Skip to main content
QUICK REVIEW

[Paper Review] Justifications for Logic Programs under Answer Set Semantics

Enrico Pontelli, Tran Cao Son|ArXiv.org|Dec 3, 2008
Logic, Reasoning, and Knowledge3 citations
TL;DR

This paper introduces off-line and on-line justifications for Answer Set Programming (ASP) to enhance program understanding and debugging. It formalizes graph-based explanations of atom truth values in answer sets, integrates them into the Smodels computation model, and demonstrates their utility in explaining and debugging ASP programs through a prototype in ASP-PROLOG.

ABSTRACT

The paper introduces the notion of off-line justification for Answer Set Programming (ASP). Justifications provide a graph-based explanation of the truth value of an atom w.r.t. a given answer set. The paper extends also this notion to provide justification of atoms during the computation of an answer set (on-line justification), and presents an integration of on-line justifications within the computation model of Smodels. Off-line and on-line justifications provide useful tools to enhance understanding of ASP, and they offer a basic data structure to support methodologies and tools for debugging answer set programs. A preliminary implementation has been developed in ASP-PROLOG. (To appear in Theory and Practice of Logic Programming (TPLP))

Motivation & Objective

  • Address the lack of methodologies and tools for understanding and debugging ASP programs due to their highly declarative and 'hand-off' execution style.
  • Provide a formal mechanism to explain why specific atoms are true or false in a given answer set.
  • Develop on-line justifications that track truth value derivation during computation, improving debugging efficiency compared to trace-based methods.
  • Integrate justifications into the Smodels computation model to support incremental and explainable ASP execution.
  • Enable practical debugging by offering a data structure that captures the logical dependencies behind answer set formation.

Proposed method

  • Define off-line justifications as safe e-graphs that explain the truth value of an atom in a final answer set using a dependency graph of positive and negative literals.
  • Introduce on-line justifications as e-graphs constructed incrementally during the computation process, reflecting the state of the program at each step.
  • Use the concept of a (J, A)-based e-graph, where A is the set of atoms derived from the program's rules and J is the current interpretation.
  • Construct justification graphs through a step-by-step process: for each rule, build subgraphs for its body literals and combine them into a justification for the head.
  • Ensure safety of e-graphs by verifying that no node is reachable from itself via positive edges, preventing circular justifications.
  • Integrate on-line justifications into the Smodels framework by maintaining snapshots of the computation state and building justification graphs dynamically.

Experimental results

Research questions

  • RQ1How can we formally explain why a specific atom is true or false in a given answer set of an ASP program?
  • RQ2What is the role of intermediate computation states in constructing meaningful justifications for atoms during ASP execution?
  • RQ3Can on-line justifications be constructed incrementally during computation to improve debugging efficiency compared to post-hoc analysis?
  • RQ4How do off-line and on-line justifications relate to each other in terms of correctness and completeness?
  • RQ5Can the integration of justifications into existing ASP solvers like Smodels be achieved without sacrificing performance or correctness?

Key findings

  • Off-line justifications are formalized as safe e-graphs that provide a complete and correct explanation of an atom's truth value in a final answer set.
  • On-line justifications are constructed incrementally during computation and are proven to be correct and consistent with the final answer set.
  • The construction of on-line justifications ensures that only relevant computation paths are tracked, avoiding the overhead and confusion of full trace-based debugging.
  • The paper proves that every on-line justification corresponds to a valid off-line justification in the final answer set, ensuring consistency.
  • A prototype implementation in ASP-PROLOG demonstrates the feasibility and practicality of integrating justifications into real ASP systems.
  • The method effectively supports debugging by isolating the logical dependencies responsible for the truth value of specific atoms, improving program comprehension.

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.