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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aizenbud-Reshef, N., Nolan, B.T., Rubin, J., Shaham-Gafni, Y.: Model traceability. IBM Syst. J. 45(3), 515–526 (2006)
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)
Clinger, W., Rees, J.: Macros that work. In: Proceedings of Symposium on Principles of Programming Languages (POPL), pp. 155–162. ACM (1991)
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)
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)
Fowler, M.: Domain-Specific Languages. Addison Wesley (2010)
Haldar, V., Chandra, D., Franz, M.: Dynamic taint propagation for Java. In: 21st Annual Computer Security Applications Conference, p. 9. IEEE (2005)
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)
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)
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)
Object Management Group (OMG). MOF Model to Text Transformation Language 1.0. formal/2008-01-16 (January 2008)
Oldevik, J., Neple, T.: Traceability in model to text transformations. In: 2nd ECMDA Traceability Workshop (ECMDA-TW), pp. 17–26 (2006)
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)
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)
Seddon, R.: Introduction to JavaScript source maps (2012), http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
van Deursen, A., Klint, P., Tip, F.: Origin tracking. Symbolic Computation 15, 523–545 (1993)
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
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)