Abstract
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.
Keywords
- Parsing
- unparsing
- pretty-printing
- model synchronisation
- technical space bridging
- bidirectional model transformation
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques and Tools. Addison-Wesley (1985)
Hughes, J.: The Design of a Pretty-printing Library. In: AFP, pp. 53–96 (1995)
van den Brand, M.G.J., Visser, E.: Generation of Formatters for Context-Free Languages. ACM TOSEM 5(1), 1–41 (1996)
Ruckert, M.: Conservative Pretty-Printing. SIGPLAN Notices 23(2), 39–44 (1996)
Wadler, P.: A Prettier Printer (1997), http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf
de Jonge, M.: Pretty-Printing for Software Reengineering. In: ICSM. IEEE (2002)
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)
Arnoldus, B., van den Brand, M., Serebrenik, A.: Less is More: Unparser-Completeness of Metalanguages for Template Engines. In: GPCE, pp. 137–146 (2011)
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)
Danielsson, N.A.: Correct-by-construction Pretty-printing. In: DTP. ACM (2013)
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)
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)
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)
Zaytsev, V.: The Grammar Hammer of 2012. ACM CoRR 1212.4446, 1–32 (2012)
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)
Duregård, J., Jansson, P.: Embedded Parser Generators. In: Haskell. ACM (2011)
Boulton, R.: Syn: A Single Language for Specifying Abstract Syntax Trees, Lexical Analysis, Parsing and Pretty-printing. University of Cambridge (1996)
Rendel, T., Ostermann, K.: Invertible Syntax Descriptions: Unifying Parsing and Pretty Printing. In: Haskell 2010, pp. 1–12. ACM (2010)
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)
Zaytsev, V.: Case Studies in Bidirectionalisation. In: TFP 2014, pp. 51–58 (2014)
Bagge, A.H., Zaytsev, V.: Workshop on Open and Original Problems in Software Language Engineering. In: WCRE 2013, pp. 493–494. IEEE (2013)
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)
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)
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)
McCarthy, J.: The Inversion of Functions Defined by Turing Machines. In: Automata Studies, pp. 177–181 (1956)
Meertens, L.: Designing Constraint Maintainers for User Interaction (June 1998)
Richter, H.: Noncorrecting Syntax Error Recovery. ACM TOPLAS 7(3), 478–489 (1985)
Cox, A., Clarke, C.: Syntactic Approximation Using Iterative Lexical Analysis. In: IWPC 2003, pp. 154–163 (2003)
Murphy, G.C., Notkin, D.: Lightweight Lexical Source Model Extraction. ACM TOSEM 5(3), 262–292 (1996)
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)
Johnson, S.C.: YACC—Yet Another Compiler Compiler. Computer Science Technical Report 32, AT&T Bell Laboratories (1975)
van der Storm, T., Cook, W.R., Loh, A.: The Design and Implementation of Object Grammars. SCP (2014)
Wile, D.S.: Abstract Syntax from Concrete Syntax. In: ICSE. ACM (1997)
van den Brand, M.G.J., Vinju, J.J.: Rewriting with Layout. In: RULE (2000)
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)
Basten, H.J.S., Vinju, J.J.: Faster Ambiguity Detection by Grammar Filtering. In: LDTA (2010)
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)
Salomon, D.J., Cormack, G.V.: Scannerless NSLR(1) Parsing of Programming Languages. In: PLDI 1989, pp. 170–178. ACM (1989)
Völter, M., Benz, S., Dietrich, C., Engelmann, B., Helander, M., Kats, L.C.L., Visser, E., Wachsmuth, G.: DSL Engineering. dslbook.org (2013)
Wang, M., Gibbons, J., Wu, N.: Incremental Updates for Efficient Bidirectional Transformations. In: ICFP 2011, pp. 392–403. ACM (2011)
Diskin, Z., Xiong, Y., Czarnecki, K.: From State- to Delta-Based Bidirectional Model Transformations: The Asymmetric Case. JOT 10, 1–25 (2011)
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)
Hofmann, M., Pierce, B., Wagner, D.: Edit Lenses. In: POPL. ACM (2012)
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)
Danvy, O.: Functional unparsing. JFP 8(6) (1998) 621–625
Asai, K., Kiselyov, O., Shan, C.-C.: Functional un|unparsing. Higher-Order and Symbolic Computation 24(4), 311–340 (2011)
Zaytsev, V.: Formal Foundations for Semi-parsing. In: CSMR-WCRE (2014)
Bézivin, J., Kurtev, I.: Model-based Technology Integration with the Technical Space Concept. In: MIS. Springer (2005)
Parreiras, F.S., Staab, S., Winter, A.: On Marrying Ontological and Metamodeling Technical Spaces. In: ESEC-FSE, pp. 439–448. ACM (2007)
Bruneliére, H., Cabot, J., Jouault, F., Madiot, F.: MoDisco: A Generic and Extensible Framework for Model Driven Reverse Engineering. In: ASE (2010)
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)
Rugaber, S., Stirewalt, K.: Model-Driven Reverse Engineering. IEEE Software 21(4), 45–53 (2004)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Zaytsev, V., Bagge, A.H. (2014). Parsing in a Broad Sense. In: Dingel, J., Schulte, W., Ramos, I., Abrahão, S., Insfran, E. (eds) Model-Driven Engineering Languages and Systems. MODELS 2014. Lecture Notes in Computer Science, vol 8767. Springer, Cham. https://doi.org/10.1007/978-3-319-11653-2_4
Download citation
DOI: https://doi.org/10.1007/978-3-319-11653-2_4
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-11652-5
Online ISBN: 978-3-319-11653-2
eBook Packages: Computer ScienceComputer Science (R0)