MARTINI: The Little Match and Replace Tool for Automatic Code Rewriting

  • Alister Johnson (Creator)
  • Camille Coti (Creator)
  • Allen D. Malony (Creator)
  • Johannes Doerfert (Creator)

Dataset

Description

This work presents MARTINI, a new approach to code rewriting built on the Clang compiler, which exposes complex and semantic-driven rewrite capabilities to users in a simple and natural way. Rewrite rules are expressed as a pair of parameterized “before-and-after” code snippets in the source language, one to describe what to match and one to describe what the replacement looks like. Through this novel and user-friendly interface, programmers can automate and customize complex code changes which require a deep understanding of the language without any knowledge of compiler internals.
Our contributions are in the llvm-project/clang-tools-extra/clang-rewrite directory in the joss22 and europar22 branches.
Date made available2022
Publisherfigshare

Cite this