Table of Contents
Fetching ...

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

Jan Heuer

TL;DR

This work extends anthem to verify strong equivalence for non-positive logic programs by introducing a HT-to-classical mapping $\sigma^*$ and extending the program-to-classical translation $τ^*$ to handle pools and tuples. It formalises how $σ^*$ can express HT-equivalence in classical logic and how the extended $τ^*$, combined with $σ^*$, encodes strong equivalence of logic programs in finite first-order logic, enabling automated theorem proving. The extended implementation in anthem 0.3 translates programs with negation, simple choices, and pools into classical logic and compares several automated provers (cvc4, princess, vampire, zipperposition), with cvc4 and vampire (notably in parallel) providing the most viable verification options. The results demonstrate practical applicability for verification in industrial ASP contexts and point to future work on richer language features and solver-assisted verification to broaden coverage and efficiency.

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 $τ^*$ 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 $σ^*$ is presented, which transforms formulas from the logic of here-and-there to classical logic. A theorem formalises how $σ^*$ can be used to express equivalence in the logic of here-and-there in classical logic. Second, the translation $τ^*$ is extended to programs containing pools. Another theorem shows how $σ^*$ can be combined with $τ^*$ to express the strong equivalence of two programs in classical logic. With $σ^*$ and the extended $τ^*$, it is possible to express the strong equivalence of logic programs containing negation, simple choices, and pools. Both the extended $τ^*$ and $σ^*$ 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...

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

TL;DR

This work extends anthem to verify strong equivalence for non-positive logic programs by introducing a HT-to-classical mapping and extending the program-to-classical translation to handle pools and tuples. It formalises how can express HT-equivalence in classical logic and how the extended , combined with , encodes strong equivalence of logic programs in finite first-order logic, enabling automated theorem proving. The extended implementation in anthem 0.3 translates programs with negation, simple choices, and pools into classical logic and compares several automated provers (cvc4, princess, vampire, zipperposition), with cvc4 and vampire (notably in parallel) providing the most viable verification options. The results demonstrate practical applicability for verification in industrial ASP contexts and point to future work on richer language features and solver-assisted verification to broaden coverage and efficiency.

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 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 is presented, which transforms formulas from the logic of here-and-there to classical logic. A theorem formalises how can be used to express equivalence in the logic of here-and-there in classical logic. Second, the translation is extended to programs containing pools. Another theorem shows how can be combined with to express the strong equivalence of two programs in classical logic. With and the extended , it is possible to express the strong equivalence of logic programs containing negation, simple choices, and pools. Both the extended and 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...
Paper Structure (24 sections, 7 theorems, 42 equations, 4 tables)

This paper contains 24 sections, 7 theorems, 42 equations, 4 tables.

Key Result

Theorem 1

Two programs, $\Pi_1$ and $\Pi_2$ are strongly equivalent if and only if their representations as propositional formulas are equivalent in the logic of here-and-there.

Theorems & Definitions (20)

  • Definition 4.1: Equivalence
  • Definition 4.2: Uniform Equivalence
  • Definition 4.3: Strong Equivalence
  • Definition 4.4: Satisfiability in the Logic of Here-And-There
  • Theorem 1: Strong Equivalence
  • Definition 4.5: $\sigma$
  • Definition 4.6: $\sigma^*$
  • Lemma 1
  • proof
  • Lemma 2
  • ...and 10 more