{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,30]],"date-time":"2026-01-30T07:09:51Z","timestamp":1769756991167,"version":"3.49.0"},"reference-count":61,"publisher":"Association for Computing Machinery (ACM)","issue":"PLDI","license":[{"start":{"date-parts":[[2024,6,20]],"date-time":"2024-06-20T00:00:00Z","timestamp":1718841600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"FCT","award":["SFRH\/BD\/150688\/2020"],"award-info":[{"award-number":["SFRH\/BD\/150688\/2020"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2024,6,20]]},"abstract":"<jats:p>In today\u2019s software industry, large-scale, multi-language codebases are the norm. This brings substantial challenges in developing automated tools for code maintenance tasks such as API migration or dead code cleanup. Tool builders often find themselves caught between two less-than-ideal tooling options: (1) languagespecific code rewriting tools or (2) generic, lightweight match-replace transformation tools with limited expressiveness. The former leads to tool fragmentation and a steep learning curve for each language, while the latter forces developers to create ad-hoc, throwaway scripts to handle realistic tasks.<\/jats:p>\n          <jats:p>\n            To fill this gap, we introduce a new declarative domain-specific language (DSL) for expressing interdependent multi-language code transformations. Our key insight is that we can increase the expressiveness and applicability of lightweight match-replace tools by extending them to support for composition, ordering, and flow. We implemented an open-source tool for our language, called P\n            <jats:sc>olyglot<\/jats:sc>\n            P\n            <jats:sc>iranha<\/jats:sc>\n            , and deployed it in an industrial setting. We demonstrate its effectiveness through three case studies, where it deleted 210K lines of dead code and migrated 20K lines, across 1611 pull requests. We compare our DSL against state-of-the-art alternatives, and show that the tools we developed are faster, more concise, and easier to maintain.\n          <\/jats:p>","DOI":"10.1145\/3656429","type":"journal-article","created":{"date-parts":[[2024,6,20]],"date-time":"2024-06-20T16:27:20Z","timestamp":1718900840000},"page":"1288-1312","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["A Lightweight Polyglot Code Transformation Language"],"prefix":"10.1145","volume":"8","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-0402-0239","authenticated-orcid":false,"given":"Ameya","family":"Ketkar","sequence":"first","affiliation":[{"name":"Gitar Inc., San Mateo, United States"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2147-2176","authenticated-orcid":false,"given":"Daniel","family":"Ramos","sequence":"additional","affiliation":[{"name":"Carnegie Mellon University, Pittsburgh, USA"},{"name":"INESC-ID, Lisbon, Portugal"},{"name":"Instituto Superior T\u00e9cnico, Universidade de Lisboa, Lisbon, Portugal"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0001-9773-7273","authenticated-orcid":false,"given":"Lazaro","family":"Clapp","sequence":"additional","affiliation":[{"name":"Gitar Inc., New York, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4779-1391","authenticated-orcid":false,"given":"Raj","family":"Barik","sequence":"additional","affiliation":[{"name":"Gitar Inc., San Mateo, United States"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6568-017X","authenticated-orcid":false,"given":"Murali Krishna","family":"Ramanathan","sequence":"additional","affiliation":[{"name":"Amazon Web Services, Santa Clara, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,6,20]]},"reference":[{"key":"e_1_3_1_2_2","doi-asserted-by":"publisher","DOI":"10.1109\/SCAM.2012.28"},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","DOI":"10.5555\/6448"},{"key":"e_1_3_1_4_2","volume-title":"SwiftSyntax Documentation","author":"Apple","year":"2024","unstructured":"Apple. 2024. SwiftSyntax Documentation. Apple Inc. https:\/\/swiftpackageindex.com\/apple\/swift-syntax\/509.0.0\/documentation\/swiftsyntax Accessed: 2024-03-06."},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568243"},{"key":"e_1_3_1_6_2","unstructured":"Astgrep. 2024. ast-grep: write code to match code. Open-source. https:\/\/ast-grep.github.io Accessed: 2024-03-06."},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","DOI":"10.1145\/3360585"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00038"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/1094811.1094832"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/3338906.3338919"},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2004.1317484"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2007.11.003"},{"key":"e_1_3_1_13_2","volume-title":"Tree-sitter: A New Parsing System for Programming Tools","author":"Brunsfeld Max","year":"2018","unstructured":"Max Brunsfeld. 2018. Tree-sitter: A New Parsing System for Programming Tools. Strange Loop Conference. Available online: https:\/\/thestrangeloop.com\/2018\/tree-sitter---a-new-parsing-system-for-programming-tools.html."},{"key":"e_1_3_1_14_2","volume-title":"Tree-sitter","author":"Brunsfeld Max","year":"2024","unstructured":"Max Brunsfeld. 2024. Tree-sitter. GitHub. https:\/\/tree-sitter.github.io\/tree-sitter\/ Accessed: 2024-03-06."},{"key":"e_1_3_1_15_2","author":"Clang","year":"2024","unstructured":"Clang. 2024. Clang LibTooling. Accessed: 2024-03-06.","journal-title":"Clang LibTooling"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","DOI":"10.5555\/2773566.2773666"},{"key":"e_1_3_1_17_2","unstructured":"Detekt. 2024. Detekt: A static code analyzer for Kotlin. https:\/\/detekt.dev Accessed: 2024-03-06."},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","DOI":"10.4018\/978-1-4666-2092-6.ch003"},{"key":"e_1_3_1_19_2","volume-title":"fastmod","author":"Fastmod","year":"2024","unstructured":"Fastmod. 2024. fastmod. Meta Inc. https:\/\/github.com\/facebookincubator\/fastmod Accessed: 2024-03-06."},{"key":"e_1_3_1_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/1985793.1985989"},{"key":"e_1_3_1_21_2","volume-title":"Continuous integration","author":"Fowler Martin","year":"2006","unstructured":"Martin Fowler and Matthew Foemmel. 2006. Continuous integration."},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2013.6606699"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","DOI":"10.5555\/1209014"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.5381\/JOT.2004.3.9.A2"},{"key":"e_1_3_1_25_2","volume-title":"CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security","author":"GitHub","year":"2024","unstructured":"GitHub. 2024. CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security. GitHub, Inc. https:\/\/codeql.github.com"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1145\/3485537"},{"key":"e_1_3_1_27_2","volume-title":"go-patch: Structured code diffs and refactors","author":"gopatch","year":"2024","unstructured":"gopatch. 2024. go-patch: Structured code diffs and refactors. Uber Technologies, Inc. https:\/\/github.com\/uber-go\/gopatch GitHub repository."},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568260"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.4230\/LIPICS.ECOOP.2019.22"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/1869459.1869497"},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00117"},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510115"},{"key":"e_1_3_1_33_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2015.7332467"},{"key":"e_1_3_1_34_2","doi-asserted-by":"publisher","DOI":"10.1109\/SCAM.2009.28"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/3276492"},{"key":"e_1_3_1_36_2","first-page":"601","volume-title":"USENIX Annual Technical Conference","author":"Lawall Julia","year":"2018","unstructured":"Julia Lawall and Gilles Muller. 2018. Coccinelle: 10 Years of Automated Evolution in the Linux Kernel. In USENIX Annual Technical Conference, Haryadi S. Gunawi and Benjamin C. Reed (Eds.). USENIX Association, Boston, MA, USA, 601\u2013614. https:\/\/www.usenix.org\/conference\/atc18\/presentation\/lawall"},{"key":"e_1_3_1_37_2","doi-asserted-by":"publisher","DOI":"10.1145\/2854146"},{"key":"e_1_3_1_38_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2013.6606596"},{"key":"e_1_3_1_39_2","unstructured":"Meta. 2024. Build faster with Buck2: Our open source build system. (April 2024). https:\/\/engineering.fb.com\/2023\/04\/06\/open-source\/buck2-open-source-large-scale-build-system\/ Accessed: 2023-11-14."},{"key":"e_1_3_1_40_2","unstructured":"Microsoft. 2024. Language Server Protocol. https:\/\/microsoft.github.io\/language-server-protocol\/"},{"key":"e_1_3_1_41_2","doi-asserted-by":"publisher","DOI":"10.1145\/3360569"},{"key":"e_1_3_1_42_2","volume-title":"OpenRewrite: Semantic code search and transformation tool","author":"Moderne","year":"2024","unstructured":"Moderne. 2024. OpenRewrite: Semantic code search and transformation tool. Moderne Inc. https:\/\/docs.openrewrite.org Accessed: 2024-03-06."},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00023"},{"key":"e_1_3_1_44_2","unstructured":"Online. 2024. ErrorProne ComplexBooleanConstant. Available: https:\/\/errorprone.info\/bugpattern\/UnusedMethod."},{"key":"e_1_3_1_45_2","unstructured":"Online. 2024. ErrorProne ComplexBooleanConstant. Available: https:\/\/errorprone.info\/bugpattern\/ComplexBooleanConstant."},{"key":"e_1_3_1_46_2","unstructured":"Online. 2024. Fix CWE-338 with SecureRandom. Available: https:\/\/docs.openrewrite.org\/recipes\/java\/security\/fixcwe338."},{"key":"e_1_3_1_47_2","unstructured":"Online. 2024. Loggers should be named for their enclosing classes. Available: https:\/\/docs.openrewrite.org\/recipes\/java\/logging\/slf4j\/loggersnamedforenclosingclass."},{"key":"e_1_3_1_48_2","unstructured":"Online. 2024. Open Rewrite Recipes. Available: https:\/\/docs.openrewrite.org\/concepts-explanations\/recipes."},{"key":"e_1_3_1_49_2","unstructured":"Online. 2024. Use secure temporary file creation. Available: https:\/\/docs.openrewrite.org\/recipes\/java\/security\/securetempfilecreation."},{"key":"e_1_3_1_50_2","volume-title":"GPT-4 Technical Report","author":"OpenAI","year":"2024","unstructured":"OpenAI. 2024. GPT-4 Technical Report. OpenAI Inc. Available online: https:\/\/ar5iv.org\/abs\/2303.08774 [Accessed: 2024-03-06."},{"key":"e_1_3_1_51_2","doi-asserted-by":"publisher","DOI":"10.1145\/3477314.3507153"},{"key":"e_1_3_1_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/2901739.2901745"},{"key":"e_1_3_1_53_2","doi-asserted-by":"publisher","DOI":"10.1007\/S10664-018-9639-0"},{"key":"e_1_3_1_54_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377813.3381350"},{"key":"e_1_3_1_55_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2308.14687"},{"key":"e_1_3_1_56_2","doi-asserted-by":"publisher","DOI":"10.1108\/QROM-08-2016-1408"},{"key":"e_1_3_1_57_2","doi-asserted-by":"publisher","DOI":"10.1145\/3183440.3195098"},{"key":"e_1_3_1_58_2","unstructured":"Uber. 2024. PolyglotPiranha: A flexible multilingual framework for chaining interdependent structural search\/replace rules. https:\/\/github.com\/uber\/piranha. Accessed: 2024-03-28."},{"key":"e_1_3_1_59_2","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314589"},{"key":"e_1_3_1_60_2","doi-asserted-by":"publisher","DOI":"10.1145\/2541348.2541355"},{"key":"e_1_3_1_61_2","volume-title":"Software engineering at google: Lessons learned from programming over time","author":"Winters Titus","year":"2020","unstructured":"Titus Winters, Tom Manshreck, and Hyrum Wright. 2020. Software engineering at google: Lessons learned from programming over time. O\u2019Reilly Media, Sebastopol, CA, USA."},{"key":"e_1_3_1_62_2","doi-asserted-by":"publisher","DOI":"10.1145\/3563302"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3656429","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3656429","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,7,4]],"date-time":"2025-07-04T20:43:13Z","timestamp":1751661793000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3656429"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,6,20]]},"references-count":61,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2024,6,20]]}},"alternative-id":["10.1145\/3656429"],"URL":"https:\/\/doi.org\/10.1145\/3656429","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,6,20]]},"assertion":[{"value":"2024-06-20","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}