Back to Search
Start Over
High-fidelity metaprogramming with separator syntax trees
- Source :
- Aarssen , R T A & Van Der Storm , T 2020 , High-fidelity metaprogramming with separator syntax trees . in PEPM 2020 : Proceedings of the 2020 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2020 . PEPM 2020 - Proceedings of the 2020 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2020 , Association for Computing Machinery, Inc , pp. 27-37 , 2020 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM 2020) , New Orleans, LA , United States , 20/01/2020 .
- Publication Year :
- 2020
-
Abstract
- Many metaprogramming tasks, such as refactorings, automated bug fixing, or large-scale software renovation, require high-fidelity source code transformations-transformations which preserve comments and layout as much as possible. Abstract syntax trees (ASTs) typically abstract from such details, and hence would require pretty printing, destroying the original program layout. Concrete syntax trees (CSTs) preserve all layout information, but transformation systems or parsers that support CSTs are rare and can be cumbersome to use. In this paper we present separator syntax trees (SSTs), a lightweight syntax tree format, that sits between AST and CSTs, in terms of the amount of information they preserve. SSTs extend ASTs by recording textual layout information separating AST nodes. This information can be used to reconstruct the textual code after parsing, but can largely be ignored when implementing high-fidelity transformations. We have implemented SSTs in Rascal, and show how it enables the concise definition of high-fidelity source code transformations using a simple refactoring for C++.
Details
- Database :
- OAIster
- Journal :
- Aarssen , R T A & Van Der Storm , T 2020 , High-fidelity metaprogramming with separator syntax trees . in PEPM 2020 : Proceedings of the 2020 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2020 . PEPM 2020 - Proceedings of the 2020 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2020 , Association for Computing Machinery, Inc , pp. 27-37 , 2020 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM 2020) , New Orleans, LA , United States , 20/01/2020 .
- Notes :
- application/pdf, English
- Publication Type :
- Electronic Resource
- Accession number :
- edsoai.on1365338011
- Document Type :
- Electronic Resource