1 / 32

Häufungspunkte Bifurkation: x n+1 = r x n (1-x n )

Häufungspunkte Bifurkation: x n+1 = r x n (1-x n ). Startwert x 0 = 0,25. Implementing DLV. DLV System Architecture. Rule Handling and Intelligent Grounding. Intelligent Grounding. Ground Programm has exactly the same answer sets as the original programme

benoit
Télécharger la présentation

Häufungspunkte Bifurkation: x n+1 = r x n (1-x n )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Häufungspunkte Bifurkation: xn+1 = r xn (1-xn) Startwert x0 = 0,25

  2. Implementing DLV

  3. DLV System Architecture

  4. Rule Handling and Intelligent Grounding

  5. Intelligent Grounding • Ground Programm hasexactlythe same answersetsasthe original programme • Forsome syntactically restricted classes of programs (e.g. stratified programs), the “Intelligent Grounding” module already computes the corresponding answer sets. • We assume “safe programmes”, i.e. no variables in the head that are not bound by positive literals in the body. • We assume function-free programmes here. Thomas Eiter, Nicola Leone, Cristinel Mateis, Gerald Pfeifer, FranceseoScarcello. A Deductive System for Non-Monotonic Reasoning. In: LogicProgrammingAndNonmonotonicReasoning. Lecture Notes in Computer Science, 1997, Volume 1265/1997, 363-374, Springer.

  6. Rules and Graphs Handler • Motivation: Overall problem of EDLP is co-NP hard, BUT many of its parts are much easier (e.g. stratified programms are polynomially computable)

  7. Ground Dependency Graph (GG) • Nodes: atoms Edges: E+, E-, E • Ground Programme:  p(2,3) :- t(2) :- q(1)  q(3) :- p(2,3), NOT t(2). t(3) :- q(3), p(2,3).

  8. Ground Collapsed Positive Dependency Graph (GG+) • Strongly connected components form modules and become one node (not in the example here)

  9. Non-Ground Collapsed Positive Dependency Graph (G+ P)

  10. Summarizing Steps for Analyzing Rules • Givenprogramme P, itcomputesG+ P forthe intelligent groundingmodule (IGM) • Given from IGM itcomputes GG • From  and GG itsets apart • themodules, • syntacticalproperties (e.g. stratification) forthe Model Generator • ItcomputesGG+for Model Checkertoreducesearchspace • ForeachcomponentofGG+itanalyzessyntacticalproperties (e.g. headcycle-freeness) foruseby Model Checker

  11. Grounding Init NF = EDBP % Groundedfactsinitially= DB extension = % Growgroundedprogramfrom  G+P % Analyzethecollapsedngrulegraph Key stepsofprocedure: • Growrulegroundingfromnode C in G+P withoutincomingedges (i.e. non-recursive) • Growrulegroundingusing positive literals (andremovethemfromthegroundedrules!)

  12. Example Programme Programme P p(1,2)  p(2,3) :- t(X) :- a(X). q(X)  q(Z) :- p(X,Y), p(Y,Z), NOT t(Y). t(X) :- q(X), p(Y,X) a(2) :- Grounded Programme  p(1,2)  p(2,3) :- t(2) :- q(1)  q(3) :- p(1,2), p(2,3), NOT t(2). t(3) :- q(3), p(2,3) a(2) :- Note: ground(P) contains 40 rule instances, but Instantiate generates only 4.

  13. Theorem • Let P be a safe disjunctive datalog program, and  be the ground program generated by Instantiat(P). Then, P and  have the same stable models.

  14. Summary Grounding is a bit like forward chaining (applying immediate consequence operator). However, because of disjunction in the heads it is overgenerating and it is also not retracting implications that fail because of negation.

  15. Model generator

  16. Model Generator • Derive what is definitely derivable, • Make ‘educated’ guess for one of those literals which have not been decided yet. • IF further guesses can be madeTHEN GOTO 2ELSE Call MODEL-CHECKER If candidate model is inconsistent or not stable then backtrack, taking knowledge about previous guesses into account to avoid redundancies Nicola Leone, Pasquale Rullo, Francesco Scarcello. Disjunctive Stable Models: Unfounded Sets, Fixpoint Semantics, and Computation. In: Information and Computation, 135(2): 69-112, 1997.

  17. Note • The number of candidate models can be exponential • Smart generation of candidate models is crucial • Prune the search space! • Special algorithms for: • Polynomial-time algorithm for normal stratified programs • Special algorithm for headcycle-free disjunctive programs • General algorithm

  18. Unfounded Sets Intuitively • An unfoundedsetfor a disjunctiveprogram P w.r.t. an interpretation I is a setof positive literalsthatcannotbederivedfrom P assumingthefacts in I. [generalizationof a techniquefrom well-foundedsemantics!]

  19. Unfounded Sets Formally: • Let I be an interpretation for a program P. A set X of ground atoms is an unfounded set for P w.r.t. I if, for each a∈X, for each rule r∈ground(P) such that a∈H(r), at least one of the following conditions holds: • B(r) ∩ .I ≠ , that is, the body of r is false w.r.t. I • B+(r)∩ X ≠ , that is, some positive body literal belongs to X • (H(r)-X) ∩ I ≠ , that is, an atom in the head of r, distinct from a and other elements in X, is true w.r.t. I [generalization of a technique from well-founded semantics!]

  20. Unfounded Sets: Example Program P: a  b :- I = {b} Then {a} is an unfounded set of P wrt I (criterion 3 applies) Intuitively: there is no reason to believe that a is true given I

  21. Unfounded Sets: Example Program P: a  b :- I = {a,b} Then both {a} and {b} are unfounded sets of P wrt I (i.e. we should not believe both!) However, {a,b} is not an unfounded set!

  22. Unfounded Sets: Example Program P: a  b :- a :- b. b :- a. I = {a,b} Then  is the only unfounded set of P wrt I

  23. Definition & Proposition Definition • Let I be an interpretation for a program P. • I is unfounded-free if I ∩ X =  for each unfounded set X for P w.r.t. I. Proposition: Let I be an unfounded-free interpretation for a program P. Then • P has the greatest unfounded set GUSP(I) • GUSP(I) is computable in polynomial time

  24. Monotonic Operator WP Plan: • Compute WP() • Eitherthisis a uniquestablemodel • Otherwisemovefrom WP() towardsthestablemodels

  25. Immediate Consequence Operator TP Definition: • TP(I) = {a∈BP | ∃ r∈ground(P) s.t. a∈H(r), H(r) – {a} ⊆.I, and B(r) ⊆I} Note: TP is deterministic! Definition: • WP (I) = TP(I)  .GUSP(I)

  26. Theorem Theorem • Let M be a total interpretationforprogram P. M is a stablemodelfor P iff M is a fixpointof WP. Proposition: • Given a propositional program P, WP() iscomputable in polynomial time.

  27. Examples Program P: a  b :- WP() = , i.e. not a model! Program P: b :- NOT c. a  b :- WP() = {NOT c, b, NOT a}, i.e. total, i.e. stable model

  28. Computing the Stable Models: Main Possiblytrueliterals

  29. Computing the Stable Models: Compute-Stable

  30. This slide deck is not part of the material for examinations Finis

More Related