Boolean Abstraction for Temporal Logic Satisfiability
- A. Cimatti1, M. Roveri1, V. Schuppan1, S. Tonetta2
1FBK-irst, Trento, Italy 2University of Lugano, Faculty of Informatics, Lugano, Switzerland
Boolean Abstraction for Temporal Logic Satisfiability A. Cimatti 1 , - - PowerPoint PPT Presentation
Boolean Abstraction for Temporal Logic Satisfiability A. Cimatti 1 , M. Roveri 1 , V. Schuppan 1 , S. Tonetta 2 1 FBK-irst, Trento, Italy 2 University of Lugano, Faculty of Informatics, Lugano, Switzerland CAV07, July 37, 2007, Berlin,
1FBK-irst, Trento, Italy 2University of Lugano, Faculty of Informatics, Lugano, Switzerland
2
c 2007 V. Schuppan
3
c 2007 V. Schuppan
4
(well-known in SMT community)
∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
U
⇒ ∧
combination Boolean temporal formula
c 2007 V. Schuppan
5
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula Boolean formula abstract
c 2007 V. Schuppan
6
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula Boolean formula abstract false? = yes unsatisfiable
c 2007 V. Schuppan
7
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula A1 A3 ¬A 4 Boolean formula abstract false? = no yes unsatisfiable extract prime implicant prime implicant Boolean
c 2007 V. Schuppan
8
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula A1 A3
F G
∧
U
⇒ ∧
X
∨
G
¬A 4 Boolean formula abstract false? = no yes unsatisfiable extract prime implicant prime implicant Boolean concretize temporal prime implicant ¬
c 2007 V. Schuppan
9
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula A1 A3
F G
∧
U
⇒ ∧
X
∨
G
¬A 4 Boolean formula abstract false? = no yes unsatisfiable extract prime implicant check satisfiability prime implicant Boolean concretize temporal prime implicant ¬
c 2007 V. Schuppan
10
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula A1 A3
F G
∧
U
⇒ ∧
X
∨
G
¬A 4 SAT? yes satisfiable Boolean formula abstract false? = no yes unsatisfiable extract prime implicant check satisfiability prime implicant Boolean concretize temporal prime implicant ¬
c 2007 V. Schuppan
11
(well-known in SMT community)
A1 A2 A3 A4
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
U
⇒ ∧
X
∨
G X
¬
temporal formula
∧ ∨ ¬ ⇔ ⇒ ∨
A2
U
⇒ ∧
combination Boolean fresh proposition temporal formula A1 A3
F G
∧
U
⇒ ∧
X
∨
G
¬A 4 prime implicant remove SAT? no yes satisfiable Boolean formula abstract false? = no yes unsatisfiable extract prime implicant check satisfiability prime implicant Boolean concretize temporal prime implicant ¬
c 2007 V. Schuppan
12
c 2007 V. Schuppan
13
[Davis, Putnam (1960); Dunham, Fridshal, Sward (1959)]
Assume a propositional formula φ in CNF: (l1,1 ∨...∨l1,n1 ∨ p)∧...∧(lk,1 ∨...∨lk,nk ∨ p)
∧ φ2
Then: φ is satisfiable iff p∧φ is satisfiable. (And similarly if p occurs only negatively in φ1.)
c 2007 V. Schuppan
14
Extend notion of pure literal to PSL (see paper). Let φ be a PSL formula such that p is pure positive in φ. Then: φ is satisfiable iff (Gp)∧φ is satisfiable. (And similarly if p is pure negative in φ.) (Modal logic K : [Pan, Sattler, Vardi (J. Applied Non-Classical Logics 2006)])
c 2007 V. Schuppan
15
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
F G
∧
U
⇒ ∧
U
⇒ ∧
X
∨
G X
∨
G
A1 A1 A2 A3 A3 A4 ¬A 4 ¬
¬
X
temporal formula Boolean formula Boolean prime implicant temporal prime implicant abstract yes unsatisfiable false? no = extract prime implicant concretize check satisfiability satisfiable yes SAT? no remove prime implicant
(Pure literal) Simplification
c 2007 V. Schuppan
16
c 2007 V. Schuppan
17
Assume φ ≡ (Gp) ∧ (F¬p) ∧ ((Xp) ∨ (XXp)) Prime implicants: (Gp) ∧ (F¬p) ∧ (Xp) (Gp) ∧ (F¬p) ∧ (XXp) They share unsatisfiable part ⇒ no need to check both! Given {φi | i ∈ I} with V
i∈I φi unsatisfiable,
any {φj | j ∈ J ⊆ I} with V
j∈J φj unsatisfiable is an unsatisfiable core.
c 2007 V. Schuppan
18
∧ ∨ ¬ ⇔ ⇒ ∨ ∧ ∨ ¬ ⇔ ⇒ ∨
F G
∧
F G
∧
U
⇒ ∧
U
⇒ ∧
X
∨
G X
∨
G
A1 A1 A2 A3 A3 A4 ¬A 4 ¬
¬
X
temporal formula Boolean formula Boolean prime implicant temporal prime implicant abstract yes unsatisfiable false? no = extract prime implicant concretize check satisfiability satisfiable yes SAT? no remove prime implicant
Extract/remove unsat core(s)
c 2007 V. Schuppan
19
Propositional case: [Lynce, Marques-Silva (SAT’04)]
i∈I φi.
uchi automaton B for
^
i∈I
(Ai → φi) Let J ⊆ I. B has fair path from some initial state with {Aj | j ∈ J} true iff
V
j∈J φ j is satisfiable.
Independent of how B¨ uchi automaton is constructed!
c 2007 V. Schuppan
20
Let B be a B¨ uchi automaton for V
i∈I(Ai → φi).
(e.g., Emerson-Lei).
Now S contains the set of unsatisfiable cores of V
i∈I φi.
(We obtain all unsatisfiable cores.)
c 2007 V. Schuppan
21
Let B be a B¨ uchi automaton for V
i∈I(Ai → φi).
at time 0.
Now {φj | j ∈ J} contains an unsatisfiable core of V
i∈I φi.
(We obtain one unsatisfiable core.)
c 2007 V. Schuppan
22
c 2007 V. Schuppan
23
Benchmarks on PSL satisfiability (Used in [Cimatti, Roveri, Semprini, Tonetta (FMCAD’06); Cimatti, Roveri, Tonetta (TACAS’07)])
Orni (2005)] with random regular expressions.
lowing shapes: – large conjunction, – (large conjunction) implies (large conjunction), – (large conjunction) iff (large conjunction), – random Boolean combination. We’d love to have challenging realistic benchmarks from industry.
c 2007 V. Schuppan
24
Implementation – Basis: NuSMV – Translation from PSL to automata: [Cimatti, Roveri, Tonetta (TACAS’07)] – BDD-based solver: backward Emerson-Lei, dynamic reordering baseline for BDD-based approaches – SAT-based solver: incremental and complete SBMC with MiniSat [Heljanko, Junttila, Latvala (CAV’05)] baseline for SAT-based approaches Resources – Time out: 120 seconds – Memory out: 768 MB Download http://sra.itc.it/people/roveri/cav07-bapsl/
c 2007 V. Schuppan
25
SAT BDD
to 100 10 1 0.1 to 100 10 1 0.1
Baseline [seconds] Boolean abstraction [seconds]
to 100 10 1 0.1 to 100 10 1 0.1
Baseline [seconds] Boolean abstraction [seconds]
unsat sat
c 2007 V. Schuppan
26
SAT BDD
to 100 10 1 0.1 to 100 10 1 0.1
Baseline [sec] Baseline, pure lit. [sec]
to 100 10 1 0.1 to 100 10 1 0.1
Baseline [sec] Baseline, pure lit. [sec]
unsat sat
c 2007 V. Schuppan
27
SAT BDD
to 100 10 1 0.1 to 100 10 1 0.1
to 100 10 1 0.1 to 100 10 1 0.1
unsat sat
c 2007 V. Schuppan
28
SAT BDD run time
to 100 10 1 0.1 to 100 10 1 0.1
to 100 10 1 0.1 to 100 10 1 0.1
search space
1000 100 10 1 1000 100 10 1
1000 100 10 1 1000 100 10 1
c 2007 V. Schuppan
29
Introduce Boolean abstraction for PSL. ⇒ Very helpful with BDD-based, unclear with SAT-based solvers. ⇒ SAT- and BDD-based approaches complementary. Extend pure literal simplification to PSL. ⇒ Very helpful, more so when applied to prime implicants. Extract unsatisfiable cores from solvers. ⇒ Reduces search space, though at the cost of run time. Much room for improvement: – Optimize extraction of unsatisfiable cores. – Reuse partial results between prime implicants. – Improve prioritization of prime implicants. – ... (and some more) ...
c 2007 V. Schuppan
30
c 2007 V. Schuppan
31
p in Xφ φ∨ψ ψ∨φ φ∧ψ ψ∧φ φ U ψ ψ U φ φ R ψ ψ R φ r ✸ → ψ s ✸ → φ r | → ψ s | → φ (and analogously for a negative occurrence of p). p is pure positive (negative) in φ iff all occurrences of p in φ are positive (negative).
c 2007 V. Schuppan
32
[Heljanko, Junttila, Latvala (CAV’05)]
1 k ← 0; 2 while true do 3 check for contradiction at length k; 4 if contradiction then return no fair path exists fi 5 check for non-redundant path of length k; 6 if no non-redundant path then return no fair path exists fi 7 check for fair lasso-shaped path of length k; 8 if fair lasso-shaped path then return fair path exists fi 9 k++; 10
Note: all constraints added in lines 3, 5 for k are present at lines 3, 5, 7 for k′ > k.
c 2007 V. Schuppan
33
literals assumed CNF "UNSAT" + conflict "SAT" + assignment SAT solver
c 2007 V. Schuppan
34
literals assumed CNF "UNSAT" + conflict "SAT" + assignment
j φ j such that is unsat
i Ai → φi SAT solver {A } at time step 0 j at time step 0 i {A } no contradiction up to time step k
(We obtain one unsatisfiable core.)
c 2007 V. Schuppan
35
SAT BDD
to 100 10 1 0.1 to 100 10 1 0.1
top [seconds] top + prime implicant [seconds]
to 100 10 1 0.1 to 100 10 1 0.1
top [seconds] top + prime implicant [seconds]
unsat sat
c 2007 V. Schuppan
36
without Boolean abstraction with Boolean abstraction
to 100 10 1 0.1 to 100 10 1 0.1
BDD (pure lit.) [seconds] SAT (pure lit.) [seconds]
to 100 10 1 0.1 to 100 10 1 0.1
BDD (BA, pure lit.) [sec.] SAT (BA, pure lit.) [seconds]
unsat sat
c 2007 V. Schuppan