Computation Tree Logic Guided Program Repair

📅 2025-02-21
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This paper addresses the overfitting problem induced by test-suite guidance in automatic repair of infinite-state programs. We propose a CTL (Computation Tree Logic) temporal-logic-guided repair approach. Our method encodes both program semantics and CTL specifications in Datalog, using fact modification as the primary repair mechanism; to our knowledge, this is the first CTL-guided repair framework built upon hierarchical Datalog. To handle infinite computations arising from liveness properties, we innovatively introduce loop summarization. Furthermore, we extend Symbolic Execution Datalog (SEDL) to support hierarchical negation and fixed-point semantics modeling. Evaluated on small-scale benchmarks and real-world scenarios, our approach achieves accuracy rates of 56.6% (+28.9 percentage points) and 88.5% (+11.6 percentage points), respectively, and attains a 100% repair rate—significantly outperforming state-of-the-art tools.

Technology Category

Planning, Routing, and Scheduling: Replanning and Plan RepairConstraint Satisfaction and Optimization: Satisfiability Modulo TheoriesKnowledge Representation and Reasoning: Automated Reasoning and Theorem Proving

Application Category

Search and Retrieval-Augmented AI: Web learning to rank, online learning, and counterfactual learning for rankingSemantics and Knowledge: Data modeling to support human-machine intelligence, including LLMs agents, intelligent system behavior, explanations, and user-friendly interactionsEconomics, Online Markets and Human Computation: Data quality aspects of human-annotated datasets
📝 Abstract
Temporal logics like Computation Tree Logic (CTL) have been widely used as expressive formalisms to capture rich behavioral specifications. CTL can express properties such as reachability, termination, invariants and responsiveness, which are difficult to test. This paper suggests a mechanism for the automated repair of infinite-state programs guided by CTL properties. Our produced patches avoid the overfitting issue that occurs in test-suite-guided repair, where the repaired code may not pass tests outside the given test suite. To realize this vision, we propose a repair framework based on Datalog, a widely used domain-specific language for program analysis, which readily supports nested fixed-point semantics of CTL via stratified negation. Specifically, our framework encodes the program and CTL properties into Datalog facts and rules and performs the repair by modifying the facts to pass the analysis rules. Previous research proposed a generic repair mechanism for Datalog-based analysis in the form of Symbolic Execution of Datalog (SEDL). However, SEDL only supports positive Datalog, which is insufficient for expressing CTL properties. Thus, we extended SEDL to make it applicable to stratified Datalog. Moreover, liveness property violations involve infinite computations, which we handle via a novel loop summarization. Our approach achieves analysis accuracy of 56.6% on a small-scale benchmark and 88.5% on a real-world benchmark, outperforming the best baseline performances of 27.7% and 76.9%. Our approach repairs all detected bugs, which is not achieved by existing tools.
Problem

Research questions and friction points this paper is trying to address.

Automated repair of infinite-state programs using CTL.
Prevents overfitting in test-suite-guided program repair.
Extends SEDL for stratified Datalog to support CTL properties.
Innovation

Methods, ideas, or system contributions that make the work stand out.

CTL-guided program repair
Extended SEDL for stratified Datalog
Novel loop summarization technique
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.