26,007 research outputs found
Structural resolution for abstract compilation of object-oriented languages
We propose abstract compilation for precise static type analysis of
object-oriented languages based on coinductive logic programming. Source code
is translated to a logic program, then type-checking and inference problems
amount to queries to be solved with respect to the resulting logic program. We
exploit a coinductive semantics to deal with infinite terms and proofs produced
by recursive types and methods. Thanks to the recent notion of structural
resolution for coinductive logic programming, we are able to infer very precise
type information, including a class of irrational recursive types causing
non-termination for previously considered coinductive semantics. We also show
how to transform logic programs to make them satisfy the preconditions for the
operational semantics of structural resolution, and we prove this step does not
affect the semantics of the logic program.Comment: In Proceedings CoALP-Ty'16, arXiv:1709.0419
Synthesis of Logic Programs from Object-Oriented Formal Specifications
Early validation of requirements is crucial for the rigorous development of software. Without it, even the most formal of the methodologies will produce the wrong outcome. One successful approach, popularised by some of the so-called lightweight formal methods, consists in generating (finite, small) models of the specifications. Another possibility is to build a running prototype from those specifications. In this paper we show how to obtain executable prototypes from formal specifications written in an object oriented notation by translating them into logic programs. This has some advantages over other lightweight methodologies. For instance, we recover the possibility of dealing with recursive data types as specifications that use them often lack finite models
An Object-oriented Formal Notation: Executable Specifications in Clay = Una notación formal orientada a objetos : especificaciones ejecutables con Clay
This thesis presents Clay, a stateless object-oriented formal notation. Clay is class-based, has a nominal type system that integrates algebraic types and inheritance, has equality, method overriding with Scandinavian semantics, dynamic binding, and a rather permissive overloading.
The type system of Clay is used to reject illegal specifications, and also to help guide the translation schemes that define the Clay semantics and the generation of executable prototypes.
Clay has a first-order semantics that gives an interpretation in first-order logic of the main object-oriented constructions: inheritance, defining classes by cases, overloading, dynamic binding and static equality. Furthermore, the use of the concrete syntax of an automatic theorem prover (Prover9/Mace4) has allowed mechanising both, the Clay's meta-theory and specifications. For example, some of the theorems about Clay in this thesis have been proved semi-automatically.
The thesis presents also a compilation scheme of Clay specifications into Prolog programs. Code can be generated from implicit specifications, even recursive ones, something hard to find in other tools. My implementation takes advantage of various logic programming techniques in order to achieve reasonable efficiency: constraints, constructive negation, Lloyd-Topor transforms, incremental deepening search, etc.
A Clay compiler is also contributed, a tool that goes beyond the mathematical presentation of the translations into first-order logic and the synthesis of logic programs. I have built a compiler that supports syntax analysis of modular Clay specifications, type checking, translation of Clay specifications into first-order theories in Prover9/Mace4, and synthesis of executable Prolog prototypes
Fifty years of Hoare's Logic
We present a history of Hoare's logic.Comment: 79 pages. To appear in Formal Aspects of Computin
An efficient, parametric fixpoint algorithm for analysis of java bytecode
Abstract interpretation has been widely used for the analysis of object-oriented languages and, in particular, Java source and bytecode. However, while most existing work deals with the problem of flnding expressive abstract domains that track accurately the characteristics of a particular concrete property, the underlying flxpoint algorithms have received comparatively less attention. In fact, many existing (abstract interpretation based—) flxpoint algorithms rely on relatively inefHcient techniques for solving inter-procedural caligraphs or are speciflc and tied to particular analyses. We also argüe that the design of an efficient fixpoint algorithm is pivotal to supporting the analysis of large programs. In this paper we introduce a novel algorithm for analysis of Java bytecode which includes a number of optimizations in order to reduce the number of iterations. The algorithm is parametric -in the sense that it is independent of the abstract domain used and it can be applied to different domains as "plug-ins"-, multivariant, and flow-sensitive. Also, is based on a program transformation, prior to the analysis, that results in a highly uniform representation of all the features in the language and therefore simplifies analysis. Detailed descriptions of decompilation solutions are given and discussed with an example. We also provide some performance data from a preliminary implementation of the analysis
A Step-indexed Semantics of Imperative Objects
Step-indexed semantic interpretations of types were proposed as an
alternative to purely syntactic proofs of type safety using subject reduction.
The types are interpreted as sets of values indexed by the number of
computation steps for which these values are guaranteed to behave like proper
elements of the type. Building on work by Ahmed, Appel and others, we introduce
a step-indexed semantics for the imperative object calculus of Abadi and
Cardelli. Providing a semantic account of this calculus using more
`traditional', domain-theoretic approaches has proved challenging due to the
combination of dynamically allocated objects, higher-order store, and an
expressive type system. Here we show that, using step-indexing, one can
interpret a rich type discipline with object types, subtyping, recursive and
bounded quantified types in the presence of state
PLACES'10: The 3rd Workshop on Programmng Language Approaches to concurrency and Communication-Centric Software
Paphos, Cyprus. March 201
- …