Encoding First Order Proofs in SAT - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Encoding First Order Proofs in SAT

Description:

May Need Multiple Copies of Clauses. 26. Algorithm For Rigid ... augment F with additional copies of original clauses. 27. General First Order Theorem Proving ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 33
Provided by: ralphmc
Category:

less

Transcript and Presenter's Notes

Title: Encoding First Order Proofs in SAT


1
Encoding First Order Proofs in SAT
  • Todd Deshane, Wenjin Hu, Patty Jablonski, Hai
    Lin, Christopher Lynch, and
  • Ralph Eric McGregor
  • Clarkson University

2
Introduction
  • Novel Approach to First Order Logic Theorem
    Proving
  • Method
  • Encode proof of rigid unsatisfiability in SAT
  • Use incrementally to solve general problem
  • Proof in the Form of Rigid Connection Tableau
  • Complete Sound

3
Rigidly Unsatisfiable
  • A formula F is rigidly unsatisfiable if there
    exists a substitution s such that Fs is
    unsatisfiable.
  • R(x)
  • R(y)
  • R(a) ? R(b)
  • Rigidly Unsatisfiable
  • R(x)
  • R(a) ? R(b)
  • Not Rigidly Unsatisfiable

4
Overview
  • Preliminaries
  • Closed Rigid Connection Tableaux
  • Tableau Encodings Algorithms
  • Rigid Horn Problems
  • Rigid Non-Horn Problems
  • General First Order Logic Algorithm
  • An Implementation ChewTPTP
  • Future Work

5
Setting Definitions
  • Classical First Order Logic
  • View substitution as a set of equations
  • An assignment is a single equation contained in a
    substitution.
  • Standard definition of unifier

6
Rigid Clausal Tableaux
  • Rigid Clausal Tableaux are
  • trees
  • with all nodes (except the root node) labeled
    with literals
  • with branches labeled with zero or more
    assignments
  • with branches either open or closed

7
Rigid Clausal Tableaux
  • Defined inductively as follows
  • For a set of clauses S
  • Base Case A single unlabeled root node is a
    rigid clausal tableau for S.

8
Rigid Clausal Tableaux Expansion Rule
  • Given rigid clausal tableau for S
  • A leaf node on an open branch
  • Some clause C in S
  • Construct new rigid clausal tableau for S
  • Expand leaf with literals in C
  • Label each new branch as open

9
Rigid Clausal Tableaux Closure Rule
  • Given rigid clausal tableau for S
  • A leaf node labeled L on an open branch
  • An ancestor of the leaf labeled K
  • s such that Ls Ks, and s is consistent with
    other assignments
  • Construct new rigid clausal tableau for S
  • Close branch
  • Label branch with assignments of s

10
Rigid Connection Tableau
  • A rigid connection tableau is a
  • rigid clausal tableau
  • each clause (except the root clause) in the
    tableau contains some literal which is unifiable
    with the negation of its parent.
  • uses Extension Rule


11
Closed Rigid Connection Tableaux
  • A rigid connection tableau is closed if each
    branch is closed.

12
Negative Clause at Root
  • A negative clause is a clause which contains only
    negative literals.
  • Theorem If there exists a closed rigid
    connection tableau for a set of clauses, S, then
    there exists a closed rigid connection tableau
    for S which has a negative clause off the root in
    the tableau.

13
Example
Figure 1
  • R(a)
  • Q(b) ? R(y)
  • P(a) ? Q(x)
  • P(w)

Figure 2
14
Example Continued
  • R(a)
  • Q(b) ? R(y)
  • P(a) ? Q(x)
  • P(w)

Figure 3
Figure 4
15
Proof for Rigid Unsatisfiability
  • Theorem Let F be a first order logic formula.
    There exists a closed rigid connection tableau
    for F iff F is rigidly unsatisfiable.

16
Our Goal
  • To generate a propositional logic encoding G for
    F such that G is propositionally satisfiable iff
    G is an encoding of a rigid closed connection
    tableau for F.

17
Tableau Encoding
  • Let F be a first order formula.
  • We start by enumerating each clause in F and each
    of the literals in each clause.
  • We denote clause i by Ci and the jth literal in
    clause i by Lij.
  • P(w)
  • P(a) ? Q(x)
  • Q(b) ? R(y)
  • R(a)
  • C1 L11
  • C2 L21 ? L22
  • C3 L31 ? L32
  • C4 L41

18
Defining Propositonal Variables For Horn Problems
  • Define cm T iff Cm appears in the tableau.
  • Define lmn T iff Lmn is a negative literal in
    the tableau.
  • Define emnq T iff Cq is an extension of Lmn.
  • Define ua T iff a is an assignment implied by
    the substitutions used in the closure rules.
  • Define pmq T iff there exists a path from Cm to
    Cq.

19
Defining Propositional Clauses For Horn Problems
  • 1. \/ ci , where ci is a negative clause
  • 2. cm ? lmn , where lmn is a negative literal in
    cm
  • 3. lmn (\/ emnq) , where Lmn is unifiable with
    the postitive literal in Cq
  • 4. emnq ? cq
  • 5. emnq ? ust , where s t is an assignment in
    the unifier of Lmn and the positive literal in Cq

20
Encoding For Horn Problems, continued
  • 6. uxs ? uxt , where s and t are not
    unifiable
  • 7. uxs ? uxt ? uyr , where y r is an
    assignment in the unification of s
    and t
  • 8. emnq ? pmq
  • 9. pmq ? pqs ? pms , (transitivity of path
    relation)
  • 10. pmm , (no cycles)

21
Example
  • R(a)
  • Q(b) ? R(y)
  • P(a) ? Q(x)
  • P(w)
  • 1. c1
  • 2. c1 ? l11
  • 3. c2 ? l21
  • 4. c3 ? l31
  • 5. l11 ? e112
  • 6. e112 ? c2
  • 7. e112 ? uya
  • 8. l21 ? e213
  • 9. e213 ? c3
  • 10. e213 ? uxb
  • 11. l31 ? e314
  • 12. e314 ? c4
  • 13. e314 ? uwa
  • And so on 105 total clauses

22
Algorithm For Rigid Horn Problems
  • Input F, a set of FO formula in CNF.
  • Output RIGIDLY UNSATISFIABLE or RIGIDLY
    SATISFIABLE
  • generate set of encodings, S, for F
  • loop
  • run SAT solver on S
  • if SAT solver returns SATISFIABLE
  • run occurs-check procedure
  • if no occurs-check return (RIGIDLY
    UNSATISFIABLE)
  • else augment S and continue in loop
  • else if SAT solver returns UNSATISFIABLE
  • return (RIGIDLY SATISFIABLE)

23
Encoding For Non-Horn Problems
  • Similar to Horn Encoding
  • Closure property encoded differently

24
Sharing Expressed As Tree
  • P ? Q
  • P ? Q
  • P ? Q
  • P ? Q

25
Algorithm For Rigid Non-Horn Problem
  • May Need Multiple Copies of Clauses

26
Algorithm For Rigid Non-Horn Problems
  • Input F, a set of FO formula in CNF.
  • Output RIGIDLY UNSATISFIABLE or RIGIDLY
    SATISFIABLE
  • loop
  • generate set of encodings, S, for F
  • run SAT solver on S
  • if SAT solver returns SATISFIABLE
  • run occurs-check procedure
  • if no occurs-check return (RIGIDLY
    UNSATISFIABLE)
  • else augment S and continue in loop
  • else if SAT solver returned UNSATISFIABLE
  • augment F with additional copies of
    original clauses

27
General First Order Theorem Proving
  • May Need Additional Instances

28
General Algorithm
  • Input F, a set of FO formula in CNF.
  • Output RIGIDLY UNSATISFIABLE or RIGIDLY
    SATISFIABLE
  • loop
  • generate set of encodings, S, for F
  • run SAT solver on S
  • if SAT solver returns SATISFIABLE
  • run occurs-check
  • if no occurs-check return (RIGIDLY
    UNSATISFIABLE)
  • else augment S and continue in loop
  • else if SAT solver returned UNSATISFIABLE
  • augment F with additional instances of
    original clauses

29
ChewTPTP An Implementation
  • Written in C on Linux
  • Options
  • TPTP Input
  • Uses Minisat
  • Experimental Results

30
ChewTPTP Example
  • This is MiniSat 2.0 beta
  • WARNING for repeatability, setting FPU to use
    double precision
  • Problem Statistics

  • Number of variables 0
  • Number of clauses 4
  • Parsing time 0.00 s
  • Search Statistics
  • Conflicts ORIGINAL
    LEARNT Progress
  • Vars Clauses Literals
    Limit Clauses Lit/Cl

  • 0 0 0 0
    0 0 nan 0.000

  • restarts 1
  • conflicts 0 (nan /sec)
  • decisions 1 (0.00
    random) (inf /sec)
  • propagations 109 (inf /sec)
  • conflict literals 0 ( nan
    deleted)
  • Memory used 0.37 MB

31
Future Work
  • Find good way to represent equality
  • Find way to decide which clauses should have
    multiple instances
  • Replace SAT solver with SAT solver modulo
    theories

32
Thank You
Write a Comment
User Comments (0)
About PowerShow.com