Designing a Lightweight Polyglot Code Transformation Language
Blog post from Sonar
PolyglotPiranha, a PLDI 2024 research project, aims to improve automated maintenance of large, multilingual codebases by bridging the gap between simple syntactic rewriting tools and complex language-specific transformation frameworks. Lightweight tools such as Comby and ast-grep are fast and accessible but struggle with cascading refactorings that require multiple dependent edits, while imperative tools such as OpenRewrite and jscodeshift are highly expressive but require specialized language and build-system knowledge. PolyglotPiranha organizes lightweight rewrite rules into directed graphs, allowing rules to pass captured information, such as a deleted method’s name, to subsequent rules and to constrain follow-up cleanups to relevant code scopes. This approach supports controlled, multi-step refactorings, such as deleting an annotated method, replacing its calls, and simplifying the resulting expressions, while remaining compatible with multiple matching syntaxes including Comby, tree-sitter queries, concrete syntax, and regular expressions.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Developer Experience | 1 | 287 | 186 | 98 | -17% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.