Language-Agnostic Program Repair Engine Generator
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computer program repair systems are either purely symbolic, failing to capture natural candidate repairs, or purely neural, lacking guarantees on their output and often failing to repair errors or introducing new mistakes.
Innovation Solution
A language-agnostic computer program repair engine generator is developed, capable of creating a repair engine that utilizes both symbolic and neural techniques. This system annotates a context-free grammar with domain-agnostic edit operations and domain-specific repair rules, enabling the repair engine to perform 'last-mile repairs' by converting buggy programs into correct ones with minimal edits.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If purely symbolic repair systems are used, then syntax constraints are satisfied, but the naturalness of candidate repairs is not captured
Solution Approach 1:
The patent merges symbolic parsing techniques with neural language modeling to create a hybrid repair system. The symbolic component ensures syntax constraint satisfaction through grammar-based parsing, while the neural component captures repair naturalness through language model probabilities, resolving the contradiction between precise syntax enforcement and natural repair generation.
Solution Approach 2:
The patent introduces a repair candidate generation module as an intermediary between the symbolic parser and the neural language model. This intermediary generates plausible repair candidates that are then filtered and ranked by both syntax validators and language model scores, mediating between the rigid syntax constraints and the flexible naturalness requirements.
2Reliability
If purely neural repair systems are used, then naturalness of repairs is captured, but guarantees on output are lost
Solution Approach 1:
The patent combines neural language model predictions with symbolic grammar validation to achieve both repair naturalness and output guarantees. The neural model provides natural-sounding repair candidates while the symbolic grammar checker ensures they meet syntax requirements, eliminating the trade-off between naturalness and guarantees.
Solution Approach 2:
The patent implements a feedback loop where neural-generated repair candidates are validated against syntax rules, and failed candidates are refined or rejected. This feedback mechanism ensures that only repairs satisfying both naturalness (from the neural model) and guarantees (from syntax validation) are output.
3Reliability
If traditional repair systems are used, then repair capability is provided, but computational efficiency is reduced
Solution Approach 1:
The patent segments the repair process into distinct stages: error detection, candidate generation, syntax validation, and ranking. Each stage uses optimized algorithms appropriate to its task, improving overall computational efficiency while maintaining repair capability. The segmentation allows parallel processing and early termination of invalid candidates.
Solution Approach 2:
The patent applies partial action by focusing computational resources only on the specific error region identified by the parser, rather than analyzing the entire program. This localized approach maintains repair capability while significantly reducing computational overhead compared to full-program analysis.
Data Source
AI summary
Techniques are described herein that are capable of creating a language-agnostic computer program repair engine generator. A context-free grammar is annotated to identify token(s) that are likely to be included in or excluded from a computer program in a manner that violates the context-free grammar. A language-agnostic computer program repair engine generator is created that is configured to generate a parser. The repair engine generator is configured to create a repair engine that: converts the candidate string into repaired strings that neither violate the context-free grammar nor violate a criterion for a valid computer program; calculates differences between the candidate string and the respective repaired strings; and replaces the candidate string with a designated repaired string based at least in part on the difference between the designated repaired string and the candidate string being less than or equal to a difference threshold.


