Dealing with Symmetries in Modal Tableaux Carlos Areces and Ezequiel Orbe Universidad Nacional de Córdoba, Argentina CONICET, Argentina Frontiers of Combining Systems 2013, Nancy, France Introduction Definitions Symmetry Detection Symmetry Blocking Introduction A symmetry is a permutation of the variables (literals) of a problem that preserves its structure and its set of solutions. For instance: ϕ = (¬p ∨ r) ∧ (q ∨ r) ∧ (¬p ∨ q) has symmetry: ρ = (¬p q)(¬q p) We may improve the performance of theorem proving if: symmetry detection is cheap this information pays off in terms of performance We present a tableau optimization called ”symmetry blocking”. Conclusions Introduction Definitions Symmetry Detection Symmetry Blocking Syntax Modal Conjunctive Normal Form: Clausal representation of modal formulas: (¬p ∨ r) ∧ (q ∨ r) ∧ (r ∨ (¬p ∨ q))) → {{¬p, r}, {q, r}, {r, {¬p, q}}} Disregard order and multiplicity: formulas as set of sets. Symmetry: Permutations of literals, ρ : PLIT 7→ PLIT ρ is a symmetry of ϕ if ρ(ϕ) = ϕ. Conclusions Introduction Definitions Symmetry Detection Symmetry Blocking Semantics Models: Kripke model: M = hW, R, V i W is the domain R⊆W ×W V : W 7→ P(PROP) Pointed Models: M = hw, W, R, V i, w ∈ W Satisfaction Relation: M |= ϕ M |= C M |= p M |= C iff iff iff iff M |= C for all clauses C ∈ ϕ M |= l for some literal l ∈ C p ∈ V (w) for p ∈ PROP hw0 , W, R, V i |= C for all w0 s.t. wRw0 Conclusions Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Permutation Sequences In modal logics that have the tree model property, a notion of layer is induced: Formula ϕ modal depth = 0 ∧ depth = 0 ∨ ∨ p Model M qr ¬� modal depth = 1 q Layer 1 p := true Layer 2 r :=true Layer 3 depth = 1 ∨ ¬p p := true � modal depth = 2 depth = 2 ¬r We can consider a different permutation at each layer. Permutation Sequence: ρ̄ = hρ1 , . . . , ρn i Enables to find more symmetries. Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Symmetry Detection Create a graph from the formula such that its automorphism group is isomorphic to the symmetry group of the formula. Pass it to graph automorphism tools (eg Saucy, Bliss). The reduction enables the detection of layered symmetries. Node coloring avoids spurious symmetries. ϕ = ¬(¬p ∨ q ∨ ¬q) ∧ ¬(¬q ∨ p ∨ ¬p) p -p A B C D E F q -q Group Generators: q -q G H p -p ρ̄1 = hρId , ρId , (p ¬p)i ρ̄2 = hρId , ρId , (q ¬q)i ρ̄3 = hρId , (p q)(¬p ¬q), (p q)(¬p ¬q)i A = ¬(¬p ∨ q ∨ ¬q) B = ¬(¬q ∨ p ∨ ¬p) C = ¬p ∨ q ∨ ¬q D = ¬q ∨ p ∨ ¬p E = q F = ¬q G = p H = ¬p Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Symmetry Detection: Experimental Evaluation Testbed: 378 LWB K+ 756 QBFLib + 19000 random. Conclusions: Symmetries do arise in modal formulas. As expected: encoding of the formula drives the existence of symmetries (LWB K). % of symmetries in random instances highly depends on L/N . LWB K QBFLib #Inst #Sym T 378 756 208 746 10.2 16656 100 V20 V90 V150 V210 V300 V400 V500 Class k k k k k k k k k branch d4 dum grz lin path ph poly t4p #Inst #Sym AvGen 42 42 42 42 42 42 42 42 42 42 0 0 42 1 42 39 42 0 12 0 0 4 1 35 1 18 0 %Symm 80 60 40 20 0 0 5 10 15 20 L/N 25 30 35 Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions BML Prefixed Tableaux Calculus σ:ϕ σ:C (∧) for all Ci ∈ ϕ σ:Ci σ:¬C (♦)1 σRσ 0 , σ 0 :∼C 1 (∨) for all li ∈ C σ:l1 | . . . | σ:ln σ:C, σRσ 0 () σ0 : C ∼C: CNF of the negation of C. The prefix σ 0 is new in the tableau. A branch is closed if contains both σ:p and σ:¬p, otherwise open. A branch is saturated if no rule can be further applied. Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Symmetry Blocking We write Γ(σ) = {ψ | σ:ψ ∈ Θ} for the set of -formulas at prefix σ in branch Θ. Definition (Symmetry Blocking) Let ρ̄ be a layered symmetry of ϕ, and Θ a branch in a tableau of ϕ. Rule (♦) cannot be applied to σ:ρ̄(¬ψ) on Θ if and – it has been applied to σ:¬ψ – Var(ρ̄(¬ψ)) ∩ Var(Γ(σ)) = ∅, Dynamic: Var(Γ(σ)) can change over time. Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Symmetry Blocking Completeness: Soundness is trivial as we do not modify the set of rules. Completeness requires more work. Theorem The tableau calculus with symmetry blocking for the modal logic BML is sound and complete. Completeness lemma: a saturated open branch and its blocked ¬-formulas form a satisfiable set of formulas. Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Symmetry Blocking: Experimental Evaluation I Implementation on the HTab solver: It only expands a ¬-formula if there is no symmetric formula already expanded. Checks blocking condition: iff it gets a saturated open branch. If it holds for all blocked formulas, terminates. Otherwise, reschedules for further expansion. Conclusions: Figure : HTab vs. HTab+SB HTab+SB outperforms HTab. Table : Total Times with SB Solver HTab+SB HTab #Suc #TO T1 T2 318 311 636 643 9657 10634 391167 396434 HTab + SB [sec.] 100 10 1 0.1 0.01 0.001 0.001 0.01 0.1 1 HTab [sec.] 10 100 Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Symmetry Blocking: Experimental Evaluation II Conclusions: Different behavior for sat and unsat instances. Table : Applications of SB. Status #Inst #Trig B1 B2 157 163 73 79 6319 1038 6278 87 100 100 10 10 HTab + SB [sec.] HTab + SB [sec.] Satisfiable Unsatisfiable 1 0.1 0.01 1 0.1 0.01 0.001 0.001 0.01 0.1 1 HTab [sec.] a) Satisfiable formulas 10 100 0.001 0.001 0.01 0.1 1 HTab [sec.] b) Unsatisfiable formulas Figure : Performance of HTab vs. HTab+SB. 10 100 Introduction Definitions Symmetry Detection Symmetry Blocking Symmetry Blocking: Experimental Evaluation III Conclusions: Effectiveness of SB depends on the problem class. Table : Effect of SB on the LWB K Class k k k k k k k k k k branch p branch n grz p grz n path p path n ph p ph n poly p poly n n100 21 9 21 21 21 21 7 21 21 21 HTab+SB n600 21 10 21 21 21 21 8 21 21 21 T n100 HTab n600 T 59.760 7010.200 0.508 0.632 4.542 5.348 8116.900 177.560 29.068 29.534 13 8 21 21 21 21 7 21 21 21 15 10 21 21 21 21 8 21 21 21 4402.130 7197.000 0.276 0.380 3.812 3.792 8095.48 178.579 22.949 24.229 Conclusions Introduction Definitions Symmetry Detection Symmetry Blocking Conclusions Conclusions Layered permutations enable to find more symmetries. Symmetric blocking performs differently depending on problem class. Not all symmetries are used by Symmetric Blocking (not always happen in ¬−-formulas). Future work: Symmetry Breaking Predicates for modal logic. Appendix Resources HTab prover: http://tinyurl.com/orsnu2z Benchmarks: http://tinyurl.com/pq63to7 Appendix Symmetries in Modal Logics: semantic properties Property I Let ϕ be a formula, ρ be a symmetry of ϕ and M a model, then, M |= ϕ iff ρ(M) |= ϕ. Symmetries induce a partition in the model set. Static and Dynamic Symmetry Breaking (Symmetry Breaking Predicates). Property II Let ϕ and ψ be formulas and ρ be a symmetry of ϕ then, ϕ |= ψ iff ϕ |= ρ(ψ). This provides a cheap inference mechanism. Symmetric Reasoning (Symmetric Clause Learning). This holds for permutation sequences.