On Compiling Rewriting Logic Language Definitions into Competitive Interpreters

This paper describes a completely automated method for generating efficient and competitive interpreters from formal semantics expressed in Rewriting Logic. The semantics are compiled into OCaml code, which then acts as the interpreter for the language being defined. This automatic translation is tested on the semantics of an imperative as well as a functional language, and these generated interpreters are then benchmarked across a number of programs. In all cases the compiled interpreter is faster than directly executing the definition in a Rewriting system with improvements of several orders of magnitude.

[1]  Grigore Rosu,et al.  K: A Rewriting-Based Framework for Computations -- Preliminary version -- , 2007 .

[2]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[3]  Grigore Rosu,et al.  Runtime Verification of C Memory Safety , 2009, RV.

[4]  Peter D. Mosses,et al.  Pragmatics of Modular SOS , 2002, AMAST.

[5]  S TraianFlorin A Rewriting Logic Approach to Operational Semantics , 2010 .

[6]  Gérard Berry,et al.  The chemical abstract machine , 1989, POPL '90.

[7]  Narciso Martí-Oliet,et al.  Maude: specification and programming in rewriting logic , 2002, Theor. Comput. Sci..

[8]  Grigore Rosu,et al.  A K Definition of Scheme , 2007 .

[9]  MeseguerJosé Conditional rewriting logic as a unified model of concurrency , 1992 .

[10]  Viljem Zumer,et al.  Compiler/interpreter generator system LISA , 2000, Proceedings of the 33rd Annual Hawaii International Conference on System Sciences.

[11]  Grigore Rosu,et al.  A rewriting approach to the design and evolution of object-oriented languages , 2007, OOPSLA '07.

[12]  J. Meigs,et al.  WHO Technical Report , 1954, The Yale Journal of Biology and Medicine.

[13]  Martin Wirsing,et al.  Algebraic Specification , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[14]  Derek J. Andrews,et al.  The Formal Definition of Modula-2 and Its Associated Interpreter , 1988, VDM Europe.

[15]  G. Rosu,et al.  From Rewriting Logic Executable Semantics to Matching Logic Program Verification , 2009 .

[16]  Marcelo d'Amorim,et al.  An Equational Specification for the Scheme Language , 2005, J. Univers. Comput. Sci..

[17]  Arie van Deursen,et al.  The ASF+SDF Meta-environment: A Component-Based Language Development Environment , 2001 .

[18]  José Meseguer,et al.  A rewriting logic approach to operational semantics , 2009, Inf. Comput..

[19]  José Meseguer,et al.  Formal Analysis of Java Programs in JavaFAN , 2004, CAV.

[20]  José Meseguer,et al.  The Rewriting Logic Semantics Project , 2006, SOS@ICALP.

[21]  Arie van Deursen,et al.  The Asf+Sdf Meta-Environment: a Component-Based Language Development Environment , 2001, LDTA@ETAPS.

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

[23]  Grigore Rosu,et al.  A Rewrite Framework for Language Definitions and for Generation of Efficient Interpreters , 2006, WRLA.

[24]  Paul Klint,et al.  Compiling language definitions: the ASF+SDF compiler , 2000, TOPL.

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