11 research outputs found

    Relations as a program development language

    Get PDF

    Theory and Practice of Action Semantics

    Get PDF
    Action Semantics is a framework for the formal descriptionof programming languages. Its main advantage over other frameworksis pragmatic: action-semantic descriptions (ASDs) scale up smoothly torealistic programming languages. This is due to the inherent extensibilityand modifiability of ASDs, ensuring that extensions and changes tothe described language require only proportionate changes in its description.(In denotational or operational semantics, adding an unforeseenconstruct to a language may require a reformulation of the entire description.)After sketching the background for the development of action semantics,we summarize the main ideas of the framework, and provide a simpleillustrative example of an ASD. We identify which features of ASDsare crucial for good pragmatics. Then we explain the foundations ofaction semantics, and survey recent advances in its theory and practicalapplications. Finally, we assess the prospects for further developmentand use of action semantics.The action semantics framework was initially developed at the Universityof Aarhus by the present author, in collaboration with David Watt(University of Glasgow). Groups and individuals scattered around fivecontinents have since contributed to its theory and practice

    An Introduction to Action Semantics

    Get PDF
    Formal semantics is a topic of major importance in the study of programming languages. Its applications include documenting language design, establishing standards for implementations, reasoning about programs, and generating compilers. These notes introduce action semantics, a recently-developed framework for formal semantics. The primary aim of action semantics is to allow useful semantic descriptions of realistic programming languages

    Provably Correct Compiler Generation

    Get PDF
    We have designed, implemented, and proved the correctness of a compiler generator that accepts action semantic descriptions of imperative programming languages. We have used it to generate compilers for both a toy language and a non-trivial subset of Ada. The generated compilers emit absolute code for an abstract RISC machine language that is assembled into code for the SPARC and the HP Precision Architecture. The generated code is an order of magnitude better than that produced by compilers generated by the classical systems of Mosses, Paulson, and Wand. Our machine language needs no run time type-checking and is thus more realistic than those considered in previous compiler proofs. We use solely algebraic specifications; proofs are given in the initiaI model. The use of action semantics makes the processable language specifications easy to read and pleasant to work with. We view our compiler generator as a promising first step towards user-friendly and automatic generation of realistic and provably correct compilers

    Action semantics of unified modeling language

    Get PDF
    The Uni ed Modeling Language or UML, as a visual and general purpose modeling language, has been around for more than a decade, gaining increasingly wide application and becoming the de-facto industrial standard for modeling software systems. However, the dynamic semantics of UML behaviours are only described in natural languages. Speci cation in natural languages inevitably involves vagueness, lacks reasonability and discourages mechanical language implementation. Such semi-formality of UML causes wide concern for researchers, including us. The formal semantics of UML demands more readability and extensibility due to its fast evolution and a wider range of users. Therefore we adopt Action Semantics (AS), mainly created by Peter Mosses, to formalize the dynamic semantics of UML, because AS can satisfy these needs advantageously compared to other frameworks. Instead of de ning UML directly, we design an action language, called ALx, and use it as the intermediary between a typical executable UML and its action semantics. ALx is highly heterogeneous, combining the features of Object Oriented Programming Languages, Object Query Languages, Model Description Languages and more complex behaviours like state machines. Adopting AS to formalize such a heterogeneous language is in turn of signi cance in exploring the adequacy and applicability of AS. In order to give assurance of the validity of the action semantics of ALx, a prototype ALx-to-Java translator is implemented, underpinned by our formal semantic description of the action language and using the Model Driven Approach (MDA). We argue that MDA is a feasible way of implementing this source-to-source language translator because the cornerstone of MDA, UML, is adequate to specify the static aspect of programming languages, and MDA provides executable transformation languages to model mapping rules between languages. We also construct a translator using a commonly-used conventional approach, in i which a tool is employed to generate the lexical scanner and the parser, and then other components including the type checker, symbol table constructor, intermediate representation producer and code generator, are coded manually. Then we compare the conventional approach with the MDA. The result shows that MDA has advantages over the conventional method in the aspect of code quality but is inferior to the latter in terms of system performance

    Verification in ASL and related specification languages

    Get PDF

    Type systems for modular programs and specifications

    Get PDF

    Dynamic Order-Sorted Term-Rewriting Systems

    Get PDF
    This thesis considers the problems of order-sorted equational logic and its operational interpretation, order-sorted term rewriting

    Action Notation Transformations

    Get PDF
    ACTRESS is a semantics-directed compiler generation system based on action semantics. Its aim is to generate compilers whose performance is closer to hand-written compilers than the ones generated by other semantics-directed compiler generators. ACTRESS generates a compiler for a language based solely on the language's action semantic description. We describe the process by which this is achieved. A compiler for action notation, the formal notation used in action semantic descriptions, is the core of the generated compilers. We specify and implement a code generator for the action notation compiler. We also present the design and implementation of an action notation interpreter. A conventional hand-written compiler eliminates, whenever possible, references to identifiers at compile time. Some storage allocation is often performed at compile-time too. We can see both steps as transformations whose main objective is to improve the quality of the object code. The compiler writer, based on his knowledge of properties of the source language, implements these "transformations" as best as he can. In the context of ACTRESS, where action notation can be seen as the intermediate language of every generated compiler, we adopt a similar approach. We introduce a set of transformations, called action transformations, which allow the systematic and automatic elimination of bindings in action notation for statically scoped languages. They also allocate storage statically whenever possible. We formalise and implement these action transformations. The transformations may be included in generated compilers. We show that this inclusion improves the quality of the object code generated by ACTRESS' compilers. In general, action transformations are a way to do some static processing of actions. Transforming actions corresponds to partially performing them, leaving less work to be done at performance time. Thus, transformed actions are more efficient. Binding elimination exposes the static and dynamic nature of bindings in action notation. This relates with the binding discipline one can find in a programming language. We study the binding discipline of action notation and we state a condition which identifies a statically scoped action. We extend this condition to a sufficient condition on the action semantics of a language which tells if the language is statically scoped. This condition can be implemented as an analysis to be performed by ACTRESS, at compiler generation time, to decide which transformations will be included in a generated compiler for the language. Finally, we list possibilities for improvements and potential areas for further research

    Unified Algebras and Modules

    No full text
    This paper concerns the algebraic specification of abstract data types. It introduces and motivates the recently-developed framework of unified algebras, and provides a practical notation for their modular specification. It also compares unified algebras with the well known framework of order-sorted algebras, with underlies of OBJ specification language
    corecore