15 research outputs found
Semantic Predicate Types and Approximation for Class-based Object Oriented Programming
We apply the principles of the intersection type discipline to the study of
class-based object oriented programs and; our work follows from a similar
approach (in the context of Abadi and Cardelli's Varsigma-object calculus)
taken by van Bakel and de'Liguoro. We define an extension of Featherweight
Java, FJc and present a predicate system which we show to be sound and
expressive. We also show that our system provides a semantic underpinning for
the object oriented paradigm by generalising the concept of approximant from
the Lambda Calculus and demonstrating an approximation result: all expressions
to which we can assign a predicate have an approximant that satisfies the same
predicate. Crucial to this result is the notion of predicate language, which
associates a family of predicates with a class.Comment: Proceedings of 11th Workshop on Formal Techniques for Java-like
Programs (FTfJP'09), Genova, Italy, July 6 200
Rigorous concurrency analysis of multithreaded programs
technical reportThis paper explores the practicality of conducting program analysis for multithreaded software using constraint solv- ing. By precisely defining the underlying memory consis- tency rules in addition to the intra-thread program seman- tics, our approach orders a unique advantage for program ver- ification | it provides an accurate and exhaustive coverage of all thread interleavings for any given memory model. We demonstrate how this can be achieved by formalizing sequen- tial consistency for a source language that supports control branches and a monitor-style mutual exclusion mechanism. We then discuss how to formulate programmer expectations as constraints and propose three concrete applications of this approach: execution validation, race detection, and atom- icity analysis. Finally, we describe the implementation of a formal analysis tool using constraint logic programming, with promising initial results for reasoning about small but non-trivial concurrent programs
User-definable resource usage bounds analysis for java bytecode
Automatic cost analysis of programs has been traditionally concentrated on a reduced number of resources such as execution steps, time, or memory. However, the increasing relevance of analysis applications such as static debugging and/or certiflcation of user-level properties (including for mobile code) makes it interesting to develop analyses for resource notions that are actually application-dependent. This may include, for example, bytes sent or received by an application, number of files left open, number of SMSs sent or received, number of accesses to a datábase, money spent, energy consumption, etc. We present a fully automated analysis for inferring upper bounds on the usage that a Java bytecode program makes of a set of application programmer-deflnable resources. In our context, a resource is defined by programmer-provided annotations which state the basic consumption that certain program elements make of that resource. From these deflnitions our analysis derives functions which return an upper bound on the usage that the whole program (and individual blocks) make of that resource for any given set of input data sizes. The analysis proposed is independent of the particular resource. We also present some experimental results from a prototype implementation of the approach covering a signiflcant set of interesting resources
Recommended from our members
Pointer Analysis in the Presence of Dynamic Class Loading ; CU-CS-966-03
OwnKit: Ownership Inference for Java
Object ownership allows us to statically control run-time aliasing in order to provide
a strong notion of object encapsulation. Unfortunately in order to use ownership,
code must first be annotated with extra type information. This imposes
a heavy burden on the programmer, and has contributed to the slow adoption
of ownership. Ownership inference is the process of reconstructing ownership
type information based on the existing ownership patterns in code. This thesis
presents OwnKit—an automatic ownership inference tool for Java. OwnKit conducts
inference in a modular way: by only considering a single class at the time.
The modularity makes our algorithm highly scalable in both time and memory
usage
Flow-sensitive, context-sensitive, and object-sensitive information flow control based on program dependance graphs
Information flow control (IFC) checks whether a program can leak secret data to public ports, or whether critical computations can be influenced from outside. But many IFC analyses are imprecise, as they are flow-insensitive, context-insensitive, or object-insensitive; resulting in false alarms. We argue that IFC must better exploit modern program analysis technology, and present an approach based on pro-gram dependence graphs (PDG). PDGs have been developed over the last 20 years as a standard device to represent information flow in a program, and today can handle realistic programs. In particular, our dependence graph generator for full Java bytecode is used as the basis for an IFC implementation which is more precise and needs less annotations than traditional approaches. We explain PDGs for sequential and multi-threaded pro-grams, and explain precision gains due to flow-, context-, and object-sensitivity. We then augment PDGs with a lattice of security levels and introduce the flow equations for IFC. We describe algorithms for flow computation in detail and prove their correctness. We then extend flow equations to handle declassification, and prove that our algorithm respects monotonicity of release. Finally, examples demonstrate that our implementation can check realistic sequential programs in full Java bytecode
Deriving Escape Analysis by Abstract Interpretation
Escape analysis of object-oriented languages approximates the set of objects which do not escape from a given context. If we take a method as context, the non-escaping objects can be allocated on its activation stack; if we take a thread, Java synchronisation locks on such objects are not needed. In this paper, we formalise a basic escape domain E as an abstract interpretation of concrete states, which we then refine into an abstract domain ER which is more concrete than E and, hence, leads to a more precise escape analysis than E. We provide optimality results for both E and ER, in the form of Galois insertions from the concrete to the abstract domains and of optimal abstract operations. The Galois insertion property is obtained by restricting the abstract domains to those elements which do not contain garbage, by using an abstract garbage collector. Our implementation of ER is hence an implementation of a formally correct escape analyser, able to detect the stack allocatable creation points of Java (bytecode) applications