Deciding Equivalence between Extended Datalog Programs. A Brief Survey.

Similar documents
Strong and Uniform Equivalence in Answer-Set Programming: Characterizations and Complexity Results for the Non-Ground Case

Uniform Equivalence of Logic Programs under the Stable Model Semantics

Complexity Results for Checking Equivalence of Stratified Logic Programs

TE C H N I C A L R E P O R T. Model-Based Recasting in Answer-Set Programming INSTITUT FÜR INFORMATIONSSYSTEME DBAI-TR

Casting Away Disjunction and Negation under a Generalisation of Strong Equivalence with Projection

Eliminating Disjunction from Propositional Logic Programs under Stable Model Preservation

Elimination of Disjunction and Negation in Answer-Set Programs under Hyperequivalence

On Solution Correspondences in Answer-Set Programming

Simplifying Logic Programs under Uniform and Strong Equivalence

Modular Equivalence for Normal Logic Programs

On Eliminating Disjunctions in Stable Logic Programming

Notions of Strong Equivalence for Logic Programs with Ordered Disjunction

Theoretical Foundations of Logic Programming

A Theory of Forgetting in Logic Programming

Two New Definitions of Stable Models of Logic Programs with Generalized Quantifiers

On the Stable Model Semantics for Intensional Functions

Well-Supported Semantics for Description Logic Programs

Resolving Conflicts in Action Descriptions

Inconsistency Management for Traffic Regulations

First-Order Modular Logic Programs and their Conservative Extensions (Extended Abstract)

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 85

Level Mapping Induced Loop Formulas for Weight Constraint and Aggregate Programs

Loop Formulas for Description Logic Programs

A theory of modular and dynamic knowledge representation

Relativized Hyperequivalence of Logic Programs for Modular Programming

Logic Programming for Knowledge Representation

Forgetting and Conflict Resolving in Disjunctive Logic Programming

2.0 VO , WS 2005/06 Verarbeitung deklarativen Wissens (Declarative Knowledge Processing) Answer Set Programming /1.

Hyperequivalence of programs and operators (Preliminary version)

Reconciling Well-Founded Semantics of DL-Programs and Aggregate Programs

Yet Another Proof of the Strong Equivalence Between Propositional Theories and Logic Programs

Semantic forgetting in answer set programming. Author. Published. Journal Title DOI. Copyright Statement. Downloaded from. Griffith Research Online

Stable Models and Difference Logic

Dealing with Inconsistency when Combining Ontologies and Rules using DL-Programs

Extending Logic Programs with Description Logic Expressions for the Semantic Web

First-Order Disjunctive Logic Programming vs Normal Logic Programming

Splitting a Logic Program Revisited

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Relational Information Exchange and Aggregation in Multi-Context Systems

R E P O R T. Hyperequivalence of Logic Programs with Respect to Supported Models INSTITUT FÜR INFORMATIONSSYSTEME DBAI-TR

Nested Epistemic Logic Programs

I N F S Y S R E S E A R C H R E P O R T QUERY ANSWERING IS UNDECIDABLE IN DLS WITH REGULAR EXPRESSIONS, INSTITUT FÜR INFORMATIONSSYSTEME

Resolving Conflicts in Action Descriptions

A Syntax-Independent Approach to Forgetting in Disjunctive Logic Programs

Infinitary Equilibrium Logic and Strong Equivalence

Disjunctive Logic Programs with Existential Quantification in Rule Heads

ON LOGIC PROGRAM UPDATES INVITED TALK AT EPCL 2012 WORKSHOP. João Leite CENTRIA, New University of Lisbon

The Modal Logic S4F, the Default Logic, and the Logic Here-and-There

Two-Valued Logic Programs

Modular Equivalence for Normal Logic Programs

System f2lp Computing Answer Sets of First-Order Formulas

Integrating Answer Set Programming and Satisfiability Modulo Theories

Logic as The Calculus of Computer Science

Logic Programs with Compiled Preferences

Liberal Safety for Answer Set Programs with External Sources

Declarative and Computational Properties. 2 Logic Programs with Aggregates

Loop Formulas for Disjunctive Logic Programs

Computing Loops With at Most One External Support Rule

On the Logic and Computation of Partial Equilibrium Models

A Unified Framework for Representing Logic Program Updates

Grounding for Model Expansion in k-guarded Formulas with Inductive Definitions

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Preferences, Contexts and Answer Sets

Liberal Safety for Answer Set Programs with External Sources

Partial Grounded Fixpoints

