Deriving program transformations by demonstration
Matthew J. Sottile, Geoffrey C. Hulette

TL;DR
This paper introduces a method for automatically deriving application-specific program transformations by analyzing exemplars of code changes and generating generalizable term rewriting rules, applicable across multiple programming languages.
Contribution
It presents a novel approach to automatically generate program transformations from examples using syntax analysis and term rewriting, enhancing code adaptation for specific applications.
Findings
Method successfully derives transformation rules from exemplars
Applicable to multiple programming languages in high-performance computing
Facilitates accessible and automatic code transformation
Abstract
Automatic code transformation in which transformations are tuned for specific applications and contexts are difficult to achieve in an accessible manner. In this paper, we present an approach to build application specific code transformations. Our approach is based on analysis of the abstract syntax representation of exemplars of the essential change to the code before and after the transformation is applied. This analysis entails a sequence of steps to identify the change, determine how to generalize it, and map it to term rewriting rules for the Stratego term rewriting system. The methods described in this paper assume programs are represented in a language-neutral term format, allowing tools based on our methods to be applied to programs written in the major languages used by computational scientists utilizing high performance computing systems.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Logic, programming, and type systems
