TRANSFORMATIONS OF ABSTRACT SYNTAX TREES INTO SOURCE CODE
DOI:
https://doi.org/10.24867/17BE21JokicKeywords:
Abstract syntax tree, domain specific languages, refactoringAbstract
Most of the advanced tools for automated source code modifications, such as automated refactoring tools, are based on modifications of the abstract syntax tree. The modifications which are done on the abstract syntax tree must be applied to the original source code, which can be done by transforming the tree back into a textual representation. In this paper, solutions for such transformations are researched and implemented, focusing on the problems of preserving the non-semantic elements of the original source code, such as comments and manual formatting.
References
[1] Kent Beck, Cynthia Andres, “Extreme Programming Explained: Embrace Change (2nd Edition)”, Addison-Wesley Professional, 2004.
[2] J. Overbey, R. Johnson, “Generating rewritable abstract syntax trees”, SLE, 2008.
[3] M. de Jonge, “Pretty-printing for software reengineering”, International Conference on Software Maintenance, 2002. Proceedings, pp. 550–559, 2002.
[4] M. de Jonge, E. Visser, “An algorithm for layout preservation in refactoring transformations.”, SLE, 2011.
[5] M. Van De Vanter, “Preserving the Documentary Structure of Source Code in Language-Based Transformation Tools”, SCAM, pp. 133-143, 2011.
[6] I. Dejanović, R. Vaderna, G. Milosavljević, Ž. Vuković, “TextX: A python tool for domain-specific languages implementation”, Knowledge-Based Systems, 115:1-4, 2017.
[7] I. Dejanović, G. Milosavljević, R. Vaderna, “Arpeggio: A flexible PEG parser for Python”, Knowledge-Based Systems, issn:0950-7051, vol.95, p.71–74, DOI:10.1016/j.knosys.2015.12.004, 2016.
[2] J. Overbey, R. Johnson, “Generating rewritable abstract syntax trees”, SLE, 2008.
[3] M. de Jonge, “Pretty-printing for software reengineering”, International Conference on Software Maintenance, 2002. Proceedings, pp. 550–559, 2002.
[4] M. de Jonge, E. Visser, “An algorithm for layout preservation in refactoring transformations.”, SLE, 2011.
[5] M. Van De Vanter, “Preserving the Documentary Structure of Source Code in Language-Based Transformation Tools”, SCAM, pp. 133-143, 2011.
[6] I. Dejanović, R. Vaderna, G. Milosavljević, Ž. Vuković, “TextX: A python tool for domain-specific languages implementation”, Knowledge-Based Systems, 115:1-4, 2017.
[7] I. Dejanović, G. Milosavljević, R. Vaderna, “Arpeggio: A flexible PEG parser for Python”, Knowledge-Based Systems, issn:0950-7051, vol.95, p.71–74, DOI:10.1016/j.knosys.2015.12.004, 2016.
Downloads
Published
2022-04-08
Issue
Section
Electrotechnical and Computer Engineering