Prototyping realistic programming languages based on formal specifications

Abstract. The specification of realistic programming languages is difficult and expensive. One approach to make language specification more attractive is the development of techniques and systems for the generation of language–specific software from specifications. To contribute to this approach, a tool–based framework with the following features is presented: It supports new techniques to specify more language aspects in a static fashion. This improves the efficiency of generated software. It provides powerful interfaces to generated software components. This facilitates the use of these components as parts of language–specific software. It has a rather simple formal semantics. In the framework, static semantics is defined by a very general attribution technique enabling e.g. the specification of flow graphs. The dynamic semantics is defined by evolving algebra rules, a technique that has been successfully applied to realistic programming languages.After providing the formal background of the framework, an object–oriented programming language is specified to illustrate the central specification features. In particular, it is shown how parallelism can be handled. The relationship to attribute grammar extensions is discussed using a non-trivial compiler problem. Finally, the paper describes new techniques for implementing the framework and reports on experiences made so far with the implemented system.

[1]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[2]  Takuya Katayama,et al.  Translation of attribute grammars into procedures , 1984, TOPL.

[3]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[4]  Mikael Pettersson,et al.  RML - A New Language and Implementation for Natural Semantics , 1994, PLILP.

[5]  GSrel Hedin Incremental Static-Semantic Analysis for Object-Oriented Languages Using Door Attribute Grammars , 1991, Attribute Grammars, Applications and Systems.

[6]  Arnd Poetzsch-Heffter,et al.  Deriving Partial Correctness Logics From Evolving Algebras , 1994, IFIP Congress.

[7]  Didier Parigot,et al.  Integrating Natural Semantics and Attribute Grammars : the Minotaur System , 1993 .

[8]  Yuri Gurevich,et al.  Algebraic Operational Semantics and Occam , 1990, CSL.

[9]  Gregory F. Johnson,et al.  Inductive attribute grammars: a basis for incremental program execution , 1995 .

[10]  Patrick Borras,et al.  Centaur: the system , 1988, Software Development Environments.

[11]  Robert Giegerich,et al.  A truly generative semantics-directed compiler generator , 1982, SIGPLAN '82.

[12]  Martin Jourdan An Optimal-time Recursive Evaluator for Attribute Grammars , 1984, Symposium on Programming.

[13]  Anthony M. Sloane,et al.  Eli: a complete, flexible compiler construction system , 1992, CACM.

[14]  S. Doaitse Swierstra,et al.  Higher order attribute grammars , 1989, PLDI '89.

[15]  Arnd Poetzsch-Heffter Programming Language Specification and Prototyping Using the MAX System , 1993, PLILP.

[16]  Peter Ørbæk OASIS: An Optimizing Action-Based Compiler Generator , 1994, CC.

[17]  Yuri Gurevich,et al.  The Semantics of the C Programming Language , 1992, CSL.

[18]  Yves Bertot Occurrences in debugger specifications , 1991, PLDI '91.

[19]  Gail E. Kaiser,et al.  Incremental dynamic semantics for language-based programming environments , 1989, TOPL.

[20]  Martin A. Musicante,et al.  An Action Semantics for ML Concurrency Primitives , 1994 .

[21]  Yves Bertot,et al.  Reasoning with Executable Specifications , 1995, TAPSOFT.

[22]  Arnd Poetzsch-Heffter Developing Efficient Interpreters Based on Formal Language Specifications , 1994, CC.

[23]  Yuri Gurevich,et al.  Evolving algebras 1993: Lipari guide , 1995, Specification and validation methods.

[24]  Paul Klint,et al.  A meta-environment for generating programming environments , 1989, TSEM.

[25]  Egidio Astesiano,et al.  Inductive and Operational Semantics , 1989, Formal Description of Programming Concepts.