Data Structures and Algorithms For The Analysis of Real Time Systems
Data Structures and Algorithms For The Analysis of Real Time Systems
Gerd Behrmann
Aalborg University
Department of Computer Science
Data Structures and Algorithms for the Analysis of Real Time
Systems
Data Structures and Algorithms for the
Analysis of Real Time Systems
Gerd Behrmann
PhD Dissertation
Aalborg University
Department of Computer Science
ABSTRACT
This thesis presents data structures and algorithms for the analysis of real time sys-
tems in various modelling formalisms. Algorithms for reachability analysis (a special
case of model checking) and static scheduling analysis are presented. The modeling
formalisms range from traditional state/event systems as used in the commercial
tool visualSTATE over hierarchical state/event systems and timed automata to
linear priced timed automata. Data structures used range from reduced ordered bi-
nary decision diagrams (ROBDD) used in symbolic model checking of state/event
systems, over clock difference diagrams (CDD) – an ROBDD like data structures
for real time systems, to priced zones used for representing the state space of cost
annotated timed automata.
The thesis is a collection of six papers. The first two papers deal with model checking
of visualSTATE models – in fact, the current version of visualSTATE uses the
patented techniques proposed in the first paper. The third paper considers alterna-
tive data structures for representing the state space of a real time system (CDDs).
The remaining three papers deal with how real time model checking techniques like
those used for timed automata, can be used to answer static scheduling problems
and in particular, how one can specify and find optimal schedules. The techniques
presented in the thesis have been experimentally evaluated using either a prototype
of the visualSTATE model checker or the academic timed automata verification
tool Uppaal.
Keywords: Finite state systems, state/event systems, real time systems, timed
automata, priced timed automata, reachability analysis, optimal reachability, verifi-
cation, model checking, static scheduling, state explosion problem, symbolic repre-
sentations, compositional verification, hierarchical verification, dependency analysis,
verification tool.
This thesis is a collection of six selected papers. I would not have been able to write
them without the support from my supervisor Kim G. Larsen. Thanks for believing
in me and treating me like a colleague.
Also thanks to my colleagues here at the department. It wouldn’t have been fun
without Luca, Josva, Arne, Brian and Thomas. Thanks to all my co-authors and col-
leagues in Aarhus, Uppsala, Copenhagen, Archen, Nijmegen and Twente: Thomas,
Paul, Alexandre, Johan, Wang, Justin, Jørn, Henrik, Henrik, Kaare, Carsten, Judi,
Ansgaar, Frits and Ed.
Also thanks to the secretaries at the department, especially Ulla, Lene and Helle,
for all the help with the practical issues of pursuing a Ph.D.
Thanks to my family and friends, for all the barbecues and long evenings which
helped me forget about work and papers and the thesis. And finally, thanks to
Mette, my love, for not giving up on me.
xii
CONTENTS
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Reachability Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Modeling Formalisms . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5 The Making of Uppaal . . . . . . . . . . . . . . . . . . . . . . . . . 26
6 Thesis Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1 Motivation
Software crashes. Software contains bugs. Software is complex. These statements
are almost axioms – anybody with a PC can agree that this is how software behaves.
These assertions are independent of the software type, e.g. your operating system,
your typical office application, or special purpose software for managing the flow
of goods in your company all crash from time to time. Platform does not matter
either: Although some people might try to convince you otherwise, Linux and Mac
software is just as buggy as software for Windows.
Not all software is as buggy as your typical PC application. Nowadays, most
devices more complex than a light bulb actually contain software – this is what is
called embedded software – and most of this software is working flawlessly. As does
most software used in avionics and space exploration (or at least we hope so; in
recent years a number of losses in space missions were caused by software failures).
Think about it: Your car (engine, brakes, airbags, etc.), your microwave oven, your
dishwasher, your washing machine, your phone, your cell phone, your house alarm,
your HiFi equipment and much more all contain software. And if the vision about
pervasive computing becomes true then your light bulbs, your shoes, your door,
even the goods in the local grocery store will contain small computers containing
software.
For software embedded in small devices, simplicity probably plays a major role in
ensuring correctness, i.e., compared to your typical PC application, the functionality
and complexity of embedded software is lower – at least this was the case some
years ago. In recent years, the functionality and hence the complexity of embedded
software has been going up. As a result the failure rate increases. Take a good
look at a modern cell phone. It contains over one megabyte of RAM and has a
more powerful processor than a PC 10 years ago. Consequently, software failures
are quite common. Consumers are already getting used to the fact that a cell phone
can crash, forcing them to remove the battery in order to reboot the phone.
There are many approaches towards fighting this problem. None of them are
restricted to embedded software, although the higher cost of bugs in embedded soft-
ware and mission-critical software has a tendency to make people in those areas
more receptive to techniques for increasing software quality. The whole area of soft-
ware process improvement tries to avoid the errors in the first place by avoiding
the ad-hoc development style used in many software development projects. It boils
down to better management, better documentation, better planning, and more dis-
cipline. On the other hand, techniques like triple modular redundancy are based on
the assumption that faults do occur and that any system must be fault tolerant.
In triple modular redundancy, all systems consist of three functionally equivalent
modules which vote about each operation. Each module is developed from the same
requirement specification by an independent team. Whenever one of the modules
does not agree with the other two, the module is overruled assuming that the two
agreeing modules have the correct result. This approach triples the development
costs and thus is only used for life-critical missions, e.g., in avionics.
4 Introduction
Fig. 2: A model checker is a tool, that checks whether a given model satisfies a set
of requirements. If not, debugging information may be produced which can be used
to fix the model (or the requirement specification). If the model does satisfy the
requirements, the model checker might provide further insight into the behaviour of
the model.
based on what we observe and there is no way of guaranteeing that the world is
actually behaving as assumed or predicted. On the other hand, it is easy to disprove
statements, since all we need is a counter example: An experiment which clearly
demonstrates that the world is not behaving according to our prediction. When
this line of thought is applied to formal verification of software, we must conclude
that we can never prove the correctness of software. At most, we can prove the
correctness of software as a mathematical object (the model), but never as a part of
a real system. In model checking, the model of the software and the environment it is
interacting with is always an abstraction of the software running on a real processor
and interacting with the real environment. The more detailed the model, the more
we can trust it in the sense that errors in the real system are preserved in the model.
Therefore, in case we cannot find any errors, this might increase our confidence in
the real system. However, the only thing we can do with certainty is to disprove
the correctness, i.e. to find bugs.1 Model checking should always be considered
orthogonal to other techniques of fault prevention. It is just another addition to the
arsenal of tools available to developers for fighting bugs.
Model checking is sometimes referred to as push-button verification, implying
it is so easy that one can verify the correctness of programs by pressing a single
button – nothing could be further from the truth. It is correct that once the model
has been created and the requirement specification has been written, proving the
correctness is done by the model checking tool. However, model checking tools suffer
from the so called state space explosion problem: The complexity of the system
under consideration grows exponentially in the number of concurrent components
in the model. From a purely theoretical point of view, model checking seems futile:
The worst-case complexity of the problem dooms the approach for anything but
1
There is no guarantee that an error in the model is actually an error in the real system, but if
we can reproduce the error in the real system, then we can be certain.
6 Introduction
the simplest systems. In practise however, many realistic systems are of such a
structured nature that model checking is of practical use. A good modeling language
allows the developer to express the structure of the problem. Much research is
invested in finding techniques that can utilise the structure to allow model checking
of realistic systems despite the complexity of the general problem. For the moment,
model checking tools still require a firm understanding of the modeling language
and at least rudimentary knowledge about the techniques used in the tool. In time,
modeling languages, model checking techniques and the ever increasing amount of
computer power available will hopefully turn the approach into a viable complement
to traditional quality assurance techniques.
Model checkers differentiate themselves from the competition by using differ-
ent modeling languages and different languages for the requirement specification.
Common to all model checkers is that the modeling language essentially describes
a directed graph, which is exhaustively explored by the model checker. They might
use more or less clever ways of representing and exploring this state space. For some
modeling languages the state space can even be infinite. Nonetheless, state space
exploration is a characteristic feature of a model checker.
Formal verification is not the only application of model checking tools. If the
model is only a partial description of the problem, model checkers can be (mis)used
to synthesize some of the remaining components. In particular, as illustrated in
Fig. 3, if only a model of the uncontrolled environment is available, a model checker
can be used to answer questions like “Is there a way to bring the system into this
and that state?” or “Is there an infinite path such that something particularly bad
never happens?”. Answering these questions by themselves does not give us any clue
as to how to actually realise the behaviour, but most model checkers can produce
traces which demonstrate that the properties actually do hold. These traces are in
fact schedules. Hence, model checkers can be used as alternative scheduling tools.
The two scheduling questions mentioned before are of a particularly simple nature,
as they assume that we are in control of all transitions of the environment. However,
Motivation 7
it is not unlikely that we can only control some transitions whereas the others are
taken non-deterministically. For those familiar with game theory, this is like the
difference between one player games (e.g. Solitair, where the player is in control of
all moves) and two player games (e.g. Chess, where players move in turns).
This thesis is a collection of six selected papers. These six papers do not provide
all answers to all remaining problems in model checking. Each paper advances the
state-of-the-art in its own area. The papers deal with different modeling languages,
different ways of representing and exploring the state space, and techniques that
are used in different tools. The common theme for all papers is simply reachability
analysis; maybe with a twist towards embedded software, although this is never
explicitly stated in any of the papers.
The techniques presented in this thesis are evaluated using two tools: visual-
STATE and Uppaal. The former is a commercial tool by visualSTATE A/S.
The tool is used in development of embedded software and provides a graphical
Statechart based language, supports code generation, simulation, and prototyp-
ing. Finally, the tool contains a verification component which can detect common
mistakes like dead code and deadlocks. The first two papers of this thesis deal with
model checking of visualSTATE models – in fact, the current version of visual-
STATE uses the patented techniques proposed in the first paper. The latter tool
– Uppaal – is an academic tool for model checking real time systems. The folklore
definition of a real time system is:
“Any system whose correctness does not only depend on the correct order
of events, but also the timing between events.”
For instance, the airbag release system in a car is a real time system: It does not
suffice that the air bag will eventually be released after the car has crashed; to be
of any use it must be released within a certain maximum amount of time after the
impact. The third paper considers alternative data structures for representing the
state space of a real time system. The remaining three papers deal with how real
time model checking techniques like those used in Uppaal, can be used to answer
static scheduling problems and in particular, how one can specify and find optimal
schedules.
Outline Table 1 gives an overview of the various tools used in the thesis, the
modeling formalisms they support, and the techniques and data structures used.
There are two interesting axes in this table, namely the formalisms and the data
structures, and the remainder of this introductory chapter gives an overview of these
two dimensions.
Section 2 gives a short introduction to explicit state and symbolic reachability
analysis. Section 3 gives an overview of the various formalisms, and section 4 dis-
cusses the data structures. Section 5 gives an overview of Uppaal, its architecture
and various sub-projects. Finally, section 6 gives a summary of the six papers of
this thesis.
8 Introduction
2 Reachability Analysis
The reachability problem is in many ways fundamental in model checking. Although
reachability analysis is not as powerful as, for instance, full CTL model checking,
many interesting problems can be reduced to that of checking reachability of certain
states. In this section we will look at various approaches to solving the reachability
problem.
Let us first define the reachability problem. A transition system is a tuple M =
(S, S0 , R) where S is a set of states, S0 ⊆ S is a set of initial states, R ⊆ S × S is
a set of transitions. Let G ⊆ S be a set of goal states. We say G is reachable from
S0 iff there exists a sequence of states s 0 , s1 , . . . , sn such that s0 ∈ S0 , sn ∈ G and
(si , si+1 ) ∈ T for all 0 ≤ i < n. This is illustrated in Fig. 4.
For finite transition systems, deciding the reachability problem is easy. Either
perform a breadth first or depth first traversal of the transition system starting at
the set of initial states and see if any of the states of G can be reached; alternatively
reverse all transitions and start with the set of goal states and see if any states in S 0
can reach a goal state. This is shown in Fig. 5. The problem is that most modeling
languages use parallel composition and thus the size of S (the state-space) is expo-
nential in the size of the input model. This is often referred to as the state explosion
problem. Researches have attacked the state explosion problem from numerous an-
gles; for instance, symmetry reduction [ES96] and partial order reduction [GW91]
techniques take advantage of the regularity of the model.
An alternative (and to some extent orthogonal) approach is to use symbolic
model checking techniques. Two approaches are predominant: Symbolic data struc-
tures (such as ROBDDs, see section 4.1) can be used to represent the transition
relation and sets of states and perform a breadth first search of M [BCM+ 90], see
Reachability Analysis 9
j
a b
c f k
i
g d h
Fig. 4: Assuming that state a is an initial state, the highlighted states prove that
state k is reachable.
j
a b
c f k
i
g d h
Fig. 5: It is easy to see that state e is unreachable when all edges are reversed and
starting the reachability analysis at e. It only requires one step to realize that there
is no path back to the initial state (state a). This is called backwards traversal of
the state space.
Fig. 6: Symbolic reachability techniques use data structures like ROBDDs to rep-
resent the set of states T and the transition relation R. In each iteration, the set
of all successors of states in T is computed in one symbolic operation. Compared
to explicitly computing the successors of each state, the symbolic approach is often
several orders of magnitude faster.
10 Introduction
a
b
j
k
c f
h
i
d
g
e
Fig. 7: Symbolic computation of the set of reachable states. In each iteration the
current set of reachable states is extended with the set of new states reachable in
one step from a state already in the set (the frontier of each iteration is shaded with
a different pattern).
Fig. 6. The advantage compared to explicit state model checking is two-fold: First,
the representation of the set of reachable states is not based on individual states and
thus can potentially represent extremely large sets. Second, the algorithm illustrated
in Fig. 7 computes the successors (the set of states reachable in one step) of a set
of states in one symbolic operation, which often is orders of magnitudes faster than
explicitly computing the successors of each state. The other approach to symbolic
model checking is referred to as bounded model checking [BCCZ99] which reduces
the reachability problem to a satisfiability problem. This is done by representing
the transition relation R as a formula in propositional logic and then unfolding the
transition relation n times in such a way that the resulting formula is satisfiable if
and only if a goal state can be reached with n or less transitions. One can then use
a SAT-solver to decide the resulting satisfiability problem. Bounded model checking
is often very efficient at finding a path to a goal state if such a path exists; the
drawback is that the model is only analysed up to depth n, which might be un-
known. In [McM03] bounded and unbounded model checking has been successfully
combined.
For general infinite transition systems, the reachability problem is undecidable,
but for certain models finite abstractions preserving interesting properties do exist.
We will return to such models in section 3.3.
3 Modeling Formalisms
3.1 State/Event Machines
The VVS project was a CIT2 sponsored collaboration between Baan visualSTATE
A/S (now IAR visualSTATE A/S), BRICS at Aalborg University and the computer
systems section at the Technical University of Denmark. The problem under consid-
eration was that of verifying large State/Event Machines (a.k.a. state/event models),
the native modeling formalism of the commercial visualSTATE tool.
2
Danish National Centre for IT Research
Modeling Formalisms 11
Go GoRight Down
[Closed] [Move]
GoLeft
Up [Move] Up
Fig. 8: A simple state/event model of a train. There are three concurrent state
machines; Train models the movement, Direction the current direction of the move-
ment, and Crossing a railway crossing. The events of this systems are Up, Down,
Go, GoLeft, and GoRight. The expressions is square brackets are guards testing on
the state of the other state machines.
within a short period of time. In one case, a model of the German ICE train with
a declared state space of 10476 was verified within 5 minutes.
Root
Train Stop Crossing
Go Open
[Closed] Up
Move H Down Up
GoRight
Left Right
GoLeft Closed
Fig. 10: A simple model of a train using the hierarchical state/event model.
push
dim
push push
bright
off
x := 0 x <= 1
x <= 10
push
x>1
Fig. 11: A timed automaton modeling an intelligent light switch. Pushing the
button twice quickly brings the switch into the bright location. The invariant in the
bright location forces the transition back to the off location (an auto-off feature).
suited for the compositional backwards reachability technique. Paper B shows that
whereas flattening leads to an exponential increase in verification time even when
combined with the compositional backwards reachability technique, our technique
is independent of the nesting depth.
Notice that the terms location and edge refer to the syntactic elements of a
timed automaton. A concrete state of a timed automaton is a semantic element and
is defined as a pair containing a location and a valuation of the clocks. The initial
state of the timed automaton in the example is (off, x = 0).
There are two types of transitions between concrete states: Whenever allowed by
the invariant of the current location, time can pass. The resulting delay transitions
do not change the locations, but all clocks are incremented by the exact same delay.
In the initial state of the example we have (off, x = 0) → (off, x = d) for any positive
real d. Alternatively, if the guard of an edge is satisfied, we might trigger an edge
transition. Edge transitions do not take time, i.e. the clock valuation is not changed
except to reflect updates
√ directly specified on the edge involved. Thus in the example
we have (off, x = 2) → (dim, x = 0). For the sake of argument, we could introduce
another clock y, which is not used by the automaton. In that case the following
sequence of transitions would be valid (off, x = 0, y = 0) → (off, x = π, y = π) →
(dim, x = 0, y = π).
Since clocks are continuous variables, it is not surprising that the state space of
a timed automaton is uncountably infinite. It was proven in [ACD93] that model
checking of TCTL, a timed extension of CTL, is decidable for timed automata. At
the core of this result is the region construction for timed automata [AD90]. Since
guards of a timed automaton are restricted to comparing clocks and differences of
clocks to integers, it becomes impossible to distinguish certain clock valuations in
a timed automaton. These clock valuations form equivalence classes called regions,
see Fig. 12. It was proven that the resulting structure is bisimilar to the original
timed automaton.
In practice, verification tools for timed automata use zones rather than regions
for exploring the state space. A zone is a set of clock valuations definable by a
conjunction of constraints on the form x ./ c or x − y ./ c, where x and y are clocks,
c is a constant, and ./ is one of the relational operators in {<, ≤, ≥, >}. A zone
describes a union of several regions, and is thus a coarser representation of the state
space. If we restrict the set of guards and invariants by disallowing negations, then
we can easily restate the semantics of a timed automaton in terms of zones rather
than clock valuations: A symbolic state is a pair (l, Z), where l is a location and Z
is a zone. When computing the successor of a symbolic state we first compute the
effect of an edge by applying the guard of the edge and then projecting the zone
according to the updates on the edge. Second we compute the future of the zone,
i.e., the set of states which can be reached by delaying, and apply the invariant of
the target location. Figure 13 shows the first steps of a symbolic exploration of the
example in Fig. 11.
Using zones, we obtain a countable representation of the state space. Here it be-
comes important to distinguish between diagonal-free and non-diagonal-free timed
automata. The first class is the subset of timed automata where guards and in-
variants are limited to conjunctions of the form x ./ c, where ./∈ {<, ≤, ≥, >},
i.e. conditions on differences of clocks are not allowed. In [BBFL03, Bou03] it was
proven that for diagonal-free timed automata, we can construct abstractions a, i.e.,
Modeling Formalisms 15
Timed Automata: Let X be a set of clocks, and let G(X) be the set of
expressions formed by the syntax
∃d ∈ R>0 : σ 0 = σ + d ∧ ∀0 ≤ d0 ≤ d : I(l) |= σ + d0 ,
where (σ + d)(x) = σ(x) + d. Edge transitions are on the form ((l, σ), (l 0 , σ 0 ))
such that:
where (
0 if x ∈ r
σ[r 7→ 0](x) =
σ(x) otherwise.
Fig. 12: Left: The region construction for a timed automaton with two clocks.
Regions are equivalence classes of clock valuations. Right: Regions are illustrated
by fat lines, intersections (marked by a dot) and stippled areas.
y y y
x x x
(a) (b) (c)
y
y
x x
(d) (e)
Fig. 13: The zones encountered during the first steps of a symbolic exploration of
the light switch from Fig. 11 with the addition of an extra clock y: (a) Delaying
in location off ; (b) resetting x to zero while following the edge to location dim; (c)
delaying the zone; (d) applying the guard x ≤ 1 from the edge to location bright;
(e) delaying and applying the invariant x ≤ 10 in location bright.
Modeling Formalisms 17
functions from zones to zones, such that Z ⊆ a(Z) and the resulting abstract sym-
bolic transition system is finite and bisimilar to the original timed automaton. Such
abstractions exist and are inspired by a similar abstraction in the region representa-
tion: Intuitively, if a clock x is never compared to any constant bigger than c x in any
guard or invariant of the timed automaton, then once x is bigger than c x , the exact
value of x does not matter (it has no influence on the behaviour of the automaton);
only the fact that it is bigger than c x is important.
It was shown in [Bou03] that for non-diagonal-free timed automata such an
abstraction does not exist for zones, although it does at the region level. For most
practical purposes the class of diagonal-free timed automata suffices and zones are
the preferred representation of the state-space of timed automata.
Notice that in the worst case the region representation is actually better than the
zone representation since the set of all zones is not a partitioning of the set of clock
valuations and hence there are more zones than regions. In practice, however, zones
are much more effective than regions. Also, the region representation is sensitive
to the size of the constants used in the timed automaton, e.g. if all constants are
multiplied by a factor, then this has a profound impact on the number of regions,
whereas the zone representation has the same size.
Timed automata can be composed to form networks of concurrent and commu-
nicating timed automata. A state then consists of a location vector and a clock
valuation. In this thesis, the difference between a network of timed automata and a
timed automaton is often not that important. Whenever possible, the discussion is
limited to a single timed automaton.
There is an alternative to the continuous time interpretation of timed automate,
namely, discrete time interpretation. In this interpretation, clocks have the non-
negative integers as their domain and time passes in discrete steps causing all clocks
to be incremented by one. If guards and invariants are restricted to non-strict
bounds on clocks (so called closed timed automata), then the problem of location
reachability is equivalent in the continuous time interpretation and the discrete time
interpretation. The benefit of the discrete time interpretation is that symbolic model
checking techniques like the use of ROBDDs are directly applicable. The downside
is that direct application of these techniques suffers from the size of the maximum
constants to which clocks are compared – the region construction suffers from the
same effect, but the zone construction is (at least to some extent) immune to this
problem.
push
cost’ == 1
dim
push push
bright
off
x := 0 x <= 1 x <= 10,
cost’ == 0
push cost’ == 3
x>1
Fig. 14: A model of the light switch from Fig. 11 annotated with a cost function
modeling power consumption. There is no cost associated with staying in location
off. In location dim, the price is one cost unit per time unit whereas in location
bright the cost rate is 3.
although the algorithm for finding optimal paths described in [ALP01] is different
from ours.
4 Data Structures
Much research is invested in finding good data structures for representing individual
states, sets of states or transition relations for various modeling formalisms. A good
data structure must not only allow for compact representation of the state-space,
but must also support the necessary operations for performing reachability analysis
or model checking. In the following, we will take a brief look at the data structures
used in the papers of this thesis.
a
Figure 15: An ROBDD over four
Boolean variables, a, b, c, and d rep-
b b
resenting the Boolean function (a =
b) =⇒ (c = d). Each path
from the root to a terminal node repre-
sents a truth-assignment. Dashed edges
c
represent the Boolean value false and
solid edges represent the Boolean value
true. The terminal indicates whether
d d
the function maps the truth assignment
to true or false. In this figure, only paths
1
to the true-terminal are shown – all re-
maining paths go to the false-terminal.
1. The left and right child of a non-terminal are not the same, i.e. for all
non-terminals n e have lef t(n) 6= right(n).
2. No two nodes are equal, i.e. ∀n1 , n2 : var(n1 ) = var(n2 ) ∧ lef t(n1 ) =
lef t(n2 ) ∧ right(n1 ) = right(n2 ) =⇒ n1 = n2 .
Data Structures 21
effect with special image computation operators (this is often referred to as guided
model checking, see e.g. [BRS00], and is not the same as the guiding techniques
discussed in paper D, E and F).
Any DBM can be brought into its normal form in O(n 3 ) time using the well-
known Floyd-Warshall algorithm for the all-pairs shortest path problem. Given a
DBM in normal form, all operations needed to compute a successor according to
the abstract symbolic transition relation of a timed automaton can be efficiently
implemented, see Tab. 2. Instead of recomputing the normal form after each oper-
ation, it is often more efficient to use a specialised version of the various operations
which maintain the normal form of the DBM [Rok93]. For instance, it is possible to
compute the conjunction of a DBM in normal form and a guard in O(m · n 2 ) time
for m ≤ n, where m is the number of clocks in the guard. This should be compared
to the O(n3 ) runtime of first applying the guard and then recomputing the normal
form. Using DBMs and the symbolic semantics given in section 3.3, the reachability
question for timed automata can be efficiently settled using the algorithm in Fig. 16.
Tab. 2: The runtime of various operations on DBMs. Often the operations can be
modified to keep the DBM in normal form, which is faster (third column) than to
recompute the normal form using the all-pairs shortest path algorithm.
proc reach(L, l0 , E, I, g, u) ≡
wait = {(l0 , Z0 )} Z0 is the initial zone
passed = ∅
while wait 6= ∅ do
select and remove a state (l, Z) from wait
if ¬∃(l0 , Z 0 ) ∈ passed : l = l 0 ∧ Z ⊆ Z 0
then
passed = passed ∪ {(l, Z 0 )}
wait = wait ∪ {(l 00 , Z 00 ) : (l, Z) =⇒ (l 00 , Z 00 )}
Where =⇒ is the symbolic transition relation
fi.
Fig. 16: The reachability algorithm for timed automata. Two sets of states, wait
and passed, are maintained during the exploration. The waiting set contains states
that are reachable, but have not yet been explored. The passed set contains states
which have been explored. When the algorithm terminates, the passed set will
contain all reachable states of the timed automaton.
Data Structures 23
x−0
[1,2] [3,4] y
]2,3[
3
y−0
[1,4]
y−0 y−0
2
[1,3] [2,4] 1
True 1 2 3 4 5 6
x
(a) (b)
Fig. 17: The nodes on a CDD are labelled with clock differences, and the outgoing
edges partition R (edges to the False terminal have been omitted). Each path from
the root to a terminal corresponds to a zone. The CDD on the left corresponds to
the set of clock valuations on the right.
the untimed case. Rabbit [BLN03] uses a discrete time interpretation of timed au-
tomata and can thus encode the transition relation directly using ROBDDs. NDDs
[ABK+ 97] are regular BDDs used to encode the region graph of a dense-time timed
automaton. CDDs [BLP+ 99], DDDs [MLAH99b] and CDRs [Wan01] are all vari-
ations of the same idea (discovered at roughly the same time by several research
groups around the world). In paper C of this thesis the clock difference diagram, or
CDD for short, is introduced.
Structurally, a CDD is very similar to a BDD, see Fig. 17. The two main differ-
ences are that:
– The nodes of the DAG are labelled with pairs of clocks which are interpreted
as clock differences, rather than Boolean variables. I.e. elements in X × (X ∪
{x0 }), where x0 is a clock which is zero in all valuations.
– Any intermediate node can have two or more out-edges, each labelled with
a non-empty, convex, integer-bounded subset of the real line, which together
form a partitioning of R.
Like for BDDs, we say that a CDD is ordered if there exist a total order of
X × (X ∪ {x0 }) such that all paths from the root to a terminal respect this ordering.
A CDD is reduced if:
– There are no trivial edges, i.e. nodes with only one outgoing edge.
– The intervals on the edges are maximal, i.e. for two edges between the same
two nodes, either the intervals are the same or the union is not an interval.
regions. Implementing common operations like negation, set union, set intersection,
etc. is easy and can be achieved in time polynomial to the size of the argument CDDs.
Contrary to ROBDDs, a reduced and ordered CDD is not a canonical representation.
The literature contains a few conjectures of normal forms for CDDs and DDDs, but
these are very expensive to compute and do not have practical value. A CDD can
be brought into a semi-canonical form by eliminating infeasible paths (paths for
which there are no clock valuations satisfying all constraints of the path) from the
CDD. In this form, a tautology is uniquely represented by the true terminal and an
unsatisfiable function by the false terminal. By combining CDDs and BDDs into one
data structure, one can perform fully symbolic model checking of timed automata.
Unfortunately, existential quantification takes exponential time in the size of the
CDD (whereas it is polynomial for ROBDDs). Existential quantification is essential
for computing the future of a CDD (i.e. the delay transitions).
In paper C of this thesis we focus on an alternative use of CDDs, namely as a
replacement for DBMs when storing the set of visited symbolic states.
x x x
(a) (b) (c)
Fig. 18: Symbolic states encountered during exploration of the LPTA in Fig. 14:
(a) the symbolic state while in location off ; (b) the symbolic state after resetting x
and delaying with cost rate 1; (c) the symbolic state after applying the guard x ≤ 1
and delaying with cost rate 3.
not sufficient to represent the cost and thus we need to split the zone into two smaller
zones (compare this to Fig. 13(e) which shows the unpriced zone in the presence of a
second clock y). The main contribution of paper F of this thesis is the introduction
of priced zones and operations on priced zones which are essential for an effective
algorithm for finding cost optimal paths in linearly priced timed automata.
xa (ma,i , ≺a,i )
xb (mb,i , ≺b,i )
Fig. 19: A constraint graph illustrating a zone over three clocks x a , xb , and xi . An
edge from a node v to a node u labelled with (c, ≺) corresponds to a constraints
v − u ≺ c.
graph by adding the constraints from a single zero-cycle from each class. Given an
ordering on the clocks, this representation is also a canonical representation of the
zone.
In paper C, zones are first brought into the minimal constraint form before they
are encoded as CDDs, thus reducing the size of the resulting CDD. In paper F, the
problem of finding the infimum cost in a priced zone is reduced to an LP problem.
In this translation, one wants to reduce the size of the LP problem by using the
smallest number of constraints possible to describe the zone. This is exactly the
minimal constraint form of the zone.
methods. Uppaal was used to analyse a model of the protocol, and an error trace
of almost 2000 steps was found. With the error trace in hand, it was possible to
consistently reproduce the error in the laboratory, thus making it much easier to fix
the problem.
The goal of Uppaal has always been to serve as a platform for research in timed
automata technology. As such, it is important for the tool to provide a flexible
architecture that allows experimentation. It should allow orthogonal features to be
integrated in an orthogonal manner to evaluate various techniques within a single
framework and investigate how they influence each other.
At the same time we are committed to provide a useful and efficient tool to
academia. A tool which can be used in education and for practical verification
purposes. There are several tools (e.g TIMES [AFM+ 03] and Moby/PLC [TD98])
which use the verification back-end of Uppaal, and provide alternative modeling
languages or functionality to the user. In the future we hope to make it easier for
third party developers to reuse the engine in their tools.
We neither claim nor expect Uppaal to support each and every technique in
existence. For instance, the choice of supporting rich data types in the input language
(e.g. bounded integer variables and arrays) makes explicit backwards reachability
analysis difficult and ineffective, which is one of the reasons this technique is not
supported.6
Architecture
Fig. 20: There are two interfaces to the verification engine: A command line in-
terface (CLI) and a graphical user interface (GUI). The GUI provides editing and
simulation facilities and acts as a front-end to the verification engine. The interaction
between the GUI and the verification engine is based on a client-server architecture,
where the GUI is the client and the model checking engine is the server. The GUI
and the CLI share a number of common file formats.
Most of these optimisations are optional since they involve a tradeoff between speed
and memory usage.
The architecture of the Uppaal engine has changed a lot over time. Some
years ago Uppaal was a more or less straightforward implementation of the timed
automaton reachability algorithm annotated with conditional tests on features or
options. Although it was simple, it had several disadvantages:
– The core reachability algorithm became more and more complicated as new
options were added.
– Some experimental designs and extensions required major changes due to new
algorithms. Thus certain parts of the code were duplicated, which in turn
complicated maintenance.
The internals of Uppaal are constantly refactored in order to facilitate new
designs and algorithms, see Fig. 21 for the latest incarnation. The main goals of the
design are speed and flexibility. The bottom layer providing the system and symbolic
state representations has only seen minimal architectural changes over the years. In
fact, the code where most options are implemented is in the state manipulation and
state space representation components.
The state manipulation components implement fundamental operations on sym-
bolic states such as evaluating a state property or computing the delay successors.
All state manipulation components implement a common interface (called Filter )
The Making of Uppaal 29
User Interface
Parser
Parser
Query
Fig. 21: The Uppaal engine uses a layered architecture. Components for repre-
senting the input model and a symbolic state are placed at the bottom. The state
space representations are a set of symbolic states and together with the state oper-
ations they form the next layer. The various checkers combine these operations to
provide the complex functionality needed. This functionality is made available via
either a command line interface or a graphical user interface.
which allows them to be chained together to form more advanced operations. State
space representation components are used to represent sets of symbolic states. Again,
there is a common interface (called Buffer ) which all state space representation com-
ponents implement. Figure 22 shows the UML class diagram for these interfaces.
The verification components, such as the reachability checker, are compound fil-
ters that take the initial state as input and generate counter examples. For instance,
the reachability checker is implemented by composing a number of filters into a graph
structure resembling a flow-chart, see Fig. 23. The compound filter implements the
zone based reachability algorithm for timed automata. It consists of filters comput-
ing the edge successors (Transition and Successor), the delay successors (Delay and
Normalisation), and the unified passed and waiting list buffer (PWList). Additional
components include a filter for generating progress information (e.g. throughput and
number of states explored), a filter implementing active clock reduction [CS96], and
a filter storing information needed to generate diagnostic traces. Notice that some
of the components are optional. If disabled, a filter can be bypassed completely and
does not incur any overhead.
The details of the passed and waiting list interaction are abstracted by a single
buffer component, the PWList. To summarise, the passed list keeps a list of explored
reachable states whereas the waiting list contains unexplored reachable states. Both
are hash tables to facilitate identification of duplicate states. Traditionally, succes-
sors were added to the waiting list as they were computed and then later removed
from the waiting list compared to and – if not previously explored – added to the
30 Introduction
Fig. 22: Class diagram of parameterised interfaces for filters and buffers. The return
value of tryPut and tryGet is used to indicate whether the operation succeeded, using
whatever definition of success is appropriate for the operation.
passed list and explored. In the presence of actual implementations of the waiting
list and the passed list, an implementation of a PWList component could look some-
thing like this (the Boolean return value indicates whether the operation succeeded;
tryGet succeeds if the buffer is not empty, whereas tryPut succeeds if the state was
not already in the buffer):
} while (!passed->tryPut(state));
return true;
}
The downside of this implementation is that many of the states on the waiting list
might have been explored already, but this is not discovered until they are removed
from the waiting list and compared to the passed list, thus wasting memory and
increasing the pressure on the waiting list hash table. On the other hand, adding
them to the waiting list and the passed list at the same time also wastes memory.
One of the recent changes is the introduction of a shared passed and waiting list
implementation [DBLY03] merging the two hash tables and letting the passed list
and the waiting list contain references to the entries in the hash table.
The number of unnecessary copy operations during exploration has been reduced
as much as possible. In fact, a symbolic state is only copied twice during exploration.
The first time is when it is inserted into the PWList, since the PWList might use
alternative and more compact representations than the rest of the pipeline. The
original state is then used for evaluating the state property using the Query filter.
This is destructive as the zone is modified by this operation and the state is discarded
after this step. The second is when constructing the successor. In fact, one does not
retrieve a state from the PWList directly but rather a reference to a state. The state
can then be copied directly from the internal representation used in the PWList to
the memory reserved for the successor.
The benefits of using a common filter and buffer interface are flexibility, code
reuse, and acceptable efficiency. Any component can be replaced at runtime with
an alternate implementation providing different tradeoffs. Stages in the pipeline can
be skipped completely with no overhead. The same components can be used and
combined for different purposes. For instance, the Successor filter is used by both
the reachability checker, the liveness checker, the deadlock checker, and the trace
generator.
Today, Uppaal is more than just a tool. Uppaal is an umbrella for various real-
time related projects. Some of these projects are covered by this thesis, others are
not. In the following we will briefly look at some of the projects which for one reason
or another have not yet been included in the official version of Uppaal.
The main Uppaal code base is fairly stable. Most of the interesting work hap-
pens in branches with minimal coordination and often as joint work with visitors.
Sometimes these branches bear fruit and sometimes they do not. If they do, they
will be integrated when ready by refactoring the stable code base to facilitate the
additions from the branch.
32 Introduction
Distributed Uppaal
Real time model checking is a time and memory consuming task, quite often reach-
ing the limits of both computers and the patience of users. An increasingly common
solution to this situation is to use the combined power of normal computers con-
nected in a cluster. Good results were achieved for Uppaal by distributing both the
reachability algorithm and the main data structures. Most of this work was done in
the fall of 1999 when Thomas S. Hune, who was a Ph.D. student at Arhus University
at that time, and Gerd Behrmann visited Frits Vaandrager’s group in Nijmegen, see
[BHV00, Beh02, Beh03].
At the core of Uppaal we find the state-space exploration algorithm for timed
automata. To summarise, we might think of this as a variation of searching the
states (nodes) of an oriented graph. The waiting list contains the states that have
been encountered by the algorithm, but have not been explored yet, i.e. the succes-
sors have not been determined. The passed list contains all states that have been
explored. The algorithm takes a state from the waiting list, compares it with the
passed list, and in case it has not been explored, the state itself is added to the
passed list while the successors are added to the waiting list. The one data structure
responsible for the potentially huge memory consumption is the hash table used to
implement both the passed list and the waiting list.
The distributed version of this algorithm is similar. Each node (processing unit)
in the cluster will hold fragments of both the waiting list and the passed list according
to a distribution function mapping states to nodes. In the beginning, the distributed
waiting list will only hold the initial state. Whichever node hosts the initial state
will compare it to its empty passed list fragment and then explore it. Now, the
successors are distributed according to the distribution function and put into the
waiting list fragment on the respective nodes. This process will be repeated, but
now several nodes contain states in their fragment of the waiting list and quickly all
nodes become busy exploring their part of the state space. The algorithm terminates
when all waiting list fragments are empty and no states are in the process of being
transferred between nodes.
The distribution function is in fact a hash function. It distributes states uni-
formly over its range and hence implements what is called random load balancing.
Since states are equally likely to be mapped to any node, all nodes will receive
approximately the same number of states and hence the load will be equally dis-
tributed.
This approach is very similar to the one taken by [SD97]. The difference is that
Uppaal uses symbolic states, each covering (infinitely) many concrete states. In
order to achieve optimal performance, the lookup performed on the passed list is
actually an inclusion check. An unexplored symbolic state taken from the waiting
list is compared with all the explored symbolic states on the passed list, and only if
none of those states cover (include) the unexplored symbolic state it is explored. For
this to work in the distributed case, the distribution function needs to guarantee that
potentially overlapping symbolic states are mapped to the same node in the cluster.
The Making of Uppaal 33
A symbolic state can actually be divided into a discrete part and a continuous part.
By only basing the distribution on the discrete part, the above is ensured.
Depending on the search order, building the complete reachable state-space can
result in varying number of states being explored. For instance, let s and t be two
symbolic states such that s includes t. Thus, if s is encountered before t, t will not
be explored because s is already on the passed list and hence covers t. On the other
hand, if we encounter t first, both states will be explored. Experiments have shown
that breadth first order is close to optimal when building the complete reachable
state-space. Unfortunately, ensuring strict breadth first order in a distributed set-
ting requires synchronising the nodes, which is undesirable. Instead, we order the
states in each waiting list fragment according to their distance from the initial state,
exploring those with the smallest distance first. This results in an approximation of
the breadth first order. Experiments have shown that this order drastically reduces
the number of explored states compared to simply using a FIFO order.
This version of Uppaal has been used on a Sun Enterprise 10000 with 24 CPUs
and on a Linux Beowulf cluster with 10 nodes. Good speedups have been observed
on both platforms when verifying large systems (around 80% of optimal at 23 CPUs
on the Enterprise 10000).
Although the approach taken is orthogonal to most of the existing techniques
used in Uppaal, no official release has been made. The current implementation
can be used for little more than benchmarking. The main obstacle in releasing a
distributed version is the dependency on libraries. The implementation relies on the
Message Passing Interface (MPI), a standard interface to message passing libraries.
Although Uppaal can be used with any MPI library, it needs to be linked with the
library at compile time. This makes it difficult to release, as Uppaal is only released
in binary form.
Stopwatches in Uppaal
Stopwatch automata are very similar to timed automata, except that the rate of each
clock can be set to either 0 or 1, depending on the current state. In fact, the two
models look so similar that one could be tempted to implement stopwatch automata
in Uppaal. Unfortunately, the reachability problem for stopwatch automata is
undecidable. In fact, in [CL00] it was shown that stopwatch automata have the
same expressive power as linear hybrid automata. Of course, this did not stop us
from implementing them.
The approach taken is to use a new delay operation on DBMs. The resulting
DBM is an over-approximation of the actual set of delay successors, hence the com-
puted reachable state-space is an over-approximation of the reachable state-space.
Anyway, using this approach it was possible to show a number of interesting prop-
erties of linear hybrid systems previously checked using HyTech [HHWT97b], but
at a fraction of the time.
Although stopwatch automata in principle could be integrated into the regular
version of Uppaal, this version has been dormant for some time.
34 Introduction
The terms guided Uppaal and priced Uppaal have both been used to describe
versions of Uppaal related to scheduling and optimal paths. In principle, the term
guided refers to the use of branch and bound techniques to select which state to
explore next, and priced refers to the fact that the input model is some version of
priced timed automata. In practice, guided Uppaal is the UPTA version and priced
Uppaal is the LPTA version.
UPTA support in Uppaal is relatively easy, since the zone of a state of an UPTA
can be represented as a regular DBM with an extra clock, which keeps track of the
time. The main contribution in the UPTA implementation is the use of branch
and bound techniques to efficiently find the optimal path, and the use of various
heuristics to speed up the process. It should be relatively easy to integrate this into
the regular version of Uppaal.
LPTA support in Uppaal is based on priced zones. Although an extension of
DBMs, the use of priced zones changes a fundamental data structure in Uppaal.
At the moment it is unlikely that this feature will be integrated into the rest of
Uppaal.
Other Projects
There are many other Uppaal related projects, such as parameterised Uppaal
[HRSV02], Lego Mindstorm integration, C in Uppaal, hierarchical TA [DM01],
animation [ADY00], symmetries [HBL+ 03], acceleration [HL02], etc. The tool has
also been used in numerous case studies. The reader is referred to the Uppaal
website at http://www.uppaal.com/ for a complete list of publications.
Of special interest to this thesis is the use of the compositional backwards reach-
ability (CBR) technique in Uppaal [Lar02]. The main idea is to use a semi-symbolic
representation of sets of location vectors of a network of timed automata. The set is
represented by a vector with wildcards in some of the entries that might be substi-
tuted by any location of that component. When computing the set of predecessors,
only transitions that can be taken regardless of the “unknown” components, i.e. the
components for which the vector contains a wildcard, will be considered. The main
obstacle in this approach is that time is a global phenomenon in a network of timed
automata and any automaton might cause time-locks. Thus, it becomes difficult to
reason about the behaviour of one component while not considering the behaviour
of the other components.
CDDs are currently used to represent non-convex sets of regions of the timed
automaton. This is the case during deadlock detection. An experimental version of
a passed list implementation using CDDs exists, which might be integrated into the
regular version. In principal, CDDs can represent the transition relation of the timed
automaton and one could use all the existing symbolic model checking techniques
based on ROBDDs to model check timed automata. The main obstacle is that
existential quantification on CDDs is very expensive. Without this operation, most
Thesis Summary 35
6 Thesis Summary
Paper A: Verification of Large State/Event Systems using
Compositionality and Dependency Analysis
A state/event model is a concurrent version of Mealy machines used for describing
embedded reactive systems. It is supported by the commercial tool visualSTATE.
A number of predefined properties such as deadlock freeness and absence of dead
code can effectively be reduced to reachability checking. This paper introduces the
compositional backwards reachability technique that uses compositionality and de-
pendency analysis to significantly improve the efficiency of symbolic ROBDD based
model checking of state/event models.
The compositionality is exploited to effectively compute an under approximation
of the set of states which can reach a goal state by including a minimal number of
components in the analysis. If necessary, the dependency analysis is exploited to
include more components in the analysis, while a monotonicity result allows the
previous analysis to be reused.
It makes possible automated verification of large industrial designs with the use
of only modest resources (less than 5 minutes on a standard PC for a model with
1421 concurrent machines). The results of the paper have been patented and are
now implemented in visualSTATE.
Contributions
Publication History An early version of the paper was presented at the fourth
International Conference on Tools and Algorithms for the Construction and Analysis
of Systems (TACAS’98) and published in the LNCS volume 1385, Springer-Verlag.
The present version has been published in the internal journal Formal Methods in
System Design (FMSD) volume 18, number 1, January 2001.
36 Introduction
Contributions
– A technique for decomposing the system into superstates and substates and
reducing the reachability problem to reachability problems in the components.
Publication History The initial results presented in the paper are taken from my
master’s thesis [ABPV98]. An early version of the paper was presented at the fifth
International Conference on Tools and Algorithms for the Construction and Analysis
of Systems (TACAS’99) and published in the LNCS volume 1579, Springer-Verlag.
The present version has been published in the internal journal Formal Methods in
System Design (FMSD) volume 21, number 2, September 2002.
A less formal presentation of the topics of papers A and B was given in a pa-
per ”Practical Verification of Embedded Software”, in IEEE Computer, volume 33,
number 5, May 2000.
Thesis Summary 37
Contributions
– Algorithms for computing the union and intersection of clock difference dia-
grams, encoding zones with clock difference diagrams, and checking whether a
zone is included in a clock difference diagram.
Publication History The paper appears in the BRICS Report Series, RS-98-47,
December 1998. In was presented at the 11th International Conference on Computer
Aided Verification (CAV’99) and published in LNCS 1633, Springer-Verlag.
symbolic representation and manipulation of reachable states together with the cost
of reaching them.
Contributions
– A symbolic semantics based on priced regions for linearly priced timed au-
tomata.
Publication History A shorter version of this paper was presented at the Fourth
International Workshop, HSCC ’01, and published in LNCS 2034, Springer-Verlag.
The full version given here appears in the BRICS Report Series as RS-01-3.
Contributions
Publication History A short version of this paper was presented at the 7th
International Conference on Tools and Algorithms for the Construction and Analysis
of Systems (TACAS’01) and published in LNCS 2031, Springer-Verlag. The full
version was published in the BRICS Report Series under RS-01-4.
Contributions
Publication History A short version of the paper was presented at the 13th
International Conference on Computer Aided Verification (CAV’01) and published
in LNCS 2102, Springer-Verlag.
40 Introduction
PAPER A
VERIFICATION OF LARGE
STATE/EVENT SYSTEMS USING
COMPOSITIONALITY AND
DEPENDENCY ANALYSIS
Abstract
A state/event model is a concurrent version of Mealy machines used for describing embed-
ded reactive systems. This paper introduces a technique that uses compositionality and
dependency analysis to significantly improve the efficiency of symbolic model checking of
state/event models. It makes possible automated verification of large industrial designs
with the use of only modest resources (less than 5 minutes on a standard PC for a model
with 1421 concurrent machines). The results of the paper are being implemented in the next
version of the commercial tool visualSTATEtm .
1 Introduction
Symbolic model checking is a powerful technique for formal verification of finite-state
concurrent systems. The technique has proven very efficient for verifying hardware
systems: circuits with an extremely large number of reachable states have been
verified. However, it is not clear whether model checking is effective for other kinds
of concurrent systems as, for example, software systems. One reason that symbolic
model checking may not be as efficient is that software systems tend to be both
larger and less regularly structured than hardware. For example, many of the results
reported for verifying large hardware systems have been for linear structures like
stacks or pipelines (see, e.g., [BCL+ 94]) for which it is known that the size of the
transition relation (when represented as an ROBDD) grows linearly with the size
of the system [McM93]. Only recently have the first experiments on larger realistic
software systems been reported [ABB+ 96, SA96].
This paper presents a technique that significantly improves the performance
of symbolic model checking of large embedded reactive systems modeled using a
state/event model. The model can be viewed as a simplified version of StateCharts
[Har87] or RSML [LHHR94]. The state/event model is a concurrent version of Mealy
machines. It consists of a fixed number of concurrent finite state machines that have
pairs of input events and output actions associated with the transitions of the ma-
chines. The model is synchronous: each input event is reacted upon by all machines
in lock-step; the total output is the multi-set union of the output actions of the
individual machines. Further synchronization between the machines is achieved by
associating a guard with the transitions. Guards are Boolean combinations of condi-
tions on the local states of the other machines. In this way, the firing of transitions
in one machine can be made conditional on the local state of other machines. If a
machine has no enabled transition for a particular input event, it simply does not
perform any state change.
The state/event model is capable of modeling both synchronous and asynchronous
systems. If two guards in different machines share an input event, the transitions
fire simultaneously, i.e., synchronously, on that event. If two enabled transitions
in different machines have different input events, they can fire in either order, i.e.,
asynchronously.
The state/event model is convenient for describing the control portion of embed-
ded reactive systems, including smaller systems as cellular phones, hi-fi equipment,
and cruise controls for cars, and large systems as train simulators, flight control sys-
tems, telephone and communication protocols. The model is used in the commercial
tool visualSTATEtm [vA96]. This tool assists in developing embedded reactive soft-
ware by allowing the designer to construct and manipulate a state/event model. The
tool is used to simulate the model, check the consistency of the model, and from the
model automatically generate code for the hardware of an embedded system. The
consistency checker is in fact a verification tool that checks for a range of properties
that any state/event model should have. Some of the checks must be passed for
the generated code to be correct, for instance, it is crucial that the model is deter-
44 Paper A: Verification of Large State/Event Systems using Compos. . .
ministic. Other checks are issued as warnings that might be design errors such as
transitions that can never fire.
State/event models can be extremely large and, unlike in traditional model check-
ing, the number of checks is at least linear in the size of the model. This paper
reports results for models with up to 1421 concurrent state machines (10 476 states).
For systems of this size, traditional symbolic model checking techniques fail, even
when using a partitioned transition relation [BCL91] and backwards iteration. We
present a compositional technique that initially considers only a few machines in de-
termining satisfaction of the verification task and, if necessary, gradually increases
the number of considered machines. The machines considered are determined using
a dependency analysis of the structure of the system.
The results are encouraging. A number of large state/event models from indus-
trial applications have been verified. Even the largest model with 1421 concurrent
machines can be verified with modest resources (it takes less than 5 minutes on a
standard PC). Compared with the current version of visualSTATE tm , the results
improve on the efficiency of checking smaller instances and dramatically increase
the size of systems that can be verified.
Related Work
The use of ROBDDs [Bry86] in model checking was introduced by Burch et al.
[BCM+ 90] and Coudert et al. [CMB90]. Several improvements have been developed
since, such as using a partitioned transition relation [BCL91, GB94] and simplifying
the ROBDD representation during the fixed-point iteration [CBM89]. Many of these
improvements are implemented in the tool SMV [McM93]. Other techniques like
abstraction [CGL94] and compositional model checking [CLM89] further reduce the
complexity of the verification task, but require human insight and interaction.
Our compositional technique is efficient because it only considers subsets of the
model. Several other techniques attempt to improve the efficiency of the verification
in this way. For example, [BSV93] presents a conservative technique for showing
emptiness of L-processes based on including only a subset of the processes. The
technique is based on analyzing an error trace from the verifier, and use this trace
to modify the considered subset of L-processes. Pardo and Hachtel [PH97] utilizes
the structure of a given formula in the propositional µ-calculus to find appropriate
abstractions whereas our technique depends on the structure of the model.
Another technique, based on ROBDDs, that also exploits the structure of the
system is presented in [LPJ+ 96]. On the surface this technique is very close to
the one presented here and thus we will discuss it in more detail. The technique
in [LPJ+ 96] uses a partitioned transition relation and a greedy heuristic is used to
select subsets of the transition relation. For each chosen subset, a complete fixed-
point iteration is performed. If the formula cannot be proven after this iteration, a
larger subset is chosen. In case of an invalid formula the algorithm only terminates
when the full transition relation has been constructed (or memory or time has been
exhausted). To compare this approach with the one presented here, we can consider
State/Event Systems 45
a subset of the transition relation as being similar to a subset of the machines in the
state/event model. The approach of [LPJ+ 96] differs from ours in several central
aspects:
– In selecting a new machine to include in the transition relation, [LPJ+ 96] uses
a greedy strategy involving a fixed-point iteration for each of the remaining
machines. If the system only has a single initial state — as in state/event
systems — the greedy strategy reduces to selecting an arbitrary machine. We
chose a new machine based on an initial dependency analysis and thus avoid
any extraneous fixed-point iterations.
– Due to a central monotonicity result (lemma 1), we can reuse the previously
computed portion of the state space instead of having to start from scratch
each time a new machine is added.
– Even when all machines are needed, experiments have shown that our tech-
nique of including machines one at a time (exploiting the monotonicity prop-
erty) is faster than performing a traditional fixed-point iteration using a par-
titioned transition relation and early variable quantification. The technique
of [LPJ+ 96] does not have this property.
The compositional technique presented here shares ideas with partial model
checking [ASM97, And95, KLL+ 97], but explicitly analyzes the structure of the
system. Finally, experiments by Anderson et al. [ABB+ 96] and Sreemani and Atlee
[SA96] verified large software systems using SMV. The technique presented here sig-
nificantly improves on the results we have obtained using SMV and makes it possible
to verify larger systems.
2 State/Event Systems
A state/event system consists of n machines M 1 , . . . , Mn over an alphabet of input
events E and an output alphabet O. Each machine M i is a triple (Si , s0i , Ti ) of local
states, an initial state, and a set of transitions. The set of transitions is a relation
Ti ⊆ Si × E × Gi × M(O) × Si ,
46 Paper A: Verification of Large State/Event Systems using Compos. . .
where M(O) is a multi-set of outputs, and G i is the set of guards not contain-
ing references to machine i. These guards are generated from the following simple
grammar for Boolean expressions:
g ::= lj = p | ¬g | g ∧ g | tt .
Two machines can be combined into one. More generally if M I and MJ are com-
positions of two disjoint sets of machines I and J, I, J ⊆ {1, . . . , n}, we can com-
bine them into one MIJ = MI × MJ = (SIJ , (s0IJ ), TIJ ), where SIJ = SI × SJ and
s0IJ = (s0I , s0J ). The transition relation TIJ is a subset of SIJ ×E ×GIJ ×M(O)×SIJ ,
where GIJ are the guards in the composite machine. By construction of T IJ , the
guards GIJ will not contain any references to machines in I ∪ J. To define T IJ , we
introduce the predicate idle:
^
idle(TI , sI , e) = {¬g | ∃o, s0I . (sI , e, g, o, s0I ) ∈ TI },
which holds for states in which no transitions in M I are enabled at state sI when
receiving the input event e. The transition relation T IJ is defined by the following
inference rules (the symbol ] denotes multi-set union):
(sI , e, g1 , o1 , s0I ) ∈ TI
g = g1 [sJ /lJ ] ∧ idle(TJ , sJ , e)[sI /lI ]
((sI , sJ ), e, g, o1 , (s0I , sJ )) ∈ TIJ
(sJ , e, g2 , o2 , s0J ) ∈ TJ
g = idle(TI , sI , e)[sJ /lJ ] ∧ g2 [sI /lI ].
((sI , sJ ), e, g, o2 , (sI , s0J )) ∈ TIJ
The rules show the synchronous behavior of state/event systems. The first rule
represents the case where there exists an enabled transition with input event e in
Consistency Checks 47
e
p1 , q 1 p2 , q 1
e q1 e p2
p1 p2 q1 q2 e r o e
e q2 e r o e r o
p1 , q 2 p2 , q 2
e ¬r
Fig. 1: Two state/event machines and the corresponding parallel combination. The
guards, which formally should be of the form l j = p, are simply written as the state
p since the location lj is derivable from the name of the state (the reference to r is
a requirement to a state in a third machine not shown). The small arrows indicate
the initial states.
both TI and TJ and the resulting transition in TIJ represents the synchronization
on e. The other two cases occur if no enabled transition exists in either T I or TJ .
Figure 1 shows two machines and the parallel composition of them. Notice how the
two machines synchronize on the common input event e.
Q
The full combination of all n machines, T = ni=1 Ti , yields a Mealy machine.
e o e o
We extend the transition relation of T to a total relation s −−→ s0 as follows: s −−→ s0
if there exists a true guard g such that (s, e, g, o, s 0 ) ∈ T . If no such guard exists,
e ∅
i.e., all machines idle on input event e, the relation contains an idling step, s −−→ s.
3 Consistency Checks
The consistency checker in visualSTATE tm performs seven predefined types of checks,
each of which can be reduced to verifying one of two types of properties. The first
type is a reachability property. For instance, visualSTATE tm performs a check for
“conflicting transitions” i.e., it checks whether two or more transitions can become
enabled in the same local state, leading to non-determinism. This can be reduced to
questions of reachability by considering all pairs of guards g 1 and g2 of transitions
with the same local state si and input event e. A conflict can occur if a global state
is reachable in which (lj = si ) ∧ g1 ∧ g2 is satisfied.
In total, five of the seven types of checks reduce to reachability checks. Four
of these, such as check for transitions that are never enabled and check for states
that are never reached, generate a number of reachability checks which is linear in
the number of transitions, t. In the worst-case the check for conflicting transitions
gives rise to a number of reachability checks which is quadratic in the number of
transitions. However, in practice very few transitions have the same starting local
state and input event, thus in practice the number of checks generated is much
smaller than t.
48 Paper A: Verification of Large State/Event Systems using Compos. . .
The remaining two types of consistency checks reduce to a check for absence of
local deadlocks. A local deadlock occurs if the system can reach a state in which
one of the machines idles forever on all input events. This check is made for each
of the n machines. In total at least t + n checks have to be performed making the
verification of state/event systems quite different from traditional model checking
where typically only a few key properties are verified.
We attempt to reduce the number of reachability checks by performing an im-
plicational analysis between the guards of the checks. If a guard g 1 implies another
guard g2 then clearly, if g1 is reachable so is g2 . To use this information we start by
sorting all the guards in ascending order of the size of their satisfying state space.
In this way the most specific guards are checked first and for each new guard to be
checked we compare it to all the already checked (and reachable) guards. If the new
guard includes one of them, then we know that it is satisfiable. In our experiments,
between 40% and 94% of the reachability checks are eliminated in this manner.
4 ROBDD Representation
This section describes how Reduced Ordered Binary Decision Diagrams (ROBDDs)
[Bry86] are used to represent sets of states and the transition relation. We also show
how to perform a traditional forward iteration to construct the set of reachable states
from which it is straightforward to check each of the reachability checks.
To construct the ROBDD Te for the transition relation T , we first construct the
local transition relations Tei for each machine Mi . The variables of the ROBDD rep-
resents an encoding of the input events, the current states, and the next-states.
The variables are ordered as follows: The first kEk variables encode the input
events E (kXk denotes dlog 2 Xe) and are denoted VE . Then follow 2kSi k vari-
0 ,...,V
ables Vi,1 , Vi,1 0
i,kSi k , Vi,kSi k encoding the current- (unprimed variables) and the
next-states (primed variables) for machine i. The machines are ordered in the same
order in which they occur in the input, although other orders may exist which might
improve performance.
The transition relation Tei for machine i is constructed as an ROBDD predicate
over these variables. The ROBDD for a transition
(si , e, g, o, s0i ) ∈ Ti
is constructed as the conjunction of the ROBDD encodings of s i , e, g, and s0i . (The
outputs are not encoded as they have no influence on the reachable states of the
system.) The encoding of si , e, and s0i is straightforward and the encoding of the
guard g is done by converting all atomic predicates l j = p to ROBDD predicates
over the current-state variables for machine M j and then performing the Boolean
operations in the guard. The encoding of all transitions of machine i is obtained
from the disjunction of the encoding of the individual transitions:
_
e
ti = sei ∧ ee ∧ ge ∧ se0i ,
(si ,e,g,o,s0i )∈Ti
ROBDD Representation 49
where ee is the ROBDD encoding of input event e and sei and se0i are the ROBDD
encodings of the current-state si and next-state s0i , respectively.
To properly encode the global transition relation T , we need to deal with situ-
ations where no transitions of Ti are enabled. In those cases we want the machine
i to stay in its current state. We construct an ROBDD neg i representing that no
transition is enabled by negating all guards in machine i (including the input events):
^
negi = ¬(e
si ∧ ge ∧ ee ) .
(si ,e,g,o,s0i )∈Ti
The ROBDD equi encodes that machine i does not change state by requiring that
the next-state is identical to the current-state:
kSi k
^
0
equi = Vi,j ↔ Vi,j .
j=1
Tei = e
ti ∨ (negi ∧ equi ) .
The ROBDD Te for the full transition relation is the conjunction of the local transi-
tion relations:
^n
e
T = Tei .
i=1
R0 = se 0
Rk = Rk−1 ∨ (∃V, VE . Te ∧ Rk−1 )[V /V 0 ]
where V is the set of current-state variables, V 0 is the set of next-state variables, and
(· · · )[V /V 0 ] denotes the result of replacing all the primed variables in V 0 by their
unprimed versions.
The construction of the full transition relation T can be avoided by using a
partitioned transition relation [BCL91] together with early variable quantification.
This is done by identifying sets Ij of transition relations that, when applied in the
correct order, allows for early quantification of the state variables that no other
transition relations depend on. If V Ij are these variables and we have m sets, then
we get:
R0 = se 0 ^ ^
Rk = Rk−1 ∨ (∃VE .∃VI1 . Tei ∧ . . . ∧ (∃VIm . Tei ∧ Rk−1 ))[V /V 0 ].
i∈I1 i∈Im
50 Paper A: Verification of Large State/Event Systems using Compos. . .
Both approaches have been implemented and tested on our examples as shown in
section 7. Here we see that the calculation of the reachable state space using the
full transition relation is both fast and efficient for the small examples. However,
for models with more than approximately 30 machines, both approaches fail to
complete.
s ∈ P and s =I s0 ⇒ s0 ∈ P .
As an example, consider a guard g which mentions only machines 1 and 3. The set of
states defined by g is I-sorted for any I containing 1 and 3. 1 Another understanding
of the definition is that if a set P is I-sorted, it only depends on machines in I.
From an I-sorted set defined by g we perform a backwards reachability compu-
tation by including states which, irrespective of the states of the machines in I, can
1
If the guard is self-contradictory (always false), it will be I-sorted for any I. This reflects the
fact that the semantic sortedness is more precise than syntactic occurrence.
Compositional Backwards Reachability 51
e1 X
g
e2 ¬X Y
sI
e3 ¬Y
Fig. 2: An example showing the effect of BI (g). If X is the guard lj = p and Y the
guard lk = q with j, k 6∈ I then the transitions from s I seem to depend on machines
Mj and Mk outside I. However, the guards X, ¬X Y , and ¬Y together span all
possibilities and therefore, by selecting either e 1 , e2 , or e3 , the state sI can reach g
irrespective of the states of the machines M j and Mk .
reach g. One backward step is given by the function B I (g) defined by:
By definition BI (g) is I-sorted. The set BI (g) is the set of states which independently
of machines in I, by some input event e, can reach a state in g. Observe that B I (g)
is monotonic in both g and I. Figure 2 shows how a state sI of a machine is included
in BI (g) although it syntactically seems to depend on machines outside I.
By iterating the application of BI , we can compute the minimum set of states
containing g and closed under application of B I . This is the minimum fixed-point
µX.g∪BI (X), which we refer to as BI∗ (g). Note that B{1,...,n}
∗ (g) becomes the desired
set of states which can reach g.
A set of indices I is said to be dependency closed if none of the machines in I
depend on machines outside I. Formally, I is dependency closed if for all i ∈ I,
e o e o
states s0 , s, si , input events e, and outputs o, s −−→i si and s0 =I s implies s0 −−→i si .
We say that one machine Mi is dependent on another Mj if Mi has a transition
with a guard that refers to a state in machine M j . We use this syntactic notion
of dependency to determine whether a set of indices I is dependency closed. For
example, from the dependency graph in Fig. 3 we observe that the set I = {1, 2, 3, 6}
is dependency closed.
The basic properties of the sets BI∗ (g) are captured by the following lemma:
Proof: We first observe directly from the definition that B I (g) is monotonic in both
I and g, i.e., for any J with I ⊆ J and g 0 with g ⊆ g 0 we have:
The operation of taking minimum fixed points is also monotonic, therefore for any
I and J with I ⊆ J we have from (2):
proving that BI∗ (g) is monotonic in the index set of machines I, which is (i) of the
lemma.
To prove (ii) of the lemma, first observe from the definition of B I∗ (g) that g ⊆
BI (g), hence by monotonicity of BJ∗ ( ) and B ∗ (g) it follows that
∗
BJ∗ (g) ⊆ BJ∗ (BI∗ (g)) ⊆ BJ∗ (BJ∗ (g)) = BJ∗ (g) .
The last equality follows from the fact that B J∗ (g) is a fixed-point. We have proved
(ii) of the lemma.
To prove (iii) we first observe that the inclusion ⊆ holds by (i). We therefore
concentrate on the other inclusion ⊇. We employ the following fixed point induction
principle (due to David Park):
(If the sets x and y are contained in a third set z then also their least upper bound
x ∪ y is contained within z.) Assume now that s is some state in B J (BI∗ (g)) \ g.
Then by definition of BJ ( ) the following holds:
e o
∀s0 ∈ S. s =J s0 ⇒ ∃e, o, s00 . s0 −−→ s00 and s00 ∈ BI∗ (g) . (4)
To show that s is in BI∗ (g) we need to prove that the following holds:
e o0
∀s0 ∈ S. s =I s0 ⇒ ∃e, o0 , s000 . s0 −−→ s000 and s000 ∈ BI∗ (g) . (5)
Compositional Backwards Reachability 53
M5 M9
M4 M1 M7 M8
M6 M3
M2
Fig. 3: This figure illustrates the dependencies between 9 state machines taken from
a real example (the example “hi-fi” of section 7). An arrow from one machine Mi
to another Mj indicates that Mi depends on Mj , i.e., that Mi has a transition with
a guard that refers to a state in machine M j .
Consider a state s0 such that s =I s0 . Let s00 be the state reached by firing e from
e o e o0
s, s −−→ s00 and similarly, let s000 be the state reached from s0 , s0 −−→ s000 (s00 and s000
are well-defined since the transition relation is total). Then from the definition of
dependency closure of I, it follows that for all i ∈ I, s 00i = s000 00
i and thus s =I s .
000
From (6), s00 ∈ BI∗ (g) and s00 =I s000 , it follows that s000 ∈ BI∗ (g) since BI∗ (g) is I-
sorted. We have proved (5) and thus also (iii) of the lemma.
The results of the lemma are applied in the following manner. To check whether a
guard g is reachable, we first consider the set of machines I 1 syntactically mentioned
in g. Clearly, g is I1 -sorted. We then compute BI∗1 (g) by a standard fixed-point
∗
iteration. If the initial state s0 belongs to BI∗1 (g), then by (i) s0 ∈ B{1,...,n} (g)
0
and therefore g is reachable from s and we are done. If not, we extend I1 to a
larger set of machines I2 . We then reuse BI∗1 (g) to compute BI∗2 (g) as BI∗2 (BI∗1 (g))
which is correct by (ii). We continue like this until s 0 has been found in one of
the sets or an index set Ik is dependency closed. In the latter case we have by (iii)
∗
BI∗k (g) = B{1,...,n} (g) and g is unreachable unless s0 ∈ BI∗k (g). The algorithm for
performing a compositional backwards analysis is shown in Fig. 4.
We extend I by adding machines that are syntactically mentioned on guards
in transitions of machines in I, i.e., machines are included in I by traversing the
dependency graph in a breadth-first manner. As an example, assume that we want
to determine whether the guard g = (l 1 = p ∧ l3 6= q) is reachable in the example of
Fig. 3. The initial index set is I1 = {1, 3}. If this is not enough to show g reachable,
the second index set I2 = {1, 3, 6, 2} is used. Since this set is dependency closed, g
is reachable if and only if the initial state belongs to B I∗2 (BI∗1 (g)).
The above construction is based on a backwards iteration. A dual version of
BI for a forwards iteration could be defined. However, such a definition would not
make use of the dependency information since s 0 is only I-sorted for I = {1, . . . , n}.
Therefore all machines would be considered in the first fixed-point iteration reducing
54 Paper A: Verification of Large State/Event Systems using Compos. . .
Reachable(M1 , M2 , . . . , Mn , g) =
I ← {i : g contains an atomic predicate l i = p }
R←g
repeat
Rnew ← BI∗ (R)
/∗ Check for property (i): early positive termination ∗/
if s0 ∈ Rnew then return true
/∗ Check for property (iii): early negative termination ∗/
if I is dependency closed then return false
Extend I with at least one machine.
/∗ Apply property (ii): reuse of previously computed states ∗/
R ← Rnew
forever
where ge[V 0 /V ] is equal to ge with all variables in V replaced by their primed versions.
It is essential to avoid building the global transition V relation Te. This is done by
0 0 0 e e e e e
writing ∃V as ∃VI .∃VI¯ and T = TI ∧ TI¯ where TI = i∈I Ti . This allows us to push
the existential quantification of V I¯0 to TeI¯ since g is I-sorted and thus independent of
the variables in VI¯0 . As ∃VI¯0 .TeI¯ is a tautology (since the transition relation is total),
equation (7) reduces to:
which only uses the local transition relations for machines in I. Each T i refers only
to primed variables in Vi0 , allowing early variable quantification for each machine
individually:
eI (e
B g ) = ∀VI¯. ∃VE . ∃Vi01 .Tei1 ∧ (∃Vi02 .Tei2 ∧ · · · ∧ (∃Vi0k .Teik ∧ ge[V 0 /V ]) · · · )
for I = {i1 , i2 , . . . , ik }. This equation efficiently computes one step in the fixed-point
iteration constructing B e ∗ (e
I g ).
Local Deadlock Detection 55
e1 e2 e3 p1
p1 p2 p3 q1 q2
e 1 q2 e2 e3
The check is divided into two parts. First, the set of all live states L ∗i for
machine i is computed. Second, we check that all reachable states are in L ∗i . A
straightforward but inefficient approach would be to compute the two sets and check
for inclusion. However, we will take advantage of the compositional construction
used in the backwards reachability in both parts of the check.
Similar to the definition of BI (g), we define LI,i (X) to be the set of states that
are immediately live for machine i ∈ I (independently of the machines outside I) or
which leads to states in X (i.e., states already assumed to be live for machine i):
Compared to definition (1) the only difference is the extra possibility that the state
is immediately live, i.e., si 6= s00i . The set of states that are live for machine i
independently of machines outside I is then the set L ∗I,i (∅) where L∗I,i (Y ) is the
minimum fixed point defined by L∗I,i (Y ) = µX.Y ∪ LI,i (X).
The three properties of the lemma also hold for L ∗I,i (Y ) when Y is I-sorted. If I
is dependency closed it follows from property (iii) of the lemma that L ∗I,i (∅) equals
56 Paper A: Verification of Large State/Event Systems using Compos. . .
L∗{1,...,n},i (∅) which is precisely the set of live states of machine i. This gives an
efficient way to compute the sets L∗I,i (∅) for different choices of I. We start with I 1
equal to {i} and continue with larger I k ’s exactly as for the backwards reachability.
The only difference is the termination conditions. One possible termination case
is if L∗Ik ,i (∅) becomes equal to S for some k. In that case the set of reachable
states is contained in L∗Ik ,i (∅). From the monotonicity property (i) of the lemma it
follows that machine i is live and thus free of local deadlocks. The other termination
case is when Ik becomes dependency closed. Then we have to check whether there
exists reachable states not in L∗Ik ,i (∅). This is done by a compositional backwards
reachability check with g = S \ L∗Ik ,i (∅). The algorithm is shown in Fig. 6.
LocalDeadlock(M1 , M2 , . . . , Mn , i) =
I ← {i}
L←∅
repeat
Lnew ← L∗I,i (L)
if S = Lnew then return false /∗ No local deadlock ∗/
if I is dependency closed then
return Reachable(M1 , M2 , . . . , Mn , S \ Lnew )
Extend I with at least one machine.
L ← Lnew
forever
7 Experimental Results
The technique presented above has been applied to a range of real industrial state/event
systems and a set of systems constructed by students in a course on embedded sys-
tems. The examples are all constructed using visualSTATE tm [vA96]. They cover
a large range of different applications and are structurally highly irregular.
The characteristics of the systems are shown in Tab. 1. The systems hi-fi, avs,
flow, motor, intervm, dkvm, n8, train1 and train2 are industrial examples.
hi-fi is the control part of an advanced compact hi-fi system, avs is the control
part of an audio-video system, flow is the control part of a flow meter, motor is
a motor control, intervm and dkvm are advanced vending machines, and train1
and train2 are both independent subsystems of a train simulator. The remaining
examples are constructed by students. The vcr is a simulation of a video recorder,
cyber is an alarm clock, jvc is the control of a hi-fi system, video is a video player,
and volvo is a simulation of the functionality of the dashboard of a car.
The experiments were carried out on a 350 MHz Pentium II PC with 64 MB
RAM running Linux. To implement the ROBDD operations, we use the BuDDy
Experimental Results 57
Tab. 1: The state/event systems used in the experiments. The last two columns
show the size of the declared and reachable state space. The size of the declared state
space is the product of the number of local states of each machine. The reachable
state space is only known for those systems where the forwards analysis completes.
package [LN99]. In all experiments we limit the total number of ROBDD nodes to
three millions corresponding to 60 MB of memory. We check for each transition
whether the guard is reachable and whether it is conflicting with other transitions.
Furthermore, we check for each machine whether it has a local deadlock. The total
runtime for these checks, including loadtime and the time to construct the depen-
dency graphs, are shown in Tab. 2. The memory consumption is typically 3 MB and
never more than 10 MB for the analyses that completes within the limits. The total
number of checks is far from the quadratic worst-case, which supports the claim
that in practice only very few checks are needed to check for conflicting rules (see
section 3).
As expected, the forwards iteration with a full transition relation is efficient for
smaller systems. It is remarkable that the ROBDD technique is superior to explicit
state enumeration even for systems with a very small number of reachable states.
Using the partitioned transition relation in the forwards iteration works poorly.
For the largest system, only the compositional backwards technique succeeds. In
fact, for the three largest systems it is the most efficient and for the small examples
it has performance comparable to the full forward technique. This is despite the
fact that the number of checks is high and the backward iterations must be repeated
58 Paper A: Verification of Large State/Event Systems using Compos. . .
Tab. 2: The runtime of the experiments in CPU seconds. The second column of the
table shows the total number of guards that are checked for reachability after this
number has been reduced by the implicational analysis. The forward columns show
results using a forward iteration with a full and a partitioned transition relation. The
backward columns show the results of a backwards iteration using the full transition
relation, the full dependency closure and the compositional backwards reachability.
The visualSTATE column shows the runtimes obtained using an explicit state enu-
meration as implemented in version 3.0 of visualSTATE tm . A “−” denotes that we
ran out of BDD nodes.
for each check. From the experiments it seems that the compositional backwards
technique is better than full forwards from somewhere around 30 machines.
Fig. 7: The dependency graph for train2. Each vertex in the graph represents a
state machine and an edge from vertex i to j indicates that machine M i depends
on machine Mj , i.e., that Mi has a transition with a guard that refers to a state in
machine Mj .
%
100
80
60
40
20
0
0 50 100 150 200 250
8 Conclusion
We have presented a verification problem for state/event systems which is charac-
terized by a large number of reachability checks. A compositional technique has
been presented which significantly improves on the performance of symbolic model
checking for large state/event systems. This has been demonstrated on a number
Conclusion 61
of industrial systems of which the largest could not be verified using traditional
symbolic model checking.
We have shown how the backward compositional technique is used to check
for two types of properties, namely reachability and deadlocks. The check for local
deadlock shows how some properties requiring nesting of fixed points can be checked
efficiently with the compositional backwards analysis. Based on these ideas, we
have recently shown how the compositional technique can be extended to handle
full CTL [LNA99].
Other models of embedded control systems, such as StateCharts [Har87] and
RSML [LHHR94], are often structured hierarchically, i.e., states may contain sub-
components. It is possible to extend the compositional backwards technique to not
only handle hierarchical models but also to take advantage of the hierarchy to im-
prove the efficiency of the verification [BLA+ 99].
In general, we believe that the compositional backwards technique works well
when the model can be decomposed into independent components. On the other
hand, if all components of the model are mutually dependent, the dependency clo-
sure will include all components and the compositional technique reduces to the
standard model checking approaches. For example, in some models the components
can communicate by using signals (or internal events). The signals are placed in a
queue and only when this queue becomes empty can the components react on ex-
ternal events. In such a model, all components become mutually dependent due to
synchronization with the centralized queue, resulting in a severe degradation in per-
formance. In current research, we attempt to avoid the queue by using a difference
semantics which allows the signals to be statically eliminated by turning them into
state synchronizations. The goal is to allow the use of signals in the model without
degrading the efficientcy of the verification.
62 Paper A: Verification of Large State/Event Systems using Compos. . .
PAPER B
VERIFICATION OF HIERARCHICAL
STATE/EVENT SYSTEMS USING
REUSABILITY AND COMPOSITIONALITY
G.Behrmann, K. G. Larsen
BRICS, Aalborg University, Denmark
Abstract
We investigate techniques for verifying hierarchical systems, i.e., finite state systems with
a nesting capability. The straightforward way of analysing a hierarchical system is to first
flatten it into an equivalent non-hierarchical system and then apply existing finite state
system verification techniques. Though conceptually simple, flattening is severely punished
by the hierarchical depth of a system. To alleviate this problem, we develop a technique
that exploits the hierarchical structure to reuse earlier reachability checks of superstates to
conclude reachability of substates. We combine the reusability technique with the successful
compositional technique of [LNAB+ 98] and investigate the combination experimentally on
industrial systems and hierarchical systems generated according to our expectations to real
systems. The experimental results are very encouraging: whereas a flattening approach
degrades in performance with an increase in the hierarchical depth (even when applying the
technique of [LNAB+ 98]), the new approach proves not only insensitive to the hierarchical
depth, but even leads to improved performance as the depth increases.
1 Introduction
Finite state machines provide a convenient model for describing the control-part (in
contrast to the data-part) of embedded reactive systems including small systems
such as cellular phones, HiFi equipment, cruise controls for cars, and large systems
as train simulators, flight control systems, telephone and communication protocols.
We consider a version of finite state machines called state/event machines (SEMs).
The SEM model offers the designer a number of advantages including automatic
generation of efficient and compact code and a platform for formal analysis such as
model-checking. In this paper we focus and contribute to the latter.
In practice, to describe complex systems using SEMs, a number of extensions are
often useful. In particular, rather than modeling a complex control as a single SEM,
it is often more convenient to use a concurrent composition of several component
SEMs each typically dealing with a specific aspect of the control. Here we focus on
an additional hierarchical extension of SEMs, in which states of component SEMs
are either primitive or superstates which are themselves (compositions of) SEMs.
Figure 1(a) illustrates a hierarchical description of a system with two components,
a Train and a Crossing. Inside the Train the state Move is a superstate with the two
(primitive) states Left and Right. Transitions within one component may be guarded
with conditions on the substates of other components. E.g., the ‘Go’-transition may
only be fired when the superstate Crossing is in the substate Closed. The Move state
is flagged as a history state indicated by the capital H. On deactivation history states
remember the last active substate and may reenter it when reactivated.
mTrain Go [Closed]
Stop Move
Root Up
Train Stop Crossing
mMove
Open GoRight [Move]
Go
[Closed] Up Left Right
GoLeft [Move]
Move H Down Up
GoRight mCrossing
Left Right Down
GoLeft Closed Open Closed
Up
Fig. 1: (a) A hierarchical model of a toy train. The system is composed of a number
of serial, parallel and primitive states. (b) The model after it has been flattened. In
case Move had not been a history state there would have been an extra transition
in the flattened model from Right to Left on event GoRight and guard Stop ∧ Closed
forcing mMove into Left whenever Move is activated.
nique that uses the hierarchical structure to reuse earlier reachability checks of
superstates to conclude reachability of substates. We develop the reusability tech-
nique for a hierarchical SEM model inspired by Statechart and combine it with
the compositionality technique of [LNAB+ 98]. We investigate the combination ex-
perimentally on hierarchical systems generated according to our expectations from
real systems.2 The experimental results are very encouraging: whereas the flatten-
ing approach degrades in performance with an increase in the hierarchical depth, it
is clearly demonstrated that our new approach is not only insensitive to the hier-
archical depth, but even leads to improved performance as the depth increases. In
addition, for non-hierarchical (flat) systems the new method is an instantiation of,
and performs as well as, the compositional technique of [LNAB+ 98].
Related Work
R. Alur and M. Yannakakis’ work on hierarchical Kripke structures offers impor-
tant worst case complexity results for both LTL and CTL model checking [AY98].
However, their results are restricted to sequential hierarchical machines and use
the fact that abstract superstates may appear in several instantiations. In contrast
we provide verification results for general hierarchical systems with both sequential
and parallel superstates without depending on multiple instantiations of abstract
superstates.
Park, Skakkebæk and Dill [PSD98] have found an algorithm for automatic gen-
eration of invariants for states in Rsml specifications. Using these invariants it is
possible to perform some of the same checks that we provide for hierarchical SEMs.
Their algorithm works on an approximation of the specification, and uses the fact
that Rsml does allow internal events sent from one state to another.
S0 S0
S100 S100
g g∗
x x
y y
z z
u v u v
(a) (b)
scenario depicted in Fig. 2(a) should in many cases be encountered with only small
extensions of the considered superstates. It is noteworthy, that exception handling
does not follow this pattern. An exception may result in a transition from a state
s deep within the hierarchy to an exception state far away. However, this does not
affect reachability of s, only that of the exception state.
T ⊆ S × E × G × M(O) × S ,
where M(O) is the set of all multisets of outputs, and G is the set of guards derived
from the grammar
g ::= g1 ∧ g2 | ¬g1 | tt | s .
The atomic predicate s is a state synchronisation on the state s, having the intu-
itive interpretation that s is true whenever s is active (we will return to the formal
semantics in a moment).
We use t = (st , et , gt , ot , s0t ) to range over syntactic transitions (with source,
event, guard, outputs and target respectively).
Example 1. In Fig. 1a we have
(Stop, Go, Closed, ∅, Move) is one of the six elements in T . The Sub relation defines
the nesting structure of the states, e.g. we have Sub(Root) = {Train, Crossing}. The
function def is only defined for serial and history states, e.g. def (Move) = Left,
whereas def (Root) is undefined.
Example 2. Let t1 be the transition from Open to Closed and t 2 the transition
from Left to Right. We then have χ(t1 ) = Crossing and χ(t2 ) = Move. If we had
a transition from Move to Open (remember transitions between any two states are
allowed), the scope would have been $.
Example 4. Let σ = (Stop, Left, Open), i.e. the initial configuration. We have that
s in σ is true for s ∈ {Root, Train, Stop, Crossing, Open}. We do not have Left in σ
since this would require Move in σ.
The Hierarchical State/Event Model 71
σ |= tt
σ |= s iff s in σ
σ |= g1 ∧ g2 iff σ |= g1 and σ |= g2
σ |= ¬g iff σ 6|= g
Before introducing the formal semantics, we summarise the intuitive idea behind
a computation step in HSEM. An HSEM is event driven, i.e., it only reacts when an
event is received from the environment. When this happens, a maximal set of non-
conflicting and enabled transitions is executed, where non-conflicting means that no
transitions in the set have nested scope. This conforms to the idea that the scope
defines the area affected by the transition. In fact, a transition is understood to leave
the scope and immediately reactivate it. When a transition is executed, it forces a
state change to the target. All implicitly activated serial states enter their default
state and all history states the remembered last active substate. Notice that contrary
to Statecharts, HSEMs do not include any notion of scope overriding. Scope
overriding varies greatly between hierarchical specification languages (for instance
between Statecharts and Uml). For this reason we decided not to include this
mechanism in HSEM. In fact, it is easy to translate an HSEM with Statechart like
scope overriding to an HSEM without (for any given transition add the conjunction
of negated guards of potentially enabled transitions with higher scope to the guard),
although this adds additional dependencies between states.
Formally, a set ∆ ⊆ T is enabled on (e, σ) if ∀ t ∈ ∆ : (e, σ) |= t, ∆ is compatible
if ∀ t, t0 ∈ ∆ : (t 6= t0 ⇒ χ(t) 6&∗ χ(t0 )), and ∆ is maximal if ∀ ∆0 ⊆ T : ∆ ⊂ ∆0 ⇒
∆0 is incompatible or disabled on (e, σ).
Example 5. Let σ = (Stop, Left, Open) be the initial configuration, e = Down, and
∆ = {t1 }, where t1 is again the transition from Open to Closed. The set ∆ is
compatible, enabled on (e, σ), and maximal.
2) o = ]t∈∆ ot ,
3) ∀ t ∈ ∆ : s0t in σ 0 ,
4
The symbol ] denotes multiset union
72 Paper B: Verification of Hierarchical State/Event Systems using. . .
is a valid transition. Clearly the first two constraints are satisfied. Since t 1 is the only
transition in ∆ and χ(t1 ) = Crossing, we find that the third and fourth constraint do
not matter it this example (both Open and Closed are primitive). The last constraint
requires Train and Move to remain unchanged, which is the case. In fact the above
transition is the only transition satisfying the constraints in the given configuration
and event. Continuing from this new configuration we obtain
Go/∅ GoRight/∅
(Stop, Left, Closed)−−−→(Move, Left, Closed)−−−−−−→
Up/∅
(Move, Right, Closed)−−−→(Stop, Right, Open)
4 Consistency Checks
The consistency checker of visualSTATE performs seven predefined types of checks
such as checking absence of dead code in the sense that all transitions must be
possibly enabled and all states must be possibly entered, and checking absence of
deadlocks. Each check can be reduced to verifying one of two types of properties.
The first property type is reachability. For instance, checking whether a transition
t will ever become enabled is equivalent to checking whether a configuration σ can
be reached such that ∃ e : (e, σ) |= t. Similarly, checking whether a state s may be
entered amounts to checking whether the system can reach a configuration within
Σs .
The remaining types of consistency checks reduce to a check for absence of local
deadlocks. A local deadlock occurs if the system can reach a configuration in which
one of the superstates will never change value nor be deactivated no matter what
sequence of events is offered.
Reusable Reachability Checking 73
In the following two sections we present our novel technique exploiting reusability
and compositionality through its application to reachability analysis. In [ABPV98]
the applicability of the technique to local deadlock detection is demonstrated.
Example 7. Checking whether the transition from Stop to Move is not dead code
reduces to checking whether some configuration in X 1 = {σ | σ |= Stop ∧ Closed} =
{(Stop, Left, Closed), (Stop, Right, Closed)} is reachable. Similarly, checking whether
Right is not dead code reduces to checking whether some configuration in X 2 =
ΣRight = {(Move, Right, Open), (Move, Right, Closed)} is reachable.
B(X) = {σ | ∃σ 0 ∈ X : σ ; σ 0 },
i.e. given a set X we compute the configurations that in one step can reach a
configuration in X. By repeating the step until we reach the fixed point B ∗ (X) =
µY.X ∪ B(Y ), we compute the set of configurations that in a number of steps can
reach X. Although this approach is very simple it is infeasible for large systems.
To explain the idea of reusability, let i be a state such that X ⊂ Σ i , i.e., reacha-
bility of any configuration within X implies reachability of the state i (see Fig. 3(a)).
Notice that such a state exists for all non-trivial reachability questions, e.g., the root
will satisfy this condition for any X 6= Σ. The question we ask is how existing infor-
mation about reachability of i may be reused to simplify reachability-checking of X.
The simple case is clearly when i is unreachable. In this case there is no way that X
can be reachable either, since X only contains configurations where i is active. Since
we expect (or hope) most of the reachability questions issued by visualSTATE to
be true this only modestly reduces the number of computations. However, although
it is more challenging, we can also make use of the information that i is reachable,
as explained below.
Knowing i is reachable, still leaves open which of the configurations in Σ i are
in fact reachable (and in particular if any configuration in X is). However, any
reachable configuration σ in Σi must necessarily be reachable through a sequence of
e/o
5
Here σ ; σ 0 abbreviates ∃ e, o : σ −→ σ 0 .
74 Paper B: Verification of Hierarchical State/Event Systems using. . .
Reachable(X) =
i := lowest(X)
if not Reachable(Σi ) then
return false
Σ σ0 Y := X
repeat
Σi Y 0 := Bi∗ (Y )
Init(i) // Prop. i and iii
if σ0 ∈ Y 0 or Init(i) ⊆ Y 0 then
return true
// Prop. iv
if Init(i)∩Y 0 = ∅ then return false
X // Prop. ii
i := lsa(i)
Y := Y 0
forever
Init(s) = {σ ∈ Σs | σ = σ0 or ∃ σ 0 6∈ Σs : σ 0 ; σ}
i.e., Init(s) is the set of configurations for which s is active and which are reachable
in one step from a configuration in which s is inactive (clearly σ n+1 in (1) is in
Init(i), see also Fig. 3(a)). We call Init(i) the initial configurations of i. Notice
that for a configuration to be an initial configuration, all we require is that there is
a predecessor which is not in i. In the presence of history states, the set of initial
configurations of i is larger than the set of configurations in i terminating paths
which are otherwise not in i. A path leading to a initial configuration might have
entered and left i several times.
Example 8. In the example from the introduction we have that
Notice that the second state can only be reached via paths containing the first state.
Consider then the following backwards step computation:
Bi (Y ) = {σ ∈ Σi | ∃ σ 0 ∈ Y : σ ; σ 0 } (2)
Reusable Reachability Checking 75
that is, Bi (Y ) is the set of configurations with i active, which in one step may reach
Y . The fixed point defined by
can easily be found by applying Bi iteratively. Notice that B = Bi for i being the
root state. The following lemma states the crucial properties of this fixed point.
Lemma 1. Let σ0 be the initial state. For states j &∗ i and a set X ⊂ Σi , the
following holds:
Example 9. Given the two reachability questions from Example 7 we have lowest(X1 ) ∈
{Stop, Closed} and lowest(X2 ) = Right.
σ0 ∈ B ∗ (Σs ) ⇔ σ0 ∈ B ∗ (Init(s))
Lemma 3. For any two superstates i and j s.t. j & ∗ i and for any set of configu-
rations X ⊂ Σi the following holds.
Lemma 1 (continued)
Proof: We first observe from the definition that B i (X) is monotonic in both i (w.r.t.
&∗ ) and X (w.r.t. ⊆). Property i) of the lemma is a direct consequence.
For ii), observe X ⊆ Bi∗ (X). It follows that
Bj∗ (X) ⊆ Bj∗ (Bi∗ (X)) ⊆ Bj∗ (Bj∗ (X)) = Bj∗ (X) .
σ =I σ 0 ⇐⇒ ∀ s ∈ I : πs (σ) = πs (σ 0 ) .
Notice that we require P ⊆ ΣI for P to be I-sorted. This follows the idea that
the reusable reachability check restricts the analysis to I. Hence, in the following
the least common ancestor of I will play the role of state i used in the reusable
reachability algorithm. P being I-sorted intuitively means that it only depends on
states within I. Using ROBDDs allows for very compact representations of I-sorted
sets as the parts of the configuration set outside the sort will be ignored.
Given a sort I, we define the behaviour of I in terms of a transition relation
;I ⊆;. Intuitively, σ ;I σ 0 if the transition does not depend on superstates not
in I. This is the case exactly when all configurations I-equivalent to σ can perform
a similar transition to a configuration I-equivalent to σ 0 . Formally, ;I ⊆ ΣI × ΣI
such that
σ ;I σ 0 ⇐⇒ ∀σ 00 =I σ : ∃ σ 000 =I σ 0 : σ 00 ; σ 000
It is now easy to define a compositional backwards step function similar to (2)
based on ;I :
CBI (X) = {σ | ∃ σ 0 ∈ X : σ ;I σ 0 } .
Let CBI∗ (X) be the minimum fixed-point defined by µY.X ∪ CB I (Y ). Observe that
CBI is monotonic in both X and I. In an ROBDD based implementation, the global
transition relation may be partitioned into conjunctive parts with contributions from
6
Only if lca(I) is a serial state does this imply that lca(I) ∈ I.
78 Paper B: Verification of Hierarchical State/Event Systems using. . .
each superstate. Crucial for our approach is the fact that CB I may be computed
without involving the global transition relation directly, but only the parts of the
partitioning relevant for the considered sort I. We refer to [LNAB+ 98] for a similar
observation for flat SEMs.
If computing CBI∗ (X) does not resolve the reachability question, we extend the
sort I with states the behaviour of the sort I logically depends on. If I only depends
on states in I, we say I is dependency closed. Formally, I is dependency closed if
∀σ, σ 0 ∈ ΣI , I 0 ⊇ I : σ ;I σ 0 ⇔ σ ;I 0 σ 0 .
Proof: The proofs of i), ii), and iii) are identical to the proofs of Lemma 1 (sub-
stitute CB, I, and J for B, i, and j). For iv) the proof is by contradiction. Assume
the left hand side of the implication holds, but σ 0 ∈ B ∗ (X). There must be a path
from σ0 = σ n ; · · · σ m · · · ; σ 0 ∈ X, where σ k ∈ B k (X), σ m+1 6∈ ΣI or m = n,
and for all k ≤ m : σ k ∈ ΣI . Then σ m ∈ Init(I). Since I is dependency closed we
have that σ k ∈ CBIk (X) for k ≤ m which contradicts Init(I) ∩ CB I∗ (X) = ∅.
As before, any over approximation of Init and Dep will suffice for the lemma to
hold. We will return to this matter in Section 7. Lemma 4 is a generalisation of the
Compositional Reachability Lemma in [LNAB+ 98] to the hierarchical case.
Algorithm 2 in Fig. 4 is the result of using the compositional backward step CB I
instead of Bi , with M insort(X) offering a minimal sort for the set of configurations
X. When the algorithm returns false, none of the configurations in X are reachable.
If true is returned, it means that at least one goal configuration is reachable under
the assumption that lca(I) is known to be reachable. The same optimisation as in
Section 5 using a preorder traversal of the state tree can be applied.
Reachable(X) =
Y := X
I := M insort(X)
repeat
Y 0 = CBI∗ (Y )
// Prop. i and iii
if σ0 ∈ Y 0 or Init(I) ⊆ Y 0 then return true
if Dep(I) 6= I then
I := Convex(I ∪ J), where J ⊆ Dep(I)
else if Init(I) ∩ Y 0 6= ∅ then
I := I ∪ {lsa(lca(I))}
// Prop. iv
else return false
// Prop. ii
Y := Y 0
forever
Definition 4. Let s be a super state. The set Init 0 (s) is the smallest set, such that
σ ∈ Init0 (s) whenever s in σ and either
For history states any substate can potentially be activated by a transition to the
edge of the history state, and thus history states are not restricted by the definition
of Init0 . A history states reduces the chance of termination using property iii) and
iv) of Lemma 4, but if used moderately, history states do not dramatically increase
the size of the set of initial configurations. We now have the following lemma.
conclude that there must exist exactly one transition with scope above s. Call this
transition t. We now have two cases: If the target of t is below s, then condition
3) and 4) imply ii). If the target is not below s, s will be implicitly activated by
condition 4 ) and 5 ) implying that i) holds.
For dependency analysis we need to look at transitions with scope in or above
I. All other transitions will by definition of scope not influence the behaviour of
I. For transitions with scope in I, we require that the parent of the source and all
parents to states in the guard are in I for I to be dependency closed. For transitions
with scope above I we basically require the same, but only if Σ I can potentially be
active both before (defined by the pre-states) and after (defined by the post-states)
the transition is executed.
states(tt) = ∅
states(s) = {lsa(s)}
states(g1 ∧ g2 ) = states(g1 ) ∪ states(g2 )
states(¬g) = states(g)
8 Experimental Results
To evaluate our approach, the runtime and memory usage of an experimental imple-
mentation using our method is compared to an implementation for flat systems. We
will refer to the first as the hierarchical checker and the second as the flat checker.
Both checkers utilise the compositional backwards analysis and use ROBDDs to
represent sets of states and transition relations, but only the hierarchical checker
uses the reusable reachability check. Only dead code detection for transitions is
performed, i.e., whether the system for each transition is unable to reach a config-
uration such that the transition is enabled. The hierarchical checker additionally
Experimental Results 81
a x u
b c
[v] y v
[y] e d
Fig. 5: State c depends on u, due to the transition from e to u and since u is the
parent of v upon which the transition is guarded. Likewise does the transition from
e to b create dependencies from state a (the scope of the transition) to state c (the
parent of the source) and x (the parent of the state upon which the transition is
guarded).
checks whether non-primitive states are reachable since this is necessary in order to
apply the reusable reachability check.
The two implementations where first compared on a number of flat industrial
SEM systems ranging from 4 to 1421 parallel components used in [LNAB+ 98] (HiFi
and video control software, and two train simulators to name a few). Without going
into details, adding the reusable reachability check did not degrade performance.
The lack of adequate examples has forced us to develop a method to generate
scalable hierarchical systems. The basic structure of the generated systems is the cell
structure seen in Figure 6. A cell is a parallel state with a number of serial substates,
each containing a number of either primitive states or cells. The size (p, q) of a cell
is determined by the number of serial states p contained in the parallel state and
the number of states q within each serial state. For instance, the cell in Figure 6 has
size (3, 4). By varying the cell size and the maximum nesting depth, systems of any
size can be generated. Notice, that the cells do not generate a complete tree, i.e.,
different branches will not necessarily have the same length. For instance, a system
with nesting depth 12 does have some branches of length 12, but most branches are
shorter. If the generated system is not deep enough to accommodate the number of
wanted states, the width of the root cell is expanded. E.g., a system with 100 serial
states and nesting depth 1 will have a parallel root with 100 substates.
As stated in the introduction, we believe that in good designs, dependencies are
more likely to be local. The generated test cases reflect this by only including transi-
tions between nearby states. The guards are created at random, but the probability
that a guard synchronises with a given state is inverse exponential to the distance
between the scope of the transition and the state. The number of transitions is pro-
portional to the number of serial states. Transitions are arranged so that any state
is potentially reachable, i.e., if the transitions were unguarded all states (but not
necessarily all cofigurations) would be reachable. Events are distributed such that
given a sequence of events the system is guaranteed to be deterministic (HSEMs do
allow non-determinism, but the flattening algorithm generates quite complex guards
that cannot be handled by the SEM model checker of [LNAB+ 98] – in other words,
this is a restriction of the implementation, not of our approach).
82 Paper B: Verification of Hierarchical State/Event Systems using. . .
Fig. 6: A cell of size (p, q) is a parallel state with p serial substates, each containing
q primitive states or cells. Cells are the basic building blocks used in the generated
hierarchical systems.
450
Seconds Flat
Flat 400 Hierarchical
900 Hierarchical
800 350
700
300
600
Seconds
500 250
400
300 200
200
150
100
400
0 350 100
300
1 250
2
150
200 Automata 50
3
4 100
Depth 5 50
6 0
1 2 3 4 5 6
Depth
Fig. 7: Comparison of the runtime of the flat and hierarchical checker. Left: The
runtime of both checkers is plotted as a function of the nesting depth of the system
and number of automata/serial states. Right: A slice of the mesh where the number
of automata is 300. As can be seen, the runtime of the flat checker explodes as the
depth increases, whereas the runtime of the hierarchical checker decreases slightly.
Figure 7 shows the runtime of both the hierarchical and the flat checker for
a cell size of (4, 3), but with varying nesting depth and number of serial states
(which corresponds to the number of automata in the equivalent flat system). It
is interesting to notice that the runtime of the hierarchical checker is much more
consistent than that of the flat checker, i.e., the runtime of the flat checker does
vary greatly for different systems generated with the same parameters, as the depth
is increased. Although each grid point of the figures shows the mean time of 20
measurements,7 it is still hard to achieve a smooth mesh for the flat checker.
While the flat checker suffers under the introduction of a hierarchy, the hierarchi-
cal checker actually benefits from it. How can it be that the addition of a hierarchy
decreases the runtime of the hierarchical checker? As stated earlier, we believe that
7
It took about two days to run the 1920 cases providing the basis of the 96 depicted grid points.
The test was performed on a Sun UltraSparc 2 with two 300 MHz processors and 1 GB of RAM
(although the enforced limit of 106 nodes assured a maximal memory consumption below 20 MB).
Experimental Results 83
Tab. 1: Distribution of reachability questions. The vertical axis shows the initial
distance between the root and the subsystem analysed, and the horizontal axis shows
the final distance. From the diagonal it can be seen that most questions are answered
without including additional states toward the root.
Final distance
1 2 3 4 5 6 7 8 9 10 11 12 Sum
1 114 114
2 30 65 95
3 20 5 83 108
4 25 5 10 70 110
Initial distance
5 12 0 2 8 59 81
6 0 0 6 8 10 77 101
7 0 0 6 7 12 16 70 111
8 8 0 0 7 1 1 12 66 95
9 0 0 0 0 0 11 10 3 89 113
10 0 0 0 10 0 1 5 7 5 75 103
11 0 0 0 0 0 0 2 1 8 9 91 111
12 0 0 0 6 0 0 0 2 2 9 14 90 123
Sum 209 75 107 116 82 106 99 79 104 93 105 90 1265
the number of questions distributed over the initial and final depth of the lca state
of the questions. For instance we can see that 59 of the questions starting at depth 5
are verified without including additional states toward the root, but that 2 questions
needed to expand the sort such that the final answer was found at depth 3. It is
apparent that a large number of questions is verified in terms of a small subsystem.
This illustrates why our method does scale as well as it does. This particular system
is verified within 26 seconds using the hierarchical checker, whereas the flat checker
uses 497 seconds.
9 Conclusion
In this paper we have presented a verification technique for hierarchical systems. The
technique combines a new idea of reusability of reachability checks with a previously
demonstrated successful compositional verification technique. The experimental re-
sults are encouraging: in contrast to a straightforward flattening approach the new
technique proves not only insensitive to the hierarchical depth, but even leads to
improved performance as the depth increases (given a fixed number of serial states).
A topic for further research is how to extend the techniques to model-checking of
more general temporal properties and how to combine it with utilisation of multiple
instantiations of abstract superstates.
PAPER C
EFFICIENT TIMED REACHABILITY
ANALYSIS USING CLOCK DIFFERENCE
DIAGRAMS
Abstract
One of the major problems in applying automatic verification tools to industrial-size sys-
tems is the excessive amount of memory required during the state-space exploration of a
model. In the setting of real-time, this problem of state-explosion requires extra attention
as information must be kept not only on the discrete control structure but also on the values
of continuous clock variables.
In this paper, we present Clock Difference Diagrams, CDDs, a BDD-like data-structure
for representing and effectively manipulating certain non-convex subsets of the Euclidean
space, notably those encountered during verification of timed automata.
A version of the real-time verification tool Uppaal using CDDs as a compact data-
structure for storing explored symbolic states has been implemented. Our experimental
results demonstrate significant space-savings: for 8 industrial examples, the savings are
between 46% and 99% with moderate increase in runtime.
We further report on how the symbolic state-space exploration itself may be carried out
using CDDs.
Motivation 87
1 Motivation
In the last few years a number of verification tools have been developed for real-time
systems (e.g., [HHWT95, DY95, BLL+ 96]). The verification engines of most tools
in this category are based on reachability analysis of timed automata following the
pioneering work of Alur and Dill [AD90]. A timed automaton is an extension of a
finite automaton with a finite set of real-valued clock-variables. Whereas the initial
decidability results are based on a partitioning of the infinite state-space of a timed
automaton into finitely many equivalence classes (so-called regions), tools such as
Kronos and Uppaal are based on more efficient data structures and algorithms for
representing and manipulating timing constraints over clock variables. The abstract
reachability algorithm applied in these tools is shown in Fig. 1. The algorithm checks
whether a timed automaton may reach a state satisfying a given state formula φ.
It explores the state space of the automaton in terms of symbolic states of the form
(l, D), where l is a control–node and D is a constraint system over clock variables
{X1 , . . . , Xn }. More precisely, D consists of a conjunction of simple clock constraints
of the form Xi op c, −Xi op c and Xi − Xj op c, where c is an integer constant and
op ∈ {<, ≤}. The subsets of Rn which may be described by clock constraint systems
are called zones. Zones are convex polyhedra, where all edge-points are integer
valued, and where border lines may or may not belong to the set (depending on a
constraint being strict or not).
Passed:= ∅
Wait:= {(l0 , D0 )}
repeat
get (l, D) from Wait
if (l, D) |= φ then
return “YES”
if D 6⊆ D 0 for all (l, D 0 ) ∈ Passed then
add (l, D) to Passed (∗)
Next:={(ls , Ds ) : (l, D) ; (ls , Ds ) ∧ Ds 6= ∅}
for all (ls0 , Ds0 ) in Next do
put (ls0 , Ds0 ) to Wait
endif
until Wait = ∅
return “NO”
We observe that several operations of the algorithm are critical for efficient imple-
mentation. In particular the algorithm depends heavily on operations for checking
set inclusion and emptiness. In the computation of the set Next, operations for in-
tersection, forward time projection (future) and projection in one dimension (clock
reset) are required. A well-known data-structure for representing clock constraint
88 Paper C: Efficient Timed Reachability Analysis using Clock Dif. . .
systems is that of Difference Bounded Matrices, DBM, [Dil89], giving for each pair of
clocks1 the upper bound on their difference. All operations required in the reachabil-
ity analysis in Fig. 1 can be easily implemented on DBMs with satisfactory efficiency.
In particular, the various operations may benefit from a canonical DBM represen-
tation with tightest bounds on all clock differences computed by solving a shortest
path problem. However, computation of this canonical form should be postponed as
much as possible, as it is the most costly operation on DBMs with time-complexity
O(n3 ) (n being the number of clocks).
DBMs obviously consume space of order O(n 2 ). Alternatively, one may represent
a clock constraint system by choosing a minimal subset from the constraints of the
DBM in canonical form. This minimal form [LLPY97] is preferable when adding a
symbolic state to the main global data-structure Passed as in practice the space-
requirement is only linear in the number of clocks.
Considering once again the reachability algorithm in Fig.1, we see that a symbolic
state (l, D) from the waiting-list Wait is exempted from being explored (the inner
box) provided some symbolic state (l, D 0 ) already in Passed ’covers’ it (i.e. D ⊆ D 0 ).
Though clearly a sound rule and provably sufficient for termination of the algorithm,
exploration of (l, D) may be avoided under less strict conditions. In particular, it
suffices for (l, D) to be ’covered’ collectively by the symbolic states in Passed with
location l, i.e.:
[
D⊆ {D 0 | (l, D 0 ) ∈ Passed} (1)
Related Work
The work in [Bal96] and [WTD95] represent early attempts of applying BDD-techno-
logy to the verification of continuous real-time systems. In [Bal96], DBMs themselves
are coded as BDDs. However, unions of DBMs are avoided and replaced by convex
hulls leading to an approximation algorithm. In [WTD95], BDDs are applied to a
symbolic representation of the discrete control part, whereas the continuous part is
dealt with using DBMs.
The Numerical Decision Diagrams of [ABK+ 97, BMPY97] offer a canonical rep-
resentation of unions of zones, essentially via a BDD-encoding of the collection of
regions covered by the union. [CC95] offers a similar BDD-encoding in the simple
case of one-clock automata. In both cases, the encodings are extremely sensitive to
the size of the in-going constants. NDDs may be seen as degenerate CDDs requiring
very fine granularity.
CDDs are in the spirit of Interval Decision Diagrams of [ST98]. In [Str98],
IDDs are used for analysis in a discrete, one-clock setting. Whereas IDDs nodes are
associated with independent real-valued variables, CDD-nodes – being associated
with differences – are highly dependent. Thus, the subset- and emptiness checking
algorithms for CDDs are substantially different. Also, the canonical form requires
additional attention, as bounds on different arcs along a path may interact.
The CDD datastructure was first introduced in [LWYP98], where a thorough
study of various possible normal forms is given.
2 Timed Automata
Timed automata were first introduced in [AD90] and have since then established
themselves as a standard model for real–time systems. We assume familiarity with
this model and only give a brief review in order to fix the terminology and notation
used in this paper.
Consider the timed automaton of Fig. 2. It has two control nodes l0 and l1 and
two real–valued clocks X and Y . A state of the automaton is of the form (l, s, t),
90 Paper C: Efficient Timed Reachability Analysis using Clock Dif. . .
X >= 1 Y := 0
l1
l0
(X <= 5 && Y <= 3)
(X <= 4)
X := 0, Y := 0
where l is a control node, and s and t are non–negative reals giving the value of the
two clocks X and Y . A control node is labelled with a condition (the invariant) on
the clock values that must be satisfied for states involving this node. Assuming that
the automaton starts to operate in the state (l 0 , 0, 0), it may stay in node l0 as long
as the invariant X ≤ 4 of l0 is satisfied. During this time the values of the clocks
increase synchronously. Thus from the initial state, all states of the form (l 0 , t, t),
where t ≤ 4, are reachable. The edges of a timed automaton may be decorated with
a condition (guard) on the clock values that must be satisfied in order to be enabled.
Thus, only for the states (l0 , t, t), where 1 ≤ t ≤ 4, is the edge from l 0 to l1 enabled.
Additionally, edges may be labelled with simple assignments reseting clocks. E.g.
when following the edge from l0 to l1 the clock Y is reset to 0 leading to states of
the form (l1 , t, 0), where 1 ≤ t ≤ 4.
A timed automaton is a standard finite-state automaton extended with a finite
collection of real-valued clocks C = {X 1 , . . . , Xn }. We use B(C) ranged over by g
and D to denote the set of clock constraint systems over C.
Definition 1. A timed automaton A over clocks C is a tuple hN, l 0 , E, Invi where N
is a finite set of nodes (control-nodes), l 0 is the initial node, E ⊆ N × B(C) × 2C × N
corresponds to the set of edges, and finally, Inv : N → B(C) assigns invariants to
g,r
nodes. In the case, hl, g, r, l 0 i ∈ E, we write l −→ l0 .
Formally, we represent the values of clocks as functions (called clock assignments)
from C to the non–negative reals R≥ . We denote by V the set of clock assignments
for C. A semantical state of an automaton A is now a pair (l, u), where l is a
node of A and u is a clock assignment for C, and the semantics of A is given by
a transition system with the following two types of transitions (corresponding to
delay–transitions and edge–transitions):
– (l, u)−→(l, u + d) if Inv(l)(u) and Inv(l)(u + d)
g,r
– (l, u)−→(l 0 , u0 ) if there exist g, r such that l −→ l0 , g(u), u0 = [r 7→ 0]u,
Inv(l)(u) and Inv(l 0 )(u0 )
where for d ∈ R≥ , u + d denotes the time assignment which maps each clock X
in C to the value u(X) + d, and for r ⊆ C, [r 7→ 0]u denotes the assignment for C
which maps each clock in r to the value 0 and agrees with u over C\r. Given a clock
constraint g and a valuation v, by g(v) we denote the application of g to v, i.e. the
boolean value derived from replacing the clocks in g by the values given in v.
Clock Difference Diagrams 91
Y Y Y
1 2 3 4 5 6
1
1 2 3 4 5 6
1 2 3 4 5 6
X X X
X [0,2]
[2,3]
X [1,2] [3,4]
[1,3] [4,6] ]2,3[
[0,1]
Y
X −
Y
X − Y
Y Y Y Y
[0,0] [0,1]
[1,4]
[1,3] [1,3]
True
[2,4]
True True
Fig. 3: Three example CDDs. Intervals not shown lead implitely to False; e.g., in
(a) there are arcs from the X-node to False for the three intervals ] − ∞, 1[, ]3, 4[,
and ]6, ∞[.
– V has exactly two terminal nodes called True and False, where type(True) =
type(False) = (0, 0) and succ(True) = succ(False) = ∅.
– all other nodes n ∈ V are inner nodes, which have attributed a type type(n) ∈
T and a finite set of successors succ(n) = {(I 1 , n1 ), . . . , (Ik , nK )}, where (Ii , ni ) ∈
I ×V.
I
We shall write n →
− m to indicate that (I, m) ∈ succ(n). For each inner node n, the
following must hold:
– the successors are disjoint: for (I, m), (I 0 , m0 ) ∈ succ(n) either (I, m) = (I 0 , m0 )
or I ∩ I 0 = ∅,
S I
– the successor set is an R-cover: {I | ∃m.n →
− m} = R,
Operation on CDDs 93
I
– the CDD is ordered: for all m, whenever n →
− m then type(m) v type(n)
Note that we do not require a special root node. Instead each node can be
chosen as the root node, and the sub-DAG underneath this node is interpreted as
describing a (possibly non-convex) set of clock valuations. This allows for sharing not
only within a representation of one set of valuations, but between all representations.
Figure 3 gives some examples of CDDs. The following definition makes precise how
to interpret such a DAG:
Definition 3. Given a CDD (V, type, succ), each node n ∈ V is assigned a semantics
[[n]] ⊆ V, recursively defined by
– [[False]] := ∅, [[True]] := V,
I
– [[n]] := {v ∈ V | ∃I, m : n →
− m ∧ I(type(n))(v) ∧ v ∈ [[m]]} for n being an inner
node.
For BDDs and IDDs, testing for equality can be achieved easily due to their
canonicity: the test is reduced to a pure syntactical comparison. However, in the
case of CDDs canonicity is not achieved in the same straightforward manner.
To see this, we give an example of two reduced CDDs in Figure 4(a) describing
the same set. The two CDDs are however not isomorphic. The problem with CDDs
– in contrast to IDDs – is that the different types of constraints in the nodes are not
independent, but influence each other. In the above example obviously 1 ≤ X ≤ 3
and X = Y already imply 1 ≤ Y ≤ 3. The constraint on Y in the CDD on the right
hand side is simply too loose. Therefore a step towards an improved normal form is
to require that on all paths, the constraints should be as tight as possible. We turn
back to this issue in the final section.
4 Operation on CDDs
Simple Operations Three important operations on CDDs, namely union, inter-
section and complement, can be defined analogously to IDDs. All use a function
makenode which for a given type t and a successor set S = {(I 1 , n1 ), . . . , (Ik , nK )}
will either return the unique node in the given CDD C = (V, type, succ) having
these attributes or, in case no such exists, add a new node to the CDD with the
94 Paper C: Efficient Timed Reachability Analysis using Clock Dif. . .
4
2
3
1
2
1
1 2 3 4 5 6
X
1 2 3 4 5 X X
[1,2] [3,4]
X X ]2,3[
[1,3] [1,3] Y Y Y
Y Y [1,3] [1,4] [2,4]
[1,3] [1,4]
X −Y X −Y Y −X Y −X Y −X
[0,0] [0,0] [-2,2] [-2,1[
]-1,2]
(a) (b)
Fig. 4: (a) Two reduced CDDs for the same zone, (b) A tightened CDD.
union(n1 , n2 ):
if n1 = True or n2 = True then return True
if n1 = False then return n2
if n2 = False then return n1
if type(n1 ) = type(n2 ) then
return makenode type(n1 ),
I I
{(I1 ∩ I2 ,union(n01 , n02 )) | n1 −→
1
n01 , n2 −→
2
n02 , I1 ∩ I2 6= ∅}
if type(n1 ) v type(n2 ) then
I1
return makenode type(n1 ), {(I1 , union(n01 , n2 )) | n1 −→ n01 }
if type(n2 ) v type(n1 ) then
I2
return makenode type(n2 ), {(I2 , union(n1 , n02 )) | n2 −→ n02 }
algorithm will need to combine and compare DBMs obtained from exploration of the
timed automaton with CDDs used as a compact representation of the Passed-list.
For the following we assume that a constraint system D holds at most one simple
constraint for each pair of clocks X i , Xj (which is obviously true for DBMs and the
minimal form). Let D(i, j) be the set of all simple constraints of type (i, j), i.e.,
those for Xi − Xj and Xj − Xi . The constraint system D(i, j) gives an upper and/or
a lower bound for Xi − Xj . If not present, choose −∞ as lower and +∞ as upper
bound. Denote the interval defined thus by I D(i,j) .
Further, given an interval I ∈ I, let lo(I) := {r ∈ R | ∀r 0 ∈ I.r < r 0 } be
the set of lower bounds and hi(I) := {r ∈ R | ∀r 0 ∈ I.r > r 0 } the set of upper
bounds. Note that always lo(I), hi(I) ∈ I ∅ . Using this notation, a simple algorithm
for constructing a CDD from a constraint system can be given as in Fig. 7. Using
this, we can easily union zones to a CDD as required in the modified reachability
algorithm of Uppaal (cf. footnote on page 88). Note that for this asymmetric
union it is advisible to use the minimal form representation for the zone, as this
will lead to a smaller CDD, and subsequently to a faster and less space-consuming
union-operation.
makeCDD(D)
n := True
for t ∈ T \ {(0, 0)} do // use ordering v
I := ID(t)
if I 6= R then
if lo(I) = ∅ then
n := makenode(t, {(I, n), (hi(I), False)})
elseif hi(I) = ∅ then
n := makenode(t, {(I, n), (lo(I), False)})
else
n := makenode(t, {(I, n), (hi(I), False), (lo(I), False)})
endif
endif
endfor
return n
subset(D, n)
if D = false or n = True then return true
elseif n = False
V then return false
else return I subset(D ∧ I(type(n)), m)
n→
−m
endif
97
98 Paper C: Efficient Timed Reachability Analysis using Clock Dif. . .
Theorem 1. Let C1 , C2 be two CDDs which are tightened and equally fine parti-
tioned. Then [[C1 ]] = [[C2 ]] iff C1 and C2 are graph-isomorphic.
A drastical way of achieving equally fine partitioned CDDs is to allow only atomic
integer-bounded intervals, i.e., intervals of the form [n, n] or (n, n+1). This approach
has been taken in [ABK+ 97, BMPY97] demonstrating canonicity. However, this
approach is extremely sensitive to the size of the constants in the analysed model.
Conclusion 99
In contrast, for models with large constants our notion of CDD allows for coarser,
and hence more space-efficient, representations.
7 Conclusion
In this paper, we have presented Clock Difference Diagrams, CDDs, a BDD-like
data-structure for effective representation and manipulation of finite unions of zones.
A version of the real-time verification tool Uppaal using CDDs to store explored
symbolic states has been implemented. Our experimental results on 8 industrial
examples found in the literature demonstrate significant space-savings (46%–99%)
with a moderate increase in run-time (in average 7%). As future work, we want to
experimentally pursue the fully symbolic state-space exploration of the last section
and [LWYP98].
Acknowledgement
The second author of this paper was introduced to the idea of developing a BDD-
like structure with nodes labeled with bounds on clock-differences by Henrik Reif
Andersen.
PAPER D
MINIMUM-COST REACHABILITY FOR
PRICED TIMED AUTOMATA∗
Thomas Hune
BRICS, Århus University, Denmark
Paul Pettersson‡
Department of Computer Systems, Information Technology,
Uppsala University, Sweden
∗
This work is partially supported by the European Community Esprit-LTR Project 26270 VHS
(Verification of Hybrid systems).
†
Research supported by Netherlands Organization for Scientific Research (NWO) under contract
SION 612-14-004.
‡
Research partly sponsored by the AIT-WOODDES Project No IST-1999-10069.
Abstract
This paper introduces the model of linearly priced timed automata as an extension of timed
automata, with prices on both transitions and locations. For this model we consider the
minimum-cost reachability problem: i.e. given a linearly priced timed automaton and a
target state, determine the minimum cost of executions from the initial state to the target
state. This problem generalizes the minimum-time reachability problem for ordinary timed
automata. We prove decidability of this problem by offering an algorithmic solution, which is
based on a combination of branch-and-bound techniques and a new notion of priced regions.
The latter allows symbolic representation and manipulation of reachable states together with
the cost of reaching them.
Keywords: Timed Automata, Verification, Data Structures, Algorithms, Optimization.
Introduction 105
1 Introduction
Recently, real-time verification tools such as Uppaal [LPY97a], Kronos [BDM+ 98]
and HyTech [HHWT97a], have been applied to synthesize feasible solutions to
static job-shop scheduling problems [Feh99b, HLP00, NY99]. The basic common
idea of these works is to reformulate the static scheduling problem as a reachability
problem that can be solved by the verification tools. In this approach, the timed
automata [AD94] based modeling languages of the verification tools serve as the
basic input language in which the scheduling problem is described. These modeling
languages have proven particularly well-suited in this respect, as they allow for
easy and flexible modeling of systems, consisting of several parallel components that
interact in a time-critical manner and constrain each other’s behavior in a multitude
of ways.
In this paper we introduce the model of linearly priced timed automata and
offer an algorithmic solution to the problem of determining the minimum cost of
reaching a designated set of target states. This result generalizes previous results
on computation of minimum-time reachability and accumulated delays in timed
automata, and should be viewed as laying a theoretical foundation for algorithmic
treatments of more general optimization problems as encountered in static scheduling
problems.
y := 0 x≥2
A x := 0 B z := 0 C y≤1 D z≥3 E
y := 0
The above trace may be viewed as a feasible solution to the original static schedul-
ing problem. However, given an optimization problem, one is often not satisfied with
an arbitrary feasible solution but may insist on solutions which are optimal in some
sense. When modeling a problem like this one using timed automata, an obvious
notion of optimality is that of minimum accumulated time. For the timed automa-
ton of Fig. 1 the trace of (1) has an accumulated time-duration of 4. This, however,
is not optimal as witnessed by the following alternative trace, which by exploiting
the looping transition on C reaches E within a total of 3 time-units 2 :
τ τ (2) τ τ (1) τ
(A, 0, 0, 0) −
→−→−−→ (C, 2, 2, 2) −
→ (C, 2, 0, 2) −
→−−→ (D, 3, 1, 3) −
→ (E, 3, 1, 3) (2)
y := 0 x≥2
A x := 0 B z := 0 C y≤1 D z≥3 E
1 0 1 0 1 0 β 0 1
y := 0
α
(α, β) = (2, 2) the cost of both traces is 6; thus in this case it is immaterial whether
the looping transition is taken or not. In fact, the optimal cost of reaching E will in
general be the minimum of 2 + 2β and 3 + α, and the optimal trace will include the
looping transition on C depending on the particular values of α and β.
In this paper we deal with the problem of determining the minimum cost of
reaching a given location for linearly priced timed automata. In particular, we offer
an algorithmic solution to this problem. 3 In contrast to minimum-time reachabil-
ity for timed automata, the minimum-cost reachability problem for linearly priced
timed automata requires the development of new data structures for symbolic rep-
resentation and manipulation of sets of reachable states together with the cost of
reaching them. In this paper we put forward one such data structure, namely a
priced extension of the fundamental notion of clock regions for timed automata
[AD94].
The remainder of the paper is structured as follows: Section 2 formally introduces
the model of linearly priced timed automata together with its semantics. Section 3
develops the notion of priced clock regions, together with a number of useful opera-
tions on these. The priced clock regions are then used in Section 4 to give a symbolic
semantics capturing (sufficiently) precisely the cost of executions and used as a basis
for an algorithmic solution to the minimum-cost problem. Finally, in Section 5 we
give some concluding remarks.
number, and ./ ∈ {<, ≤, =, ≥, >}. Elements of B(C) are called clock constraints over
C. Note that for each timed automaton that has constraints of the form x − y ./ c,
there exists a strongly bisimilar timed automaton with only constraints of the form
x ./ c. Therefore, the results in this paper are applicable to automata having
constraints of the type x − y ./ c as well.
Formally, clock values are represented as functions called clock assignments from
C to the non-negative reals R≥0 . We denote by RC the set of clock assignments for C
ranged over by u, u0 etc. We define the operation u0 = [r 7→ 0]u to be the assignment
such that u0 (x) = 0 if x ∈ r and u(x) otherwise, and the operation u 0 = u + d to
be the assignment such that u0 (x) = u(x) + d. Also, a clock valuation u satisfies a
clock constraint g, u ∈ g, if u(x) ./ n for any atomic constraint x ./ n in g. Notice
that the set of clock valuations satisfying a guard is always a convex set.
The semantics of a LPTA A is defined as a transition system with the state-space
L × RC , with initial state (l0 , u0 ) (where u0 assigns zero to all clocks in C), and with
the following transition relation:
(d),p
– (l, u) −−−→ (l, u + d) if u + d ∈ I(l), and p = P (l) ∗ d.
a,p g,a,r
– (l, u) −−→ (l0 , u0 ) if there exists g, r such that l −−−→ l0 , u ∈ g, u0 = [r 7→ 0]u,
u0 ∈ I(l0 ) and p = P ((l, g, a, r, l 0 )).
Note that the transitions are decorated with two labels: a delay-quantity or an
action, together with the cost of the particular transition. For determining the
cost, the price of a location gives the cost rate of staying in that location (per time
unit), and the price of a transition gives the cost of taking that transition. In the
remainder, states and executions of the transition system for LPTA A will be referred
to as states and executions of A.
a1 ,p1 an ,pn
Definition 2 (Cost). Let α = (l0 , u0 ) −−−→ (l1 , u1 ) . . . −−−→ (ln , un ) be a finite
execution of LPTA A. The cost of α, Cost(α), is the sum Σ i∈{1,...,n} pi .
For a given state (l, u), the minimal cost of reaching (l, u), mincost((l, u)), is the
infimum of the costs of finite executions ending in (l, u). Similarly, the minimal cost
of reaching a location l is the infimum of the costs of finite executions ending in a
state of the form (l, u).
x>1
A x <= 2 B x := 0 C
3 5 1 1 4
Example 1. Consider the LPTA of Fig. 3. The LPTA has a single clock x, and the
locations and transitions are decorated with guards and prices. A sample execution
of this LPTA is for instance:
(1.5),4.5 τ,5 τ,1
(A, 0) −−−−−→ (A, 1.5) −−→ (B, 1.5) −−→ (C, 1.5)
The cost of this execution is 10.5. In fact, there are executions with cost arbitrarily
close to the value 7, obtainable by avoiding delaying in location A, and delaying just
long enough in location B. Due to the infimum definition of mincost, it follows that
mincost(C) = 7. However, note that because of the strict comparison in the guard of
the second transition, no execution actually achieves this cost.
Definition 3 (Priced Regions). Given set S, let Seq(S) be the set of finite se-
quences of elements of S. A priced clock region over a finite set of clocks C
2. x ∈ r0 iff frac(u(x)) = 0,
110 Paper D: Minimum-Cost Reachability for Priced Timed Automata
For a priced region R = (h, [r0 , . . . , rk ], [c0 , . . . , ck ]) the first two components of
the triple constitute an ordinary (unpriced) region R̂ = (h, [r0 , . . . , rk ]). The naturals
c0 , . . . , ck are the costs, which are associated with the vertices of the closure of the
(unpriced) region, as follows. We start in the left-most lower vertex of the exterior
of the region and associate cost c0 with it, then move one time unit in the direction
of set rk to the next vertex of the exterior, and associate cost c 1 with that vertex,
then move one unit in the direction of r k−1 , etc. In this way, the costs c0 , . . . , ck ,
span a linear cost plane on the k-dimensional unpriced region.
The closure of the unpriced region R is the convex hull of the vertices. Each clock
valuation u ∈ R is a (unique) convex combination 4 of the vertices. Therefore the
cost of u can be defined as the same convex combination of the cost in the vertices.
This gives the following definition:
k−1
X
Cost(u, R) = c0 + frac(u(xk−i )) ∗ (ci+1 − ci )
i=0
In the symbolic state-space, constructed with the priced regions, the costs will
be computed such that for each concrete state in a symbolic state, the cost associ-
ated with it is the minimal cost for reaching that state by the symbolic path that
4
ai = 1, and ai ≥ 0.
P P
A linear expression ai vi where
Priced Clock Regions 111
was followed. In this way, we always have the minimal cost of all concrete paths
represented by that symbolic path, but there may be more symbolic paths leading
to a symbolic state in which the costs are different. Note that the cost of a clock
valuation in the region is computed by adding fractions of costs for equivalence sets
of clocks, rather than for each clock.
To prepare for the symbolic semantics, we define in the following a number
of operations on priced regions. These operations are also the ones used in the
algorithm for finding the optimal cost of reaching a location.
The delay operation computes the time successor, which works exactly as in
the classical (unpriced) regions. The changing dimensions of the regions cause the
addition or deletion of vertices and thus of the associated cost. The price argument
will be instantiated to the price of the location in which time is passing; this is
needed only when a vertex is added. The two cases in the operation are illustrated
in Fig. 5 to the left (5.1) and (5.2).
Definition 5 (Delay). Given a priced region R = (h, [r 0 , . . . , rk ], [c0 , . . . , ck ]) and
a price p, the function delay is defined as follows:
1. If r0 is not empty, then
delay(R, p) = (h, [∅, r0 , . . . , rk ], [c0 , . . . , ck , c0 + p])
2. If r0 is empty, then
delay(R, p) = (h0 , [rk , r1 , . . . , rk−1 ], [c1 , . . . , ck ])
where h0 = h incremented for all clocks in rk
When resetting a clock, a priced region may lose a dimension. If so, the two costs,
associated with the vertices that are collapsed, are compared and the minimum is
taken for the new vertex. Two of the three cases in the operation are illustrated in
Fig. 5 to the right (6.2) and (6.3).
112 Paper D: Minimum-Cost Reachability for Priced Timed Automata
The reset operation on a set of clocks: reset(C ∪ {x}, R) = reset(C, reset(x, R)), and
reset(∅, R) = R.
The price argument in the increment operation will be instantiated to the price
of the particular transition taken; all costs are updated accordingly.
Definition 7 (Increment). Given a priced region R = (h, [r 0 , . . . , rk ], [c0 , . . . , ck ])
and a price p, the increment of R with respect to p is the priced region R ⊕ p =
(h, [r0 , . . . , rk ], [c00 , . . . , c0k ]) where c0i = ci + p.
If in region R, no clock has fractional part 0, then time may pass in R, that is,
each clock valuation in R has a time successor and predecessor in R. When changing
location with R, we must choose for each clock valuation u in R between delaying
in the previous location until u is reached, followed by the change of location, or
changing location immediately and delaying to u in the new location. This depends
on the price of either location. For this the following operation self is useful.
Definition 8 (Self ). Given a priced region R = (h, [r 0 , . . . , rk ], [c0 , . . . , ck ]) and a
price p, the function self is defined as follows:
1. If r0 is not empty, then self(R, p) = R.
2. If r0 is empty, then
Definition 9 (Comparison). Two priced regions may be compared only if their un-
priced versions are equal: (h, [r0 , . . . , rk ], [c0 , . . . , ck ]) ≤ (h0 , [r00 , . . . , rk0 0 ], [c00 , . . . , c0k0 ])
iff h = h0 , k = k 0 , and for 0 ≤ i ≤ k: ri = ri0 and ci ≤ c0i .
Symbolic Semantics and Algorithm 113
5. self(R ⊕ q, p) = self(R, p) ⊕ q,
6. delay(R ⊕ q, p) = delay(R, p) ⊕ q,
In the remainder, states and executions of the symbolic transition system for
LPTA A will be referred to as the symbolic states and executions of A.
Lemma 1. Given LPTA A, for each execution α of A that ends in state (l, u), there
is a symbolic execution β of A, that ends in symbolic state (l, R), such that u ∈ R,
and Cost(u, R) ≤ Cost(α).
Proof: For this proof we first observe that, given g ∈ B(C), if u ∈ R and u ∈ g,
then R ∈ g.
We prove this by induction on the length of α. Suppose α ends in state (l, u).
The base step concerns α with length 0, consisting of only the initial state (l 0 , u0 )
where u0 is the valuation assigning zero to all clocks. Clearly, Cost(α) = 0. Since
the initial state of the symbolic semantics is the state (l 0 , (h0 , [C], [0])), in which h0
assigns zero to the integer part of all clocks, and the fractional part of all clocks
is zero, we can take β to be (l0 , (h0 , [C], [0])). Clearly, there is only one valuation
u ∈ (h0 , [C], [0]), namely the valuation u that assigns zero to all clocks, which is
exactly u0 , and by definition, Cost(u0 , (h0 , [C], [0])) = 0 and trivially 0 ≤ 0.
For the induction step, assume the following. We have an execution α 0 in the
concrete semantics, ending in (l 0 , u0 ), a corresponding execution β 0 in the symbolic
semantics, ending in (l 0 , R0 ), such that u0 ∈ R0 , and Cost(u0 , R0 ) ≤ Cost(α0 ).
a,p a,g,r
Suppose (l 0 , u0 ) −−→ (l, u). Then there is a transition l 0 −−−→ l in the automaton
A such that u ∈ g, u = [r 7→ 0]u0 , u ∈ I(l) and p = P ((l 0 , a, g, r, l)). Now u0 ∈ g
implies that R0 ∈ g. Let R = (R0 , r) ⊕ p. It is easy to show that u = [r 7→ 0]u 0 ∈ R
and as u ∈ R we then have that R ∈ I(l). So (l 0 , R0 ) → (l, R) and
(d),p∗d
Suppose (l 0 , u0 ) −−−−−→ (l, u), where p = P (l), i.e. l = l 0 , u = u0 +d, and u ∈ I(l).
Now there exist sequences Ro , R1 , . . . , Rm and d1 , . . . , dm of price regions and delays
suchPthat d = d1 +· · ·+dm , R0 = R0 and for i ∈ {1, . . . , m}, Ri = delay(Ri−1 , p) with
u0 + ik=1 dk ∈ Ri . This defines the sequence of regions wisited without considering
cost. To obtain the priced regions with the optimal cost we apply the self operation.
Let R00 = self(R0 , p) and for i ∈ {1, . . . , m} let Ri0 = delay(Ri−1 0 , p) (in fact, for
i ∈ {1, . . . , m}, Ri0 = self(Ri0 , p) due to Proposition 1.4 and Ri0 ≤ Ri ). Clearly we
have the following symbolic extension of β 0 :
β 0 → (l0 , R00 ) → · · · → (l 0 , Rm
0
)
Now by Proposition 2.2 (the condition of Proposition 2.2 is satisfied for all Ri0 (i ≥ 0)
Symbolic Semantics and Algorithm 115
Cost(u0 + d, Rm
0
) = Cost(u0 , R00 ) + d ∗ p
≤ Cost(u0 , R0 ) + d ∗ p
≤IH Cost(α0 ) + d ∗ p
= Cost(α)
Proof: The proof is by induction on the length of the symbolic trace β reaching
(l, R). In the base case, the length of β is 0 and (l, R) = (l 0 , R0 ), where R0 is the
initial price region (h0 , [C], [0]) in which h0 associates 0 with all clocks. Clearly, there
is only one valuation u ∈ R0 , namely the valuation which assigns 0 to all clocks.
Obviously, mincost((l0 , u0 )) = 0 ≤ Cost(u0 , R0 ) = 0.
For the induction step, assume that (l, R) is reached by a trace β with length greater
than 0. In particular, let (l 0 , R0 ) be the immediate predecessor of (l, R) in β. Let
u ∈ R. We consider three cases depending on the type of symbolic transition from
(l0 , R0 ) to (l, R).
Case 1: Suppose (l 0 , R0 ) → (l, R) is a symbolic delay transition. That is, l = l 0 ,
R = delay(R0 , p) with p = P (l) and R ∈ I(l). We consider two sub-cases depending
on whether R0 is self-delayable or not5 .
Assume that R0 is not self-delayable, i.e. R 0 = (h0 , [r00 , . . . , rk0 ], [c00 , . . . , c0k ]) with
r00 6= ∅. Then R = (h0 , [∅, r00 , . . . , rk0 ], [c00 , . . . , c0k , c00 + p]). Let x ∈ r00 and let u0 =
(d),q
u − d where d = frac(u(x)). Then u0 ∈ R0 and (l0 , u0 ) −−−→ (l, u) where q =
d ∗ p. Thus mincost((l, u)) ≤ mincost((l 0 , u0 )) + d ∗ p. By induction hypothesis,
mincost((l 0 , u0 )) ≤ Cost(u0 , R0 ), and as Cost(u, R) = Cost(u0 , R) + d ∗ p, we obtain, as
desired, mincost((l, u)) ≤ Cost(u, R).
Assume that R0 is self-delayable. That is, R 0 = (h0 , [r00 , r10 , . . . , rk0 ], [c00 , . . . , c0k ]) with
r00 = ∅ and R = (h00 , [rk0 , r10 , . . . , rk−1
0 ], [c01 , . . . , c0k ]). Now, let x ∈ r10 . Then for any
(d),p∗d
d < frac(u(x)) we let ud = u − d. Clearly, ud ∈ R0 and (l, ud ) −−−−−→ (l, u). Now,
Now let R00 = (h, [r1 , . . . , rk ], [c0 , . . . , ck−1 ]). Then R = delay(R00 , p) and R0 =
delay(R00 , ck − c0 ). Now Cost(ud , R0 ) = Cost(uu(x) , R00 ) + (ck − c0 ) ∗ (d − u(x))
which converges to Cost(uu(x) , R00 ) when d → u(x). Thus Cost(ud , R0 ) + p ∗ d →
Cost(uu(x) , R00 )+p∗d = Cost(u, R) for d → u(x). Hence, as desired, mincost((l, u)) ≤
Cost(u, R).
Combining the two lemmas we obtain as a main theorem that the symbolic
semantics captures (sufficiently) accurately the cost of reaching states and locations:
Theorem 1. Let l be a location of a LPTA A. Then
Example 2. We now return to the linearly priced timed automaton in Fig. 2 where
the value of both α and β is two, and look at its symbolic state-space. The shaded
area in Fig. 6(a) including the lines in and around the shaded area represents some
of the reachable priced regions in location B after time has passed (a number of delay
actions have been taken). Only priced regions with integer values up to 3 are shown.
The numbers are the cost of the vertices. The shaded area in Fig. 6(b) represents
in a similar way some of the reachable priced regions in location C after time has
passed. For a more elaborate explanation of the reachable state-space we refer to the
appendix.
The introduction of priced regions provides a first step towards an algorithmic
solution for the minimum-cost reachability problem. However, in the present form
Symbolic Semantics and Algorithm 117
(a) (b)
both the integral part as well as the cost of vertices of priced regions may grow
beyond any given bound during symbolic exploration. In the unpriced case, the
growth of integral parts is often dealt with by suitable abstractions of (unpriced)
regions, taking the maximal constant of the given timed automaton into account.
Here we have chosen a very similar approach exploiting the fact, that any LPTA A
may be transformed into an equivalent “bounded” LPTA Ã in the sense that A and
à reaches the same locations with the exact same cost.
For the base step, the length of such an execution is 0. Trivially, the cost of such
an execution is 0, and if (l1 , u1 ) and (l2 , u2 ) are initial states, clearly ((l1 , u1 ), (l2 , u2 )) ∈
R.
For the transition steps, we first observe that for each clock x ∈ C, u 1 (x) ∼ c
iff u2 (x) ∼ c with ∼∈ {<, ≤, >, ≥} and c ≤ max A (x) (∗). Assume ((l1 , u1 ), (l2 , u2 ))
∈ R, and (l1 , u1 ) and (l2 , u2 ) can both be reached with cost c. We make the following
case distinction.
(d),p
Case 1: Suppose (l1 , u1 ) −−−→A (l1 , u1 +d). In order to let d time pass in (l2 , u2 ),
we have to alternatingly perform the added τ transition to reset those clocks that
have reached the maxA (x) + 2 bound as many times as needed, and then let a bit
of the time pass. Let d1 . . . dm be a sequence of delays, such that d = d 1 + . . . + dm ,
and for x ∈ C and i ∈ {1, . . . , m}, if maxA (x) + 2 − (u1 (x) + d1 + . . . + di−1 ) ≥ 0 then
di ≤ maxA (x)+2−(u1 (x)+d1 +. . . +di−1 ), else di ≤ 1−frac(u1 (x)+d1 +. . . +di−1 ).
It is easy to see that for some u02 ,
τ,0 (d1 ),p1 τ,0 (dm ),pm
(l2 , u2 )(−−→)∗ −−−−−→ . . . (−−→)∗ −−−−−−→ (l2 , u02 )
a,p
Case 4: Suppose (l2 , u2 ) −−→Ã (l20 , u02 ). Let (l, g, a, r, l 0 ) be a corresponding edge.
If (l, g, a, r, l 0 ) ∈ EA , then the argument goes exactly like in the previous case.
If (l, g, a, r, l 0 ) 6∈ EA , then a = τ , p = 0, l20 = l0 = l = l2 , and x ∈ r implies
u02 (x) = maxA (x) + 1 and u2 (x) = maxA (x) + 2. Since the cost of reaching (l 20 , u02 ) is
c + 0 = c, it suffices to show ((l1 , u1 ), (l2 , u02 )) ∈ R. For x 6∈ r, this follows trivially.
For x ∈ r, u2 (x) = maxA (x) + 2, so u1 (x) > maxA (x) and by u02 (x) = maxA (x) + 1
we have u02 (x) > maxA (x).
Now, we suggest in Fig. 7 a branch-and-bound algorithm for determining the
minimum-cost of reaching a given target location l g from the initial state of a LPTA.
All encountered states are stored in the two data structures Passed and Waiting,
divided into explored and unexplored states, respectively. The global variable Cost
stores the lowest cost for reaching the target location found so far. In each iteration,
a state is taken from Waiting. If it matches the target location l g and has a lower
cost than the previously lowest cost Cost, then Cost is updated. Then, only if the
state has not been previously explored with a lower cost do we add it to Passed
and add the successors to Waiting. This bounding of the search in line 8 of Fig. 7
may be optimized even further by adding the constraint mincost(R) < Cost; i.e.,
we only need to continue exploration if the minimum cost of the current region is
below the optimal cost computed so far. Due to Theorem 1, the algorithm of Fig. 7
does indeed yield the correct minimum-cost value.
Cost := ∞
Passed := ∅
Waiting := {(l0 , R0 )}
while Waiting 6= ∅ do
select (l, R) from Waiting
if l = lg and mincost(R) < Cost then
Cost := mincost(R)
if for all (l, R0 ) in Passed: R0 6≤ R then
add (l, R) to Passed
for all (l 0 , R0 ) such that (l, R) → (l 0 , R0 ): add (l0 , R0 ) to Waiting
return Cost
Fig. 7: Branch-and-bound state-space exploration algorithm.
Theorem 3. When the algorithm in Fig. 7 terminates, the value of Cost equals
mincost(lg ).
Proof: First, notice that if (l1 , R1 ) can reach (l2 , R2 ), then a state (l1 , R10 ), where
R10 ≤ R1 , can reach a state (l2 , R20 ), such that R20 ≤ R2 . We prove that Cost equals
min{mincost(R) | (lg , R) is reachable}. Assume that this does not hold. Then there
exists a reachable state (lg , R) where mincost(R) < Cost. Thus the algorithm must
at some point have discarded a state (l 0 , R0 ) on the path to (lg , R). This can only
happen in line 8, but then there must exist a state (l 0 , R00 ) ∈ Passed, where R00 ≤ R0 ,
encountered in a prior iteration of the loop. Then, there must be a state (l g , R000 )
120 Paper D: Minimum-Cost Reachability for Priced Timed Automata
reachable from (l 0 , R00 ), and Cost ≤ mincost(R 000 ) ≤ mincost(R), contradicting the
assumption. The theorem now follows from Theorem 1.
For bounded LPTA, application of Higman’s Lemma [Hig52] ensures termination.
In short, Higman’s Lemma says that under certain conditions the embedding order
on strings is a well quasi-order.
Proof: Even if A is bounded (and hence yields only finitely many unpriced regions),
there are still infinitely many priced regions, due to the unboundedness of cost of
vertices. However, since all costs are positive application of Higman’s lemma ensures
that one cannot have an infinite sequence h(c i1 , . . . , cim ) : 0 ≤ i < ∞i of cost-vectors
(for any fixed length m) without cjl ≤ ckl for all l = 1, . . . , m for some j < k.
Consequently, due to the finiteness of the sets of locations and unpriced regions, it
follows that one cannot have an infinite sequence h(l i , Ri ) : 0 ≤ i < ∞i of symbolic
states without lj = lk and Rj ≤ Rk for some j < k, thus ensuring termination of
the algorithm.
Finally, combining Theorem 3 and 4, it follows, due to Theorem 2, that the
minimum-cost reachability problem is decidable.
5 Conclusion
In this paper, we have successfully extended the work on regions and their operations
to a setting of timed automata with linear prices on both transitions and locations.
We have given the principle basis of a branch-and-bound algorithm for the minimum-
cost reachability problem, which is based on an accurate symbolic semantics of
timed automata with linear prices, and thus showing the minimum-cost reachability
problem to be decidable.
The algorithm is guaranteed to be rather inefficient and highly sensitive to the
size of constants used in the guards of the automata — a characteristic inherited
from the time regions used in the basic data-structure of the algorithm. An obvious
continuation of this work is therefore to investigate if other more (in practice) efficient
data structures can be found. Possible candidates include data structures used in
reachability algorithms of timed automata, such as DBMs, extended with costs on
the vertices of the represented zones (i.e. convex sets of clock assignments). In
contrast to the priced extension of regions, operations on such a notion of priced
zones6 can not be obtained as direct extensions of the corresponding operations on
zones with suitable manipulation of cost of vertices.
The need for infimum in the definition of minimum cost executions arises from
linearly priced timed automata with strict bounds in the guards, such as the one
shown in Fig. 3 and discussed in Example 1. Due to the use of infimum, a linearly
6
In particular, the reset-operation and the delay-operation.
Conclusion 121
priced timed automaton is not always able to realize an execution with the exact
minimum cost of the automata, but will be able to realize one with a cost (infinites-
imally) close to the minimum value. If all guards include only non-strict bounds,
the minimum cost trace can always be realized by the automaton. This fact can
be shown by defining the minimum-cost problem for executions covered by a given
symbolic trace as a linear programming problem.
In this paper we have presented an algorithm for computing minimum-costs for
reachability of linearly priced timed automata, where prices are given as constants
(natural numbers). However, a slight modification of our algorithm provides an ex-
tension to a parameterized setting, in which (some) prices may be parameters. In
this setting, costs within priced regions will be finite collections, C, of linear expres-
sions over the given parameters rather than simple natural numbers. Intuitively, C
denotes for any given instantiation of the parameters the minimum of the concrete
values denoted by the linear expressions within C. Now, two cost-expressions may
be compared simply by comparing the sizes of corresponding parameters, and two
collections C and D (both denoting minimums) are related if for any element of D
there is a smaller element in C. In the modified version of algorithm Fig. 7, Cost will
similarly be a collection of (linear) cost-expressions with which the goal-location has
been reached (so far). From recent results in [AN00] (generalizing Higman’s lemma)
it follows that the ordering on (parameterized) symbolic states is again a well-quasi
ordering, hence guaranteeing termination of our algorithm. Also, we are currently
working on extending the algorithmic solution offered here to synthesis of minimum-
cost controllers in the sense of [AM99]. In this extension, a priced region will be
given by a conventional unpriced region together with a min-max expression over
cost vectors for the vertices of the region. Also for this extension it follows from
recent results in [AN00] (generalizing Higman’s lemma) that the orderings on sym-
bolic states are again well-quasi orderings, hence guaranteeing termination of our
algorithms.
Acknowledgements
The authors would like to thank Lone Juul Hansen for her great, creative effort
in making the figures of this paper. Also, the authors would like to thank Parosh
Abdulla for sharing with us some of his expertise and knowledge on the world beyond
well-quasi orderings.
122 Paper D: Minimum-Cost Reachability for Priced Timed Automata
(a) (b)
(c) (d)
(e) (f)
(g) (h)
and the line between these two points. The cost of reaching these points is five, so
it is also possible to reach location E with this cost.
After taking the loop transition in location C once we also had the choice of
taking it again. Doing this would yield the same priced regions as displayed in
Fig. 8(g) but now with two added to the cost. Therefore the new priced regions
would be more costly than the priced regions already found and hence not explored
by our algorithm.
PAPER E
EFFICIENT GUIDING TOWARDS
COST-OPTIMALITY IN Uppaal ∗
Gerd Behrmann
BRICS, Aalborg University, Denmark
Thomas Hune
BRICS, Århus University, Denmark
Kim Larsen‡
Department of Computer Science
University of Twente, The Netherlands
Paul Pettersson§
Department of Computer Systems, Information Technology,
Uppsala University, Sweden
∗
This work is partially supported by the European Community Esprit-LTR Project 26270 VHS
(Verification of Hybrid systems).
†
Research supported by Netherlands Organization for Scientific Research (NWO) under contract
SION 612-14-004.
‡
On sabbatical from Basic Research in Computer Science, Aalborg University.
§
Research partly sponsored by the AIT-WOODDES Project No IST-1999-10069.
Abstract
In this paper we present an algorithm for efficiently computing the minimum cost of reaching
a goal state in the model of Uniformly Priced Timed Automata (UPTA). This model can
be seen as a submodel of the recently suggested model of linearly priced timed automata,
which extends timed automata with prices on both locations and transitions. The presented
algorithm is based on a symbolic semantics of UTPA, and an efficient representation and
operations based on difference bound matrices. In analogy with Dijkstra’s shortest path
algorithm, we show that the search order of the algorithm can be chosen such that the
number of symbolic states explored by the algorithm is optimal, in the sense that the number
of explored states can not be reduced by any other search order based on the cost of states.
We also present a number of techniques inspired by branch-and-bound algorithms which can
be used for limiting the search space and for quickly finding near-optimal solutions.
The algorithm has been implemented in the verification tool Uppaal. When applied on
a number of experiments the presented techniques reduced the explored state-space with up
to 90%.
Introduction 129
1 Introduction
Recently, formal verification tools for real-time and hybrid systems, such as Uppaal
[LPY97a], Kronos [BDM+ 98] and HyTech [HHWT97a], have been applied to
solve realistic scheduling problems [Feh99b, HLP00, NY99]. The basic common idea
of these works is to reformulate a scheduling problem to a reachability problem
that can be solved by verification tools. In this approach, the automata based
modeling languages of the verification tools serve as the input language in which
the scheduling problem is described. These modeling languages have been found
to be very well-suited in this respect, as they allow for easy and flexible modeling
of systems consisting of several parallel components that interact in a time-critical
manner and constrain the behavior of each other in a multitude of ways.
A main difference between verification algorithms and dedicated scheduling al-
gorithms is in the way they search a state-space to find solutions. Scheduling al-
gorithms are often designed to find optimal (or near optimal) solutions and are
therefore based on techniques such as branch-and-bound to identify and prune parts
of the states-space that are guaranteed to not contain any optimal solutions. In
contrast, verification algorithms normally do not support any notion of optimality
and are designed to explore the entire state-space as efficiently as possible. The
verification algorithms that do support notions of optimality are restricted to simple
trace properties such as shortest trace [LPY95], or shortest accumulated delay in
trace [NTY00].
In this paper we aim at reducing the gap between scheduling and verification
algorithms by adopting a number of techniques used in scheduling algorithms in the
verification tool Uppaal. In doing so, we study the problem of efficiently computing
the minimal cost of reaching a goal state in the model of Uniformly Priced Timed
Automata (UPTA). This model can be seen as a restricted version of the recently
suggested model of Linearly Priced Timed Automata (LPTA) [BFH+ 01a], which
extends the model of timed automata with prices on all transitions and locations.
In these models, the cost of taking an action transition is the price associated with
the transition, and the cost of delaying d time units in a location is d · p, where p is
the price associated with the location. The cost of a trace is simply the accumulated
sum of costs of its delay and action transitions. The objective is to determine the
minimum cost of traces ending in a goal state.
The infinite state-spaces of timed automata models necessitates the use of sym-
bolic techniques in order to simultaneously handle sets of states (so-called symbolic
states). For pure reachability analysis, tools like Uppaal and Kronos use symbolic
states of the form (l, Z), where l is a location of the timed automaton and Z ⊆ R C1
is a convex set of clock valuations called a zone. For the computation of minimum
costs of reaching goal states, we suggest the use of symbolic cost states of the form
(l, C), where C : RC → (R≥0 ∪ {∞}) is a cost function mapping clock valuations to
C denotes the set of clocks of the timed automata, and RC denotes the set of functions from C
1
to R≥0 .
130 Paper E: Efficient Guiding Towards Cost-Optimality in Uppaal
Cost := ∞
Passed := ∅
Waiting := {(l0 , C0 )}
while Waiting 6= ∅ do
select (l, C) from Waiting
if (l, C) |= ϕ and min(C) < Cost then
Cost := min(C)
if for all (l, C 0 ) in Passed: C 0 6v C then
add (l, C) to Passed
for all (m, D) such that (l, C) ; (m, D): add (m, D) to Waiting
return Cost
real valued costs or ∞. The intention is that, whenever C(u) < ∞, reachability of
the symbolic cost state (l, C) should ensure that the state (l, u) is reachable with
cost C(u).
Using the above notion of symbolic cost states, an abstract algorithm for com-
puting the minimum cost of reaching a goal state satisfying ϕ of a uniformly priced
timed automaton is shown in Fig. 1. The algorithm is similar to a standard state-
space traversal algorithm that uses two data-structures Wait and Passed to store
states waiting to be examined, and states already explored, respectively. Initially,
Passed is empty and Wait holds an initial (symbolic cost) state. In each iteration,
the algorithm proceeds by selecting a state (l, C) from Wait, checking that none of
the previously explored states (l, C 0 ) has a “smaller” cost function, written C 0 v C 2 ,
and if this is the case, adds it to Passed and its successors to Wait. In addition
the algorithm uses the global variable Cost, which is initially set to ∞ and up-
dated whenever a goal state is found that can be reached with a lower cost than the
current value of Cost. The algorithm terminates when Wait is empty, i.e. when
no further states are left to be examined. Thus, the algorithm always searches the
entire state-space of the analyzed automaton.
In [BFH+ 01a] an algorithm for computing the minimal cost of reaching desig-
nated goal states was given for the full model of LPTA. However, the algorithm is
based on a cost-extended version of regions, and is thus guaranteed to be extremely
inefficient and highly sensitive to the size of constants used in the models. As the
first contribution of this paper, we give for the subclass of UPTA an efficient zone
representation of symbolic cost states based on Difference Bound Matrices [Dil89],
and give all the necessary symbolic operators needed to implement the algorithm.
As the second contribution we show that, in analogy with Dijkstra’s shortest path al-
gorithm, if the algorithm is modified to always select from Wait the (symbolic cost)
state with the smallest minimum cost, the state-space exploration may terminate
as soon as a goal state is explored. This means that we can solve the minimum-
cost reachability problem without necessarily searching the entire state-space of the
analyzed automaton. In fact, it can even be shown that the resulting algorithm is
optimal in the sense that choosing to search a symbolic cost state with non-minimal
2
Formally C 0 v C iff ∀u. C 0 (u) ≤ C(u).
Uniformly Priced Timed Automata 131
minimum cost can never reduce the number of symbolic cost states explored.
The third contribution of this paper is a number of techniques inspired by branch-
and-bound algorithms [AC91] that have been adopted in making the algorithm even
more useful. These techniques are particularly useful for limiting the search space
and for quickly finding solutions near to the minimum cost of reaching a goal state.
To support this claim, we have implemented the algorithm in an experimental version
of the verification tool Uppaal and applied it to a wide variety of examples. Our
experimental findings indicate that in some cases as much as 90% of the state-space
searched in ordinary breadth-first order can be avoided by combining the techniques
presented in this paper. Moreover, the techniques have allowed pure reachability
analysis to be performed in cases which were previously unsuccessful.
The rest of this paper is organized as follows: In Section 2 we formally define
the model of uniformly priced timed automata and give the symbolic semantics.
In Section 3 we present the basic algorithm and the branch-and-bound inspired
techniques. The experiments are presented in Section 4. We conclude the paper in
Section 5.
where for d ∈ R≥0 , u + d maps each clock x in C to the value u(x) + d, and u[r 7→ 0]
denotes the clock valuation which maps each clock in r to the value 0 and agrees with
u over C \ r.
Example 1. An example of a LPTA can be seen in Fig. 2. The LPTA has three
locations and two clocks, x and y. The number inside the locations is the rate of the
location, and the number on the transition from the leftmost location is the cost of
3 true,0,∅,0
We extend the edge set E such that l −−−−−→ l for any location l. This allows synchronization
functions to implement internal τ actions.
Uniformly Priced Timed Automata 133
4 x<3
x<3 y>3
2 2 2
{x}
the transition. The two other transitions have no cost. The initial location is the
leftmost location.
Because of the invariants on the locations, a trace reaching the rightmost location
must first visit the middle location and then go back to the initial location. The
minimal cost of reaching the rightmost location is 14. Note that there is no trace
actually realizing the minimum cost because of the strict inequality on the transition
to the rightmost location. However, because of the infimum in the definition of
minimum cost, we will say that the minimum cost of reaching the rightmost location
is 14.
Table 2 summarizes several operations that are used by the symbolic semantics
and the algorithm in Fig. 1. In terms of the support of a cost function, the operations
134 Paper E: Efficient Guiding Towards Cost-Optimality in Uppaal
g,a,r
a
→ l0 , I(l) r(g(C)) + p iff l −−−→ l0 , and p = P ((l, g, a, r, l 0 )).
– (l, C) −
The initial state is (l0 , I(l0 )(C0 )) where sup(C0 ) = {u0 } and C0 (u0 ) = 0.
Uniformly Priced Timed Automata 135
Notice that the support of any cost function reachable by the symbolic semantics
is a zone.
Lemma 1. Given an LPTA A, for each trace α of A that ends in state (l, u), there
exists a symbolic trace β of A, that ends up in a symbolic cost state (l, C), such that
C(u) ≤ cost(α).
Proof: By induction in the length of the run α. The base case, a run of length 0,
is trivial.
For the induction step assume we have a trace α ending in a state (l, u) and a
symbolic trace ending in a symbolic state (l, C), such that C(u) ≤ cost(α). We look
at two cases:
(d),p
– The trace α is extended with a delay transition (l, u) −−−→ (l, u + d) such
that ∀ 0 ≤ e ≤ d : u + e ∈ I(l) where p = d · P (l). The cost of u + d
is cost(α) + p. This can be matched in the symbolic semantics by a delay
− (l, C 0 ), where
transition (l, C) →
C 0 = I(l) delay C, P (l) .
We now get
where the first inequality follows from the definition of delay(C, p) in Table 2
and the second inequality follows from the induction hypothesis.
a,p
– The trace α is extended with an action transition (l, u) −−→ (l0 , u0 ) using a tran-
g,a,r
sition l −−−→ l0 where u ∈ g, u0 = u[r], and u0 ∈ I(l0 ). Let p = P ((l, g, a, r, l 0 ))
be the cost of the transition. The cost of (l, u 0 ) is cost(α) + p. This can be
a
matched in the symbolic semantics by an action transition (l, C) − → (l0 , C 0 ),
where
C 0 = I(l) r(g(C)) + p .
Since u satisfies the guard g, u0 = u[r], and u0 satisfies the invariant I(l 0 ), it fol-
lows from the definition of the reset operation in Table 2 that I(l0 )(r(g(C)))(u0 ) ≤
C(u). We conclude that C 0 (u0 ) ≤ C(u) + p.
Proof: We prove this by induction in the length of the symbolic trace leading to
(l, C). The base case, a trace of length zero, is trivial.
For the induction we assume that there is a symbolic trace ending in (l, C) and
for each u ∈ sup(C), mincost(l, u) ≤ C(u). We look at two cases:
136 Paper E: Efficient Guiding Towards Cost-Optimality in Uppaal
− (l, C 0 ) where
– The symbolic trace β is extended with a delay transition (l, C) →
C 0 = I(l) delay C, P (l)
≥ mincost(l 0 , u) ,
where ∗ follows from the fact that every concrete trace ending in (l, v) can be
extended to (l 0 , u) with the same action transition used to extend the symbolic
trace by paying p.
Theorem 1. mincost(l) = min{min(C) | (l, C) is reachable}
Theorem 1 ensures that the algorithm in Fig. 1 indeed does find the minimum
cost, but since the state-space is still infinite there is no guarantee that the algorithm
ever terminates. For zone based timed automata model checkers, termination is en-
sured by normalizing all zones with respect to a maximum constant M [Rok93], but
for LPTA ensuring termination also depends on the representation of cost functions.
Lemma 3. Any UPTA A with positive rate can be translated into an UPTA B with
rate 1 such that mincost(l) in A is identical to mincost(l) in B.
Proof: [sketch] Let A be an UPTA with positive rate r. Now, let B be like A except
that all constants on guards and invariants are multiplied by r and set the rate of
B to 1.
Thus, in order to find the infimum cost of reaching a satisfying state in UPTA,
we only need to be able to handle rate zero and rate one.
In case of rate zero, all symbolic states reachable by the symbolic semantics have
very simple cost functions: The support is mapped to the same integer (because the
cost is 0 in the initial state and only modified by the increment operation). This
means that a cost function C can be represented as a pair (Z, c), where Z is a zone
and c an integer, s.t. C(u) = c when u ∈ Z and ∞ otherwise. Delay, reset and
satisfaction are easily implementable for zones using DBMs. Increment is a matter
of incrementing c and a comparison (Z 1 , c1 ) v (Z2 , c2 ) reduces to Z2 ⊆ Z1 ∧ c1 ≤ c2 .
Termination is ensured by normalizing all zones with respect to a maximum constant
M.
In case of rate one, the idea is to use zones over C ∪ {δ}, where δ is an additional
clock keeping track of the cost, s.t. every clock valuation u is associated with exactly
one cost Z(u) in zone Z 4 . Then, C(u) = c iff u[δ 7→ c] ∈ Z. This is possible because
the continuous cost advances at the same rate as time. Delay, reset, satisfaction
and infimum are supported directly by DBMs. Increment C + c translates to Z[δ 7→
δ + k] = {u[δ 7→ u(δ) + k] | u ∈ Z} and is also realizable using DBMs. For
comparison between symbolic cost states, notice that Z 2 ⊆ Z1 ⇒ Z1 v Z2 , whereas
the implication in the other direction does not hold in general, see Fig. 3. However,
it follows from the following Lemma 4 that comparisons can still be reduced to set
inclusion provided the zone is extended in the δ dimension, see Fig. 3.
δ
Z†
Z2†
Z
Z2
Z1
Fig. 3: Let x be a clock and let δ be the cost. In the figure, Z v Z 1 v Z2 , but
only Z1 is a subset of Z. The ()† operation removes the upper bound on δ, hence
Z2† ⊆ Z † ⇔ Z v Z2 .
Proof: When a state is taken from Wait using the MC order, no state with lower
cost are reachable. Therefore, when the first goal state is taken from Wait no (goal)
states with lower cost are reachable, so the optimal solution has been found.
When applying the MC order, the algorithm in Fig. 1 can be simplified since the
variable Cost is not needed any more.
Improving the State-Space Exploration 139
Again in analogy with Dijkstra’s shortest path algorithm, the MC ordering finds
the minimum cost of reaching a goal state with guarantee of its optimality, in a
manner which requires exploration of a minimum number of symbolic cost states.
Proof: Assume on the contrary that this would be the case. Then at some stage, the
exploration of a symbolic cost state (l, C) of Wait with non-minimal cost should be
able to reduce the subsequent exploration of one of the symbolic cost states (m, D)
of Wait with smaller minimum cost. That is, some derivative of (l, C) should be
applicable in pruning the exploration of some derivative of (m, D), or more precisely,
(l, C) ;∗ (l0 , C 0 ) and (m, D) ;∗ (m0 , D 0 ) with l0 = m0 and C 0 v D 0 . By definition of
v and since ; never decreases minimum cost, it follows that min(C) ≤ min(C 0 ) ≤
min(D 0 ). But then, application of the MC order would also explore (l, C) and
(l0 , C 0 ) before (m0 , D 0 ) and hence lead to the same pruning of (m 0 , D 0 ) contradiction
the assumed superiority of the non-MC search order.
In situations when Wait contains more than just one symbolic cost state with
smallest minimum cost, the MC order does not offer any indication as to which
one to explore first. In fact, for exploration of the symbolic state-space for timed
automata without cost, we do not know of a definite strategy for choosing a state
from Wait such that the fewest number of symbolic states are generated. However,
any improvements gained with respect to the search-order strategy for the state-
space exploration of timed automata will be directly applicable in our setting with
respect to the strategy for choosing between symbolic cost states with same minimum
cost.
min(C) and Rem(l, C). Since min(C) + Rem(l, C) is smaller than the actual cost of
reaching a goal state, the first goal state to be explored is guaranteed to have optimal
cost. We call this the MC+ order but it is also known as Least-Lower-Bound order.
In Section 4 we will show that even simple estimates of the remaining cost can lead
to large improvements in the number of states searched to find the minimum cost of
reaching a goal state.
One way to obtain a lower bound is for the user to specify an initial estimate
and annotate each transition with updates of the estimate. In this case it is the
responsibility of the user to guarantee that the estimate is actually a lower bound
in order to ensure that the optimal solution is not deleted. This also allows the user
to apply her understanding and intuition about the system.
To obtain a lower bound of the remaining cost in an automatic and efficient
manner, we suggest to replace one or more automata in the network with “more
abstract” automata. The idea is that this should result in an abstract network which
(1) contains (at least) all runs of the original one, and (2) with no larger costs. Thus
computing the minimum cost of reaching a goal state in the abstract network will
give the desired lower bound estimate of reaching a goal state in the original network.
Moreover, the abstract network should (3) be substantially simpler to analyze than
the original network making it possible to obtain the estimate efficiently. We are
currently working with different ideas of implementing this idea. In Section 4 we
have used the idea when guiding systems manually.
When searching for an error state in a system a random search order might be
useful. We have chosen to implement what we call random depth-first order which as
the name suggests is a variant of a depth-first search. The only difference between
this and a standard depth-first search is that before pushing all the successors of a
state on to Waiting (which is implemented as a stack), the successors are randomly
permuted.
Once a reachable goal state has been found, an upper bound on the minimum
cost of reaching a goal state has been obtained. If we choose to continue the search,
a smaller upper bound might be obtained. During state-space exploration the cost
never decreases therefore states with cost bigger than the best cost found in a goal
state cannot lead to an optimal solution, and can therefore be deleted. The estimate
of the remaining cost defined in Section 3.2 can also be used for pruning exploration
of states since whenever min(C) + Rem(l, C) is larger than the best upper bound,
no state covered by (l, C) can lead to a better solution than the one already found.
All of the methods described in this section have been implemented in Uppaal.
Section 4 reports on experiments using these new methods.
4 Experiments
In this section we illustrate the benefits of extending Uppaal with heuristics and
costs through several verification and optimization problems. All of the examples
have previously been studied in the literature.
142 Paper E: Efficient Guiding Towards Cost-Optimality in Uppaal
Searching with the MC order does indeed improve the results, compared to BF
and DF. It is however outperformed by the MC+ heuristic that explores only 404
states to find a optimal schedule. Note that pruning based on the estimate of the
remaining cost does not apply to MC and MC+ order, since the first explored goal
state has the optimal value.
5
The distribution can be obtained at http://www.uppaal.com.
Experiments 143
Without costs and heuristics, Uppaal can only show whether a schedule exists.
The extension allows Uppaal to find the optimal schedule and explores with the
MC+ heuristic only about 10% of the states that are needed to find a initial solution
with the breadth-first heuristic.
overhead
cranes
convertor crane#1
vessel #1
track#1
1 2 3
track#2
4 5
convertor
vessel #2
crane#2
buffer
storage
place
continuous
casting
machine
15 instances, does not find solutions for the larger instances with 15 jobs and 10
machines or larger.
145
146 Paper E: Efficient Guiding Towards Cost-Optimality in Uppaal
message 1 0 0 0 1 1
cell
cell edges
signals sent
mark subcell
code subcell
sampling distance
if these two signals are if these two signals are
equal, a 0 was sent different, a 1 was sent
solution result in lower priorities. For instance, when a batch of iron is being treated
by a machine, it pays off to reward other scheduling activities rather than wait for
the treatment to finish.
A schedule for three ladles was produced in [Feh99b] for a slightly simplified
model using Uppaal. In [HLP99] schedules for up to 60 ladles were produced also
using Uppaal. However, in order to do this, additional constraints were included
that reduce the size of the state-space drastically, but also prune possibly sensible
behavior. A similar reduced model was used by Stobbe in [Sto00], who uses con-
straint programming to schedule 30 ladles. All these works only consider ladles with
the same quality of steel and the initial solutions cannot be improved.
A lower bound for the time duration of any feasible schedule is given by the
time the first load needs for all treatments plus least the time one needs to cast all
batches. Analogously, an upper bound is given by the maximal time during which
the first batch is allowed to stay in the system, plus the maximal time needed to
cast the ladles. For the instance with ten batches, these bounds are 291 and 425,
respectively. With the sketched heuristic, our extended Uppaal is able to find a
schedule with duration 355, within 60 seconds cputime on a Pentium II 300 MHz.
The initial solution found is improved by 5% within the time limit. Importantly, in
this approach we do not rule out optimal solutions. Allowing the search to go on for
longer, models with more ladles can be handled.
Tab. 5: Results for nine erroneous instances of the Biphase Mark protocol. Num-
bers of state explored before reaching an error state.
3)
3)
)
)
11
10
23
11
10
,2
11
10
,2
18
16
3,
3,
3,
9,
6,
8,
5,
6,
8,
2,
6,
8,
2,
5,
7,
1,
(1
(1
(3
(1
(1
(3
(1
(1
(3
Breadth first 1931 2582 4049 990 4701 2561 1230 1709 3035
in==1 heuristic 1153 1431 2333 632 1945 1586 725 1039 1763
There are three kind of errors that may occur in an incorrect configuration.
Firstly, the receiver may not detect the mark subcell. Secondly, the receiver may
sample too early, before or right after the sender left the mark subcell. Finally, the
receiver may also sample too late, i.e. the sender has already started to transmit
the next cell. The first two errors can only occur if there is an edge after the mark
subcell. This is only the case if input ”1” is offered to the coder. The third error
seems to be independent of the offered input.
Since two of the three errors occur only if input ”1” is offered to the coder, and
the third error can occur in any case, it seems worthwhile to choose a heuristic
that searches for states with input “1” first, rather than exploring state-space for
both possible inputs concurrently. We apply a heuristic which is a mixture of only
choosing input 1 and the breadth-first order, see Example 2, to erroneous modifi-
cations of the (correct) instances bpm(16, 6, 11), bpm(18, 5, 10) and bpm(32, 16, 23).
Table 5 gives the results. It turns out that a bit more than half of the complete
state-space size is explored, which is due to the fact that for input ”1”, there is more
activity in the protocol. The corresponding diagnostic traces show that the errors
were found within the first cell or at the very beginning of the second cell, thus at
a stage were only one bit was sent and received. An exception on this rule is the
148 Paper E: Efficient Guiding Towards Cost-Optimality in Uppaal
fifth instance bpm(18, 6, 10), which produces an error after one and a half cell, and
shows consequently a larger reduction when verified with the heuristic.
5 Conclusion
On the preceding pages, we have contributed (1) a cost function based symbolic
semantics for the class of linearly priced timed automata; (2) an efficient, zone based
implementation of cost functions for the class of uniformly priced timed automata;
(3) an optimal search order for finding the minimum cost of reaching a goal state;
and (4) experimental evidence that these techniques can lead to dramatic reductions
in the number of explored states. In addition, we have shown that it is possible
to quickly obtain upper bounds on the minimum cost of reaching a goal state by
manually guiding the exploration algorithm using priorities.
PAPER F
AS CHEAP AS POSSIBLE: EFFICIENT
COST-OPTIMAL REACHABILITY FOR
PRICED TIMED AUTOMATA
Ed Brinksma
Department of Computer Science
University of Twente, The Netherlands
Thomas Hune
BRICS, Århus University, Denmark
Paul Pettersson
Department of Computer Systems, Information Technology,
Uppsala University, Sweden
Abstract
In this paper we present an algorithm for efficiently computing optimal cost of reaching a goal
state in the model of Linearly Priced Timed Automata (LPTA). The central contribution of
this paper is a priced extension of so-called zones. This, together with a notion of facets of
a zone, allows the entire machinery for symbolic reachability for timed automata in terms of
zones to be lifted to cost-optimal reachability using priced zones. We report on experiments
with a cost-optimizing extension of Uppaal on a number of examples.
Introduction 153
1 Introduction
Well-known formal verification tools for real-time and hybrid systems, such as Up-
paal [LPY97a], Kronos [BDM+ 98] and HyTech [HHWT97a], use symbolic tech-
niques to deal with the infinite state spaces that are caused by the presence of
continuous variables in the associated verification models. However, symbolic model
checkers still share the “state space explosion problem” with their non-symbolic coun-
terparts as the major obstacle for their application to non-trivial problems. A lot of
research, therefore, is devoted to the containment of this problem.
An interesting idea for model checking of reachability properties that has re-
ceived more attention recently is to “guide” the exploration of the (symbolic) state
space such that “promising” sets of states are visited first. In a number of recent
publications [Feh99b, HLP00, BFH+ 01b, NY99, BM00] model checkers have been
used to solve a number of non-trivial scheduling problems, reformulated in terms of
reachability, viz. as the (im)possibility to reach a state that improves on a given
optimality criterion. Such criteria distinguish scheduling algorithms from classical,
full state space exploration model checking algorithms. They are used together with,
for example, branch-and-bound techniques [AC91] to prune parts of the search tree
that are guaranteed not to contain optimal solutions. This observation motivates
research into the extension of model checking algorithms with optimality criteria.
They provide a basis for the (cost-) guided exploration of state spaces, and improve
the potential of model checking techniques for solving scheduling problems. We be-
lieve that such extensions can be interesting for real-life applications of both model
checking and scheduling.
Based on similar observations an extension of the timed automata model with a
notion of cost, the Linearly Priced Timed Automata (LPTA), was already introduced
in [BFH+ 01a]. This model allows for a reachability analysis in terms of accumulated
cost of traces, i.e., the sum of the costs of the individual transitions in the trace.
Each action transition has an associated price p determining its cost. Likewise,
each location has an associated rate r and the cost of delaying d time units is
d · r. In [BFH+ 01a], and independently in [ATP01], computabitlity of minimal-cost
reachability is demonstrated based on a cost-extension of the classical notion of
regions.
Although ensuring computability, the region construction is known to be very
inefficient. Tools like Uppaal and Kronos use symbolic states of the form (l, Z),
where l is a location of the timed automaton and Z is a zone, i.e. a convex set
of clock valuations. The central contribution of this paper is the extension of this
concept to that of priced zones, which are attributed with an (affine) linear function
of clock valuations that defines the cost of reaching a valuation in the zone. We show
that the entire machinery for symbolic reachability in terms of zones can be lifted to
cost-optimal reachability for priced zones. It turns out that some of the operations
on priced zones force us to split them into parts with different price attributes, giving
rise to a new notion, viz. that of the facets of a zone.
The suitability of the LPTA model for scheduling problems was already illus-
154 Paper F: As Cheap as Possible: Efficient Cost-Optimal Reach. . .
trated in [BFH+ 01b], using the more restricted Uniformly Priced Timed Automata
(UPTA) model, admitting an efficient priced zone implementation via Difference
Bound Matrices [Dil89]. The model was used to consider traces for the time-optimal
scheduling of a steel plant and a number of job shop problems. The greater expres-
sivity of LPTA also supports other measures of cost, like idle time, weighted idle
time, mean completion time, earliness, number of tardy jobs, tardiness, etc. We take
an aircraft landing problem [BKA00] as the application example for this paper.
The structure of the rest of this paper is as follows. In Section 2 we give an ab-
stract account of symbolic optimal reachability in terms of priced transition systems,
including a generic algorithm for optimal reachability. In Section 3 we introduce the
model of linearly priced timed automata (LPTA) as a special case of the framework
of Section 2. We also introduce here our running application example, the aircraft
landing problem. Section 4 contains the definition of the central concept of priced
zones. The operations that we need on priced zones and facets are provided in Sec-
tion 5. The implementation of the algorithm, and the results of experimentation
with our examples are reported in Section 6. Our conclusions, finally, are presented
in Section 7.
Lemma 2. Let T be a priced transition system. Then, for any symbolic execution β
of T ending in priced symbolic state (A, π), whenever s ∈ A, then mincost(s) ≤ π(s).
Proof: We prove this by induction on the length of β. The base case, |β| = 0, is
obvious. For the induction-step consider a symbolic execution of length n + 1, β =
(A0 , π0 ), . . . , (An , πn ), (An+1 , πn+1 ), where for i ≤ n, (Ai+1 , πi+1 ) = P ostai (Ai , πi )
for some ai ∈ Σ, and A0 = {s0 } and π0 (s0 ) = 0. Now, let sn+1 ∈ An+1 . Completion
of the induction-step is obtained from the following:
an+1
πn+1 (sn+1 ) = inf πn (sn ) + pn+1 | sn ∈ An ∧ sn −−−→pn+1 sn+1
an+1
≥IH inf mincost(sn ) + pn+1 | sn ∈ An ∧ sn −−−→pn+1 sn+1
≥∗ mincost(sn+1 )
For (A, π) being a priced symbolic state, we denote by minCost(A, π) the infi-
mum costs in A w.r.t. π, i.e. inf{π(s) | s ∈ A}. We can now state the following
correctness theorem about the symbolic semantics:
156 Paper F: As Cheap as Possible: Efficient Cost-Optimal Reach. . .
Cost := ∞
Passed := ∅
Waiting := {({s0 }, π0 )}
while Waiting 6= ∅ do
select (A, π) from Waiting
if A ∩ G 6= ∅ and minCost(A ∩ G, π) < Cost then
Cost := minCost(A ∩ G, π)
if for all (B, η) in Passed: (B, η) 6v (A, π) then
add (A, π) to Passed
add P osta (A, π) to Waiting for all a ∈ Σ
return Cost
Theorem 1. The symbolic semantics using priced symbolic states accurately cap-
tures minimum-cost reachability:
Let (A, π) and (B, η) be priced symbolic states. We write (A, π) v (B, η) if
B ⊆ A and π(s) ≤ η(s) for all s ∈ B, informally expressing, that (A, π) is “as big and
cheap” as (B, η). Now using the above notion of priced symbolic state and associated
operations, an abstract algorithm for computing the minimum cost of reaching a
designated set of goal states G is shown in Fig. 1. It uses two data-structures
Wait and Passed to store priced symbolic states waiting to be examined, and
priced symbolic states already explored, respectively. In each iteration, the algorithm
proceeds by selecting a priced symbolic state (A, π) from Wait, checking that none
of the previously explored states (B, η) are bigger and cheaper, i.e. (B, η) 6v (A, π),
and adds it to Passed and its successors to Wait. In addition, the algorithm uses
the global variable Cost, which is initially set to ∞ and updated whenever a goal
state is found that can be reached with lower cost than the current value of Cost.
When the algorithm of Fig. 1 terminates, the value of Cost equals mincost(G).
Furthermore, termination of the algorithm will be guaranteed provided v is a well-
quasi ordering on priced symbolic states.
Before we can proof this claim, we need the two lemmas. We denote by (A, π) ;
(B, η) that (B, η) = P osta (A, π) for some a ∈ L, and we say that (A, π) can reach
(B, η) if (A, π) ;∗ (B, η). Now, v is a simulation preorder in the following sense:
Now, assume that the algorithm Fig. 1 terminates. Let W denote the total
(finite) collection of priced symbolic states, which will have been in the Wait list at
some stage during the execution of the algorithm. W is closed with respect ; up
to v in the following sense:
Priced Timed Automata 157
Lemma 4. Whenever (A, π) ∈ W and (A, π) ; ∗ (B, η), then (C, ρ) ∈ W for some
(C, ρ) v (B, η).
Proof: Due to Lemma 3 it suffices to consider the case when (A, π) ; (B, η) (the
general Lemma will then follow as an easy induction exercise). At the moment when
(A, π) was selected from the Wait list two scenarios could have taken place: either
(A, π) was explored (i.e. all P ost-successors added to Wait), in which case, the
Lemma holds trivially, or exploration of (A, π) was discarded due to the fact, that
a better (in terms of v) priced symbolic state (D, ψ) already had been previously
explored and was present in Passed. However, as (D, ψ) v (A, π), it follows from
Lemma 3, that (D, ψ) ; (C, ρ) for some (C, ρ) with (C, ρ) v (B, η). As (D, ψ) is
explored obviously (C, ρ) ∈ W.
We are now in a position where we can state and proof our main theorem:
Theorem 2. When the algorithm of Fig. 1 terminates, the value of Cost equals
mincost(G).
Proof: Using Theorem 1, we must prove that upon termination Cost equals
Assume that this does not hold. Then there exists a reachable priced symbolic state
(A, π) where minCost(A ∩ G, π) <Cost (since we approximate Cost from above).
Thus, (A, π) never appeared in the Wait list; rather, the algorithm must at some
point have discarded a state (A0 , π 0 ) on the path to (A, π) due to the fact, that a
better (bigger and cheaper) priced symbolic state already had been explored and was
present in Passed. However, as (A0 , π0 ) ;∗ (A, π) and obviously (A0 , π0 ) ∈ W,
it follows from Lemma 4, that (B, η) v (A, π) for some (B, η) ∈ W. But then
Cost≤ minCost(B ∩ G, η) ≤ minCost(A ∩ G, π) contradiction our assumption.
The above framework may be instantiated by providing concrete syntax for priced
transition systems, together with data-structures for priced symbolic states allowing
for computation of the P ost-operations, minCost, as well as v (which should be
well-quasi). In the following sections we provide such an instantiation for a priced
extension of timed automata.
n a natural number, and m an integer. Elements of B(C) are called clock constraints
or zones over C. P(C) denotes the power set of C. Clock values are represented as
functions from C to the non-negative reals R ≥0 , called clock valuations. We denote
by RC the set of clock valuations for C. For u ∈ R C and g ∈ B(C), we denote by
u ∈ g that u satisfies all constraints of g.
Definition 1 (Linearly Priced Timed Automata). A linearly priced timed
automaton A over clocks C is a tuple (L, l 0 , E, I, P ), where L is a finite set of
locations, l0 is the initial location, E ⊆ L × B(C) × P(C) × L is the set of edges,
where an edge contains a source, a guard, a set of clocks to be reset, and a target,
I : L → B(C) assigns invariants to locations, and P : (L ∪ E) → N assigns prices to
g,r
both locations and edges. In the case of (l, g, r, l 0 ) ∈ E, we write l −−→ l0 .
approaching
cost t<=T c1>=wait11
cost=l (t-T)+d c2>=wait21
t>=E t==T land1?
landX! cost+=d
c1:=0
early late
cost=e (T-t) t<=T t<=L S0
cost’==e cost’==l
Fig. 2: Figure (a) depicts the cost of landing a plane at time t. Figure (b) shows an
LPTA modelling the landing costs. Figure (c) shows an LPTA model of the runway.
For each time unit the actual landing time deviates from the target time, the landing
cost increases with rate e for early landings and rate l for late landings. In addition
there is a fixed cost d associated with late landings. In Fig. 2(b) the cost of landing
an aircraft is modeled as an LPTA. The automaton starts in the initial location
approaching and lands at the moment one of the two transitions labeled landX! 2
are taken. In case the plane lands too early it enters location early in which it delays
exactly T − t time units. In case the plane is late the cost is measured in location
late (i.e. the delay in location late is 0 if the plane is on target time). After L
time units the automaton always ends in location done. Figure 2(c) models a runway
ensuring that two consecutive landings takes place with a minimum separation time.
4 Priced Zones
Typically, reachability of a (priced) timed automaton, A = (L, l 0 , E, I, P ), is decided
using symbolic states represented by pairs of the form (l, Z), where l is a location and
Z is a zone. Semantically, (l, Z) represents the set of all states (l, u), where u ∈ Z.
Whenever Z is a zone and r a set of clocks, we denote by Z ↑ and {r}Z the set of
clock valuations obtained by delaying and resetting (w.r.t. r) clock valuations from Z
respectively. That is, Z ↑ = {u + d | u ∈ Z, d ∈ R≥0 } and {r}Z = {u[r 7→ 0] | u ∈ Z}.
It is well-known – using a canonical representation of zones as Difference Bounded
Matrices (DBMs) [Dil89] – that in both cases the resulting set is again effectively
representable as a zone. Using these operations together with the obvious fact,
that zones are closed under conjunction, the post-operations may now be effectively
realised using the zone-based representation of symbolic states as follows:
– postδ (l, Z) = l, (Z ∧ I(l))↑ ∧ I(l) ,
– poste (l, Z) = l0 , {r}(Z ∧ g) whenever e = (l, g, r, l 0 ).
2
In the example we assume that several automata A1 , ..., An can be composed in parallel with a
CCS-like parallel composition operator [Mil89] to a network (A1 , ..., An )\Act, with all actions Act
being restricted. We further assume that the cost of delaying in the network is the sum of the cost
of delaying in the individual automata.
160 Paper F: As Cheap as Possible: Efficient Cost-Optimal Reach. . .
y
y ↑
Z1
Cost = 4y − x − 10 ↑
4 Z
2
Z −1
1
−1
Cost = 2 − x + 2y
−1 Cost = 2 − x + 2y
∆Z
∆Z
c = 4
c = 4
Z10 Z20 x x
Cost = 6 − x Cost = x − 4
Thus, the cost assignments of a priced zone define a linear plane over the under-
lying zone and may alternatively be described by a linear expression over the clocks.
Figure 3 illustrates the priced zone Z = (Z, c, r) over the clocks {x, y}, where Z is
given by the six constraints 2 ≤ x ≤ 7, 2 ≤ y ≤ 6 and −2 ≤ x−y ≤ 3, the cost of the
offset (∆Z = (2, 2) is c = 4, and the cost-rates are r(x) = −1 and r(y) = 2. Hence,
the cost of the clock valuation (5.1, 2.3) is given by 4+(−1)·(5.1−2)+2·(2.3−2) = 1.5.
In general the costs assigned by Z may be described by the linear expression 2−x+2y.
Now, priced symbolic states are represented in the obvious way by pairs (l, Z),
where l is a location and Z a priced zone. More precisely, (l, Z) represents the priced
symbolic state (A, π), where A = {(l, u) | u ∈ Z} and π(l, u) = Cost(u, Z).
Unfortunately, priced symbolic states are not directly closed under the P ost-
operations. To see this, consider a timed automata A with two locations l and
m and a single edge from l to m with trivial guard (true) and resetting the clock
y.. The cost-rate of l is 3 and the transition has zero cost. Now, let Z = (Z, c, r)
be the priced zone depicted in Fig. 3 and consider the associated priced symbolic
state (l, Z). Assuming that the e-successor set, P ost e (l, Z), was expressible as a
single priced symbolic state (l 0 , Z 0 ), this would obviously require l 0 = m and Z 0 =
(Z 0 , c0 , r 0 ) with Z 0 = {y}Z. Furthermore, following our framework of Section 2,
the cost-assignment of Z 0 should be such that Cost(u0 , Z 0 ) = inf{Cost(u, Z) | u ∈
Z ∧ u[y 7→ 0] = u0 } for all u0 ∈ Z 0 . Since r(y) > 0, it is obvious that these infima
are obtained along the lower boundary of Z with respect to y (see Fig. 3 left).
E.g. Cost((2, 0), Z 0 ) = 4, Cost((4, 0), Z 0 ) = 2, and Cost((6, 0), Z 0 ) = 2. In general
Cost((x, 0), Z 0 ) = Cost((x, 2), Z) = 6 − x for 2 ≤ x ≤ 5 and Cost((x, 0), Z 0 ) =
Cost((x, x − 3), Z) = x − 4 for 5 ≤ x ≤ 7. However, the disagreement w.r.t. the
cost-rate of x (−1 or 1) makes it clear that the desired cost-assignment is not linear
and hence not obtainable from any single priced zone. On the other hand, it is
also shows that splitting Z 0 = {y}Z into the sub-zones Z10 = Z 0 ∧ 2 ≤ x ≤ 5 and
Z20 = Z 0 ∧ 5 ≤ x ≤ 7, allows the e-successor set P ost e (l, Z) to be expressed using
the union of two priced zones (with r(x) = −1 in Z 10 and r(x) = 1 in Z20 ).
Facets & Operations on Priced Zones 161
Z
3
Z5
Z3
Z Z
Z2
Z6
Z2 = (Z ∧ (x − y = 3))
Z1 = (Z ∧ y = 2) Z1
{y}Z
1{y}Z 2
x x
{y}Z
Similarly, priced symbolic states are not directly closed w.r.t. P ost δ . To see this,
consider again the LPTA A from above and the priced zone Z = (Z, c, r) depicted
in Fig. 3. Clearly, the set P ostδ (l, Z) must cover the zone Z ↑ (see Fig. 3). It can be
seen that, although P ostδ (l, Z) is not expressible as a single priced symbolic state, it
may be expressed as a finite union by splitting the zone Z ↑ into the three sub-zones
Z, Z1↑ = (Z ↑ \Z) ∧ (x − y ≤ 1), and Z2↑ = (Z ↑ \Z) ∧ (x − y ≥ 1).
Informally (see Fig. 4(right)) i) and ii) express that any valuation reachable by delay
from Z is reachable from one of the lower facets of Z, as well as reachable from one
162 Paper F: As Cheap as Possible: Efficient Cost-Optimal Reach. . .
of the upper facets of Z or within Z. iii) (and iv)) expresses that any valuation in
the projection of a zone will be in the projection of the lower (upper) facets of the
zone relative to the relevant clock.
Proof: As F ⊆ Z whenever F ∈ LF (Z) the ⊇-direction of i) is trivial. For the
⊆-direction of i) let u ∈ Z ↑ . Now let d = min{u(x) − l | (x ≥ l) ∈ Z}. We claim that
u − d ∈ F for some F ∈ LF (Z). Since u ∈ Z ↑ there is some u0 ∈ Z and some e such
that u = u0 + e. Now e ≤ d since otherwise u0 would violate one of the lower bounds
of Z. Thus u − d satisfies all upper bounds of Z on individual clocks (since u 0 does)
and also all bounds on differences from Z are satisfied. Clearly, by the choice of d,
all lower bounds of Z are satisfied by u − d. Thus u − d ∈ Z. However, it is also
clear that u − d ∈ F for some lower facet F .
As F ⊆ Z whenever F ∈ LFy (Z) the ⊇-direction of iii) is trivial. For the ⊆-
direction of iii) assume that u ∈ {y}Z. Now let d = max({u(x) − l | (y ≥ x − l) ∈
Z} ∪ {l | (y ≥ l) ∈ Z}).
We claim that u[y 7→ d] ∈ F for some F ∈ LF y (Z).
Obviously, {y} u[y 7→ d] = u. Obviously, all constraints of Z not involving y are
satisfied. Since u ∈ {y}Z there is u0 ∈ Z such that u = u0 [y 7→ 0]. Now, u0 (y) ≥ d
since otherwise u0 would violate some bound (y ≥ x − l) ∈ Z or (y ≥ l) ∈ Z. It
follows that u[y 7→ d] satisfies all upper bounds for y (since u 0 does). Clearly, by the
choice of d, all lower bounds of y are satisfied.
As a first step, the delay- and reset-operation may be extended in a straightfor-
ward manner to priced (relative) facets:
The prototype implements the P oste (reset), P ostδ (delay), minCost, and v op-
erations, using extensions of the DBM algorithms outlined in [Rok93]. To minimize
the number of facets considered and reduce the size of the LP problems needed to
be solved, we make heavy use of the canonical representation of zones in terms a
minimal set of constraints given in [LLPY97]. For dealing with LP problems, our
prototype currently uses a free available implementation of the simplex algorithm. 5
Many of the techniques for pruning and guiding the state space search described in
[BFH+ 01b] have been used extensively in modelling and verification.
landing problem partially described in Example 1. An LPTA model of the costs
associated with landing a single aircraft is shown in Fig. 2(b). When landing several
planes the schedule has to take into account the separation times between planes to
prevent the turbulence of one plane from affecting another. The separation times
depend on the types of the planes that are involved. Large aircrafts for example
generate more turbulence than small ones, and successive planes should consequently
keep a larger distance. To model the separation times between two types of planes
we introduce an LPTA of the kind shown in Fig. 2(c).
Table 1 presents the results of an experiment were the prototype was applied
to seven instances of the aircraft landing problem taken from [BKA00]6 . For each
instance, which varies in the number of planes and plane types, we compute the
cost of the optimal schedule. In cases the cost is non-zero we increase the number
of runways until a schedule of cost 0 is found 7 . In all instances, the state space
is explored in minimal cost-order, i.e. we select from the waiting list the priced
zone (l, Z) with lowest minCost(l, Z). Equal values are distinguished by selecting
first the zone which results from the largest number of transitions, and secondly by
selecting the zone which involves the plane with the shortest target time. As can
be seen from the table, our current prototype implementation is able to deal with
all the tested instances. Beasley et al. [BKA00] solves all problem instances with
a linear programming based tree search algorithm, in cases that the initial solution
– obtained with a heuristic – is not zero. In 7 of the 15 benchmarks (with optimal
solution greater than zero) the time-performance of our method is better than theirs.
These are the instances 4 to 7 with less than 3 runways. This result also holds if we
take into account that our computer is about 50% faster (according to the Dongarra
Linpack benchmarks [Don01]). It should be noted, however, that our solution-times
are quite incomparable to those of Beasleys. For some instances our approach is up
to 25 times slower, while for others it is up to 50 times faster than the approach in
[BKA00].
The cost-extended version of Uppaal has additionally been (and is currently
being) applied to other examples, including a cost-extended version of the Bridge
Problem [RB98], an optimal broadcast problem and a testing problem.
5
lp solve 3.1a by Michel Berkelaar, ftp://ftp.es.ele.tue.nl/pub/lp_solve.
6
These and other benchmarks are available at ftp://mscmga.ms.ic.ac.uk/pub/.
7
This is always possible as the cost of landing on target time is 0 and the number of runways
can be increased until all planes arrive at target time.
Implementation & Experiments
Tab. 1: Results for seven instances of the aircraft landing problem (horizontal) and 1 to 4 runways (vertical). Results were
obtained on a PentiumII 333Mhz.
Runways
Problem instance 1 2 3 4 5 6 7
Number of planes 10 15 20 20 20 30 44
Number of types 2 2 2 2 2 4 2
Optimal value 0 0
4 Explored states N/A N/A N/A 65 64 N/A N/A
Cputime (secs) 1.97 1.53
165
166 Paper F: As Cheap as Possible: Efficient Cost-Optimal Reach. . .
7 Conclusion
In this paper we have considered the minimum-cost reachability problem for LP-
TAs. The notions of priced zones, and facets of a zone are central contributions of
the paper underlying our extension of the tool Uppaal. Our initial experimental
investigations based on a number of examples are quite encouraging.
Compared with the existing special-purpose, time-optimizing version of Up-
paal [BFH+ 01b], the presented general cost-minimizing implementation does only
marginally down-grade performance. In particular, the theoretical possibility of
uncontrolled splitting of zones does not occur in practice. In addition, the consid-
eration of non-uniform cost seems to significantly reduce the number of symbolic
states explored.
The single, most important question, which calls for future research, is how
to exploit the simple structure of the LP-problems considered. We may benefit
significantly from replacing the currently used LP package with some package more
tailored towards small-size problems.
BIBLIOGRAPHY
[ADY00] Tobias Amnell, Alexandre David, and Wang Yi. A real time anima-
tor for hybrid systems. In Proceedings of the 6th ACM SIGPLAN
Workshop on Languages, Compilers, and Tools for Embedded Systems
(LCTES’2000), Vancouver, Canada, June 2000.
[AFM+ 03] Tobias Amnell, Elena Fersman, Leonid Mokrushin, Paul Pettersson,
and Wang Yi. Times - a tool for modelling and implementation of
embedded systems. In Proc. of 8th International Conference, TACAS
2002, number 2280 in Lecture Notes in Computer Science, pages 460–
464, 2003.
[AJ94] P. Abdulla and B. Jonsson. Undecidability of verifying programs with
unreliable channels. In Proc. 21st Int. Coll. Automata, Languages, and
Programming (ICALP’94), volume 820 of Lecture Notes in Computer
Science, pages 316–327. Springer-Verlag, 1994.
[ALP01] Rajeev Alur, Salvatore La Torre, and George J. Pappas. Optimal
paths in weighted timed automata. In Proc. of Fourth International
Workshop on Hybrid Systems: Computation and Control, volume 2034
of Lecture Notes in Computer Science, pages 49–62. Springer-Verlag,
2001.
[AM99] E. Asarin and O. Maler. As soon as possible: Time optimal control
for timed automata. In F. Vaandrager and J. van Schuppen, editors,
Hybrid Systems: Computation and Control, number 1569 in Lecture
Notes in Computer Science, pages 19–30. Springer-Verlag, March 1999.
[AN00] Parosh Aziz Abdulla and Aletta Nylén. Better is better than well:
On efficient verification of infinite-state systems. In Proc. of the 14th
IEEE Symp. on Logic in Computer Science. IEEE, 2000.
[And95] H. Andersen. Partial model checking (extended abstract). In Pro-
ceedings of the Tenth Annual IEEE Symposium on Logic in Computer
Science, pages 398–407, La Jolla, San Diego, 1995.
[ASM97] H. R. Andersen, J. Staunstrup, and N. Maretti. Partial model checking
with ROBDDs. In E. Brinksma, editor, Proceedings of TACAS’97, vol-
ume 1217 of Lecture Notes in Computer Science, pages 35–49. Springer-
Verlag, 1997.
[ATP01] Rajeev Alur, Salvatore La Torre, and George J. Pappas. Optimal
paths in weighted timed automata. In Fourth International Workshop
on Hybrid Systems: Computation and Control, volume 2034 of Lecture
Notes in Computer Science, pages 49–62. Springer-Verlag, 2001.
[AvLLU94] E.H.L. Aarts, P.J.M. van Laarhoven, J.K. Lenstra, and N.L.J. Ul-
der. A Computational Study of Local Search Algorithms for Job-Shop
Scheduling. OSRA Journal on Computing, 6(2):118–125, Spring 1994.
Bibliography 169
[BBFL03] Gerd Behrmann, Patricia Bouyer, Emmanuel Fleury, and Kim Guld-
strand Larsen. Static guard analysis in timed automata verification. In
Proc. of the 9th Workshop on Tools and Algorithms for the Construc-
tion and Analysis of Systems, volume 2619 of Lecture Notes in Com-
puter Science, pages 254–277, Warsaw, Poland, Apr 2003. Springer-
Verlag.
[BCCZ99] Armin Biere, Alessandro Cimatti, Edmund Clarke, and Yunshan Zhu.
Symbolic model checking without BDDs. Lecture Notes in Computer
Science, 1579:193–207, 1999.
[BFG+ 99] Marius Bozga, Jean-Claude Fernandez, Lucian Ghirvu, Susanne Graf,
Jean-Pierre Krimm, and Laurent Mounier. IF: An intermediate repre-
sentation and validation environment for timed asynchronous systems.
In World Congress on Formal Methods (1), pages 307–327, 1999.
[BFH+ 01b] Gerd Behrmann, Ansgar Fehnker, Thomas S. Hune, Kim Larsen, Paul
Petterson, and Judi Romijn. Efficient guiding towards cost-optimality
in Uppaal. In Proc. of TACAS’2001, Lecture Notes in Computer
Science. Springer-Verlag, 2001.
[BGK+ 96] Johan Bengtsson, David Griffioen, Kåre Kristoffersen, Kim G. Larsen,
Fredrik Larsson, Paul Pettersson, and Wang Yi. Verification of an
Audio Protocol with Bus Collision Using Uppaal. Accepted for pre-
sentation at the 8th Int. Conf. on Computer Aided Verification, 1996.
[BLL+ 96] Johan Bengtsson, Kim G. Larsen, Fredrik Larsson, Paul Pettersson,
and Wang Yi. Uppaal in 1995. In Proc. of the 2nd Workshop on
Tools and Algorithms for the Construction and Analysis of Systems,
Bibliography 171
[CC95] S.V. Campos and E.M. Clarke. Real-time symbolic model checking
for discrete time models. In C. Rattray T. Rus, editor, AMAST Se-
ries in Computing: Theories and Experiences for Real-Time System
Development, 1995.
[CL00] Franck Cassez and Kim Guldstrand Larsen. The impressive power of
stopwatches. In Catuscia Palamidesi, editor, 11th International Con-
ference on Concurrency Theory, (CONCUR’2000), number 1877 in
Lecture Notes in Computer Science, pages 138–152, University Park,
P.A., USA, July 2000. Springer-Verlag.
[CS96] C.Daws and S.Yovine. Reducing the number of clock variables of timed
automata. In Proceedings of the 1996 IEEE Real-Time Systems Sym-
posium, RTSS’96. IEEE Computer Society Press, 1996.
[DBLY03] Alexandre David, Gerd Behrmann, Kim G. Larsen, and Wang Yi. Uni-
fication & sharing in timed automata verification. In Proc. of SPIN
2003, volume 2648 of Lecture Notes in Computer Science, pages 225–
229. Springer-Verlag, 2003.
[ES96] F. Allen Emerson and A. Prasad Sistla. Symmetry and model check-
ing. Formal Methods in System Design: An International Journal,
9(1/2):105–131, August 1996.
[HBL+ 03] Martijn Hendriks, Gerd Behrmann, Kim G. Larsen, Peter Niebert, and
Frits Vaandrager. Adding symmetry reduction to Uppaal. In Proceed-
ings First International Workshop on Formal Modeling and Analysis
of Timed Systems (FORMATS 2003), Lecture Notes in Computer Sci-
ence, Marseille, France, September 2003.
[HRSV02] T.S. Hune, J.M.T. Romijn, M.I.A. Stoelinga, and F.W. Vaandrager.
Linear parametric model checking of timed automata. Journal of Logic
and Algebraic Programming, 52-53:183–220, 2002.
[LLPY97] Fredrik Larsson, Kim G. Larsen, Paul Pettersson, and Wang Yi. Effi-
cient Verification of Real-Time Systems: Compact Data Structures and
State-Space Reduction. In Proc. of the 18th IEEE Real-Time Systems
Symposium, pages 14–24. IEEE Computer Society Press, December
1997.
176 Bibliography
[LNAB+ 98] Jørn Lind-Nielsen, Henrik Reif Andersen, Gerd Behrmann, Henrik Hul-
gaard, Kåre Kristoffersen, and Kim G. Larsen. Verification of Large
State/Event Systems using Compositionality and Dependency Anal-
ysis. In Tools and Algorithms for the Construction and Analysis of
Systems, volume 1384 of Lecture Notes in Computer Science, pages
201–216. Springer-Verlag, March/April 1998.
[LPJ+ 96] W. Lee, A. Pardo, J.-Y. Jang, G. Hachtel, and F. Somenzi. Tear-
ing based automatic abstraction for CTL model checking. In 1996
IEEE/ACM International Conference on Computer-Aided Design,
pages 76–81, San Jose, CA, 1996.
[LPY97b] Kim G. Larsen, Paul Pettersson, and Wang Yi. Uppaal: Status and
developments. In Orna Grumberg, editor, Proc. of the 9th Int. Conf. on
Computer Aided Verification, number 1254 in Lecture Notes in Com-
puter Science, pages 456–459. Springer–Verlag, June 1997.
[LWYP98] K.G. Larsen, C. Weise, W. Yi, and J. Pearson. Clock difference di-
agrams. DoCS Technical Report 98/99, Uppsala University, Sweden,
1998. presented at the Nordic Workshop on Programming Theory,
Turku, Finland, November 1998.
Bibliography 177
[LWYP99] Kim G. Larsen, Carsten Weise, Wang Yi, and Justin Pearson. Clock
difference diagrams. Nordic Journal of Computing, 6(3):271–298, 1999.
[PSD98] David Y.W. Park, Jens U. Skakkebæk, and David L. Dill. Static
Analysis to Identify Invariants in RSML Specifications. In Formal
Techniques in Real-Time and Fault-Tolerant Systems, volume 1486 of
Lecture Notes in Computer Science, pages 133–142. Springer-Verlag,
September 1998.
[SD97] U. Stern and D. L. Dill. Parallelizing the Murϕ verifier. In Orna Grum-
berg, editor, Computer Aided Verification, 9th International Confer-
ence, volume 1254 of LNCS, pages 256–67. Springer-Verlag, June 1997.
Haifa, Isreal, June 22-25.
[ST98] Karsten Strehl and Lothar Thiele. Symbolic model checking of pro-
cess networks using interval diagram techniques. In Proceedings of
the IEEE/ACM International Conference on Computer-Aided Design
(ICCAD-98), pages 686–692, San Jose, California, 1998.
[Sto00] M. Stobbe. Results on scheduling the SIDMAR steel plant using con-
straint programming. Internal report, 2000.
[Str98] Karsten Strehl. Using interval diagram techniques for the symbolic
verification of timed automata. Technical report, Institut für Technis-
che Informatik und Kommunikationsnetze (TIK), ETH Zürich, July
1998.
[Wan00] Farn Wang. Efficient data structure for fully symbolic verification of
real-time software systems. In Tools and Algorithms for Construction
and Analysis of Systems, pages 157–171, 2000.
[YPD94] Wang Yi, Paul Pettersson, and Mats Daniels. Automatic Verification
of Real-Time Communicating Systems By Constraint-Solving. In Proc.
of the 7th International Conference on Formal Description Techniques,
1994.