Skip to main content
QUICK REVIEW

[Paper Review] SPARC - Sorted ASP with Consistency Restoring Rules

Evgenii Balai, Michael Gelfond|arXiv (Cornell University)|Jan 8, 2013
Logic, Reasoning, and KnowledgeComputer Science11 references9 citations
TL;DR

This paper introduces SPARC, a sorted extension of CR-Prolog that enhances type safety and program modularity by separating sort definitions from logic rules. It translates CR-Prolog into DLV with weak constraints, demonstrating that while performance is comparable to native CR-Prolog solvers, the translation reveals deep structural parallels between consistency restoring rules and weak constraints, paving the way for more efficient and user-friendly ASP implementations.

ABSTRACT

This is a preliminary report on the work aimed at making CR-Prolog -- a version of ASP with consistency restoring rules -- more suitable for use in teaching and large applications. First we describe a sorted version of CR-Prolog called SPARC. Second, we translate a basic version of the CR-Prolog into the language of DLV and compare the performance with the state of the art CR-Prolog solver. The results form the foundation for future more efficient and user friendly implementation of SPARC and shed some light on the relationship between two useful knowledge representation constructs: consistency restoring rules and weak constraints of DLV.

Motivation & Objective

  • To improve CR-Prolog’s usability in teaching and large-scale applications by introducing a sorted type system.
  • To address limitations in ASP such as unsafe rules and lack of type checking, which hinder correctness and debugging.
  • To explore the relationship between consistency restoring rules and weak constraints in DLV through translation and performance comparison.
  • To lay the foundation for a more efficient, user-friendly, and extensible implementation of SPARC.

Proposed method

  • Designing SPARC as a sorted variant of CR-Prolog by separating sort declarations from logic rules to improve type safety and grounding efficiency.
  • Defining a formal grammar for SPARC that includes identifiers, variables, arithmetic and symbolic terms, and supports both logical and arithmetic atoms.
  • Translating a basic CR-Prolog program into DLV’s language with weak constraints to enable execution on standard ASP solvers.
  • Comparing the performance of the translated DLV-based solver against a native CR-Prolog implementation to evaluate efficiency.
  • Using the Contingency Axiom as a core mechanism to represent indirect exceptions in default reasoning, encoded via consistency restoring rules.
  • Formalizing semantics of SPARC through a two-stage process: grounding followed by answer set generation, with sort-based constraints ensuring well-typedness.

Experimental results

Research questions

  • RQ1How can sort declarations be effectively separated from logic rules in ASP to improve type safety and modularity?
  • RQ2To what extent can CR-Prolog programs be efficiently encoded using weak constraints in DLV?
  • RQ3What are the performance trade-offs between native CR-Prolog solvers and DLV-based translations using weak constraints?
  • RQ4How do consistency restoring rules and weak constraints relate in terms of semantics and computational behavior?
  • RQ5Can the integration of sorting and constraint-based reasoning lead to more maintainable and scalable ASP applications?

Key findings

  • The translation of CR-Prolog into DLV with weak constraints is semantically sound and preserves the intended behavior of consistency restoring rules.
  • Performance of the DLV-based solver is comparable to that of the native CR-Prolog solver, though neither significantly outperforms the other in the tested benchmarks.
  • The use of sort declarations in SPARC reduces the risk of type errors and improves program maintainability, especially in large or modular codebases.
  • Unsafe rules in traditional ASP are mitigated in SPARC through explicit sort checking, preventing unintended behavior under program updates.
  • The study reveals a strong conceptual and structural similarity between consistency restoring rules and weak constraints, suggesting potential for unified reasoning frameworks.
  • Despite no major performance gain, the translation provides a viable path for implementing SPARC on existing DLV infrastructure, enabling broader tool support.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.