implementing a relevance tracker module
play

Implementing a Relevance Tracker Module Joachim Jansen 1 , Bart - PowerPoint PPT Presentation

Implementing a Relevance Tracker Module Joachim Jansen 1 , Bart Bogaerts 2 , 1 , Jo Devriendt 1 Gerda Janssens 1 , Marc Denecker 1 1 KU Leuven, Belgium, firstname.lastname@kuleuven.be 2 Aalto University, Finland, bart.bogaerts@aalto.fi October


  1. Implementing a Relevance Tracker Module Joachim Jansen 1 , Bart Bogaerts 2 , 1 , Jo Devriendt 1 Gerda Janssens 1 , Marc Denecker 1 1 KU Leuven, Belgium, firstname.lastname@kuleuven.be 2 Aalto University, Finland, bart.bogaerts@aalto.fi October 16th, 2016

  2. Overview ◮ Background: SAT(ID) ◮ Background: Relevance for SAT(ID) ◮ Implementing Relevance

  3. PC(ID), SAT(ID) ◮ SAT(ID) = satisfiability check of PC(ID) ◮ P ropositional C alculus + I nductive D efinitions ◮ PC(ID) encoding T = { p T ,∆ } (normal form) ◮ p T is defined in ∆; must hold for T to be satisfied. ◮ Relation with ASP: p T is a single constraint, all atoms not defined in ∆ are open (choice rules), ∆ contains no recursion over negation (real definition)

  4. PC(ID), SAT(ID) ◮ SAT(ID) = satisfiability check of PC(ID) ◮ P ropositional C alculus + I nductive D efinitions ◮ PC(ID) encoding T = { p T ,∆ } (normal form) ◮ p T is defined in ∆; must hold for T to be satisfied. ◮ Relation with ASP: p T is a single constraint, all atoms not defined in ∆ are open (choice rules), ∆ contains no recursion over negation (real definition) Example ◮ Choose edges and colors of nodes s.t. ◮ node b is reachable from a ◮ every node reachable from a is colored green a c b

  5. a c b Example (continued)  p T ← reach b ∧ constr 1 ∧ constr 2 ∧ constr 3 .         constr 1 ← ¬ reach a ∨ green a .          constr 2 ← ¬ reach b ∨ green b .         constr 3 ← ¬ reach c ∨ green c .       ∆ = reach a .     reach b ← case 1 ∨ case 2 .         case 1 ← reach a ∧ edge a , b .         case 2 ← reach c ∧ edge c , b .         reach c ← reach b ∧ edge b , c .   ◮ reach x = node x is reachable ◮ green x = node x is green from a ◮ constr x = color constraints on ◮ edge x , y = edge from x to y node x selected

  6. SAT(ID) solver Typically, a SAT(ID) solver searches for an assignment (true/false) to all atoms such that T is satisfied

  7. Visualising the hierarchy p T and-node or-node r b c 3 ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  8. Visualising the Search process p T r b c 3 ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  9. Visualising the Search process p T propagation r b c 3 ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  10. Visualising the Search process p T propagation r b c 3 ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  11. Visualising the Search process p T choice r b c 3 ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  12. Visualising the Search process p T r b c 3 choice ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  13. Visualising the Search process p T r b c 3 wait a minute... ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  14. Visualising the Search process p T r b c 3 ...not helping! ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  15. Visualising the Search process p T r b c 3 could be any NP subproblem! ca 1 ca 2 ¬ r c g c e a , b ¬ e b , c r a ¬ r b

  16. Justifications ◮ Defined by Denecker and De Schreye (1993) and Denecker, Brewka and Strass (2015) ◮ Intuitively, a literal is justified given a partial assignment if there exists a (recursive) explanation why it must hold in terms of true open literals.

  17. Justifications ◮ Defined by Denecker and De Schreye (1993) and Denecker, Brewka and Strass (2015) ◮ Intuitively, a literal is justified given a partial assignment if there exists a (recursive) explanation why it must hold in terms of true open literals. ◮ If a literal is justified in a partial assignment, then there exists a model of ∆ in which that literal holds. ◮ Thus... it suffices to prove that p T is justified in some partial interpretation to conclude that T is satisfiable.

  18. → searching justification Searching assignment p T r b c 3 ca 1 ca 2 ¬ r c g c r a e a , b ¬ r b ¬ e b , c

  19. → searching justification Searching assignment p T r b c 3 ca 1 ca 2 ¬ r c g c r a e a , b ¬ r b ¬ e b , c

  20. → searching justification Searching assignment p T value = “fixed” for current branch r b c 3 ca 1 ca 2 ¬ r c g c e a , b ¬ r b ¬ e b , c r a

  21. Relevance Definition Given a PC(ID) theory T = { p T , ∆ } and a partial interpretation I , we inductively define the set of relevant literals, denoted R T , I , as follows ◮ p T is relevant if p T is not justified, ◮ l is relevant if l is not justified and there exists some l ′ such that ( l ′ , l ) ∈ dd ∆ and l ′ is relevant.

  22. Relevant ≈ can help justify p T p T r b c 3 g c ca 1 ca 2 ¬ r c e a , b ¬ e b , c r a ¬ r b

  23. Relevant ≈ can help justify p T p T r b c 3 g c ca 1 ca 2 ¬ r c e a , b ¬ e b , c r a ¬ r b

  24. Relevant ≈ can help justify p T p T r b c 3 g c ca 1 ca 2 ¬ r c e a , b ¬ e b , c r a ¬ r b

  25. Relevant ≈ can help justify p T p T r b c 3 g c ca 1 ca 2 ¬ r c e a , b ¬ e b , c r a ¬ r b

  26. Adjusting the Solver ◮ Decide only on Relevant literals. ◮ Stop search when p T is justified ◮ Guarantee that a two-valued solution can be generated efficiently ◮ More tolerant to faulty choices of the solver ◮ Expectation: less choices made by solver

  27. Implementation ◮ How to keep track of justified literals? ◮ How to keep track of relevant literals?

  28. Keeping track of justified literals ◮ For each defined atom p , introduce a new atom j p . ◮ Intended interpretation: j p is true (in a partial interpretation) iff p is justified; j p is false iff ¬ p is justified; j p is unknown otherwise. ◮ Duplicate definition ∆ to a new definition ∆ ′ , obtained by a replacing each defined atom p by j p (note: open literals remain). ◮ Modify solver: forbidden to make choices on j p . ◮ Claim : after the standard propagation is executed, j p satisfies the “intended interpretation” above.

  29. Keeping track of justified literals Theorem Let ∆ be a (total) definition and I a partial interpretation in which all defined symbols of ∆ are interpreted as u . Let l be a defined literal in ∆ . In this case l is justified in I if and only if l is derivable by unit propagation on the completion of ∆ and unfounded set propagations.

  30. Keeping track of justified literals ◮ Without major modifications to the solver, we obtain a method to keep track of justified literals. ◮ Only modification: do not make choices on certain atoms.

  31. Keeping track of relevant literals Recall: Definition Given a PC(ID) theory T = { p T , ∆ } and a partial interpretation I , we inductively define the set of relevant literals as follows ◮ p T is relevant if p T is not justified, ◮ l is relevant if l is not justified and there exists some l ′ such that ( l ′ , l ) ∈ dd ∆ and l ′ is relevant.

  32. Keeping track of relevant literals ◮ For each relevant literal (except p T ), we maintain one relevant parent in dd ∆ : the reason why this literal is relevant. ◮ Thus, we maintain a subgraph of dd ∆ . ◮ We incrementally update this subgraph (as the justification status of certain literals changes) ◮ Biggest challenge: keeping this graph acyclic. (how to choose the “right” parent)

  33. Keeping track of relevant literals ◮ For each relevant literal (except p T ), we maintain one relevant parent in dd ∆ : the reason why this literal is relevant. ◮ Thus, we maintain a subgraph of dd ∆ . ◮ We incrementally update this subgraph (as the justification status of certain literals changes) ◮ Biggest challenge: keeping this graph acyclic. (how to choose the “right” parent) ◮ Turns out... this cycle detection is the same problem as tackled in unfounded set propagators. ◮ Only difference: works on a (slightly) different graph.

  34. Keeping track of relevant literals ◮ In the paper, we also detail the used data structures and an event-driven implementation

  35. Experiment Setup (1) ◮ Problems from previous ASP competitions ◮ Solver = Minisatid, Heuristic = VSIDS

  36. Experiment Setup (1) ◮ Problems from previous ASP competitions ◮ Solver = Minisatid, Heuristic = VSIDS ◮ Measuring ◮ Ratio of irrelevant decisions ( % ) ◮ Ratio of conflicts originating from irrelevant decisions ( % )

  37. Experimental Results (1) Problem % Irr. Decisions % Irr. Conflicts HP 27.37% 36.99% NQueens 22.55% 0.43% PPM 22.93% 4.98% Sokoban 48.20% 0.96% Solitaire 13.32% 3.95% SM 96.40% 0.01% Visit All 15.02% 16.45%

  38. Experiment Setup (2) ◮ Problems from previous ASP competitions ◮ Solver = Minisatid, Heuristic = VSIDS

  39. Experiment Setup (2) ◮ Problems from previous ASP competitions ◮ Solver = Minisatid, Heuristic = VSIDS ◮ Measuring ◮ Number of decisions ( # ) ◮ Number of conflicts ( # )

  40. Experimental Results (2)

  41. Experimental Results (2)

  42. Take-away messages ◮ Exploit problem hierarchy using Relevance

  43. Take-away messages ◮ Exploit problem hierarchy using Relevance ◮ Preliminary promising results: fewer decisions ◮ A relevance tracker can be implemented reusing existing methods: ◮ Justification status: unit propagation and unfounded set propagation ◮ Relevance status: unfounded set algorithms

  44. Questions?

Recommend


More recommend