Advertisement

Tracing Program Transformations with String Origins

  • Pablo Inostroza
  • Tijs van der Storm
  • Sebastian Erdweg
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, 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.

Keywords

State Machine Program Transformation Trace Link Transformation Code Text Fragment 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aizenbud-Reshef, N., Nolan, B.T., Rubin, J., Shaham-Gafni, Y.: Model traceability. IBM Syst. J. 45(3), 515–526 (2006)CrossRefGoogle Scholar
  2. 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. 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. 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)CrossRefGoogle Scholar
  5. 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. 6.
    Fowler, M.: Domain-Specific Languages. Addison Wesley (2010)Google Scholar
  7. 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. 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. 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. 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. 11.
    Object Management Group (OMG). MOF Model to Text Transformation Language 1.0. formal/2008-01-16 (January 2008)Google Scholar
  12. 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. 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)CrossRefGoogle Scholar
  14. 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)CrossRefGoogle Scholar
  15. 15.
    Seddon, R.: Introduction to JavaScript source maps (2012), http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
  16. 16.
    van Deursen, A., Klint, P., Tip, F.: Origin tracking. Symbolic Computation 15, 523–545 (1993)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Pablo Inostroza
    • 1
  • Tijs van der Storm
    • 1
    • 2
  • Sebastian Erdweg
    • 3
  1. 1.Centrum Wiskunde & InformaticaAmsterdamThe Netherlands
  2. 2.INRIA LilleFrance
  3. 3.TU DarmstadtGermany

Personalised recommendations