Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Programming with Constraints Jia-Huai You Constraint programming languages - based on non-monotonic logic - Answer set programming (ASP) Knowledge Representation.

Similar presentations


Presentation on theme: "1 Programming with Constraints Jia-Huai You Constraint programming languages - based on non-monotonic logic - Answer set programming (ASP) Knowledge Representation."— Presentation transcript:

1 1 Programming with Constraints Jia-Huai You Constraint programming languages - based on non-monotonic logic - Answer set programming (ASP) Knowledge Representation and Reasoning - Semantics, computation, application

2 2 Examples 3-Colorability Given a graph (V, E), assign each vertex a color in (r, b, g) such that no two connected vertices have the same color. Hamiltonian Path A path in a graph that reaches each vertex exactly once

3 3 Examples Planning How do we express “Once a property holds, it remains to hold until an action causes it not to hold.”

4 4 Goal WANTED: an approach to modeling and solving AI problems (planning, puzzles, combinatorics, …) Diverse domains Constraints Incomplete information Frame problem

5 5 Solution  The programming paradigm based on the stable model/answer set semantics  Basic idea - Encode problem (specification + instance) as logic program rules - Solutions are stable models of the program

6 6 Stable Models  Logic program rules ( normal rules)  Grounding: any true atom is derivable by a rule with true body  Minimal  Rules have declarative reading as constraints A  B1,…, Bk, not C1, …, not Cm

7 7 ASP vs. Logic Programming  Logic Programming – Single intended model – Domain possibly infinite –Unification and lifting to nonground case – Extensive use of recursion –Can specify any recursively enumerable set append([ ], X, X). append([X|Y], Z, [X|M]) :- append(Y,Z,M).

8 8 ASP vs. Logic Programming  ASP based on stable models – Several stable models, each as a solution – Function free programs – Finite domains – Limited use of recursion – Not intended to have full computability

9 9 Example: 3-colorability Given a graph (V, E), assign each vertex a color in (r, b, g) such that no two connected vertices have the same color. clrd(V,r)  vtx(V), not clrd(V,b), not clrd(V,g) clrd(V,g)  vtx(V), not clrd(V,r), not clrd(V,b) clrd(V,b)  vtx(V), not clrd(V,r), not clrd(V,g)  clr(C), edge(V,U), clrd(V,C), clrd(U,C)

10 10 Stable Models vs. SAT Rules with exceptions Rules with exceptions Frame Axioms Frame Axioms fly(X)  bird(X), not ab_bird(X) ab_bird(X)  penguin(X) ab_bird(X)  no_wings(X) on(X,Y,T2)  nextState(T2,T1), on(X,Y,T1), not moving(X,T1)

11 11 Why ASP? Highly expressive Highly expressive Compact representation Compact representation Efficient computation Efficient computation Bases for building advanced KR systems Bases for building advanced KR systems

12 12 Example: Hamiltonian Path  A path in a graph that reaches each node exactly once  A challenge for SAT solvers as no compact SAT encoding (with linear number of atoms) is known  Easily represented by a disjunctive program Given facts about Given facts about arc(X,Y) arc(X,Y) node(X) node(X)

13 13 A disjunctive program for Hamiltonian path reached(X)  start(X) reached(X)  reached(Y), inPath(Y,X) inPath(X,Y) v outPath(X,Y)  arc(X,Y)  inPath(X,Y), inPath(X,Y1), Y <> Y1  inPath(X,Y), inPath(X1,Y), X <> X1  node(X), not reached(X)

14 14 A number of Systems have been built  smodels by Ilkka Niemela’s group at HUT by Ilkka Niemela’s group at HUT  dlv by Nicola Leone et al. at TU Wien by Nicola Leone et al. at TU Wien

15 15 Some Research Issues Fundamental questions :  Why ASP Why not just propositional logic? Why not just propositional logic?  Is there a real need to resort to logic programming? No formal argument yet No formal argument yet

16 16 Some Research Issues  Semantics - Are there other suitable semantics for ASP? - Are there other suitable semantics for ASP? - stable models don’t tolerant “paradoxes” - stable models don’t tolerant “paradoxes” shave(X,Y)  not shave(Y,Y)

17 17 Some Research Issues  Language Extension - Other useful constructs - Other useful constructs - The complexity of the resulting language - The complexity of the resulting language - How to implement them - How to implement them E.g. Cardinality constraints v {p1,…,pn} u  Body

18 18 Some Research Issues  Computation - Efficient implementation - Efficient implementation - Top-down vs. bottom-up - Top-down vs. bottom-up - ASP vs. SAT vs. Other constraint solvers - ASP vs. SAT vs. Other constraint solvers  Modeling and application - Programming methodologies - Programming methodologies

19 19 Some of my recent papers “ Compiling defeasible networks to general logic programs,” Artificial Intelligence, 1999 “ Compiling defeasible networks to general logic programs,” Artificial Intelligence, 1999 “Unfolding partiality and disjunctions in stable model semantics,” KR 2000. “Unfolding partiality and disjunctions in stable model semantics,” KR 2000. “An abductive approach to disjunctive logic programs,” J. Logic Programming, 2000 “An abductive approach to disjunctive logic programs,” J. Logic Programming, 2000 “Loop checks for logic programs with functions” “Loop checks for logic programs with functions” Theoretical Computer Science (to appear )

20 20 Some of my recent papers “ Nonmonotonic reasoning as prioritized argumentation”, IEEE TKDE (to appear) “ Nonmonotonic reasoning as prioritized argumentation”, IEEE TKDE (to appear) “Rewrite systems for abduction”, forthcoming …


Download ppt "1 Programming with Constraints Jia-Huai You Constraint programming languages - based on non-monotonic logic - Answer set programming (ASP) Knowledge Representation."

Similar presentations


Ads by Google