Title: Equinox
1Equinox
- Koen Lindström Claessen
- Chalmers University
- Gothenburg, Sweden
2Equinox
- Theorem Prover for
- First-order logic
- With equality
- (With integers, arrays, ...)
- (With least-fixed points / induction)
- Developing phase
- Ideas for 1 year
- Started implementing from scratch 1 month ago
3Motivation
use SAT engine
- Most current theorem provers weak points
- Combinatorial reasoning
- Large problems with easy proofs
- Feedback when proof fails
- Base theorem prover on different technique
- Complementary?
- Better in some problem areas?
build candidate models
4formula (Assumptions ProofObligation)
FOL is semi-decidable
?
5Inspiration
- Plaisteds work
- Semantic hyper-linking
- Ordered semantic hyper-linking
- Lazy explicating theorem provers
- SMT
- Model elimination
- Model evolution
- ...
6Basis Incremental SAT-solver
clauses
model
SAT-solver
MiniSat (Eén Sörensson)
7A new layer
- Propositional logic
- Atoms p, q, r
- Literals p, -p
- Clauses p q -r
- Propositional logic constants equality
- Constants a, b, c
- Literals a b, b / c
- Clauses a / b a c b c
Abstraction Pick a p for each ab
symmetry
8Adding a layer
Add abstractions of clauses
Union/Find
clauses
model
Pure Propositional Logic
Add all violations Transitivity
shortest path
9Example Transitivity
(transitivity)
- Clause set
- a b b c
- a / c
- Propositional abstraction
- p q
- -r
New clause -p -q r
Model p, q, -r
ab, bc, a/c
10Another layer
- Propositional logic terms equality
- Constants a, b, c
- Functions f, g, h
- Terms f(g(a),h(a,b))
- Literals g(a) f(b,a), h(a,b) / h(b,a)
- Clauses f(a,b) a f(a,b) b
Abstraction Pick a c for each f(a,b)
11Adding the next layer
Add abstractions of clauses
Hash-consing
clauses
model
Propositional constants equality
Add all violations Congruences
clauses
model
...
12Example Congruence
- Clause set
- f(a) a ...
- f(f(a)) b ...
- Abstraction
- c1 a ...
- c2 b ...
c1/a c2c1
(congruence)
New clause f(a)/a f(f(a)) f(a)
Model c1,a,c2,b
f(a)a, f(f(a))/a
13Quantification
- Quantification terms equality
- Variables X, Y, Z
- Constants a, b, c
- Functions f, g, h
- Terms f(g(a),h(X,Y))
- Literals g(X) f(b,X), h(X,Y) / h(Y,X)
- Clauses f(X,b) X f(a,Y) Y
Abstraction Pick instances for each FO clause
14Adding Weak Quantification
Find clause instances where all literals are false
clauses
model
Propositional terms equality
Using a Prolog-like search
Add all violations Instances (no new terms)
clauses
model
...
15Example Non-inventive
- Clause
- f(X,Y) f(Y,X)
- Model
- ...,f(a,b),..., ...,f(b,a),...
- Instance
- f(a,b) f(b,a)
16Adding Stronger Quantification
Find clause instances where all literals are not
true (no guessing!)
clauses
model
Non-inventive quantification
Add all violations Instances (new terms)
clauses
model
...
17Example Inventive Quantifier
- Clause
- f(X) g(f(X))
- Model
- ...,f(a),..., ...,f(b),...
- Instances
- f(a) g(f(a))
- f(b) g(f(b))
New terms (no guesses)
18Adding Full Quantification
Done!
Guess new clause instances where all literals are
not true
clauses
model
Weak inventive quantification
Add some violation for each clause Instances (new
terms)
clauses
model
...
19Example Guessing
- Clause
- f(X) g(X,Y)
- Model
- ...,f(a),...
- Instance
- f(a) g(a,t)
Guessing Fair enumeration
20The Stack
guessing ?
inventive ?
non-inv ?
functions
constants equality
SAT
21Optimizations
- Top-level ground unit clauses
- f(a) g(a,b)
- Added as clauses (implicit or explicit)
- Found by SAT-solver
- Normalize w.r.t. to these (total order on terms)
- Top-level non-ground unit clauses
- app(X,app(Y,Z)) app(app(X,Y),Z)
- Check if other term already exists
22Prototype
- Equinox
- 2500 lines of Haskell code
- Excluding libraries
- Including comments
- MiniSat (C)
- Very simple O(n) clausifier
- No quantifier-magic
- Conjecture splitting
- Incomplete (!)
23Example Getting Feedback
type Bool
true / crash. false / crash. nil /
crash. cons(X,Xs) / crash. cons(X,Xs)
cons(Y,Ys) gt X Y. cons(X,Xs) cons(Y,Ys) gt
Xs Ys. app(nil,Ys) Ys. app(cons(X,Xs),Ys)
cons(X,app(Xs,Ys)). Xs / nil Xs /
cons(head(Xs),tail(Xs)) gt append(Xs,Ys)
crash. null(nil) true. null(cons(X,Xs))
false. Xs / nil Xs / cons(head(Xs),tail(Xs))
gt null(Xs) crash.
type List
def. append
def. null
24Conjecture
Either 1. Theory incomplete 2. Prover too slow
?
- Is this true?
- Yes! (at least in Haskell)
- Theorem prover seems not to terminate
- Is it just slow?
- Or is my FO theory incomplete?
null(Xs) true gt app(Xs,Ys) Ys
Partial model ...,false,true,..., ...
Add false / true
25Results (prototype)
- Hypothetical CASC 2005
- Bernds NASA problems
26Results FOF (Equinox vs Vampire)
only 4
vampire not equinox
equinox not vampire
equinox
vampire
27Observations
- Good Large easy
- Not good Small difficult
- Bottleneck
- Too many instances
- Wrong instances are added
- (Incompleteness)
28Future Work Equinox T
clauses
model
Propositional terms equality
SAT modulo (UIF T)
Barcelogic, MathSAT, ...
Propositional linear arithmetic
clauses
model
Propositional constants equality
29Future Work Induction
Check if model looks like standard model
Use some FO approximation of LFP
FOL equality
Add violations (instances of induction schema)
clauses
model
...
30Future Work Model Finding
- Equinox is complete for theories with
- To find finite model of size n, add this
- for fresh a1,..,an
- Increase n
- (Hopefully) avoids blow-up
- Paradox
- MACE2
X a1 X a2 ... X an
31Future Work Complexity?
- Super-exponential proof-size blow-up
- Ground proofs vs general proofs
- Assumption
- In practice no problem (?)
- General provers dont find these proofs either
(?) - Investigate groundify proofs blow-up TPTP
- Possible solutions
- Use resolution-prover to enrich clause set
- Add (limited) free variable-reasoning
32More Future Work
- Use ordering to limit instantiations
- Plaisted
- Ganzinger
- Integrate FOL-part with SAT-solver
- SMT techniques
- Completeness
- Instances?
- Minimal models?
33Conclusions
- New approach, known techniques
- SAT
- SMT
- ...
- Seems promising!
- Still developing/prototype
- See you at CASC 2006 ?