Relating Semantic Models for the Object Calculus (original) (raw)
Related papers
Relating Semantic Models for the Object Calculus: Preliminary Report
1997
Abadi and Cardelli have investigated several versions of the & -calculus, a calculus for describing central features of object-oriented programs, with particular emphasis on various type systems. In this paper we study the properties of a denotational semantics due to Abadi and Cardelli vis--vis the notion of observational congruence for the calculus Ob 1<: . In particular, we prove that the denotational semantics based on partial equivalence relations is correct with respect to observational congruence. By means of a counter-example, we argue that the denotational model is not fully abstract with respect to observational congruence. In fact, the model is able to distinguish objects that have the same behaviour in every Ob 1<: -context.
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.
Observation Equivalences for the Semantics of Inheritance
Formal Methods for Open Object-Based Distributed Systems, 1999
In the object-oriented languages, inheritance is a fundamental relation among classes, that originally indicated the is-a relation; however it has been often used for code-reuse. The integration between object-orientation and concurrency gives the possibility of using theoretical tools, such as the notions of action and state observation equivalences and preorders, developed within concurrency theories (Petri nets, CCS). In this paper we propose a semantic characterisation of two forms of inheritance in concurrent context: in particular, we propose a preorder based on action observation to give the semantics of inheritance used as is-a relation (type inheritance), and a preorder based on state observation for the semantics of inheritance as code-reuse (implementation inheritance).
A Denotational Semantics of Inheritance
This thesis develops a semantic model of inheritance and investigates its applications for the analysis and design of programming languages. Inheritance is a mechanism for incremental programming in the presence of self-reference. This interpretation of inheritance is formalized using traditional techniques of fixed-point theory, resulting in a compositional model of inheritance that is directly applicable to object-oriented languages. Novel applications of inheritance revealed by the model are illustrated to show that inheritance has wider significance beyond object-oriented class inheritance. Constraints induced by self-reference and inheritance are investigated using type theory and yield a formal characterization of abstract classes and a demonstration that the subtype relation is a direct consequence of the basic mechanism of inheritance. The model is proven equivalent to the operational semantics of inheritance embodied by the interpreters of object-oriented languages like Smalltalk. Concise descriptions of inheritance behavior in several object-oriented languages, including Smalltalk, Beta, Simula, and Flavors, are presented in a common framework that facilitates direct comparison of their features.
Two semantic models of object-oriented languages
Theoretical Aspects of Object-Oriented …, 1994
We present and compare two models of object-oriented languages. The first we call the closure model because it uses closures to encapsulate side effects on objects, and accordingly makes the operations on an object a part of that object. It is shown that this denotational framework is adequate to explain classes, instantiation, and inheritance in the style of Simula as well as Smalltalk-80. The second we call the data structure model because it mimics the implementations of data structure languages like CLU in representing objects by records of instance variables, while keeping the operations on objects separate from the objects themselves. This yields a model which is very simple, at least superficially. Both the models are presented by way of a sequence of languages, culminating in a language with Smalltalk-80-style inheritance. The mathematical relationship between them is then discussed and it is shown that the models give equivalent results. It will emerge from this discussion that more appropriate names for the two models might be the fixed-point model and the self-application model. * To appear in Gunter, C. and Mitchell, J. C. (eds) Theoretical aspects of Object-Oriented Programming, MIT Press, 1993. 1 "Smalltalk-80" is a trademark of ParcPlace Systems. We use here a language called "SmallTalk" (with different capitalization) as an abstraction of Smalltalk-80.
A denotational semantics of inheritance and its correctness
This paper presents a denotational model of inheritance. The model is based on an intuitive motivation of inheritance as a mechanism for deriving modified versions of recursive definitions. The correctness of the model is demonstrated by proving it equivalent to an operational semantics of inheritance based upon the method lookup algorithm of object-oriented languages.
Denotational Semantics for Abadi and Leino’s Logic of Objects
Lecture Notes in Computer Science, 2005
Abadi-Leino Logic is a Hoare-calculus style logic for a simple imperative and object-based language where every object comes with its own method suite. Consequently, methods need to reside in the store ("higher-order store"). We present a new soundness proof for this logic using a denotational semantics where object specifications are recursive predicates on the domain of objects. Our semantics reveals which of the limitations of Abadi and Leino's logic are deliberate design decisions and which follow from the use of higher-order store. We discuss the implications for the development of other, more expressive, program logics. Supported by the EPSRC under grant GR/R65190/01, "Programming Logics for Denotations of Recursive Objects".
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.
A Semantics of Object-Oriented Sets
1994
An account is given of extending the well-known object-oriented type system of Luca Cardelli with set constructs and logical formalism. The system is based on typed -notation, employing a subtyping relation and a powertype construct. Sets in this system are value expressions and are typed as some powertype. Sets are built up in a very general manner; in particular, sets can be described by ( rst-order) predicates. The resulting system, called LPT, is statically typecheckable (in a context of multiple inheritance) and is provided with a set-theoretic semantics. LPT can be used as a mathematical foundation for an object-oriented data model employing sets and constraints.