Denotational Semantics for Abadi and Leino’s Logic of Objects (original) (raw)
Related papers
Denotational semantics for a program logic of objects
Mathematical Structures in Computer Science, 2006
The object-calculus is an imperative and object-based programming language where every object comes equipped with its own method suite. Consequently, methods need to reside in the store ("higher-order store") which complicates the semantics. Abadi and Leino defined a program logic for this language enriching object types by method specifications. We present a new soundness proof for their logic using Denotational Semantics. It turns out that denotations of store specifications are predicates defined by mixed-variant recursion. A benefit of our approach is that derivability and validity can be kept distinct. Moreover, it is revealed which of the limitations of Abadi and Leino's logic are incidental design decisions and which follow inherently from the use of higher-order store. We discuss the implications for the development of other, more expressive, program logics.
Reasoning on an imperative object-based calculus in Higher Order Abstract Syntax
Proceedings of the 2003 workshop on Mechanized reasoning about languages with variable binding - MERLIN '03, 2003
We illustrate the benefits of using Natural Deduction in combination with weak Higher-Order Abstract Syntax for formalizing an object-based calculus with objects, cloning, method-update, types with subtyping, and side-effects, in inductive type theories such as the Calculus of Inductive Constructions. This setting suggests a clean and compact formalization of the syntax and semantics of the calculus, with an efficient management of method closures. Using our formalization and the Theory of Contexts, we can prove formally the Subject Reduction Theorem in the proof assistant Coq, with a relatively small overhead.
About Hoare Logics for Higher-Order Store
Automata, Languages and Programming, 2005
We present a Hoare logic for a simple imperative whilelanguage with stored commands, ie. stored parameterless procedures. Stores that may contain procedures are called higher-order. Soundness of our logic is established by using denotational rather than operational semantics. The former is employed to elegantly account for an inherent difficulty of higher-order store, namely that assertions necessarily describe recursive predicates on a recursive domain. In order to obtain proof rules for mutually recursive procedures, assertions have to explicitly refer to the code of the procedures. ⋆ Both authors have been partially supported by APPSEM II (Applied Semantics), a thematic network funded by the IST programme of the European Union, IST-2001-38957. ⋆⋆ The first author has been partially supported by the EPSRC under grant GR/R65190/01, "Programming Logics for Denotations of Recursive Objects".
F-logic: a higher-order language for reasoning about objects, inheritance, and scheme
ACM SIGMOD Record, 1989
We propose a database logic which accounts in a clean declarative fashion for most of the "object-oriented" features such as object identity, complex objects, inheritance, methods, etc. Furthermore, database schema is part of the object language, which allows the user to browse schema and data using the same declarative formalism. The proposed logic has a formal semantics and a sound and complete resolution-based proof procedure, which makes it also computationally attractive.
A relational logic for higher-order programs
Proceedings of the ACM on Programming Languages, 2017
Relational program verification is a variant of program verification where one can reason about two programs and as a special case about two executions of a single program on different inputs. Relational program verification can be used for reasoning about a broad range of properties, including equivalence and refinement, and specialized notions such as continuity, information flow security or relative cost. In a higher-order setting, relational program verification can be achieved using relational refinement type systems, a form of refinement types where assertions have a relational interpretation. Relational refinement type systems excel at relating structurally equivalent terms but provide limited support for relating terms with very different structures. We present a logic, called Relational Higher Order Logic (RHOL), for proving relational properties of a simply typed λ-calculus with inductive types and recursive definitions. RHOL retains the type-directed flavour of relational...
rCOS: A refinement calculus of object systems
Theoretical Computer Science, 2006
This article presents a mathematical characterization of object-oriented concepts by defining an observation-oriented semantics for a relational objectoriented language with a rich variety of features including subtypes, visibility, inheritance, type casting, dynamic binding and polymorphism. The language is expressive enough for the specification of object-oriented designs and programs. We also propose a calculus based on this model to support both structural and behavioral refinement of object-oriented designs. We take the approach of the development of the design calculus based on the standard predicate logic in Hoare and He's Unifying Theories of Programming (UTP). We also consider object reference in terms of object identity as values and mutually dependent methods.
The axiomatic semantics of programs based on Hoare's logic
Acta Informatica, 1984
This paper is about the Floyd-Hoare Principle which says that the semantics of a programming language can be formally specified by axioms and rules of inference for proving the correctness of programs written in the language. We study the simple language WP of whileprograms and Hoare's system for partial correctness and we calculate the relational semantics of WP as this is determined by Hoare's logic. This calculation is possible by using relational semantics to build a completeness theorem for the logic. The resulting semantics AX we call the axiomatic relational semantics for WP. This AX is not the conventional semantics for WP: it need not be effectively computable or deterministic, for example. A large number of elegant properties of AX are proved and the Floyd-Hoare Principle is reconsidered.
Mechanized Semantics of Simple Imperative Programming Constructs
In this paper a uniform formalization in PVS of various kinds of semantics of imperative programming language constructs is presented. Based on a comprehensive development of xed point theory, the denotational semantics of elementary constructs of imperative programming languages are de ned as state transformers. These state transformers induce corresponding predicate transformers, providing a means to formally derive both a weakest liberal precondition semantics and an axiomatic semantics in the style of Hoare. Moreover, algebraic laws as used in re nement calculus proofs are validated at the level of predicate transformers. Simple reformulations of the state transformer semantics yield both a continuation-style semantics and rules similar to those used in Structural Operational Semantics. This formalization provides the foundations on which formal speci cation of programming languages and mechanical veri cation of compilation steps are carried out within the Veri x project. This research has been funded in part by the Deutsche Forschungsgemeinschaft (DFG) under project \Veri x "
Logical Foundations for Declarative Object-oriented Programming
1999
We present a formalism for reasoning about declarative object-oriented programs. Classes are represented as first-order theories that contain logic programs as methods. Inheritance, genericity and related concepts are represented by operations on such theories which preserve the consistency of these theories as well as the correctness of the programs specified by their axioms. Our approach provides a logical basis for the construction of correct and reusable programming systems. Issues: Our main motivation is formal program development, i.e. developing programs that are formally correct wrt their formal specifications. Our goal in this paper is to provide the necessary logical foundations for formal program development in an object-oriented paradigm which has a suitable (declarative) semantics for this purpose. Object-oriented programming is widely used for software development in industry because it is seen to meet the key requirements of modularity, reusability, and reliability. However, conventional object-oriented programming (e.g. [12]) is based on the imperative programming paradigm, and does not have a declarative semantics. This means that formal reasoning about programs is not at all straightforward, since modularity and reusability are characterised at code level. Instead, invariants, pre and postconditions have to be inserted into the code and checked if some level of reliability is to be guaranteed. Declarative object-oriented programming languages have been proposed, by both the functional and logic programming communities. Examples include TOOPL [3], L&O [11], and Prolog++ [15]. These languages, though declarative in their methods, usually lack a suitable semantics for reasoning about formal object-oriented program development. That is, in these languages, classes are theories (with initial semantics) which are assumed to be correct, i.e. they are used as executable specifications. Thus in these languages it is not meaningful to talk about correctness wrt general (non-executable) specifications. Main Results: Our main contribution is to define classes and methods declaratively, such that classes are full first-order theories (with isoinitial semantics), methods are logic programs that are synthesised from their specifications (in classes), and under our chosen (isoinitial) semantics, we can reason about the correctness, and correct reuse of both classes and their programs. Both our classes and programs may be open, i.e. they may have parameters.