Dynamic Structural Operational Semantics (preliminary version) (original) (raw)
Related papers
Dynamic structural operational semantics
Journal of Logical and Algebraic Methods in Programming, 2019
We introduce Dynamic SOS as a framework for describing semantics of programming languages that include dynamic software upgrades, for upgrading software code during run-time. Dynamic SOS (DSOS) is built on top of the Modular SOS of P. Mosses, with an underlying category theory formalization. The idea of Dynamic SOS is to bring out the essential differences between dynamic upgrade constructs and program execution constructs. The important feature of Modular SOS (MSOS) that we exploit in DSOS is the sharp separation of the program execution code from the additional (data) structures needed at run-time. In DSOS we aim to achieve the same modularity and decoupling for dynamic software upgrades. This is partly motivated by the long term goal of having machine-checkable proofs for general results like type safety. We exemplify Dynamic SOS on two languages supporting dynamic software upgrades, namely the C-like PROTEUS, which supports updating of variables, functions, records, or types at specific program points, and CREOL, which supports dynamic class upgrades in the setting of concurrent objects. Existing type analyses for software upgrades can be done on top of DSOS too, as we illustrate for PROTEUS. As a side result we define of a general encapsulating construction on Modular SOS useful in situations where a form of encapsulation of the execution is needed. We use encapsulation in the CREOL setting of concurrent object-oriented programming with active objects and asynchronous method calls.
Modular structural operational semantics
Journal of Logic and Algebraic Programming, 2004
Using MSOS, the transition rules for each construct of a programming language can be given incrementally, once and for all, and do not need reformulation when further constructs are added to the language. MSOS thus provides an exceptionally high degree of modularity in language descriptions, removing a shortcoming of the original SOS framework.
An algebraic semantic framework for object oriented languages with concurrency (extended abstract)
Formal Aspects of Computing, 1996
This paper presents an algebraic semantics schema for object oriented languages including concurrent features. A class, the basic syntactic unit of an object oriented language, in our approach denotes a set of algebras determined by an algebraic specification. This specification describes a system of (possibly active) objects interacting via method calls. Extending other approaches, structured classes are modelled in a fully compositional way. This means that the semantic counterpart of class combinators such as inheritance and clientship are specification combinators. A model of records with sharing allows us to describe typical object oriented features like object sharing, inheritance polymorphism and dynamic binding. For modelling the dynamic behaviour of objects, we rely on an algebraic description of labelled transition systems.
An Open System Operational Semantics for an Object-Oriented and Component-Based Language
Electronic Notes in Theoretical Computer Science, 2008
Object orientation and component-based development have both proven useful for the elaboration of open distributed systems. These paradigms are offered by the Creol language. Creol objects are concurrent, each with its own virtual processor and internal process control, and communicate using asynchronous (non-blocking) method calls. This provides the efficiency of message passing systems, while keeping the structuring benefits of methods and object-oriented programming. Conditional processor release points provide a high-level synchronization mechanism based on passive waiting that allows us to combine active and reactive behavior. A Creol component can be a single (concurrent) object or a collection of objects, together with a number of interfaces, and cointerfaces, defining the provided and required interaction and semantic behavior. Creol's semantics is defined formally using operational semantics and Hoare logic. An operational semantics lets us simulate an entire system, where all components are known in advance; in contrast, Hoare logic, together with class invariants and communication histories, lets us reason locally about a method body, without needing access to the implementations of the other classes. To bridge the gap between these two semantics, we introduce a history-based operational semantics for open systems. This new semantics can be used as an intermediate step for proving that Creol's Hoare logic is sound and complete with respect to the language's operational semantics. The approach can easily be adapted to other component-based languages where communication is done by message passing or by method interaction.
An abstract dynamic semantics for C
1997
This report is a presentation of a formal semantics for the C programming language. The semantics has been defined operationally in a structured semantics style and covers the bulk of the core of the language. The semantics has been developed in a theorem prover (HOL), where some expected consequences of the language definition have been proved.
A Representation-Independent Behavioral Semantics for Object-Oriented Components
Lecture Notes in Computer Science, 2007
Behavioral semantics abstracts from implementation details and allows to describe the behavior of software components in a representation-independent way. In this paper, we develop a formal behavioral semantics for class-based object-oriented languages with aliasing, subclassing, and dynamic dispatch. The code of an object-oriented component consists of a class and the classes used by it. A component instance is realized by a dynamically evolving set of objects with a clear boundary to the environment. The behavioral semantics is expressed in terms of the messages crossing the boundary. It is defined as an abstraction of an operational semantics based on an ownership-structured heap. We show how the semantics can be used to define substitutability in a program independent way.
A Novel Formal Semantics for a Parallel Object-Oriented Language
Proc. of XV Intl. Conf. Of the Chilean …
The Parallel Object-Oriented language POOL integrates object-oriented characteristics with synchronous communication among objects. A novel formal description of POOL is given here. The description is written using Mosses' action notation style of formal speci cation. It is then, compared with other formal speci cations of the language. Understandability, extensibility and modularity are the main features of our description of POOL.
An Approach to Algebraic Semantics of Object-Oriented Languages
2003
Studying the semantics of programming languages has a long tradition in computer science. Various approaches use various formalisms with various objectives. In the last two decades, algebraic specifications have frequently been used to study functional as well as imperative languages, and, in particular, object-orientated ones, thereby often focusing on specific aspects and concepts of this programming paradigm. In this paper, we follow this tradition and develop an algebraic semantics of a sample object-oriented language. We thereby distinguish between the object-oriented concepts of the language to structure code, and the imperative ones to implement functionality and thus the algorithmic parts of the language. Therefore, our approach encompasses two steps: first, we develop an algebraic semantics of basic object-oriented principles, into which, secondly, the semantics of the language’s imperative parts is embedded. Static semantic aspects are captured by structured algebraic spec...
Dynamic overloading with copy semantics in object-oriented languages: a formal account
Theoretical Informatics and Applications, 2009
Mainstream object-oriented languages often fail to provide complete powerful features altogether, such as, multiple inheritance, dynamic overloading and copy semantics of inheritance. In this paper we present a core object-oriented imperative language that integrates all these features in a formal framework. We define a static type system and a translation of the language into the meta-language λ object, in order to account for semantic issues and prove type safety of our proposal.
Reusable Monadic Semantics of Object Oriented Programming Languages
2000
Abstract: We specify the dynamic semantics of an object oriented programminglanguage in an incremental way. We begin with a simple language of arithmeticand boolean expressions. Then, we add functional abstractions, localdeclarations, references and assignments obtaining a functional language withimperative features. We finally add objects, classes and subclasses to obtain aprototypical object oriented language with dynamic binding.