BiGUL: a formally verified core language for putback-based bidirectional programming

Putback-based bidirectional programming allows the programmer to write only one putback transformation, from which the unique corresponding forward transformation is derived for free. The logic of a putback transformation is more sophisticated than that of a forward transformation and does not always give rise to well-behaved bidirectional programs; this calls for more robust language design to support development of well-behaved putback transformations. In this paper, we design and implement a concise core language BiGUL for putback-based bidirectional programming to serve as a foundation for higher-level putback-based languages. BiGUL is completely formally verified in the dependently typed programming language Agda to guarantee that any putback transformation written in BiGUL is well-behaved.

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

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

[3]  Benjamin C. Pierce,et al.  Matching lenses: alignment and view update , 2010, ICFP '10.

[4]  Andres Löh,et al.  Formalizing Semantic Bidirectionalization with Dependent Types , 2014, EDBT/ICDT Workshops.

[5]  Ulf Norell Interactive programming with dependent types , 2013, ICFP.

[6]  Kazutaka Matsuda,et al.  Bidirectionalizing graph transformations , 2010, ICFP '10.

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

[8]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[9]  Martin Hofmann,et al.  Symmetric lenses , 2011, POPL '11.

[10]  Zhenjiang Hu,et al.  Monadic combinators for "Putback" style bidirectional programming , 2014, PEPM '14.

[11]  James Cheney,et al.  FLUX: functional updates for XML , 2008, ICFP.

[12]  Nils Anders Danielsson,et al.  Fast and loose reasoning is morally correct , 2006, POPL '06.

[13]  Alcino Cunha,et al.  Generic Point-free Lenses , 2010, MPC.

[14]  Martin Hofmann,et al.  Edit lenses , 2012, POPL '12.

[15]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[16]  Benjamin C. Pierce,et al.  Quotient lenses , 2008, ICFP.

[17]  João Saraiva,et al.  BiYacc: Roll Your Parser and Reflective Printer into One , 2015, Bx@STAF.

[18]  U. Norell,et al.  Towards a practical programming language based on dependent type theory , 2007 .

[19]  Jeremy Gibbons,et al.  Functional Programming for Domain-Specific Languages , 2013, CEFP.

[20]  Conor McBride,et al.  Hasochism: the pleasure and pain of dependently typed haskell programming , 2013, Haskell '13.

[21]  Ulf Norell,et al.  Dependently typed programming in Agda , 2009, TLDI '09.

[22]  Thorsten Altenkirch,et al.  Generic Programming within Dependently Typed Programming , 2002, Generic Programming.

[23]  Benjamin C. Pierce,et al.  Bidirectional programming languages , 2009 .

[24]  Zhenjiang Hu,et al.  Validity Checking of Putback Transformations in Bidirectional Programming , 2014, FM.

[25]  Zhenjiang Hu,et al.  BiFluX: A Bidirectional Functional Update Language for XML , 2014, PPDP '14.

[26]  Jeremy Gibbons,et al.  Datatype-Generic Programming , 2006, Lecture Notes in Computer Science.

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

[28]  Janis Voigtländer Bidirectionalization for free! (Pearl) , 2009, POPL '09.