[Paper Review] Logic + control: An example of program construction
This paper presents a Prolog-based SAT solver constructed via logic programming enhanced with control mechanisms—specifically selection rules and pruning—proving its correctness, completeness, and termination. The key contribution is a formal method for verifying that certain pruning strategies preserve completeness, alongside a novel notion of semi-completeness with a local sufficient condition.
We present a Prolog program (the SAT solver of Howe and King) as a logic program with added control. The control consists of a selection rule (delays of Prolog) and pruning the search space. We construct the logic program together with proofs of its correctness and completeness, with respect to a formal specification. This is augmented by a proof of ter-mination under any selection rule. Correctness and termination are inherited by the Prolog program, the change of selection rule preserves completeness. We prove that completeness is also preserved by one case of pruning; for the other an informal justification is presented. For proving correctness we use a method, which should be well known but is often neglected. A contribution of this paper is a method for proving completeness. In particular we introduce a notion of semi-completeness, for which a local sufficient condition exists. We compare the proof methods with declarative diagnosis (algorithmic debugging). We introduce a method of proving that a certain kind of pruning preserves completeness. We argue that the proof methods correspond to natural declarative thinking about programs, and that they can be used, formally or informally, in every-day programming.
Motivation & Objective
- To formally construct a Prolog SAT solver by integrating logic with control mechanisms such as selection rules and search space pruning.
- To prove correctness and completeness of the logic program with respect to a formal specification.
- To establish termination under any selection rule, ensuring robustness of the program's behavior.
- To develop a method for proving that specific pruning strategies preserve completeness.
- To demonstrate that formal proof techniques align with natural declarative reasoning in programming.
Proposed method
- Construct the SAT solver as a logic program with explicit control via selection rules (delays) and pruning of search space.
- Use a formal specification to define correctness and completeness, and prove these properties using a method emphasizing declarative reasoning.
- Introduce the concept of semi-completeness, which allows for a local sufficient condition to verify completeness.
- Prove termination for any selection rule by analyzing the structure of the logic program.
- Apply a novel proof technique to show that one class of pruning preserves completeness, with informal justification for the other.
- Compare the proof framework with declarative debugging (algorithmic debugging) to validate its practical relevance.
Experimental results
Research questions
- RQ1How can logic programming with added control mechanisms be used to construct a correct and complete SAT solver in Prolog?
- RQ2What formal method ensures that pruning strategies do not compromise completeness in logic programs?
- RQ3Can a local sufficient condition for semi-completeness be defined and applied to verify completeness in a modular way?
- RQ4How does the choice of selection rule affect correctness and completeness in the presence of control constructs?
- RQ5To what extent do formal proof techniques for correctness and completeness align with intuitive, declarative programming practices?
Key findings
- The SAT solver is formally proven correct and complete with respect to a given specification, and termination is guaranteed under any selection rule.
- The introduction of semi-completeness provides a practical, local criterion for verifying completeness, simplifying the proof process.
- One class of pruning is formally proven to preserve completeness, offering a reliable optimization technique.
- Informal justification is provided for a second class of pruning, suggesting its safety under certain conditions.
- The proof techniques used are shown to mirror natural declarative thinking, making them applicable in everyday programming contexts.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.