Title :
Formal Semantics Based Translator Generation and Tool Development in Practice
Author :
Fritzson, Peter ; Pop, Adrian ; Broman, David ; Aronsson, Peter
Author_Institution :
Dept. of Comput. & Inf. Sci., Linkoping Univ., Linkoping
Abstract :
In this paper we report on a long-term research effort to develop and use efficient language implementation generators in practice. The generator is applied to a number of different languages, some of which are used for projects in industry. The used formal specification style is operational semantics, primarily in the form called natural semantics, represented and supported by a meta-language and tool called the relational meta language (RML), which can generate efficient implementations in C, on par with hand-implemented code. Generating implementations from formal specifications are assumed to give advantages such as: high level descriptions, higher degree of correctness, and consistency between specification and implementation. To what extent can this be realized in practice? Does it scale to large language implementations? To answer some of these questions we have developed specifications of a range of languages: imperative, functional, object-oriented (Java), and equation-based (Modelica). The size of specifications range from half a page to large specifications of 60 000 lines. It turns out to be possible to generate efficient compilers, also for large languages. However, the performance of the generator tool and the user support of the development environment become increasingly important for large specifications. To satisfy such user needs the speed of the generator was increased a factor of ten to reduce turn-around time, and an Eclipse plug-in including a debugger were developed. For very large specifications, the structuring and modularity of the specification itself also become essential for performance and maintainability.
Keywords :
Java; formal specification; program compilers; program interpreters; specification languages; Eclipse plug-in; Java; formal specification; generator tool; high level descriptions; natural semantics; object-oriented programming; operational semantics; program compiler; relational meta language; translator generation; Computer languages; Equations; Formal specifications; Industrial relations; Information science; Java; Object oriented modeling; Production; Program processors; Software engineering; Compiler; Generation; Semantics; Specification; Translator;
Conference_Titel :
Software Engineering Conference, 2009. ASWEC '09. Australian
Conference_Location :
Gold Coast, QLD
Print_ISBN :
978-0-7695-3599-9
DOI :
10.1109/ASWEC.2009.46