Example-based Synthesis of Static Analysis Rules
Pranav Garg, Srinivasan Sengamedu SHS

TL;DR
This paper introduces RhoSynth, a novel algorithm for automatically generating static analysis rules from code examples using graph-based logic synthesis, significantly reducing manual effort and improving rule precision.
Contribution
The paper presents RhoSynth, a new ILP-based graph alignment method for synthesizing static analysis rules from developer-provided examples, outperforming existing approaches.
Findings
Successfully synthesized over 30 Java rules with >75% precision
Rules deployed in real-world code review system
Outperforms recent program synthesis baselines
Abstract
Static Analysis tools have rules for several code quality issues and these rules are created by experts manually. In this paper, we address the problem of automatic synthesis of code quality rules from examples. We formulate the rule synthesis problem as synthesizing first order logic formulas over graph representations of code. We present a new synthesis algorithm RhoSynth that is based on Integer Linear Programming-based graph alignment for identifying code elements of interest to the rule. We bootstrap RhoSynth by leveraging code changes made by developers as the source of positive and negative examples. We also address rule refinement in which the rules are incrementally improved with additional user-provided examples. We validate RhoSynth by synthesizing more than 30 Java code quality rules. These rules have been deployed as part of a code review system in a company and their…
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 · Advanced Software Engineering Methodologies
