Generating attribute grammar-based bidirectional transformations from rewrite rules

Higher order attribute grammars provide a convenient means for specifying uni-directional transformations, but they provide no direct support for bidirectional transformations. In this paper we show how rewrite rules (with non-linear right hand sides) that specify a forward/get transformation can be inverted to specify a partial backward/put transformation. These inverted rewrite rules can then be extended with additional rules based on characteristics of the source language grammar and forward transformations to create, under certain circumstances, a total backward transformation. Finally, these rules are used to generate attribute grammar specifications implementing both transformations.

[1]  Emma Söderberg Contributions to the Construction of Extensible Semantic Editors , 2012 .

[2]  S. Doaitse Swierstra,et al.  UUAG meets AspectAG: how to make attribute grammars first-class , 2012, LDTA.

[3]  Daniel M. Yellin Attribute Grammar Inversion and Source-to-source Translation , 1988, Lecture Notes in Computer Science.

[4]  S. Doaitse Swierstra,et al.  Linear, bounded, functional pretty-printing , 2009, J. Funct. Program..

[5]  Eric Van Wyk,et al.  Building Extensible Specifications and Implementations of Promela with AbleP , 2011, SPIN.

[6]  David F. Martin,et al.  An order-algebraic definition of knuthian semantics , 1979, Mathematical systems theory.

[7]  S. Doaitse Swierstra,et al.  Iterative type inference with attribute grammars , 2010, GPCE '10.

[8]  Frédéric Jouault,et al.  Transforming Models with ATL , 2005, MoDELS.

[9]  Thomas W. Reps,et al.  The synthesizer generator , 1984, SDE 1.

[10]  Kazutaka Matsuda,et al.  Bidirectionalization transformation based on automatic derivation of view complement functions , 2007, ICFP '07.

[11]  Benjamin C. Pierce,et al.  Relational lenses: a language for updatable views , 2006, PODS '06.

[12]  Anthony M. Sloane,et al.  A Pure Object-Oriented Embedding of Attribute Grammars , 2010, LDTA.

[13]  Michael Lawley,et al.  Forensic debugging of model transformations , 2007, MODELS'07.

[14]  Thomas Reps,et al.  The synthesizer generator reference manual (3. ed.) , 1989 .

[15]  Bruno Courcelle,et al.  Attribute Grammars and Recursive Program Schemes I , 1982, Theoretical Computer Science.

[16]  Bruno Courcelle,et al.  Attribute Grammars and Recursive Program Schemes II , 1982, Theor. Comput. Sci..

[17]  Görel Hedin,et al.  Circular Higher-Order Reference Attribute Grammars , 2013, SLE.

[18]  Eric Van Wyk,et al.  Attribute Grammar-Based Language Extensions for Java , 2007, ECOOP.

[19]  Krzysztof Czarnecki,et al.  Feature-based survey of model transformation approaches , 2006, IBM Syst. J..

[20]  João Saraiva,et al.  Lrc - A Generator for Incremental Language-Oriented Tools , 1998, International Conference on Compiler Construction.

[21]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[22]  Benjamin C. Pierce,et al.  Combinators for bi-directional tree transformations: a linguistic approach to the view update problem , 2005, POPL '05.

[23]  Torbjörn Ekman,et al.  The jastadd extensible java compiler , 2007, OOPSLA.

[24]  João Saraiva,et al.  Zipper-Based Attribute Grammars and Their Extensions , 2013, SBLP.

[25]  Eric Van Wyk,et al.  Silver: An extensible attribute grammar system , 2008, Sci. Comput. Program..

[26]  João Saraiva,et al.  Designing and Implementing Combinator Languages , 1998, Advanced Functional Programming.

[27]  Shin-Cheng Mu,et al.  A programmable editor for developing structured documents based on bidirectional transformations , 2004, PEPM '04.

[28]  Ralf Lämmel,et al.  Bidirectional Transformations: A Cross-Discipline Perspective , 2009, ICMT@TOOLS.

[29]  Perdita Stevens,et al.  A Landscape of Bidirectional Model Transformations , 2007, GTTSE.

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

[31]  Görel Hedin,et al.  Reference Attributed Grammars , 2000, Informatica.