Skip to main content

Exchanging the Target-Language in Existing, Non-Metamodel-Based Compilers

  • Conference paper
  • First Online:
System Analysis and Modeling. Technology-Specific Aspects of Models (SAM 2016)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9959))

Included in the following conference series:

  • 528 Accesses

Abstract

When looking for solutions to automatically translate from high-level source to target code in heterogeneous programming environments and under budgetary restrictions, one often encounters the problem that affordable compilers with front-end support for a particular source language don’t map to the desired target-language. The goal of this paper is to present an approach for adapting existing compilers in a non-intrusive way that keeps the front-end intact and replaces the back-end with a component that supports the translation into any language with a context-free text-based syntax. This is achieved by introducing a domain-specific language for code generation to the compiler pipeline that offers a programmable interface to access internal representations of parsed source code in its programs. We formulate a set of requirements for this language and show how compiler developers can use the supplied interface in combination with the domain-specific language to adapt the textual output to their needs.

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

References

  1. Arnoldus, B.J.: An illumination of the template enigma: software code generation with templates. Ph.D. thesis, Technische Universiteit Eindhoven (2010)

    Google Scholar 

  2. Bettini, L.: Implementing Domain-Specific Languages with Xtext and Xtend. Packt Publishing, Birmingham (2013)

    Google Scholar 

  3. Efftinge, S., Völter, M.: oAW xText: a framework for textual DSLs. In: Workshop on Modeling Symposium at Eclipse Summit, vol. 32, p. 118 (2006)

    Google Scholar 

  4. Garlan, D., Shaw, M.: An introduction to software architecture. Adv. Softw. Eng. Knowl. Eng. 1(3.4), 24 (1993)

    Google Scholar 

  5. Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis & transformation. In: International Symposium on Code Generation and Optimization, CGO 2004, pp. 75–86. IEEE (2004)

    Google Scholar 

  6. Parr, T.J.: String template. http://www.stringtemplate.org/

  7. Parr, T.J.: Enforcing strict model-view separation in template engines. In: Proceedings of the 13th International Conference on World Wide Web, pp. 224–233. ACM (2004)

    Google Scholar 

  8. Walkins, L.: asn1c. http://lionet.info/asn1c/

  9. ASN.1: Specification of basic notation. International Standard X.680, ITU-T (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dorian Weber .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing AG

About this paper

Cite this paper

Weber, D., Scheidgen, M., Fischer, J. (2016). Exchanging the Target-Language in Existing, Non-Metamodel-Based Compilers. In: Grabowski , J., Herbold, S. (eds) System Analysis and Modeling. Technology-Specific Aspects of Models . SAM 2016. Lecture Notes in Computer Science(), vol 9959. Springer, Cham. https://doi.org/10.1007/978-3-319-46613-2_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-46613-2_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-46612-5

  • Online ISBN: 978-3-319-46613-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics