10.01.2015 Views

Sets with Cardinality Constraints in Satisfiability Modulo Theories

Sets with Cardinality Constraints in Satisfiability Modulo Theories

Sets with Cardinality Constraints in Satisfiability Modulo Theories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4 Philippe Suter, Rob<strong>in</strong> Steiger, and Viktor Kuncak<br />

3 Decomposition <strong>in</strong> Solv<strong>in</strong>g BAPA <strong>Constra<strong>in</strong>ts</strong><br />

In this section, we consider formulas over f<strong>in</strong>ite sets of un<strong>in</strong>terpreted elements<br />

from a doma<strong>in</strong> E. We show <strong>in</strong> Section 4 how we comb<strong>in</strong>ed QFBAPA <strong>with</strong> other<br />

theories to obta<strong>in</strong> a theory of sets of <strong>in</strong>terpreted elements.<br />

Syntax. Figure 1 presents the syntax of QFBAPA. We use vars(φ) to denote<br />

the set of free set variables occurr<strong>in</strong>g <strong>in</strong> φ.<br />

φ ::= A | φ 1 ∧ φ 2 | φ 1 ∨ φ 2 | ¬φ<br />

A ::= S 1 = S 2 | S 1 ⊆ S 2 | T 1 = T 2 | T 1 ≤ T 2<br />

S ::= s | ∅ | U | S 1 ∪ S 2 | S 1 ∩ S 2 | S 1 \ S 2 | S c<br />

T ::= i | K | T 1 + T 2 | K · T | | S |<br />

K ::= . . . | −2 | −1 | 0 | 1 | 2 | . . .<br />

Fig. 1. Quantifier-Free Formulas of Boolean Algebra <strong>with</strong> Presburger Arithmetic<br />

(QFBAPA). S c denotes the complement of the set S <strong>with</strong> respect to the universe U,<br />

that is, U \ S.<br />

Def<strong>in</strong>ition 1 (Venn regions). One central notion throughout the presentation<br />

of the theorems and the decision procedure is the notion of Venn region. A Venn<br />

region of n sets S = {S 1 , . . . , S n } is one of the 2 n set expressions described by<br />

⋂ n<br />

i=1 Sαi i<br />

where S αi<br />

i is either S i or Si c. By construction, the 2n regions form a<br />

partition of U. We write venn(S) to denote the set of all Venn regions formed<br />

<strong>with</strong> the sets <strong>in</strong> S.<br />

Semantics. An <strong>in</strong>terpretation M of a QFBAPA formula φ is a map from the<br />

set variables of φ to f<strong>in</strong>ite subsets of E and from the <strong>in</strong>teger variables of φ to<br />

values <strong>in</strong> Z. It is a model of φ, denoted M |= φ if the follow<strong>in</strong>g conditions are<br />

satisfied:<br />

– U M is a f<strong>in</strong>ite subset of E and ∅ M is the empty set<br />

– for each set variable S of φ, S M ⊆ U M<br />

– for each <strong>in</strong>teger variable k of φ, k M ∈ Z<br />

– when =, ⊆, ∅, ∪, ∩, \ and the card<strong>in</strong>ality function | · | are <strong>in</strong>terpreted as<br />

expected, φ evaluates to true <strong>in</strong> M<br />

Def<strong>in</strong>ition 2. We def<strong>in</strong>e ∼ V to be the equivalence relation on <strong>in</strong>terpretations,<br />

parametrized by a set of set variables V , such that:<br />

M 1 ∼ V M 2 ⇐⇒ ∀v ∈ venn(V ) . | v M1 | = | v M2 |<br />

Def<strong>in</strong>ition 3. Let M be an <strong>in</strong>terpretation and f : E → E a bijection from the<br />

<strong>in</strong>terpretation doma<strong>in</strong> to itself (a permutation function). We denote by f[M] the<br />

<strong>in</strong>terpretation such that:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!