A Formal Rewriting Logic Semantic Definition of Scheme

This paper presents a formal definition of Scheme (based on the informal definition given in the RRS report [12]). The definition is purely equational, so it can be regarded as an algebraic denotational specification with an initial model/algebra semantics of Scheme. Moreover, it is executable, in the sense that equations can be oriented from left-to-right into rewrite rules and thus giving an operational semantics of Scheme as well; this way, an interpreter for Scheme is obtained for free by just executing the presented Scheme definition on term rewrite engines. Maude is used in this paper, but other equational engines could have been used as well. The definition in this paper is the most complete formal definition of Scheme that we are aware of and can play two important roles: as a formal definition of Scheme complementary to the informal one in the RRS report, and as a platform for experimentation with variants and extensions of Scheme, for example concurrency. This work is part of the rewriting logic semantics project, whose broad scope is to formally define languages and language features in rewriting logic, and then use the generic support provided by rewriting logic to obtain not only interpreters, but also formal analysis tools for the defined languages. keywords: Semantics, rewriting, Scheme.

[1]  G. Rosu,et al.  Computationally Equivalent Elimination of Conditions-extended abstract-Traian , 2009 .

[2]  Grigore Rosu,et al.  KOOL: An Application of Rewriting Logic to Language Prototyping and Analysis , 2007, RTA.

[3]  R. Kent Dybvig,et al.  The Scheme Programming Language , 1995 .

[4]  Peter D. Mosses,et al.  Modular structural operational semantics , 2004, J. Log. Algebraic Methods Program..

[5]  Grigore Rosu K: a Rewrite-based Framework for Modular Language Design, Semantics, Analysis and Implementation -Version 1- , 2005 .

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

[7]  Claude Kirchner,et al.  Formal validation of pattern matching code , 2005, Trustworthy Software.

[8]  Robert Bruce Findler,et al.  An operational semantics for R5RS Scheme , 2005 .

[9]  José Meseguer,et al.  A Rewriting Logic Approach to Operational Semantics (Extended Abstract) , 2007, Electron. Notes Theor. Comput. Sci..

[10]  Claude Kirchner,et al.  An overview of ELAN , 1998, WRLA.

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

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

[13]  José Meseguer,et al.  Conditioned Rewriting Logic as a United Model of Concurrency , 1992, Theor. Comput. Sci..

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

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

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

[17]  Grigore Rosu,et al.  On Formal Analysis of OO Languages Using Rewriting Logic: Designing for Performance , 2007, FMOODS.

[18]  José Meseguer,et al.  Rewriting logic: roadmap and bibliography , 2002, Theor. Comput. Sci..

[19]  José Meseguer,et al.  Rewriting Logic Semantics: From Language Specifications to Formal Analysis Tools , 2004, IJCAR.

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

[21]  Eelco Visser,et al.  Program Transformation with Stratego/XT: Rules, Strategies, Tools, and Systems in Stratego/XT 0.9 , 2003, Domain-Specific Program Generation.

[22]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

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