Logic Programs with Abstract Constraint Atoms: The Role of Computations

Partial Meet Revision and Contraction in Logic Programs

Stable-Unstable Semantics: Beyond NP with Normal Logic Programs

Propositional Logic Language

Characterizing Causal Action Theories and Their Implementations in Answer Set Programming: Action Languages B, C and Beyond

A Brief Introduction to Nonmonotonic Reasoning

Equilibria in Heterogeneous Nonmonotonic Multi-Context Systems

An Abstract View on Modularity in Knowledge Representation

Logic: Propositional Logic (Part I)

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler

arxiv: v1 [cs.ai] 26 Jan 2019

A Logic Programming Approach to Querying and Integrating P2P Deductive Databases

Logical Constraints and Logic Programming 1

Reducts of propositional theories, satisfiability relations, and generalizations of semantics of logic programs

Fuzzy Answer Set semantics for Residuated Logic programs

Tractable Reasoning in First-Order Knowledge Bases with Disjunctive Information

cc : A Tool for Checking Advanced Correspondence Problems in Answer-Set Programming

Computational Logic Fundamentals (of Definite Programs): Syntax and Semantics

Strong Inconsistency in Nonmonotonic Reasoning

Lloyd-Topor Completion and General Stable Models

On Testing Answer-Set Programs 1

Relativized Hyperequivalence of Logic Programs for Modular Programming

Abstract Dialectical Frameworks

Finding Explanations of Inconsistency in Multi-Context Systems

Answer-Set Programming with Bounded Treewidth

COMMUNICATING ANSWER SET PROGRAMS

Answer set programming

Learning Goals of CS245 Logic and Computation

Reducing Propositional Theories in Equilibrium Logic to Logic Programs

Encoding formulas with partially constrained weights in a possibilistic-like many-sorted propositional logic

I N F S Y S R E S E A R C H R E P O R T A MODEL BUILDING FRAMEWORK FOR ANSWER SET PROGRAMMING WITH EXTERNAL COMPUTATIONS

CS-E3220 Declarative Programming

Trichotomy Results on the Complexity of Reasoning with Disjunctive Logic Programs

Diagnosing Automatic Whitelisting for Dynamic Remarketing Ads Using Hybrid ASP

Minimal logic programs (extended report)

Transcription:

