Having multiple representations of the same instance is common in software language engineering: models can be visualised as graphs, edited as text, serialised as XML. When mappings between such representations are considered, terms “parsing” and “unparsing” are often used with incompatible meanings and varying sets of underlying assumptions. We investigate 12 classes of artefacts found in software language processing, present a case study demonstrating their implementations and state-of-the-art mappings among them, and systematically explore the technical research space of bidirectional mappings to build on top of the existing body of work and discover as of yet unused relationships.


Parsing unparsing pretty-printing model synchronisation technical space bridging bidirectional model transformation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques and Tools. Addison-Wesley (1985)Google Scholar
  2. 2.
    Hughes, J.: The Design of a Pretty-printing Library. In: AFP, pp. 53–96 (1995)Google Scholar
  3. 3.
    van den Brand, M.G.J., Visser, E.: Generation of Formatters for Context-Free Languages. ACM TOSEM 5(1), 1–41 (1996)CrossRefGoogle Scholar
  4. 4.
    Ruckert, M.: Conservative Pretty-Printing. SIGPLAN Notices 23(2), 39–44 (1996)Google Scholar
  5. 5.
  6. 6.
    de Jonge, M.: Pretty-Printing for Software Reengineering. In: ICSM. IEEE (2002)Google Scholar
  7. 7.
    van den Brand, M.G.J., Kooiker, A.T., Veerman, N.P., Vinju, J.J.: An Architecture for Context-sensitive Formatting. In: ICSM 2005 (2005)Google Scholar
  8. 8.
    Arnoldus, B., van den Brand, M., Serebrenik, A.: Less is More: Unparser-Completeness of Metalanguages for Template Engines. In: GPCE, pp. 137–146 (2011)Google Scholar
  9. 9.
    Bagge, A.H., Hasu, T.: A Pretty Good Formatting Pipeline. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 177–196. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  10. 10.
    Danielsson, N.A.: Correct-by-construction Pretty-printing. In: DTP. ACM (2013)Google Scholar
  11. 11.
    Matsuda, K., Wang, M.: FliPpr: A Prettier Invertible Printing System. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 101–120. Springer, Heidelberg (2013)Google Scholar
  12. 12.
    Stevens, P.: A Landscape of Bidirectional Model Transformations. In: Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2007. LNCS, vol. 5235, pp. 408–424. Springer, Heidelberg (2008)Google Scholar
  13. 13.
    Bohannon, A., Foster, J.N., Pierce, B.C., Pilkiewicz, A., Schmitt, A.: Boomerang: Resourceful Lenses for String Data. In: POPL 2008, pp. 407–419. ACM (2008)Google Scholar
  14. 14.
    Zaytsev, V.: The Grammar Hammer of 2012. ACM CoRR 1212.4446, 1–32 (2012)Google Scholar
  15. 15.
    Brabrand, C., Møller, A.: Dual Syntax for XML Languages. In: Bierman, G., Koch, C. (eds.) DBPL 2005. LNCS, vol. 3774, pp. 27–41. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  16. 16.
    Duregård, J., Jansson, P.: Embedded Parser Generators. In: Haskell. ACM (2011)Google Scholar
  17. 17.
    Boulton, R.: Syn: A Single Language for Specifying Abstract Syntax Trees, Lexical Analysis, Parsing and Pretty-printing. University of Cambridge (1996)Google Scholar
  18. 18.
    Rendel, T., Ostermann, K.: Invertible Syntax Descriptions: Unifying Parsing and Pretty Printing. In: Haskell 2010, pp. 1–12. ACM (2010)Google Scholar
  19. 19.
    de Jonge, M., Visser, E.: An Algorithm for Layout Preservation in Refactoring Transformations. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 40–59. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  20. 20.
    Zaytsev, V.: Case Studies in Bidirectionalisation. In: TFP 2014, pp. 51–58 (2014)Google Scholar
  21. 21.
    Bagge, A.H., Zaytsev, V.: Workshop on Open and Original Problems in Software Language Engineering. In: WCRE 2013, pp. 493–494. IEEE (2013)Google Scholar
  22. 22.
    Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View-Update Problem. ACM TOPLAS 29 (May 2007)Google Scholar
  23. 23.
    Czarnecki, K., Foster, J.N., Hu, Z., Lämmel, R., Schürr, A., Terwilliger, J.F.: Bidirectional Transformations: A Cross-Discipline Perspective. In: Paige, R.F. (ed.) ICMT 2009. LNCS, vol. 5563, pp. 260–283. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  24. 24.
    Klint, P., van der Storm, T., Vinju, J.: EASY Meta-programming with Rascal. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2009. LNCS, vol. 6491, pp. 222–289. Springer, Heidelberg (2011)Google Scholar
  25. 25.
    McCarthy, J.: The Inversion of Functions Defined by Turing Machines. In: Automata Studies, pp. 177–181 (1956)Google Scholar
  26. 26.
    Meertens, L.: Designing Constraint Maintainers for User Interaction (June 1998)Google Scholar
  27. 27.
    Richter, H.: Noncorrecting Syntax Error Recovery. ACM TOPLAS 7(3), 478–489 (1985)CrossRefzbMATHGoogle Scholar
  28. 28.
    Cox, A., Clarke, C.: Syntactic Approximation Using Iterative Lexical Analysis. In: IWPC 2003, pp. 154–163 (2003)Google Scholar
  29. 29.
    Murphy, G.C., Notkin, D.: Lightweight Lexical Source Model Extraction. ACM TOSEM 5(3), 262–292 (1996)CrossRefGoogle Scholar
  30. 30.
    Zarwin, Z., Sottet, J.S., Favre, J.M.: Natural Modeling: Retrospective and Perspectives an Anthropological Point of View. In: XM 2012, pp. 3–8. ACM (2012)Google Scholar
  31. 31.
    Johnson, S.C.: YACC—Yet Another Compiler Compiler. Computer Science Technical Report 32, AT&T Bell Laboratories (1975)Google Scholar
  32. 32.
    van der Storm, T., Cook, W.R., Loh, A.: The Design and Implementation of Object Grammars. SCP (2014)Google Scholar
  33. 33.
    Wile, D.S.: Abstract Syntax from Concrete Syntax. In: ICSE. ACM (1997)Google Scholar
  34. 34.
    van den Brand, M.G.J., Vinju, J.J.: Rewriting with Layout. In: RULE (2000)Google Scholar
  35. 35.
    Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A Language and Toolset for Program Transformation. SCP 72(1-2), 52–70 (2008)MathSciNetGoogle Scholar
  36. 36.
    Basten, H.J.S., Vinju, J.J.: Faster Ambiguity Detection by Grammar Filtering. In: LDTA (2010)Google Scholar
  37. 37.
    Erdweg, S., Rendel, T., Kästner, C., Ostermann, K.: Layout-Sensitive Generalized Parsing. In: Czarnecki, K., Hedin, G. (eds.) SLE 2012. LNCS, vol. 7745, pp. 244–263. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  38. 38.
    Salomon, D.J., Cormack, G.V.: Scannerless NSLR(1) Parsing of Programming Languages. In: PLDI 1989, pp. 170–178. ACM (1989)Google Scholar
  39. 39.
    Völter, M., Benz, S., Dietrich, C., Engelmann, B., Helander, M., Kats, L.C.L., Visser, E., Wachsmuth, G.: DSL Engineering. (2013)Google Scholar
  40. 40.
    Wang, M., Gibbons, J., Wu, N.: Incremental Updates for Efficient Bidirectional Transformations. In: ICFP 2011, pp. 392–403. ACM (2011)Google Scholar
  41. 41.
    Diskin, Z., Xiong, Y., Czarnecki, K.: From State- to Delta-Based Bidirectional Model Transformations: The Asymmetric Case. JOT 10, 1–25 (2011)CrossRefGoogle Scholar
  42. 42.
    Diskin, Z., Xiong, Y., Czarnecki, K., Ehrig, H., Hermann, F., Orejas, F.: From State- to Delta-Based Bidirectional Model Transformations: The Symmetric Case. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 304–318. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  43. 43.
    Hofmann, M., Pierce, B., Wagner, D.: Edit Lenses. In: POPL. ACM (2012)Google Scholar
  44. 44.
    de Jonge, M., Kats, L.C.L., Visser, E., Söderberg, E.: Natural and Flexible Error Recovery for Generated Modular Language Environments. ACM TOPLAS 34(4), 15:1–15:50 (2012)Google Scholar
  45. 45.
    Danvy, O.: Functional unparsing. JFP 8(6) (1998) 621–625Google Scholar
  46. 46.
    Asai, K., Kiselyov, O., Shan, C.-C.: Functional un|unparsing. Higher-Order and Symbolic Computation 24(4), 311–340 (2011)CrossRefzbMATHMathSciNetGoogle Scholar
  47. 47.
    Zaytsev, V.: Formal Foundations for Semi-parsing. In: CSMR-WCRE (2014)Google Scholar
  48. 48.
    Bézivin, J., Kurtev, I.: Model-based Technology Integration with the Technical Space Concept. In: MIS. Springer (2005)Google Scholar
  49. 49.
    Parreiras, F.S., Staab, S., Winter, A.: On Marrying Ontological and Metamodeling Technical Spaces. In: ESEC-FSE, pp. 439–448. ACM (2007)Google Scholar
  50. 50.
    Bruneliére, H., Cabot, J., Jouault, F., Madiot, F.: MoDisco: A Generic and Extensible Framework for Model Driven Reverse Engineering. In: ASE (2010)Google Scholar
  51. 51.
    Ramón, Ó.S., Cuadrado, J.S., Molina, J.G.: Model-driven Reverse Engineering of Legacy Graphical User Interfaces. In: ASE, pp. 147–150. ACM (2010)Google Scholar
  52. 52.
    Rugaber, S., Stirewalt, K.: Model-Driven Reverse Engineering. IEEE Software 21(4), 45–53 (2004)CrossRefGoogle Scholar
  53. 53.
    Diskin, Z.: Algebraic Models for Bidirectional Model Synchronization. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 21–36. Springer, Heidelberg (2008)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Vadim Zaytsev
    • 1
  • Anya Helene Bagge
    • 2
  1. 1.Universiteit van AmsterdamThe Netherlands
  2. 2.Universitetet i BergenNorway

Personalised recommendations