Skip to main content

Tracing Program Transformations with String Origins

  • Conference paper
Theory and Practice of Model Transformations (ICMT 2014)

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

Abstract

Program transformations play an important role in domain-specific languages and model-driven development. Tracing the execution of such transformations has well-known benefits for debugging, visualization and error reporting. In this paper, we introduce string origins, a lightweight, generic and portable technique to establish a tracing relation between the textual fragments in the input and output of a program transformation. We discuss the semantics and the implementation of string origins using the Rascal meta programming language as an example. We illustrate the utility of string origins by presenting data structures and operations for tracing generated code, implementing protected regions, performing name resolution and fixing inadvertent name capture in generated code.

This research was supported by the Netherlands Organisation for Scientific Research (NWO) Jacquard Grant “Next Generation Auditing: Data-Assurance as a service” (638.001.214).

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Aizenbud-Reshef, N., Nolan, B.T., Rubin, J., Shaham-Gafni, Y.: Model traceability. IBM Syst. J. 45(3), 515–526 (2006)

    Article  Google Scholar 

  2. Chin, E., Wagner, D.: Efficient character-level taint tracking for Java. In: Proceedings of the 2009 ACM Workshop on Secure Web Services, pp. 3–12. ACM (2009)

    Google Scholar 

  3. Clinger, W., Rees, J.: Macros that work. In: Proceedings of Symposium on Principles of Programming Languages (POPL), pp. 155–162. ACM (1991)

    Google Scholar 

  4. Dhoolia, P., Mani, S., Sinha, V.S., Sinha, S.: Debugging model-transformation failures using dynamic tainting. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 26–51. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  5. Erdweg, S., van der Storm, T., Dai, Y.: Capture-avoiding and hygienic program transformations. In: Proceedings of European Conference on Object-Oriented Programming (ECOOP). Springer (to appear, 2014)

    Google Scholar 

  6. Fowler, M.: Domain-Specific Languages. Addison Wesley (2010)

    Google Scholar 

  7. Haldar, V., Chandra, D., Franz, M.: Dynamic taint propagation for Java. In: 21st Annual Computer Security Applications Conference, p. 9. IEEE (2005)

    Google Scholar 

  8. Jouault, F.: Loosely coupled traceability for ATL. In: Proceedings of the European Conference on Model Driven Architecture (ECMDA) Workshop on Traceability, pp. 29–37 (2005)

    Google Scholar 

  9. Klint, P., van der Storm, T., Vinju, J.: Rascal: A domain-specific language for source code analysis and manipulation. In: Proceedings of Conference on Source Code Analysis and Manipulation (SCAM), pp. 168–177 (2009)

    Google Scholar 

  10. Kolovos, D.S., Rose, L., Paige, R., García-Domínguez, A.: The Epsilon book, http://www.eclipse.org/epsilon/doc/book/ (accessed November 13, 2012)

  11. Object Management Group (OMG). MOF Model to Text Transformation Language 1.0. formal/2008-01-16 (January 2008)

    Google Scholar 

  12. Oldevik, J., Neple, T.: Traceability in model to text transformations. In: 2nd ECMDA Traceability Workshop (ECMDA-TW), pp. 17–26 (2006)

    Google Scholar 

  13. Olsen, G.K., Oldevik, J.: Scenarios of traceability in model to text transformations. In: Akehurst, D.H., Vogel, R., Paige, R.F. (eds.) ECMDA-FA. LNCS, vol. 4530, pp. 144–156. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  14. Rose, L.M., Paige, R.F., Kolovos, D.S., Polack, F.A.C.: The Epsilon generation language. In: Schieferdecker, I., Hartman, A. (eds.) ECMDA-FA 2008. LNCS, vol. 5095, pp. 1–16. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  15. Seddon, R.: Introduction to JavaScript source maps (2012), http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

  16. van Deursen, A., Klint, P., Tip, F.: Origin tracking. Symbolic Computation 15, 523–545 (1993)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Inostroza, P., van der Storm, T., Erdweg, S. (2014). Tracing Program Transformations with String Origins. In: Di Ruscio, D., Varró, D. (eds) Theory and Practice of Model Transformations. ICMT 2014. Lecture Notes in Computer Science, vol 8568. Springer, Cham. https://doi.org/10.1007/978-3-319-08789-4_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-08789-4_12

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-08788-7

  • Online ISBN: 978-3-319-08789-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics