1 / 17

Effective Propositional Reasoning

Effective Propositional Reasoning. CSE 473 – Autumn 2003. Propositional Logic++. Proposition := Predicate( Term, Term, …) Term := CONSTANT || variable Literal := Proposition ||  Proposition Clause := (Literal  Literal  …) Clausal Formula := Clause  Clause  ….

media
Download Presentation

Effective Propositional Reasoning

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. Effective Propositional Reasoning CSE 473 – Autumn 2003

  2. Propositional Logic++ • Proposition := Predicate( Term, Term, …) • Term := CONSTANT || variable • Literal := Proposition || Proposition • Clause := (Literal  Literal  …) • Clausal Formula := Clause  Clause  …

  3. Predicate Calculus (FOL)? • FOL includes function symbols that can construct an infinite number of new terms • successor(sucessor(successor(0)))

  4. The dog barks if a stranger enters the stable.

  5. Why Logic? Enables deductive reasoning! Amazing property: X entails Y just in case X  Y is unsatisfiable Is a sentence unsatisfiable? = theorem proving Can a sentence be satisfied? = constraint satisfaction • ARISTOTLE – 350 BC • GEORGE BOOLE – 1850 • LEWIS CARROL – 1880 • GRIEDRICH FREGE – 1900 • KURT GODEL – 1930 • HILARY PUTNAM – 1959 • ALAN ROBINSON – 1965

  6. Algorithms for Satisfiability 1. Model enumeration (dumb!) for (m in truth assignments){ if (m makes F true) return “Sat!” } return “Unsat!” 2. Backtrack search through space of PARTIAL truth assignments: DPLL (Davis-Putnam) 3. Local search through space of TOTAL truth assignments: Walksat 4. Manipulate sentences: Resolution

  7. DPLL version 1Davis – Putnam – Loveland – Logemann dpll_1(pa){ if (pa makes F false) return false; if (pa makes F true) return true; choose P in F; if (dpll_1(pa U {P=0})) return true; return dpll_1(pa U {P=1}); } Returns true if F is satisfiable, false otherwise

  8. DPLL Version 1 a (a bc) b b (a ¬b) (a ¬c) c c (¬a c)

  9. Improving DPLL

  10. DPLL version 2Davis – Putnam – Loveland – Logemann dpll_2(F, literal){ remove clauses containing literal shorten clauses containing literal if (F contains no clauses)return true; if (F contains empty clause) return false; choose P in F; if (dpll(F, P))return true; return dpll_2(F, P); } Partial assignment corresponding to a node is the set of chosen literals on the path from the root to the node

  11. DPLL Version 2 a (a bc) b b (a ¬b) (a ¬c) c c (¬a c)

  12. Further Improvements

  13. DPLL (for real!)Davis – Putnam – Loveland – Logemann dpll(F, literal){ remove clauses containing literal shorten clauses containing literal if (F contains no clauses)return true; if (F contains empty clause) return false; if (F contains a unit or pure L) return dpll(F, L); choose P in F; if (dpll(F, P))return true; return dpll_2(F, P); }

  14. DPLL (for real) a (a bc) c b (a ¬b) (a ¬c) c (¬a c)

  15. DPLL (for real!)Davis – Putnam – Loveland – Logemann dpll(F, literal){ remove clauses containing literal shorten clauses containing literal if (F contains no clauses)return true; if (F contains a unit or pure L) return dpll(F, L); choose P in F; if (dpll(F, P))return true; return dpll_2(F, P); } Where could we use an heuristic to further improve performance?

  16. Heuristic Search in DPLL • Heuristics are used in DPLL to select a (non-unit, non-pure) proposition for branching • Idea: identify a most constrained variable • Likely to create many unit clauses • MOM’s heuristic: • Most occurrences in clauses of minimum length

  17. Success of DPLL • 1962 – DPLL invented • 1992 – 300 propositions • 1997 – 600 propositions (satz) • Additional techniques: • Learning conflict clauses at backtrack points • Randomized restarts • 2002 (zChaff) 1,000,000 propositions – encodings of hardware verification problems

More Related