Skip to main content

Parsing and Printing of and with Triples

  • Conference paper
  • First Online:
Relational and Algebraic Methods in Computer Science (RAMICS 2017)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10226))

Abstract

We introduce the tool Amperspiegel, which uses triple graphs for parsing, printing and manipulating data. We show how to conveniently encode parsers, graph manipulation-rules, and printers using several relations. As such, parsers, rules and printers are all encoded as graphs themselves. This allows us to parse, manipulate and print these parsers, rules and printers within the system. A parser for a context free grammar is graph-encoded with only four relations. The graph manipulation-rules turn out to be especially helpful when parsing. The printers strongly correspond to the parsers, being described using only five relations. The combination of parsers, rules and printers allows us to extract Ampersand source code from ArchiMate XML documents. Amperspiegel was originally developed to aid in the development of Ampersand.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Adding to Amperspiegel’s reflection are the switches collect and distribute, which are not described in this paper.

References

  1. van den Brand, M., Visser, E.: Generation of formatters for context-free languages. ACM Trans. Softw. Eng. Methodol. (TOSEM) 5(1), 1–41 (1996)

    Article  Google Scholar 

  2. Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. a language and toolset for program transformation. Sci. Comput. Program. 72(1), 52–70 (2008)

    Article  MathSciNet  Google Scholar 

  3. Gottlob, G., Lukasiewicz, T., Pieris, A.: Datalog+/-: questions and answers. In: Proceedings of the Fourteenth International Conference on Principles of Knowledge Representation and Reasoning (KR), pp. 682–685 (2014)

    Google Scholar 

  4. Joosten, S.: Software development in relation algebra with Ampersand. In: Pous, D., Struth, G., Höfner, P. (eds.) RAMiCS 2017. LNCS, vol. 10226, pp. 177–192. Springer, Cham (2017)

    Google Scholar 

  5. Kahl, W.: Algebraic graph derivations for graphical calculi. In: d’Amore, F., Franciosa, P.G., Marchetti-Spaccamela, A. (eds.) WG 1996. LNCS, vol. 1197, pp. 224–238. Springer, Heidelberg (1997). doi:10.1007/3-540-62559-3_19

    Chapter  Google Scholar 

  6. Kats, L.C., Visser, E.: The Spoofax language workbench: rules for declarative specification of languages and ides. In: ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA 2010), vol. 45, pp. 444–463. ACM (2010)

    Google Scholar 

  7. Klint, P., van der Storm, T., Vinju, J.: RASCAL: a domain specific language for source code analysis and manipulation. In: Proceedings of the 2009 9th IEEE International Working Conference on Source Code Analysis and Manipulation, pp. 168–177. SCAM 2009 (2009). http://dx.doi.org/10.1109/SCAM.2009.28

  8. Lankhorst, M.M., Proper, H.A., Jonkers, H.: The architecture of the ArchiMate language. In: Halpin, T., Krogstie, J., Nurcan, S., Proper, E., Schmidt, R., Soffer, P., Ukor, R. (eds.) BPMDS/EMMSAD -2009. LNBIP, vol. 29, pp. 367–380. Springer, Heidelberg (2009). doi:10.1007/978-3-642-01862-6_30

    Chapter  Google Scholar 

  9. Robertson, E.L.: Triadic Relations: An Algebra for the Semantic Web. In: Bussler, C., Tannen, V., Fundulaki, I. (eds.) SWDB 2004. LNCS, vol. 3372, pp. 91–108. Springer, Heidelberg (2005). doi:10.1007/978-3-540-31839-2_8

    Chapter  Google Scholar 

Download references

Acknowledgements

I thank Wolfram Kahl for helping me greatly improve this paper’s clarity in an intensive process of iterative feedback. I also thank the anonymous reviewers and Stef Joosten for their comments on an earlier version of this paper. Supported by the Austrian Science Fund (FWF) project Y757.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sebastiaan J. C. Joosten .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Joosten, S.J.C. (2017). Parsing and Printing of and with Triples. In: Höfner, P., Pous, D., Struth, G. (eds) Relational and Algebraic Methods in Computer Science. RAMICS 2017. Lecture Notes in Computer Science(), vol 10226. Springer, Cham. https://doi.org/10.1007/978-3-319-57418-9_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-57418-9_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-57417-2

  • Online ISBN: 978-3-319-57418-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics