We discuss denotational semantics of object-oriented languages, using the concept of closure widely used in (semi) functional programming to encapsulate side effects. It is shown that this denotational framework is adequate to explain classes, instantiation, and inheritance in the style of Sirnula as well as SMALLTALK-80. This framework is then compared with that of Kamin, in his recent denotational definition of SMALLTALK-80, and the implications of the differences between the two approaches are discussed.
Where a licence is displayed above, please note the terms and conditions of the licence govern your use of this document.When citing, please reference the published version.
Take down policyWhile the University of Birmingham exercises care and attention in making items available there are rare occasions when an item has been uploaded in error or has been deemed to be commercially or otherwise sensitive.
We propose a theoretical framework for adding assignments and dynamic data to functional languages without violating their semantic properties. This differs from semi-functional languages like Scheme and ML in that values of expressions remain static and side-effect-free. A new form of abstraction called observer is designed to encapsulate state-oriented computation from the remaining purely applicative computation. The type system ensures that observers are combined linearly, allowing an implementation in terms of a global store. The utility of this extension is in manipulating shared dynamic data embedded in data structures. Evaluation of well-typed programs is Church-Rosser. Thus, programs produce the same results whether an eager or lazy evaluation order is used (assuming termination). A simple, sound logic permits reasoning about well-typed programs. The benefits of this work include greater expressive power and efficiency (compared to applicative languages), while retaining simplicity of reasoning.
Abstract. Semantics of imperative programming languages is traditionally described in terms of functions on global states. We propose here a novel approach based on a notion of objects and characterize them in terms of their observable behavior. States are regarded as part of the internal structure of objects and play no rote in the observable behavior. It is shown that this leads to considerable accuracy in the semantic modelling of locality and single-throadedness properties of objects.
An equational approach to the synthesis of functional and logic program is taken. In this context, the synthesis task involves nding executableequationssuch that the given speci cation holds in their standard model. Hence, to synthesize such programs, induction is necessary. W e formulate procedures for inductive p r o o f , a s w ell as for program synthesis, using the framework of \ordered rewriting". We also propose heuristics for generalizing from a sequence of equational consequences. These heuristics handle cases where the deductive process alone is inadequate for coming up with a program.
Abstract. While the semantics of local variables in programming languages is by now well-understood, the semantics of pointer-addressed heap variables is still an outstanding issue. In particular, the commonly assumed relational reasoning principles for data representations have not been validated in a semantic model of heap variables. In this paper, we define a parametricity semantics for a Pascal-like language with pointers and heap variables which gives such reasoning principles. It is found that the correspondences between data representations are not simply relations between states, but more intricate correspondences that also need to keep track of visible locations whose pointers can be stored and leaked.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.