Deciding Equivalence between Extended Datalog Programs. A Brief Survey. Stefan Woltran Technische Universität Wien A-1040 Vienna, Austria Joint work with: Thomas Eiter, Wolfgang Faber, Michael Fink, Hans Tompits March 16, 2010 (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 1 / 1

Introduction The Answer-Set Programming Paradigm Answer-Set Programming (ASP) is proposed as declarative problem solving paradigm (term was coined by V. Lifschitz [1999,2002]). ASP has its roots in KR, logic programming, non-monotonic reasoning and deductive databases (Datalog). General Idea Reduce solving a problem instance to computing models of a corresponding theory / program. Problem Instance I Encoding: Program P ASP Solver Model(s) Solution(s) (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 2 / 1

Introduction (ctd.) Answer-Set Programming We deal here with non-monotonic logic programs under the answer-set semantics (also known as stable model semantics). easy formulation of concepts like transitive closure or inertia; availability of efficient solvers, like DLV or Smodels. Numerous successful applications have been realized planning, semantic-web reasoning, information integration,... Realizations via domain-specific languages front-end compiles problem instance from the domain into a logic program (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 3 / 1

Introduction (ctd.) Shortcomings Currently there is a lack of support for engineering ASP solutions: (offline) optimization techniques, testing and verification issues, modular programming methods. Main obstacle on the theoretical side: Due to non-monotonicity, equivalence is a weaker concept than, e.g., in classical logic (no replacement-theorem!) P 1 P 2 Q P 1 Q P 2 In other words, in ASP it is not possible to apply (standard) semantics to program fragments (or program parts). (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 4 / 1

Motivation Example { edge(a,b). edge(b,c).... } { } path(x,y) :- edge(x,y). path(x,z) :- path(x,y), edge(y,z). { } path(x,y) :- edge(x,y). path(x,z) :- path(x,y), path(y,z). KB Q1 Q2 Ordinary Equivalence (OE) Do Q1 KB and Q2 KB have the same output? More interesting problem: Query Equivalence (QE) Do Q1 KB and Q2 KB have the same output, for each KB (i.e., for any set of edges)? (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 5 / 1

Motivation Example { edge(a,b). edge(b,c).... } { } path(x,y) :- edge(x,y). path(x,z) :- path(x,y), edge(y,z). { } path(x,y) :- edge(x,y). path(x,z) :- path(x,y), path(y,z). KB Q1 Q2 Ordinary Equivalence (OE) Do Q1 KB and Q2 KB have the same output? More interesting problem: Query Equivalence (QE) Do Q1 KB and Q2 KB have the same output, for each KB (i.e., for any set of edges)? (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 5 / 1

Motivation (ctd.) Example { edge(a,b). edge(b,c). path(c,d).... } KB { } path(x,y) :- edge(x,y). path(x,z) :- path(x,y), edge(y,z). { } path(x,y) :- edge(x,y). path(x,z) :- path(x,y), path(y,z). Q1 Q2 More interesting problem: Query Equivalence (QE) Do Q1 KB and Q2 KB have the same output, for each KB (i.e., for any set of edges)? Different problem: Uniform Equivalence (UE) Do Q1 KB and Q2 KB have the same output, for any set of facts (i.e., also paths may be part of the input)? (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 6 / 1

Motivation (ctd.) A different view on the example... edge(a,b). edge(b,c)....... :- path(x,y).... :-... { path(x,y) :- edge(x,y). path(x,z) :- path(x,y), edge(y,z). { path(x,y) :- edge(x,y). path(x,z) :- path(x,y), path(y,z). } } P M1 M2 Strong Equivalence (SE) Do M1 P and M2 P have the same output for any program P? (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 7 / 1

Motivation (ctd.) A different view on the example... edge(a,b). edge(b,c)....... :- path(x,y).... :-... { path(x,y) :- edge(x,y). path(x,z) :- path(x,y), edge(y,z). { path(x,y) :- edge(x,y). path(x,z) :- path(x,y), path(y,z). } } P M1 M2 Application specific equivalence Do M1 P and M2 P have the same output (for each P, where edge appears only in rule heads and path only in rule bodies)? (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 8 / 1

Traditional Datalog Terminology Datalog = ASP with Horn programs. Results for Datalog QE is undecidable (if domain is infinite) [Shmueli; SIGMOD 1987]. UE is decidable [Sagiv, 1988]. UE and SE coincide [Maher, 1988] (thus also SE decidable). OE and UE are complete for EXP [Eiter,Gottlob,Manilla; TODS 1997]. Results for general ASP? How do these results carry over to Datalog extensions? (default) negation in rule bodies; disjunctions in rule heads. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 9 / 1

Traditional Datalog Terminology Datalog = ASP with Horn programs. Results for Datalog QE is undecidable (if domain is infinite) [Shmueli; SIGMOD 1987]. UE is decidable [Sagiv, 1988]. UE and SE coincide [Maher, 1988] (thus also SE decidable). OE and UE are complete for EXP [Eiter,Gottlob,Manilla; TODS 1997]. Results for general ASP? How do these results carry over to Datalog extensions? (default) negation in rule bodies; disjunctions in rule heads. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, Hans MarchTompits) 16, 2010 9 / 1

Background Syntax A (disjunctive logic) program is a finite set of rules r : a 1 a l b 1,..., b m, not c 1,..., not c n ; a i, b j, c k are atoms over terms built from countable sets of constants (domain) and variables. not denotes default negation. Rule/Program Satisfaction Let I At be an interpretation, i.e., a set of ground atoms. Then, I = r iff I hd(r) whenever bd + (r) I and I bd (r) = ; I = P iff I = r, for each r P; I is then called a model of P. (hd(r) = {a 1,..., a l }, bd + (r) = {b 1,..., b m }, bd (r) = {c 1,..., c n }) (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 10 / 1

Background Syntax A (disjunctive logic) program is a finite set of rules r : a 1 a l b 1,..., b m, not c 1,..., not c n ; a i, b j, c k are atoms over terms built from countable sets of constants (domain) and variables. not denotes default negation. Rule/Program Satisfaction Let I At be an interpretation, i.e., a set of ground atoms. Then, I = r iff I hd(r) whenever bd + (r) I and I bd (r) = ; I = P iff I = r, for each r P; I is then called a model of P. (hd(r) = {a 1,..., a l }, bd + (r) = {b 1,..., b m }, bd (r) = {c 1,..., c n }) (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 10 / 1

Background (ctd.) Answer Sets Define the reduct, P I, of a program P w.r.t. I as P I = {hd(r) bd + (r) r Gr(P), bd (r) I = }. I is an answer set of P iff I is a minimal model of P I. The set of all answer sets of P is denoted by AS(P). Intuition 1st Step: One assumes an interpretation I and evaluates default negation with respect to I; 2nd Step: The remaining program has to justify I, i.e. each atom true in I has to be derived by P I. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 11 / 1

Background (ctd.) Strong Equivalence (SE) [Lifschitz,Pearce,Valverde; TOCL 2001] Two programs P, Q are strongly equivalent iff, for any program R, AS(P R) = AS(Q R). Uniform Equivalence (UE) [Eiter,Fink; ICLP 2003] Two programs P, Q are uniformly equivalent iff, for any finite set F of facts, AS(P F) = AS(Q F). A fact is a ground rule of form a. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 12 / 1

Strong Equivalence vs. Uniform Equivalence Example: Consider Programs P 1, P 2 P 1 = {a b } P 2 = {a not b; b not a}. We have AS(P 1 ) = AS(P 2 ) = {{a}, {b}}. P 1 and P 2 are not strongly equivalent Take R = {a b, b a}. Then, AS(P 1 R) = {{a, b}} and AS(P 2 R) =. (P 1 R) {a,b} = P 1 R {a, b} AS(P 1 R); (P2 R) {a,b} = R {a, b} / AS(P 2 R). P 1 and P 2 are uniformly equivalent Let F be any set of facts: for F {a, b} =, AS(P1 F ) = AS(P 2 F ) = {{a} F, {b} F }; otherwise AS(P1 F ) = AS(P 2 F ) = {F}. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 13 / 1

Strong Equivalence vs. Uniform Equivalence Example: Consider Programs P 1, P 2 P 1 = {a b } P 2 = {a not b; b not a}. We have AS(P 1 ) = AS(P 2 ) = {{a}, {b}}. P 1 and P 2 are not strongly equivalent Take R = {a b, b a}. Then, AS(P 1 R) = {{a, b}} and AS(P 2 R) =. (P 1 R) {a,b} = P 1 R {a, b} AS(P 1 R); (P2 R) {a,b} = R {a, b} / AS(P 2 R). P 1 and P 2 are uniformly equivalent Let F be any set of facts: for F {a, b} =, AS(P1 F ) = AS(P 2 F ) = {{a} F, {b} F }; otherwise AS(P1 F ) = AS(P 2 F ) = {F}. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 13 / 1

Strong Equivalence vs. Uniform Equivalence Example: Consider Programs P 1, P 2 P 1 = {a b } P 2 = {a not b; b not a}. We have AS(P 1 ) = AS(P 2 ) = {{a}, {b}}. P 1 and P 2 are not strongly equivalent Take R = {a b, b a}. Then, AS(P 1 R) = {{a, b}} and AS(P 2 R) =. (P 1 R) {a,b} = P 1 R {a, b} AS(P 1 R); (P2 R) {a,b} = R {a, b} / AS(P 2 R). P 1 and P 2 are uniformly equivalent Let F be any set of facts: for F {a, b} =, AS(P1 F ) = AS(P 2 F ) = {{a} F, {b} F }; otherwise AS(P1 F ) = AS(P 2 F ) = {F}. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 13 / 1

Strong Equivalence Theorem [Eiter,Fink,Tompits,W; AAAI 2005] Given program P, define its extended active domain as U + P = U P {c 1,..., c n }, where c i are new constants from U and n is the max. number of variables in a rule of P. Then, P and Q are strongly equivalent iff G(P, U + P Q ) is strongly equivalent to G(Q, U+ P Q ). SE for ground case is well understood [Turner, LPNMR 2001] Let SE(P) = {(X, Y ) X Y, X = P Y, Y = P}. Then P and Q are strongly equivalent iff SE(P) = SE(Q). (This results reformulates the seminal result in [Lifschitz,Pearce,Valverde; TOCL 2001] which was given in terms of logic HT). (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 14 / 1

Strong Equivalence Theorem [Eiter,Fink,Tompits,W; AAAI 2005] Given program P, define its extended active domain as U + P = U P {c 1,..., c n }, where c i are new constants from U and n is the max. number of variables in a rule of P. Then, P and Q are strongly equivalent iff G(P, U + P Q ) is strongly equivalent to G(Q, U+ P Q ). SE for ground case is well understood [Turner, LPNMR 2001] Let SE(P) = {(X, Y ) X Y, X = P Y, Y = P}. Then P and Q are strongly equivalent iff SE(P) = SE(Q). (This results reformulates the seminal result in [Lifschitz,Pearce,Valverde; TOCL 2001] which was given in terms of logic HT). (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 14 / 1

Strong Equivalence (ctd.) Consequence Strong equivalence between non-ground programs remains decidable (even for countable domain). In fact, the problem is conexp-complete. Implementation [Eiter,Faber,Traxler; LPNMR 2005]: reduction to a decidable FO-logic fragment (as suggested by [Lin; KR 2002]). If predicate arity is bounded, the problem is only Π P 2 -complete [Eiter,Faber,Fink,W; AMAI 2007]. Alternative Characterisations Via first-order variants of logic HT [Lifschitz,Pearce,Valverde; LPNMR 2007. Pearce,Valverde; ICLP 2008]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 15 / 1

Strong Equivalence (ctd.) Consequence Strong equivalence between non-ground programs remains decidable (even for countable domain). In fact, the problem is conexp-complete. Implementation [Eiter,Faber,Traxler; LPNMR 2005]: reduction to a decidable FO-logic fragment (as suggested by [Lin; KR 2002]). If predicate arity is bounded, the problem is only Π P 2 -complete [Eiter,Faber,Fink,W; AMAI 2007]. Alternative Characterisations Via first-order variants of logic HT [Lifschitz,Pearce,Valverde; LPNMR 2007. Pearce,Valverde; ICLP 2008]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 15 / 1

Uniform Equivalence Results [Eiter,Fink,Tompits,W; AAAI 2005, IJCAI 2007] Uniform equivalence is undecidable for normal programs. Shown via a mapping of QE between linear Horn programs (undecidable, see [Feder,Saraiya; ICDT 1992]) to UE between normal programs; Undecidability holds already for definite Horn programs which contain a single constraint with a negative body atom. A slightly different mapping (using [Shmueli; PODS 1987]) yields undecidability of UE between disjunctive programs of bounded predicate arities. Characterisation via UE-models (for any finite grounding): UE(P) = {(X, Y ) SE(P) Z : X Z Y (Z, Y ) / SE(P)}. Alternative characterisations in terms of FO-HT [Fink; TPLP 2010]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 16 / 1

Uniform Equivalence Results [Eiter,Fink,Tompits,W; AAAI 2005, IJCAI 2007] Uniform equivalence is undecidable for normal programs. Shown via a mapping of QE between linear Horn programs (undecidable, see [Feder,Saraiya; ICDT 1992]) to UE between normal programs; Undecidability holds already for definite Horn programs which contain a single constraint with a negative body atom. A slightly different mapping (using [Shmueli; PODS 1987]) yields undecidability of UE between disjunctive programs of bounded predicate arities. Characterisation via UE-models (for any finite grounding): UE(P) = {(X, Y ) SE(P) Z : X Z Y (Z, Y ) / SE(P)}. Alternative characterisations in terms of FO-HT [Fink; TPLP 2010]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 16 / 1

Strong Equivalence vs. Uniform Equivalence (ctd.) For positive programs SE and UE coincide Observation: reduct makes the difference. For positive programs, P Y = P holds for any Y. Thus, (X, Y ) SE(P) yields (X, X) SE(P). It follows that SE(P) SE(Q) implies UE(P) UE(Q). Hence, UE implies SE; the other direction is by definition. Consequence: UE remains decidable for positive disjunctive programs. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 17 / 1

Strong Equivalence vs. Uniform Equivalence (ctd.) For positive programs SE and UE coincide Observation: reduct makes the difference. For positive programs, P Y = P holds for any Y. Thus, (X, Y ) SE(P) yields (X, X) SE(P). It follows that SE(P) SE(Q) implies UE(P) UE(Q). Hence, UE implies SE; the other direction is by definition. Consequence: UE remains decidable for positive disjunctive programs. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 17 / 1

Overview of Results General case / bounded predicate arity disj. positive normal Horn SE conexp/π P 2 conexp/π P 2 conexp/π P 2 EXP/coNP UE undec./undec. conexp/π P 2 undec./? EXP/coNP OE conexp NP /Π P 3 conexp NP /Π P 3 conexp/π P 2 EXP/coNP [Eiter,Fink,Tompits,W; AAAI 2005, IJCAI 2007; Eiter, Faber, Fink, W; AMAI 2007]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 18 / 1

Overview of Results General case / bounded predicate arity disj. positive normal Horn SE conexp/π P 2 conexp/π P 2 conexp/π P 2 EXP/coNP UE undec./undec. conexp/π P 2 undec./? EXP/coNP OE conexp NP /Π P 3 conexp NP /Π P 3 conexp/π P 2 EXP/coNP [Eiter,Fink,Tompits,W; AAAI 2005, IJCAI 2007; Eiter, Faber, Fink, W; AMAI 2007]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 18 / 1

Stratification Interesting observation for ground programs SE (also UE) between stratified programs is conp (thus as hard as for normal programs) [Eiter,Fink,Tompits,W; IJCAI 2007]. for the hardness reduction in the case of SE the compared programs either have to be cyclic or possess different stratifications. Non-ground programs... UE is decidable for monadic programs (follows from [Halevy,Mumick,Sagiv,Shmueli; JACM 2001]); programs with joint stratification [Levy,Sagiv; VLDB 1993]. but the general case still open. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 19 / 1

Stratification Interesting observation for ground programs SE (also UE) between stratified programs is conp (thus as hard as for normal programs) [Eiter,Fink,Tompits,W; IJCAI 2007]. for the hardness reduction in the case of SE the compared programs either have to be cyclic or possess different stratifications. Non-ground programs... UE is decidable for monadic programs (follows from [Halevy,Mumick,Sagiv,Shmueli; JACM 2001]); programs with joint stratification [Levy,Sagiv; VLDB 1993]. but the general case still open. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 19 / 1

Parameterised Notions of Equivalence Definition [W; TPLP 2008. Truszczyński,W; TPLP 2009]. HB(A, B) all programs P such that hd(p) A and bd(p) B Programs P and Q are (A, B)-equivalent, in symbols, (A,B), if for every program R HB(A, B), AS(P R) = AS(Q R). Landscape for (A,B) with A B or B A (At, )=UE BRE SE=(At, At) B A RUE RSE HRE A B (, ) ordinary equivalence (, At) (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 20 / 1

Parameterised Notions of Equivalence Definition [W; TPLP 2008. Truszczyński,W; TPLP 2009]. HB(A, B) all programs P such that hd(p) A and bd(p) B Programs P and Q are (A, B)-equivalent, in symbols, (A,B), if for every program R HB(A, B), AS(P R) = AS(Q R). Landscape for (A,B) with A B or B A (At, )=UE BRE SE=(At, At) B A RUE RSE HRE A B (, ) ordinary equivalence (, At) (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 20 / 1

Conclusion Summary Equivalence in Answer-Set Programming has received increasing interest in recent years. (Slightly) different access compared to datalog. Still, ASP can learn from datalog results. Query-reachability [Levy,Sagiv; PODS 1992] Recursion elimination [Gaifman,Mairson,Sagiv,Vardi; JACM 1993] Bounding number of variables per rule [Vardi; PODS 1995] Open questions: Decidability/undecidability frontier for UE (stratified programs, bounded arities) Characterisation of stratified/acyclic/hcf programs in terms of SE/UE-models (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 21 / 1

Conclusion (ctd.) Future Work: Put theory to practice! Software-Engineering tools for Answer-Set programmers Modular ASP: Helsinki. SE: Vienna. Does (offline-)optimization pay off?... how to improve grounders for ASP-systems. Use parameterized equivalence checks for program verification already in use for logic-programming course at our institute equivalence notions could support E-learning facilities (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 22 / 1

Conclusion (ctd.) Lot of further work has been done... Program transformations [Eiter,Fink,Tompits,W; LPNMR/KR 2004. Eiter,Fink,Tompits,Traxler,W; KR 2006. Lin,Chen; JAIR 2007. Wong; JAIR 2008. Pührer,Tompits; LPNMR 2009]. Further language extensions (weak/weight constr., aggr.) [Turner; TPLP 2003. Liu,Truszczyński; JAIR 2006]. Non-standard comparisons [Eiter,Tompits,W; IJCAI 2005. Oetsch,Tompits,W; AAAI 2007. Oetsch,Tompits; ICLP 2008]. Logical underpinning [Lifschitz,Pearce,Valverde; TOCL 2001. De Jongh,Hendriks; TPLP 2003. Lifschitz,Pearce,Valverde; LPNMR 2007. Fink; ICLP 2008]. Other LP semantics well-founded semantics [Cabalar,Odintsov,Pearce,Valverde; ICLP 2006], supported semantics [Truszczyński,W; AAAI 2008]. (Joint Deciding workequivalence with: Thomas in Extended Eiter, Wolfgang Datalog Faber, Michael Fink, March Hans Tompits) 16, 2010 23 / 1