Automated Verification of Equivalence Properties in Advanced Logic Programs -- Bachelor Thesis

Jan Heuer
2024-07-17
Abstract:With the increase in industrial applications using Answer Set Programming, the need for formal verification tools, particularly for critical applications, has also increased. During the program optimisation process, it would be desirable to have a tool which can automatically verify whether an optimised subprogram can replace the original subprogram. Formally this corresponds to the problem of verifying the strong equivalence of two programs. In order to do so, the translation tool anthem was developed. It can be used in conjunction with an automated theorem prover for classical logic to verify that two programs are strongly equivalent. With the current version of anthem, only the strong equivalence of positive programs with a restricted input language can be verified. This is a result of the translation $\tau^*$ implemented in anthem that produces formulas in the logic of here-and-there, which coincides with classical logic only for positive programs. This thesis extends anthem in order to overcome these limitations. First, the transformation $\sigma^*$ is presented, which transforms formulas from the logic of here-and-there to classical logic. A theorem formalises how $\sigma^*$ can be used to express equivalence in the logic of here-and-there in classical logic. Second, the translation $\tau^*$ is extended to programs containing pools. Another theorem shows how $\sigma^*$ can be combined with $\tau^*$ to express the strong equivalence of two programs in classical logic. With $\sigma^*$ and the extended $\tau^*$, it is possible to express the strong equivalence of logic programs containing negation, simple choices, and pools. Both the extended $\tau^*$ and $\sigma^*$ are implemented in a new version of anthem. Several examples of logic programs containing pools, negation, and simple choice rules, which the new version of anthem can translate to classical logic, are presented. Some a...
Logic in Computer Science,Artificial Intelligence
What problem does this paper attempt to address?
This paper focuses on the problem of automating the verification of strong equivalence properties in advanced logic programs. With the increasing use of Answer Set Programming (ASP) in industrial applications, the demand for formal verification tools has also grown, especially in critical applications. The authors propose the need for a tool to automatically verify whether optimized subprograms can replace the original subprograms without changing their behavior, which involves verifying the strong equivalence of two programs. The paper introduces a translation tool called anthem, which combines with classical logic automated theorem provers to automate the verification of strong equivalence between two logic programs. However, the current version of anthem can only handle limited language input and the strong equivalence of forward programs. To address this issue, the paper extends anthem by introducing a new transformation σ∗ to convert formulas from here-there logic to classical logic, and extends the translation τ∗ to handle programs with pools, negation, and simple choice rules. The paper demonstrates how the new version of anthem converts these more complex logic programs into classical logic using different theorem provers (such as cvc4 and vampire) for the verification of strong equivalence through several examples. The results show that cvc4 and vampire are the best options when used in conjunction with anthem. In conclusion, the goal of this paper is to overcome the limitations of the current anthem by enabling it to verify the strong equivalence of logic programs that include negation, simple choice, and pools, and achieve this goal through formal methods and new translation tools.