Language-Agnostic Program Repair Engine Generator

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvesyntax constraint satisfactionVSAvoidrepair naturalness
Core Design Contradiction:
Manufacturing precisionVSReliability

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.

Inventive Principle:
Principle #5Merging (Combining)

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If purely neural repair systems are used, then naturalness of repairs is captured, but guarantees on output are lost

Engineering Contradiction:
Improverepair naturalnessVSAvoidoutput guarantee
Core Design Contradiction:
ReliabilityVSManufacturing precision

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.

Inventive Principle:
Principle #5Merging (Combining)

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.

Inventive Principle:
Principle #23Feedback

3Reliability

If traditional repair systems are used, then repair capability is provided, but computational efficiency is reduced

Engineering Contradiction:
Improverepair capabilityVSAvoidcomputational efficiency
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12265789B2Language-agnostic computer program repair engine generator
Publication Date: 2025.04.01 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12265789B2 patent drawing
  • US12265789B2 patent drawing
  • US12265789B2 patent drawing

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.