@inproceedings{00fd505069014646ba9c1d6b1a54ec6d,
title = "Concrete Syntax Metapatterns",
abstract = "Software engineers should be able to apply massive code refactorings to maintain large legacy code bases. A key aspect of developing restructurings is matching and transforming code snippets using abstract syntax trees (ASTs). Matching on ASTs is typically done through AST patterns with holes. AST patterns can be extended to become metapatterns, which increase their expressivity. Metapattern examples include disjunctions, descendant patterns, and patches where we inline transformations into the pattern itself. Despite their expressivity, abstract syntax (meta)patterns can become verbose and require restructuring engineers to be intimately familiar with the data types that define the AST. A better approach is to use concrete syntax patterns, which allows us to denote our patterns in the syntax of the object language. Previous work has shown that we can use external black-box parsers of the object language to compile concrete syntax patterns for arbitrary languages. In this paper, we scale this compilation method to support concrete syntax metapatterns, which allows for a more declarative way of expressing restructurings. We evaluate this method through an implementation written in Kotlin.",
keywords = "black-box parsers, concrete syntax, metaprogramming, refactoring, restructuring",
author = "Luka Miljak and Poulsen, {Casper Bach} and Rosilde Corvino",
year = "2024",
doi = "10.1145/3687997.3695637",
language = "English",
series = "SLE 2024 - Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering, Co-located with: SPLASH 2024",
publisher = "ACM",
pages = "43--55",
editor = "Ralf Laemmel and Pereira, {Juliana Alves} and Mosses, {Peter D.} and Mosses, {Peter D.}",
booktitle = "SLE 2024 - Proceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering, Co-located with",
address = "United States",
note = "17th ACM SIGPLAN International Conference on Software Language Engineering, SLE 2024, Co-located with: SPLASH 2024 ; Conference date: 20-10-2024 Through 21-10-2024",
}