CS-E3220 Declarative Programming
|
|
- Peregrine Day
- 5 years ago
- Views:
Transcription
1 CS-E3220 Declarative Programming Lecture 7: Advanced Topics in ASP Aalto University School of Science Department of Computer Science Spring 2018
2 Motivation Answer sets and the stable model semantics allows us to understand the meaning of logic programs in an unambiguous way. At this lecture, we will introduce several concepts that help to understand the nature of logic programs even further. The presented characterizations of stable models form the basis for the efficient computation of answer sets. Logic Program SharedContext Propositional Variables Atoms Bodies Static Nogoods Implication Graph Solver 1...n Decision Heuristic Conflict Resolution Assignment Atoms/Bodies Preprocessing Program Builder Enumerator Nogood Distributor Propagation Unit Propagation Post Propagation Preprocessor Recorded Nogoods [Gebser et al.] ParallelSolve Counter T W... Queue P1 P2... Threads S1 S2... Shared Nogoods S Pn Sn 2/36
3 Program Development and Verification We need some notion(s) of equivalence to decide when two logic programs can be considered to have exactly the same meaning. It is possible to implement verification tasks by combining suitable translations of input programs, and using ASP solvers for the search of counter-examples. a a, c. a d, d. b. b c, d. c b. c d. d c. b. b c, d. c b. c d. d c. b. c d. d c. What are the correctness criteria for the simplifications done above? 3/36
4 Translating ASP Towards SAT Example Clark s completion provides a starting point for translations. Completion is faithful (i.e., model-preserving) for tight programs. Loop formulas can be introduced to cover arbitrary programs. Translations from ASP into SAT are necessarily non-modular: Normal Program Models Clauses a b. b a. {a}, {b} a b, a b a b. b a. /0 a b, a b, a b We cannot translate an ASP program rule-by-rule! 4/36
5 An Impossibility Result Theorem There is no faithful and modular translation Tr C from normal programs into sets of clauses. Proof Assume that for all normal programs P, P 1, and P 2, SM(P) /0 if and only if CM(Tr C (P)) /0, and Tr C (P 1 P 2 ) = Tr C (P 1 ) Tr C (P 2 ). Consider normal programs P 1 = {a a, b.} and P 2 = {b.}: 1. Now SM(P 1 ) = /0 implies that CM(Tr C (P 1 )) = /0. 2. Thus CM(Tr C (P 1 ) Tr C (P 2 )) = /0 and also CM(Tr C (P 1 P 2 )) = /0. 3. It follows that SM(P 1 P 2 ) = /0. A contradiction, since SM(P 1 P 2 ) = {{b}}. 5/36
6 Agenda Notions of Equivalence Translation-Based Verification Clark s Completion Tight Programs Loop Formulas Characterization of Stable Models 6/36
7 1. NOTIONS OF EQUIVALENCE The program development in ASP resembles that in conventional programming languages: the final program solving a particular problem is obtained after a number of revisions to the first version. Such revisions may aim at changing the set of answer sets or improving the performance of the answer-set solver. A basic question is whether the different versions of a program yield the same answer sets (capturing the solutions to a problem). We are mainly interested to answer this question in the case of weight constraint programs (WCPs) formed using: Normal rules: a b 1,...,b n, c 1,..., c m. Choice rules: {a 1,...,a h } b 1,...,b n, c 1,..., c m. Cardinality rules: a l {b 1,...,b n, c 1,..., c m }. Weight rules: a l {w 1 : b 1,...,w n : b n, v 1 : c 1,...,v m : c m }. 7/36
8 Weak and Strong Equivalence There are two basic notions of equivalence depending on whether we take into account the potential contexts of programs or not. Definition Two weight constraint programs P and Q are 1. (weakly) equivalent, denoted by P Q, iff SM(P) = SM(Q), and 2. strongly equivalent [Lifschitz, 2001], denoted by P s Q, iff for all weight constraint programs R, Proposition P R Q R, i.e., SM(P R) = SM(Q R). For all weight constraint programs P and Q, P s Q implies P Q (but not vice versa) and for any context program R, P R s Q R (congruence). 8/36
9 Examples Consider the weak/strong equivalence of following pairs of programs: P Q P Q? P s Q? a a. yes yes a b. a. yes no a b. b a. {a,b}. no no a b, b. yes yes a b. a b. a. yes no a a. a b. b a. yes no Provide a witnessing context R for the cases with P s Q! Example For the second pair of programs, adding b as a fact is sufficient: SM({a b. b. }) = {{b}} whereas SM({a. b. }) = {{a,b}}. 9/36
10 Characterization of Strong Equivalence Theorem Given a WCP P, an SE-interpretation is a pair N,M of ordinary interpretations such that N M At(P) [Turner, 2003]. An SE-interpretation N, M for P is an SE-model of P if and only if M = P and N = P M. Let SE(P) denote the set of SE-models of P. For any WCPs P and Q, P s Q if and only if SE(P) = SE(Q). Example Consider P = {a b. a b. } and Q = {a. } from the previous slide. The fact that P s Q is witnessed by 1. the context R = {b a. }, and 2. an SE-model /0,{a,b} of P which is not an SE-model of Q. Which SE-interpretations are the other SE-models of P and Q? 10/36
11 From Counter-Models to Context Programs The number of possible context programs R is much higher than the number of possible counter-models for strong equivalence. Actually, context programs can be restricted to unary programs consisting only of facts or unary rules of the form a b. Proposition Let P and Q be two WCPs such that N,M SE(P) but N,M SE(Q) and R a context program containing 1. for each a N, the fact a., and 2. for each a,b M \ N, the unary rule a b. Then M SM(P R), but M SM(Q R), i.e., R witnesses P s Q. Example For our preceding example, we obtain R with a b and b a. 11/36
12 Complexity Results The question is whether it is computationally feasible to verify P Q (or P s Q) for two programs under consideration. To ease complexity analysis, we distinguish the respective inclusion problems for and s as follows. Definition 1. The language WEQIN is the set of pairs P,Q of finite WCPs such that SM(P) SM(Q). 2. The language WEQ is the set of pairs P,Q of finite WCPs such that SM(P) = SM(Q). 3. The language SEQIN is the set of pairs P,Q of finite WCPs programs such that SE(P) SE(Q). 4. The language SEQ is the set of pairs P,Q of finite WCPs such that SE(P) = SE(Q). 12/36
13 Complexity Results Theorem The complement of WEQIN is in NP and NP-hard/complete, i.e., WEQIN is conp-complete. Theorem The complement of SEQIN is in NP, i.e., SEQIN is in conp. Theorem SEQIN is conp-hard [Lin, 2002]. Corollary Both WEQ and SEQ are conp-complete. We may use ASP solvers to study the equivalence of WCPs. 13/36
14 2. TRANSLATION-BASED VERIFICATION The idea is to translate two programs P and Q into a single program Tr EQ (P,Q) having a stable model iff M SM(P) such that M SM(Q). If such a stable model M is found, it acts as a certificate and a counter-model for programs P and Q not being equivalent. The translation-based verification of P Q counts on P Q Tr EQ (P,Q) and Tr EQ (Q,P) have no stable models. It is assumed (without loss of generality) that At(P) = At(Q). A number of new atoms not appearing in At(P) are needed: 1. an atom a for each atom a At(Q) to represent the reduct Q M with respect to a potential counter-example M, and 2. atoms d and f for additional control. 14/36
15 Translation for Equivalence Checking Definition For WCPs P and Q with At(P) = At(Q), the translation Tr EQ (P,Q) = P Q {d a, a. d a, a. a At(Q)} {f d, f. } where Q contains 1. a b 1,...,b n, c 1,..., c m for each basic rule, 2. a l {b 1,...,b n, c 1,..., c m } for each cardinality rule, 3. a i b 1,...,b n,a i, c 1,..., c m for each choice rule and head atom a i {a 1,...,a h }, and 4. a l {w 1 : b 1,...,w n : b n,v 1 : c 1,...,v m : c m } for each weight rule in the program Q. 15/36
16 Observations about the Translation Tr EQ (P,Q) Theorem The translation Tr EQ (P,Q) is designed to capture pairs P,Q of WCPs such that P,Q WEQIN. To this end, the parts of Tr EQ (P,Q) play the following roles: 1. The rules of P capture a stable model M SM(P). 2. The rules of Q express LM(Q M ) using At(Q). 3. Rules of the forms d a, a and d a, a check whether M and LM(Q M ) differ with respect to some a At(Q). 4. The rule f d, f excludes cases where there is no difference, i.e., M LM(Q M ) is enforced. For any WCPs P and Q with At(P) = At(Q), 1. the translation Tr EQ (P,Q) has a stable model M SM(P) such that M SM(Q), and 2. P Q SM(Tr EQ (P,Q)) = /0 and SM(Tr EQ (Q,P)) = /0. 16/36
17 Example Let us check the equivalence of the following programs: P: {a,b}. Q: a b. a a, b. b a. The translation Tr EQ (P,Q) consists of {a,b}. a a, b. a b. b a. d a, a. d b, b. d a, a. d b, b. f d, f. Given these, it is easy to verify the following: 1. There is N = {a,b,d} SM(Tr EQ (P,Q)) giving rise to a counter-model M = N At(P) SM(P) so that P Q. 2. The reduct Tr EQ (P,Q) N = {a. b. d a. d b. }. 17/36
18 Tool for Checking Equivalence There is a translator called LPEQ (v. 1.25) that implements the translation-based verification method described above. The actual search for potential counter-examples can be implemented using an ASP solver such as CLASP. The weak equivalence of two WCPs, first grounded with GRINGO (version 5 below), can be checked with the following commands: $ gringo --output smodels p1.lp > p1.sm $ gringo --output smodels p2.lp > p2.sm $ lpeq p1.sm p2.sm clasp 1 $ lpeq p2.sm p1.sm clasp 1 Classical and strong equivalence can be checked similarly. 18/36
19 3. CLARK S COMPLETION Our next goal is to characterize stable models of programs using the set of classical models CM(S) = {M Vars(S) M = S}. Ultimately, we aim at a faithful translation which preserves the semantics of a program (i.e., a one-to-one correspondence between stable models and classical models) up to At(P). Clark s completion procedure provides a preliminary translation of a normal program P into a propositional theory Comp(P). Although the translation Comp( ) is not faithful in general, it can be characterized in terms of supported models of programs. Definition We abbreviate a b 1,...,b n, c 1,..., c m by a B, C. Given a normal program P and an atom a At(P), let Def P (a) denote the definition of a in P, i.e., the set of normal rules a B, C P having the atom a as their head. 19/36
20 Completing Definitions of Atoms Definition For a finite normal program P, the completion Comp(P) includes a n i=1 ( b B i b c Ci c) for each atom a At(P) and the respective definition Def P (a) = {a B 1, C a B n, C n. }. A couple of observations about Comp(P) follow: 1. The transformation is not faithful in general because, e.g., SM(P) = {/0} and CM(Comp(P)) = {/0,{a,b}} for P = {a b. b a.} and Comp(P) = {a b,b a}. 2. The derivation of a CNF for Comp(P) is exponential in the worst case unless new atoms are introduced as names for rule bodies. 20/36
21 Supported Models Definition For a normal program P, an interpretation M At(P) is a supported model of P if and only if M = {a a B P M and B M}. Proposition If M At(P) is a supported model of a normal program P and a M, then there is a supporting rule a B, C P such that a is the head of the rule and M = B C. Example The program P = {a b. b a. } has two supported models M 1 = /0 and M 2 = {a,b} based on P M 1 = P = P M 2 but only M 1 is stable: 1. LM(P M 1) = LM(P) = /0 = M 1 and 2. LM(P M 2) = LM(P) = /0 M 2. 21/36
22 Properties of Stable and Supported Models Theorem For a normal program P, it holds in general that Proposition SM(P) SuppM(P) = CM(Comp(P)). If a normal program P contains only atomic rules of the form a C, then SM(P) = SuppM(P) = CM(Comp(P)). = The completion Comp( ) is faithful for atomic normal programs. Example Consider a program P = {a b. b a.} and its completion Comp(P) = {a b, b a} leading to a perfect match of models: SM(P) = {{a},{b}} = CM(Comp(P)). 22/36
23 4. TIGHT PROGRAMS It is possible to split programs into components as follows. Definition The dependency graph DG(P) of a WCP P is At(P), 1 where a 1 b holds for a,b At(P) if and only if (i) 1. there is a basic rule a B, C P, 2. there is a choice rule {A} B, C P such that a A, 3. there is a cardinality rule a l {B, C} P, or 4. there is a weight rule a l {w B : B, v C : C} P, and b B C, or (ii) a = b and a A for some choice rule {A} B, C P. Remark The positive dependency graph DG + (P) of P is defined analogously but using only (i) and positive dependencies (b B). 23/36
24 Strongly Connected Components The overall dependency relation ( At(P) 2 ) is the reflexive and transitive closure ( 1 ) of the immediate relation 1. Thus a b holds if and only if there is a sequence a 1,...,a n of atoms from At(P) such that n > 0 and a = a a n = b. Definition A strongly connected component (SCC) of DG(P) = At(P), 1 is a maximal subset S of At(P) such that a b and b a for every a,b S. Example The dependency graph DG(P) of the WCP a b. b c. c a. {a,b,c} d, e. d e. e d. b c Positive dep. Negative dep. d has SCCs S 1 = {a,b,c} and S 2 = {d,e}. a e 24/36
25 Tight Programs There are subclasses of normal programs P for which Comp(P) provides a sufficient (faithful) translation into propositional logic. Definition A normal program P is tight if and only if DG + (P) is acyclic. Example The program P 1 = {a b. b a, c. c a.} is tight whereas P 2 = {a b, c. b a. } is not. Theorem If a finite normal logic program P is tight, then SM(P) = CM(Comp(P)) = SuppM(P). 25/36
26 Relaxed Notions of Tightness It is possible that certain (syntactic) positive dependencies are never activated given the other rules of the program. The projection of DG + (P) = At(P), 1 with respect to an interpretation M At(P) is defined as M,{ a,b M 2 a 1 b}. The definition of tightness can be relaxed as follows. Definition 1. A normal logic program P is tight on an interpretation M At(P) iff the projection of DG + (P) with respect to M is acyclic. 2. A normal logic program P is tight if and only if P is tight on every supported model M SuppM(P). Example The program P = {a b. b a. f a, b, f.} is tight. 26/36
27 Relaxed Tightness in Action Example Consider the following program P n with n > 0 and Gnd(P n ): node(0..n). edge(n,n + 1) node(n), node(n + 1). edge(n,0). in(x,y) out(x,y), edge(x,y). out(x,y) in(x,y), edge(x,y). in(x,y) : edge(x,y). out(x,y), out(z,v), edge(x,y), edge(z,v), X Z. reach(x,y) in(x,y), edge(x,y). reach(x, Y) reach(x, Z), in(z, Y), node(x), edge(z, Y). E.g., when n = 2, one of the n + 1 = 3 supported models is M = {node(0), node(1), node(2), edge(0, 1), edge(1, 2), edge(2, 0), out(0, 1), in(1, 2), in(2, 0), reach(1, 2), reach(2, 0), reach(1, 0) }. The program Gnd(P n ) is tight on M indicating that M is stable. 27/36
28 5. LOOP FORMULAS Since Comp(P) is faithful for certain programs, the question is whether it can be revised to be faithful for all normal programs. As suggested by preceding examples, the answer to this question goes back to positively interdependent atoms in programs. Definition 1. Given a program P, a loop L is a set {a 1,...,a n } At(P) so that a a n and a n 1 a 1 in DG + (P). 2. The set of loops of a program P is denoted by loops + (P). Remarks On the basis of this definition, we observe that 1. atoms in a loop L are mutually dependent in terms of, and 2. a loop L need not be maximal, i.e., an SCC of DG + (P). 28/36
29 Supporting Rules A supported model M of P has a set of supporting rules SuppR(P,M) = {a B, C P M = B C}. A loop L for P must be similarly supported under stable models but the support for L must be external to L. Definition Given a loop L of a normal program P, the set ExtSupp(L,P) includes a formula ( b B b c C c) for each a L and each externally supporting rule a B, C P such that B L = /0. Definition The disjunctive loop formula LF P (L) associated with L loops + (P) is L ExtSupp(L, P) and LF(P) = {LF P (L) L /0 and L loops + (P)}. 29/36
30 Deriving Loop Formulas Example Consider the following normal logic program P: a b. b a. c d. d c. a c. b d. 1. There is only one nonempty loop L = {a,b} for P based on the positive dependencies a 1 b and b 1 a in DG + (P). 2. The set ExtSupp(L,P) = { c,d}. 3. The respective loop formula LF P (L) = a b c d c d a b b a c d Positive dep. Negative dep. 4. If the last two rules of P were deleted, the loop formula would be accordingly revised to a b ( a b). 30/36
31 6. CHARACTERIZATION OF STABLE MODELS Theorem Let P be a finite normal logic program P and M At(P) an interpretation. Then M SM(P) if and only if M = Comp(P) LF(P). Example For the program P from the preceding example, we have Comp(P) LF(P) = {a b c, b a d, c d, d c, a b c d} which has two classical models M 1 = {c} and M 2 = {a,b,d} so that SM(P) = {M 1,M 2 }. On the other hand, the model M 3 = {a,b,c} of Comp(P) does not satisfy LF(P) and thus M 3 SM(P). 31/36
32 Summary of Properties The translation Tr CL (P) = Comp(P) LF(P) is faithful. But the translation Tr CL (P) is exponential in the worst case. By introducing new atoms, the translation is feasible in polynomial time and the length of the translation is O( P log 2 ( At(P) )) where P gives the length of the program [Janhunen, 2006]. Example Consider, for instance, the number of loops for a program P n = {a i a j. 1 i,j n}. Any subset of At(P n ) = {a 1,...,a n } is a loop! 32/36
33 Computing Stable Models Clark s completion and loop formulas can be exploited in the computation of stable models. If the stability test fails for a candidate M SuppM(P), then LM(P M ) M, implying the existence of a loop L M \ LM(P M ). The AsSAT algorithm [Lin and Zhao, 2003] implements a DPLL-style search for stable models: Models of Comp(P) are searched using a SAT solver. Loop formulas are added incrementally for unstable models found. The one-shot translation of LP2SAT [Janhunen, 2006] is faithful and its output is valid input to a SAT solver as is. The CDNL-ASP algorithm [Gebser et al., 2012] uses CDCL and introduces completion and loop formulas only dynamically. 33/36
34 SUMMARY The expressive power of rules exceeds that of propositional formulas, making translations from ASP to SAT non-trivial. Loop formulas can be introduced in order to fill in the gap between tight and arbitrary (non-tight) programs. Clark s completion is an essential step/concept when implementing ASP in an efficient way. Moreover, many reasoning techniques that we addressed in the case of SAT checking can be readily exploited in ASP solving. 34/36
35 OBJECTIVES You are familiar with basic notions of equivalence that have been proposed for logic programs used on ASP. You understand how stable models can be characterized in terms of Clark s completion and loop formulas. You are able to calculate the following for small programs: The sets of models SM(P) and SuppM(P) = CM(Comp(P)). The dependency graphs DG(P) and DG + (P) and their SCCs. The set of loop formulas LF(P). You are aware of SAT solvers as potential search engines when implementing the search of answer sets. 35/36
36 Bibliography M. Gebser, B. Kaufmann, and T. Schaub: Conflict-Driven Answer Set Solving: from Theory to Practice, T. Janhunen: Some (In)translatability Results for Normal Logic Programs and Propositional Theories, V. Lifschitz: Strongly Equivalent Logic Programs, F. Lin: Reducing Strong Equivalence of Logic Programs to Entailment in Classical Propositional logic, F. Lin and Y. Zhao: ASSAT: computing answer sets of a logic program by SAT solvers, H. Turner: Strong Equivalence for Logic Programs and Default Theories (Made Easy), /36
Splitting a Logic Program Revisited
Splitting a Logic Program Revisited Jianmin Ji School of Computer Science and Technology University of Science and Technology of China Hefei 230027, China jianmin@ustc.edu.cn Hai Wan and Ziwei Huo and
More informationHelsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 85
Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 85 Teknillisen korkeakoulun tietojenkäsittelyteorian laboratorion tutkimusraportti 85 Espoo 2003 HUT-TCS-A85
More informationOn Elementary Loops of Logic Programs
Under consideration for publication in Theory and Practice of Logic Programming 1 On Elementary Loops of Logic Programs Martin Gebser Institut für Informatik Universität Potsdam, Germany (e-mail: gebser@cs.uni-potsdam.de)
More informationElementary Loops Revisited
Elementary Loops Revisited Jianmin Ji a, Hai Wan b, Peng Xiao b, Ziwei Huo b, and Zhanhao Xiao c a School of Computer Science and Technology, University of Science and Technology of China, Hefei, China
More informationElementary Sets for Logic Programs
Elementary Sets for Logic Programs Martin Gebser Institut für Informatik Universität Potsdam, Germany Joohyung Lee Computer Science and Engineering Arizona State University, USA Yuliya Lierler Department
More informationElementary Sets for Logic Programs
Elementary Sets for Logic Programs Martin Gebser Institut für Informatik Universität Potsdam, Germany Joohyung Lee Computer Science and Engineering Arizona State University, USA Yuliya Lierler Department
More informationOn Elementary Loops and Proper Loops for Disjunctive Logic Programs
Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence On Elementary Loops and Proper Loops for Disjunctive Logic Programs Jianmin Ji School of Computer Science and Technology University
More informationIntegrating Answer Set Programming and Satisfiability Modulo Theories
Integrating Answer Set Programming and Satisfiability Modulo Theories Ilkka Niemelä Helsinki University of Technology (TKK) Department of Information and Computer Science http://www.tcs.tkk.fi/ ini/ References:
More informationComputing Loops with at Most One External Support Rule for Basic Logic Programs with Arbitrary Constraint Atoms
TPLP 13 (4-5): Online Supplement, July 2013. YOU] c 2013 [JIANMIN JI, FANGZHEN LIN and JIAHUAI 1 Computing Loops with at Most One External Support Rule for Basic Logic Programs with Arbitrary Constraint
More informationComputing Loops With at Most One External Support Rule
Computing Loops With at Most One External Support Rule Xiaoping Chen and Jianmin Ji University of Science and Technology of China P. R. China xpchen@ustc.edu.cn, jizheng@mail.ustc.edu.cn Fangzhen Lin Department
More informationComputing Loops with at Most One External Support Rule for Disjunctive Logic Programs
Computing Loops with at Most One External Support Rule for Disjunctive Logic Programs Xiaoping Chen 1, Jianmin Ji 1, and Fangzhen Lin 2 1 School of Computer Science and Technology, University of Science
More informationLoop Formulas for Disjunctive Logic Programs
Nineteenth International Conference on Logic Programming (ICLP-03), pages 451-465, Mumbai, India, 2003 Loop Formulas for Disjunctive Logic Programs Joohyung Lee and Vladimir Lifschitz Department of Computer
More informationOn Solution Correspondences in Answer-Set Programming
On Solution Correspondences in Answer-Set Programming Thomas Eiter, Hans Tompits, and Stefan Woltran Institut für Informationssysteme, Technische Universität Wien, Favoritenstraße 9 11, A-1040 Vienna,
More informationComputing Loops with at Most One External Support Rule
Computing Loops with at Most One External Support Rule XIAOPING CHEN and JIANMIN JI University of Science and Technology of China and FANGZHEN LIN Hong Kong University of Science and Technology A consequence
More informationUniform Equivalence of Logic Programs under the Stable Model Semantics
In: Proc. 19th International Conference on Logic Programming (ICLP 2003), LNCS, c 2003 Springer. Uniform Equivalence of Logic Programs under the Stable Model Semantics Thomas Eiter and Michael Fink Institut
More informationLOGIC PROPOSITIONAL REASONING
LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1
More informationAbstract Answer Set Solvers with Backjumping and Learning
Under consideration for publication in Theory and Practice of Logic Programming 1 Abstract Answer Set Solvers with Backjumping and Learning YULIYA LIERLER Department of Computer Science University of Texas
More informationComplexity-Sensitive Decision Procedures for Abstract Argumentation
Complexity-Sensitive Decision Procedures for Abstract Argumentation Wolfgang Dvořák a, Matti Järvisalo b, Johannes Peter Wallner c, Stefan Woltran c a University of Vienna, Faculty of Computer Science,
More informationCS156: The Calculus of Computation
CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between
More informationAnswer Set Programming as SAT modulo Acyclicity 1
Answer Set Programming as SAT modulo Acyclicity 1 Martin Gebser 2 and Tomi Janhunen and Jussi Rintanen 3 Helsinki Institute for Information Technology HIIT Department of Information and Computer Science,
More informationPROPOSITIONAL LOGIC. VL Logik: WS 2018/19
PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board
More informationLoop Formulas for Description Logic Programs
Loop Formulas for Description Logic Programs Yisong Wang 1, Jia-Huai You 2, Li-Yan Yuan 2, Yidong Shen 3 1 Guizhou University, China 2 University of Alberta, Canada 3 Institute of Software, Chinese Academy
More informationEssential facts about NP-completeness:
CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions
More informationGuarded resolution for Answer Set Programming
Under consideration for publication in Theory and Practice of Logic Programming 1 Guarded resolution for Answer Set Programming V.W. Marek Department of Computer Science, University of Kentucky, Lexington,
More informationPropositional Logic: Evaluating the Formulas
Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere
More informationABHELSINKI UNIVERSITY OF TECHNOLOGY
Motivation cont d Modular Equivalence for Normal R local change R Logic Programs P Q Helsinki University of Technology {emilia.oikarinen,tomi.janhunen}@tkk.fi Translation-based technique not as efficient
More informationOn Abstract Modular Inference Systems and Solvers
University of Nebraska at Omaha DigitalCommons@UNO Computer Science Faculty Publications Department of Computer Science 7-2016 On Abstract Modular Inference Systems and Solvers Yuliya Lierler University
More informationPropositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel
Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/
More informationan efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.
1 More on NP In this set of lecture notes, we examine the class NP in more detail. We give a characterization of NP which justifies the guess and verify paradigm, and study the complexity of solving search
More informationA new semantics for logic programs capturing the stable model semantics: the extension semantics
A new semantics for logic programs capturing the stable model semantics: the extension semantics Belaïd Benhamou and Pierre Siegel Université Aix-Marseille, CMI Laboratoire des Sciences de L Information
More informationNP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof
T-79.5103 / Autumn 2006 NP-complete problems 1 NP-COMPLETE PROBLEMS Characterizing NP Variants of satisfiability Graph-theoretic problems Coloring problems Sets and numbers Pseudopolynomial algorithms
More informationStable-Unstable Semantics: Beyond NP with Normal Logic Programs
Stable-Unstable Semantics: Beyond NP with Normal Logic Programs Bart Bogaerts 1,2, Tomi Janhunen 1, Shahab Tasharrofi 1 1) Aalto University, Finland 2) KU Leuven, Belgium Computational Logic Day 2016,
More informationLecture 2 Propositional Logic & SAT
CS 5110/6110 Rigorous System Design Spring 2017 Jan-17 Lecture 2 Propositional Logic & SAT Zvonimir Rakamarić University of Utah Announcements Homework 1 will be posted soon Propositional logic: Chapter
More informationComp487/587 - Boolean Formulas
Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested
More informationOn Eliminating Disjunctions in Stable Logic Programming
On Eliminating Disjunctions in Stable Logic Programming Thomas Eiter, Michael Fink, Hans Tompits, and Stefan Woltran Institut für Informationssysteme 184/3, Technische Universität Wien, Favoritenstraße
More informationDisjunctive Answer Set Solvers via Templates
University of Nebraska at Omaha From the SelectedWorks of Yuliya Lierler Winter December, 2015 Disjunctive Answer Set Solvers via Templates Remi Brochenin Yuliya Lierler Marco Maratea Available at: https://works.bepress.com/yuliya_lierler/61/
More informationUC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170
UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, 2003 Notes 22 for CS 170 1 NP-completeness of Circuit-SAT We will prove that the circuit satisfiability
More informationOrdered Completion for First-Order Logic Programs on Finite Structures
Proceedings of the Twenty-Fourth AAAI Conference on Artificial Intelligence (AAAI-10) Ordered Completion for First-Order Logic Programs on Finite Structures Vernon Asuncion School of Computing & Mathematics
More informationLoop Formulas for Circumscription
Loop Formulas for Circumscription Joohyung Lee Department of Computer Sciences University of Texas, Austin, TX, USA appsmurf@cs.utexas.edu Fangzhen Lin Department of Computer Science Hong Kong University
More informationCOMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning
COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal
More informationAnswer set programs with optional rules: a possibilistic approach
: a possibilistic approach Kim Bauters Steven Schockaert, Martine De Cock, Dirk Vermeir Ghent University, Belgium Department of Applied Mathematics, Computer Science and Statistics August 4, 2013 reasoning
More informationComplexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München
Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 5 NP-completeness (2) 3 Cook-Levin Teaser A regular expression over {0, 1} is defined
More informationStable Models and Difference Logic
Stable Models and Difference Logic Ilkka Niemelä Helsinki University of Technology Laboratory for Theoretical Computer Science P.O.Box 5400, FI-02015 TKK, Finland Ilkka.Niemela@tkk.fi Dedicated to Victor
More informationLecture 9: The Splitting Method for SAT
Lecture 9: The Splitting Method for SAT 1 Importance of SAT Cook-Levin Theorem: SAT is NP-complete. The reason why SAT is an important problem can be summarized as below: 1. A natural NP-Complete problem.
More informationOn Testing Answer-Set Programs 1
On Testing Answer-Set Programs 1 Tomi Janhunen, 2 Ilkka Niemelä, 2 Johannes Oetsch, 3 Jörg Pührer, 3 and Hans Tompits 3 Abstract. Answer-set programming (ASP) is a well-acknowledged paradigm for declarative
More informationModular Equivalence for Normal Logic Programs
Modular Equivalence for Normal Logic Programs Emilia Oikarinen and Tomi Janhunen 1 Abstract. A Gaifman-Shapiro-style architecture of program modules is introduced in the case of normal logic programs under
More informationTopics in Complexity Theory
Topics in Complexity Theory Announcements Final exam this Friday from 12:15PM-3:15PM Please let us know immediately after lecture if you want to take the final at an alternate time and haven't yet told
More informationCS151 Complexity Theory. Lecture 13 May 15, 2017
CS151 Complexity Theory Lecture 13 May 15, 2017 Relationship to other classes To compare to classes of decision problems, usually consider P #P which is a decision class easy: NP, conp P #P easy: P #P
More informationStrong and Uniform Equivalence in Answer-Set Programming: Characterizations and Complexity Results for the Non-Ground Case
Strong and Uniform Equivalence in Answer-Set Programming: Characterizations and Complexity Results for the Non-Ground Case Thomas Eiter, Michael Fink, Hans Tompits, and Stefan Woltran Institut für Informationssysteme
More informationIntroduction to Complexity Theory. Bernhard Häupler. May 2, 2006
Introduction to Complexity Theory Bernhard Häupler May 2, 2006 Abstract This paper is a short repetition of the basic topics in complexity theory. It is not intended to be a complete step by step introduction
More informationNP-Complete Reductions 2
x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete
More informationComplexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler
Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard
More informationNP-problems continued
NP-problems continued Page 1 Since SAT and INDEPENDENT SET can be reduced to each other we might think that there would be some similarities between the two problems. In fact, there is one such similarity.
More informationOutline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.
Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität
More informationSimplifying Logic Programs under Uniform and Strong Equivalence
In: Proc. 7th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR-7), I. Niemelä and V. Lifschitz, (eds), LNCS, c 2004 Springer. Simplifying Logic Programs under Uniform and
More informationTopics in Model-Based Reasoning
Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational
More informationApplied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw
Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018
More informationCS:4420 Artificial Intelligence
CS:4420 Artificial Intelligence Spring 2018 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart
More informationFormal definition of P
Since SAT and INDEPENDENT SET can be reduced to each other we might think that there would be some similarities between the two problems. In fact, there is one such similarity. In SAT we want to know if
More informationSemantic forgetting in answer set programming. Author. Published. Journal Title DOI. Copyright Statement. Downloaded from. Griffith Research Online
Semantic forgetting in answer set programming Author Eiter, Thomas, Wang, Kewen Published 2008 Journal Title Artificial Intelligence DOI https://doi.org/10.1016/j.artint.2008.05.002 Copyright Statement
More informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 20 February 23, 2018 February 23, 2018 CS21 Lecture 20 1 Outline the complexity class NP NP-complete probelems: Subset Sum NP-complete problems: NAE-3-SAT, max
More informationIntroduction to Solving Combinatorial Problems with SAT
Introduction to Solving Combinatorial Problems with SAT Javier Larrosa December 19, 2014 Overview of the session Review of Propositional Logic The Conjunctive Normal Form (CNF) Modeling and solving combinatorial
More informationLecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement
CS 710: Complexity Theory 9/29/2011 Lecture 7: The Polynomial-Time Hierarchy Instructor: Dieter van Melkebeek Scribe: Xi Wu In this lecture we first finish the discussion of space-bounded nondeterminism
More informationYet Another Proof of the Strong Equivalence Between Propositional Theories and Logic Programs
Yet Another Proof of the Strong Equivalence Between Propositional Theories and Logic Programs Joohyung Lee and Ravi Palla School of Computing and Informatics Arizona State University, Tempe, AZ, USA {joolee,
More informationNP Complete Problems. COMP 215 Lecture 20
NP Complete Problems COMP 215 Lecture 20 Complexity Theory Complexity theory is a research area unto itself. The central project is classifying problems as either tractable or intractable. Tractable Worst
More informationResolving Conflicts in Action Descriptions
Resolving Conflicts in Action Descriptions Thomas Eiter and Esra Erdem and Michael Fink and Ján Senko 1 Abstract. We study resolving conflicts between an action description and a set of conditions (possibly
More informationKnowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):
Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building
More informationLevel Mapping Induced Loop Formulas for Weight Constraint and Aggregate Programs
Level Mapping Induced Loop Formulas for Weight Constraint and Aggregate Programs Guohua Liu Department of Computing Science University of Alberta Edmonton, Alberta, Canada guohua@cs.ualberta.ca Abstract.
More informationChapter 7 R&N ICS 271 Fall 2017 Kalev Kask
Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing
More informationAdvanced Topics in Theoretical Computer Science
Advanced Topics in Theoretical Computer Science Part 5: Complexity (Part II) 30.01.2014 Viorica Sofronie-Stokkermans Universität Koblenz-Landau e-mail: sofronie@uni-koblenz.de 1 Contents Recall: Turing
More informationCS156: The Calculus of Computation Zohar Manna Autumn 2008
Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)
More informationNotes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction
U.C. Berkeley Handout N2 CS294: PCP and Hardness of Approximation January 23, 2006 Professor Luca Trevisan Scribe: Luca Trevisan Notes for Lecture 2 These notes are based on my survey paper [5]. L.T. Statement
More informationTutorial 1: Modern SMT Solvers and Verification
University of Illinois at Urbana-Champaign Tutorial 1: Modern SMT Solvers and Verification Sayan Mitra Electrical & Computer Engineering Coordinated Science Laboratory University of Illinois at Urbana
More informationOptimizing Computation of Repairs from Active Integrity Constraints Cruz-Filipe, Luís
Syddansk Universitet Optimizing Computation of Repairs from Active Integrity Constraints Cruz-Filipe, Luís Published in: Foundations of Information and Knowledge Systems DOI: 10.1007/978-3-319-04939-7_18
More informationA Theory of Forgetting in Logic Programming
A Theory of Forgetting in Logic Programming Kewen Wang 1,2 and Abdul Sattar 1,2 and Kaile Su 1 1 Institute for Integrated Intelligent Systems 2 School of Information and Computation Technology Griffith
More informationWarm-Up Problem. Is the following true or false? 1/35
Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,
More informationLloyd-Topor Completion and General Stable Models
Lloyd-Topor Completion and General Stable Models Vladimir Lifschitz and Fangkai Yang Department of Computer Science The University of Texas at Austin {vl,fkyang}@cs.utexas.edu Abstract. We investigate
More informationAutomated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving
Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson SAT Solving 1 / 36 Review: Propositional
More informationCompiling Knowledge into Decomposable Negation Normal Form
Compiling Knowledge into Decomposable Negation Normal Form Adnan Darwiche Cognitive Systems Laboratory Department of Computer Science University of California Los Angeles, CA 90024 darwiche@cs. ucla. edu
More informationCS154, Lecture 13: P vs NP
CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of
More informationSAT Solvers: Theory and Practice
Summer School on Verification Technology, Systems & Applications, September 17, 2008 p. 1/98 SAT Solvers: Theory and Practice Clark Barrett barrett@cs.nyu.edu New York University Summer School on Verification
More informationProperties and applications of programs with monotone and convex constraints
Properties and applications of programs with monotone and convex constraints Lengning Liu Mirosław Truszczyński Department of Computer Science, University of Kentucky, Lexington, KY 40506-0046, USA lliu1@cs.uky.edu,
More informationSimple Random Logic Programs
Simple Random Logic Programs Gayathri Namasivayam and Miros law Truszczyński Department of Computer Science, University of Kentucky, Lexington, KY 40506-0046, USA Abstract. We consider random logic programs
More informationChapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013
Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of
More informationComputability Theory
CS:4330 Theory of Computation Spring 2018 Computability Theory The class NP Haniel Barbosa Readings for this lecture Chapter 7 of [Sipser 1996], 3rd edition. Section 7.3. Question Why are we unsuccessful
More informationPropositional Logic: Methods of Proof (Part II)
Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short
More informationFast SAT-based Answer Set Solver
Fast SAT-based Answer Set Solver Zhijun Lin and Yuanlin Zhang and Hector Hernandez Computer Science Department Texas Tech University 2500 Broadway, Lubbock, TX 79409 USA {lin, yzhang, hector}@cs.ttu.edu
More informationCardinality Networks: a Theoretical and Empirical Study
Constraints manuscript No. (will be inserted by the editor) Cardinality Networks: a Theoretical and Empirical Study Roberto Asín, Robert Nieuwenhuis, Albert Oliveras, Enric Rodríguez-Carbonell Received:
More informationOverview of Topics. Finite Model Theory. Finite Model Theory. Connections to Database Theory. Qing Wang
Overview of Topics Finite Model Theory Part 1: Introduction 1 What is finite model theory? 2 Connections to some areas in CS Qing Wang qing.wang@anu.edu.au Database theory Complexity theory 3 Basic definitions
More informationCS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms
CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms Assaf Kfoury 5 February 2017 Assaf Kfoury, CS 512, Spring
More informationPropositional Logic: Methods of Proof. Chapter 7, Part II
Propositional Logic: Methods of Proof Chapter 7, Part II Inference in Formal Symbol Systems: Ontology, Representation, ti Inference Formal Symbol Systems Symbols correspond to things/ideas in the world
More informationLecture 13, Fall 04/05
Lecture 13, Fall 04/05 Short review of last class NP hardness conp and conp completeness Additional reductions and NP complete problems Decision, search, and optimization problems Coping with NP completeness
More informationarxiv: v1 [cs.lo] 8 Jan 2013
Lloyd-Topor Completion and General Stable Models Vladimir Lifschitz and Fangkai Yang Department of Computer Science The University of Texas at Austin {vl,fkyang}@cs.utexas.edu arxiv:1301.1394v1 [cs.lo]
More informationCharacterization of Semantics for Argument Systems
Characterization of Semantics for Argument Systems Philippe Besnard and Sylvie Doutre IRIT Université Paul Sabatier 118, route de Narbonne 31062 Toulouse Cedex 4 France besnard, doutre}@irit.fr Abstract
More informationAlgorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University
Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case
More informationMTAT Complexity Theory October 13th-14th, Lecture 6
MTAT.07.004 Complexity Theory October 13th-14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when
More informationCS154, Lecture 13: P vs NP
CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of
More informationCritical Reading of Optimization Methods for Logical Inference [1]
Critical Reading of Optimization Methods for Logical Inference [1] Undergraduate Research Internship Department of Management Sciences Fall 2007 Supervisor: Dr. Miguel Anjos UNIVERSITY OF WATERLOO Rajesh
More informationAbstract Dialectical Frameworks
Abstract Dialectical Frameworks Gerhard Brewka Computer Science Institute University of Leipzig brewka@informatik.uni-leipzig.de joint work with Stefan Woltran G. Brewka (Leipzig) KR 2010 1 / 18 Outline
More informationNP-Complete Reductions 1
x x x 2 x 2 x 3 x 3 x 4 x 4 CS 4407 2 22 32 Algorithms 3 2 23 3 33 NP-Complete Reductions Prof. Gregory Provan Department of Computer Science University College Cork Lecture Outline x x x 2 x 2 x 3 x 3
More information