In model checking, a field of computer science, a difference bound matrix (DBM) is a data structure used to represent some convex polytopes called zones. This structure can be used to efficiently implement some geometrical operations over zones, such as testing emptiness, inclusion, equality, and computing the intersection and the sum of two zones. It is, for example, used in the Uppaal model checker; where it is also distributed as an independent library. More precisely, there is a notion of canonical DBM; there is a one-to-one relation between canonical DBMs and zones and from each DBM a canonical equivalent DBM can be efficiently computed. Thus, equality of zone can be tested by checking for equality of canonical DBMs.
Zone A difference bound matrix is used to represents some kind of convex polytopes. Those polytopes are called zone. They are now defined. Formally, a zone is defined by equations of the form x≤c, x≥c, x1≤x2+c and x1≥x2+c, with x1 and x2 some variables, and c a constant. Zones have originally been called region, but nowadays this name usually denote region, a special kind of zone. Intuitively, a region can be considered as a minimal non-empty zones, in which the constants used in constraint are bounded. Given n variables, there are exactly n(n+1) different non-redundant constraints possible, n constraints which use a single variable and an upper bound, n constraints which uses a single variable and a lower bound, and for each of the n2 ordered pairs of variable (x,y), an upper bound on x−y. However, an arbitrary convex polytope in ℝn may require an arbitrarily great number of constraints. Even when n=2, there can be an arbitrary great number of non-redundant constraints (x<iy+ci)i∈ℕ, for ci some constants. This is the reason why DBMs can not be extended from zones to convex polytopes.
Example As stated in the introduction, we consider a zone defined by a set of statements of the form x1≤c, x1≥c, x1≤x2+c and x1≥x2+c, with x1 and x2 some variables, and c a constant. However some of those constraints are either contradictory or redundant. We now give such examples.
the constraints x1≤3 and x1≥4 are contradictory. Hence, when two such constraints are found, the zone defined is empty. the constraints x1≤3 and x1≤4 are redundant. The second constraint being implied by the first one. Hence, when two such constraints are found in the definition of the zone, the second constraint may be removed. We also give example showing how to generate new constraints from existing constraints. For each pair of clocks x1 and x2, the DBM has a constraint of the form x1≺x2+c, where ≺ is either < or ≤. If no such constraint can be found, the constraint x1≺x2+∞ can be added to the zone definition without loss of generality. But in some case, a more precise constraint can be found. Such an example is now going to be given.
the constraints x1≤3, x2≥−3 implies that x1≤x2+6. Thus, assuming that no other constraint such as x1≤x2+5 or x1<x2+6 belongs to the definition, the constraint x1≤x2+6 is added to the zone definition. the constraints x2≤3, x1≤x2+3 implies that x1≤6. Thus, assuming that no other constraint such as x1≤5 or x1<6 belongs to the definition, the constraint x1≤6 is added to the zone definition. the constraints x1≤x2+3, x2≤x3+3 implies that x1≤x3+6. Thus, assuming that no other constraint such as x1≤x3+5 or x1<x3+6 belongs to the definition, the constraint x1≤x3+6 is added to the zone definition. Actually, the two first cases above are particular cases of the third cases. Indeed, x1≤3 and x2≥−3 can be rewritten as x1≤0+3 and 0≤x2+3 respectively. And thus, the constraint x1≤x2+6 added in the first example is similar to the constraint added in the third example.
Definition We now fix a monoid (M,0,+) which is a subset of the real line. This monoid is traditionally the set of integers, rationals, reals, or their subset of non-negative numbers.
Constraints In order to define the data structure difference bound matrix, it is first required to give a data structure to encode atomic constraints. Furthermore, we introduce an algebra for atomic constraints. This algebra is similar to the tropical semiring, with two modifications:
An arbitrary ordered monoid may be used instead of ℝ. In order to distinguish between "<m" and "≤m", the set of elements of the algebra must contain information stating whether the order is strict or not.
Definition of constraints The set of satisfiable constraints is defined as the set of pairs of the form:
(≤,m), with m∈M, which represents a constraint of the form ≤m, (<,m), with m∈M, where m is not a minimal element of M, which represents a constraint of the form <m, (<,∞), which represents the absence of constraint. The set of constraint contains all satisfiable constraints and contains also the following unsatisfiable constraint:
(<,−∞). The subset {q∈ℚ∣q≤2} can not be defined using this kind of constraints. More generally, some convex polytopes can not be defined when the ordered monoid does not have the least-upper-bound property, even if each of the constraints in its definition uses at most two variables.
Operation on constraints In order to generate a single constraint from a pair of constraints applied to the same (pair of) variable, we formalize the notion of intersection of constraints and of order over constraints. Similarly, in order to define a new constraints from existing constraints, a notion of sum of constraint must also be defined.
Order on constraints We now define an order relation over constraints. This order symbolize the inclusion relation. First, the set {<,≤} is considered as an ordered set, with < being inferior to ≤. Intuitively, this order is chosen because the set defined by x<c is strictly included in the set defined by x≤c. We then state that the constraint (≺1,m1) is smaller than (≺2,m2) if either m1<m2 or (m1=m2 and ≺1 is less than ≺2). That is, the order on constraints is the lexicographical order applied from right to left. Note that this order is a total order. If M has the least-upper-bound property (or greatest-lower-bound property) then the set of constraints also have it.
Intersection of constraints The intersection of two constraints, denoted as (≺1,m1)⊓(≺2,m2), is then simply defined as the minimum of those two constraints. If M has the greatest-lower bound property then the intersection of an infinite number of constraints is also defined.
… excerpt ends here. Continue reading the full article.



