Skip to main content

Program Transformation with Stratego/XT

Rules, Strategies, Tools, and Systems in Stratego/XT 0.9

  • Chapter

Part of the Lecture Notes in Computer Science book series (LNCS,volume 3016)

Abstract

Stratego/XT is a framework for the development of transformation systems aiming to support a wide range of program transformations. The framework consists of the transformation language Stratego and the XT collection of transformation tools. Stratego is based on the paradigm of rewriting under the control of programmable rewriting strategies. The XT tools provide facilities for the infrastructure of transformation systems including parsing and pretty-printing. The framework addresses the entire range of the development process; from the specification of transformations to their composition into transformation systems. This chapter gives an overview of the main ingredients involved in the composition of transformation systems with Stratego/XT, where we distinguish the abstraction levels of rules, strategies, tools, and systems.

Keywords

  • Transformation System
  • Parse Tree
  • Argument Strategy
  • Program Transformation
  • Concrete Syntax

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.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-540-25935-0_13
  • Chapter length: 23 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   79.99
Price excludes VAT (USA)
  • ISBN: 978-3-540-25935-0
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   99.99
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. http://www.program-transformation.org

  2. Bagge, O.S., Kalleberg, K.T., Haveraaen, M., Visser, E.: Design of the CodeBoost transformation system for domain-specific optimisation of C++ programs. In: Binkley, D., Tonella, P. (eds.) Third IEEE International Workshop on Source Code Analysis and Manipulation (SCAM 2003), Amsterdam, September 2003, pp. 65–74. IEEE Computer Society Press, Los Alamitos (2003)

    CrossRef  Google Scholar 

  3. Batory, D., Lofaso, B., Smaragdakis, Y.: JTS: tools for implementing domain-specific languages. In: Proceedings Fifth International Conference on Software Reuse, Victoria, BC, Canada, 2-5, 1998, pp. 143–153. IEEE, Los Alamitos (1998)

    Google Scholar 

  4. Borovanský, P., Cirstea, H., Dubois, H., Kirchner, C., Kirchner, H., Moreau, P.-E., Ringeissen, C., Vittek, M.: ELAN: User Manual. Loria, Nancy, France, v3.4 edition, January 27 (2000)

    Google Scholar 

  5. Boyle, J.M.: Abstract programming and program transformation—An approach to reusing programs. In: Biggerstaff, T.J., Perlis, A.J. (eds.) Software Reusability, vol. 1, pp. 361–413. ACM Press, New York (1989)

    Google Scholar 

  6. Boyle, J.M., Harmer, T.J., Winter, V.L.: The TAMPR program transforming system: Simplifying the development of numerical software. In: Arge, E., Bruaset, A.M., Langtangen, H.P. (eds.) Modern Software Tools in Scientific Computing, pp. 353–372. Birkhäuser, Basel (1997)

    Google Scholar 

  7. van den Brand, M.G.J., de Jong, H.A., Klint, P., Olivier, P.A.: Efficient annotated terms. Software—Practice & Experience 30, 259–291 (2000)

    CrossRef  Google Scholar 

  8. van den Brand, M.G.J., Klint, P., Vinju, J.: Term rewriting with traversal functions. ACM Transactions on Software Engineering and Methodology 12(2), 152–190 (2003)

    CrossRef  Google Scholar 

  9. Bravenboer, M., Visser, E.: Rewriting strategies for instruction selection. In: Tison, S. (ed.) RTA 2002. LNCS, vol. 2378, pp. 237–251. Springer, Heidelberg (2002)

    CrossRef  Google Scholar 

  10. Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Quesada, J.F.: Maude: specification and programming in rewriting logic. Theoretical Computer Science 285(2), 187–243 (2002)

    MATH  CrossRef  MathSciNet  Google Scholar 

  11. Clavel, M., Eker, S., Lincoln, P., Meseguer, J.: Principles of Maude. In: Meseguer, J. (ed.) Proceedings of the First International Workshop on Rewriting Logic and its Applications, Asilomar, Pacific Grove, CA, September 1996. Electronic Notes in Theoretical Computer Science, vol. 4, pp. 65–89. Elsevier, Amsterdam (1996)

    Google Scholar 

  12. Cordy, J.R., Carmichael, I.H., Halliday, R.: The TXL Programming Language, Version 8 (April 1995)

    Google Scholar 

  13. Czarnecki, K., Eisenecker, U.W.: Generative Programming. Addison-Wesley, Reading (2000)

    Google Scholar 

  14. de Jonge, M.: A pretty-printer for every occasion. In: Ferguson, I., Gray, J., Scott, L. (eds.) Proceedings of the 2nd International Symposium on Constructing Software Engineering Tools (CoSET 2000). University of Wollongong, Australia (2000)

    Google Scholar 

  15. de Jonge, M.: Source Tree Composition. In: Gacek, C. (ed.) ICSR 2002. LNCS, vol. 2319, pp. 17–32. Springer, Heidelberg (2002)

    CrossRef  Google Scholar 

  16. de Jonge, M., Monajemi, R.: Cost-effective maintenance tools for proprietary languages. In: Proceedings: International Conference on Software Maintenance (ICSM 2001), November 2001, pp. 240–249. IEEE Computer Society Press, Los Alamitos (2001)

    CrossRef  Google Scholar 

  17. de Jonge, M., Visser, E., Visser, J.: XT: A bundle of program transformation tools. In: van den Brand, M.G.J., Perigot, D. (eds.) Workshop on Language Descriptions, Tools and Applications (LDTA 2001), April 2001. Electronic Notes in Theoretical Computer Science, vol. 44. Elsevier Science Publishers, Amsterdam (2001)

    Google Scholar 

  18. van Deursen, A., Heering, J., Klint, P. (eds.): Language Prototyping. An Algebraic Specification Approach, September 1996. AMAST Series in Computing, vol. 5. World Scientific, Singapore (1996)

    MATH  Google Scholar 

  19. Dolstra, E., Visser, E.: Building interpreters with rewriting strategies. In: van den Brand, M.G.J., Lämmel, R. (eds.) Workshop on Language Descriptions, Tools and Applications (LDTA 2002), Grenoble, France, April 2002. Electronic Notes in Theoretical Computer Science, vol. 65/3. Elsevier Science Publishers, Amsterdam (2002)

    Google Scholar 

  20. Fischer, B., Visser, E.: Retrofitting the AutoBayes program synthesis system with concrete syntax. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 239–253. Springer, Heidelberg (2004)

    CrossRef  Google Scholar 

  21. Fowler, M.: Refactoring: Improving the Design of Existing Programs. Addison-Wesley, Reading (1999)

    Google Scholar 

  22. Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The syntax definition formalism SDF – reference manual. SIGPLAN Notices 24(11), 43–75 (1989)

    CrossRef  Google Scholar 

  23. Johann, P., Visser, E.: Warm fusion in Stratego: A case study in the generation of program transformation systems. Annals of Mathematics and Artificial Intelligence 29(1-4), 1–34 (2000)

    MATH  CrossRef  Google Scholar 

  24. Johann, P., Visser, E.: Fusing logic and control with local transformations: An example optimization. In: Gramlich, B., Lucas, S. (eds.) Workshop on Reduction Strategies in Rewriting and Programming (WRS 2001), Utrecht, The Netherlands, May 2001. Electronic Notes in Theoretical Computer Science, vol. 57. Elsevier Science Publishers, Amsterdam (2001)

    Google Scholar 

  25. Lämmel, R., Visser, E., Visser, J.: The essence of strategic programming (Draft) (October 2002)

    Google Scholar 

  26. Lämmel, R., Visser, E., Visser, J.: Strategic Programming Meets Adaptive Programming. In: Proceedings of Aspect-Oriented Software Development (AOSD 2003), Boston, USA, March 2003, pp. 168–177. ACM Press, New York (2003)

    CrossRef  Google Scholar 

  27. Luttik, B., Visser, E.: Specification of rewriting strategies. In: Sellink, M.P.A. (ed.) 2nd International Workshop on the Theory and Practice of Algebraic Specifications (ASF+SDF 1997), Electronic Workshops in Computing, Berlin, November 1997. Springer, Heidelberg (1997)

    Google Scholar 

  28. Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers, San Francisco (1997)

    Google Scholar 

  29. Olmos, K., Visser, E.: Strategies for source-to-source constant propagation. In: B. Gramlich and S. Lucas, editors, Workshop on Reduction Strategies (WRS 2002), Copenhagen, Denmark, July 2002. Electronic Notes in Theoretical Computer Science, vol. 70, p. 20. Elsevier Science Publishers, Amsterdam (2002)

    Google Scholar 

  30. Peyton Jones, S.L., Santos, A.L.M.: A transformation-based optimiser for Haskell. Science. of Computer Programming 32(1-3), 3–47 (1998)

    MATH  CrossRef  Google Scholar 

  31. Rodger, R.J.: Jostraca: a template engine for generative programming. In: European Conference for Object-Oriented Programming (2002)

    Google Scholar 

  32. Swart, L.: Partial evaluation using rewrite rules. A specification of a partial evaluator for Similix in Stratego. Master’s thesis, Utrecht University, Utrecht, The Netherlands (August 2002)

    Google Scholar 

  33. Terese: Term Rewriting Systems, March 2003. Cambridge University Press, Cambridge (2003)

    Google Scholar 

  34. Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (September 1997)

    Google Scholar 

  35. Visser, E.: Strategic pattern matching. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 30–44. Springer, Heidelberg (1999)

    CrossRef  Google Scholar 

  36. Visser, E.: Language independent traversals for program transformation. In: Jeuring, J. (ed.) Workshop on Generic Programming (WGP 2000), Ponte de Lima, Portugal, July 2000, Technical Report UU-CS-2000-19, Department of Information and Computing Sciences, Universiteit Utrecht (2000)

    Google Scholar 

  37. Visser, E.: Scoped dynamic rewrite rules. In: van den Brand, M., Verma, R. (eds.) Rule Based Programming (RULE 2001), September 2001. Electronic Notes in Theoretical Computer Science, vol. 59/4. Elsevier Science Publishers, Amsterdam (2001)

    Google Scholar 

  38. Visser, E.: Stratego: A language for program transformation based on rewriting strategies. In: Middeldorp, A. (ed.) RTA 2001. LNCS, vol. 2051, pp. 357–361. Springer, Heidelberg (2001)

    CrossRef  Google Scholar 

  39. Visser, E.: A survey of rewriting strategies in program transformation systems. In: Gramlich, B., Lucas, S. (eds.) Workshop on Reduction Strategies in Rewriting and Programming (WRS 2001), Utrecht, The Netherlands, May 2001. Electronic Notes in Theoretical Computer Science, vol. 57. Elsevier Science Publishers, Amsterdam (2001)

    Google Scholar 

  40. Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)

    CrossRef  Google Scholar 

  41. Visser, E., Benaissa, Z.-e.-A.: A core language for rewriting. In: Kirchner, C., Kirchner, H. (eds.) Second International Workshop on Rewriting Logic and its Applications (WRLA 1998), Pont-à- Mousson, France, September 1998. Electronic Notes in Theoretical Computer Science, vol. 15. Elsevier Science Publishers, Amsterdam (1998)

    Google Scholar 

  42. Visser, E., Benaissa, Z.-e.-A., Tolmach, A.: Building program optimizers with rewriting strategies. In: Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP 1998), September 1998, pp. 13–26. ACM Press, New York (1998)

    CrossRef  Google Scholar 

  43. http://www.stratego-language.org

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Visser, E. (2004). Program Transformation with Stratego/XT. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds) Domain-Specific Program Generation. Lecture Notes in Computer Science, vol 3016. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25935-0_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-25935-0_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22119-7

  • Online ISBN: 978-3-540-25935-0

  • eBook Packages: Springer Book Archive