How does Uppaal clock evolve? I have two locations 1 and 2 without invariant, a clock reset to zero (0) on the transition into location 1. On the edge between location 1 and 2, how do I know the value of the clock at this time? (That is, the value of the clock in between the two locations before location 2). Does the clock continue to evolve from location 1 to location 2 and beyond or an automatic reset takes place at the entrance to a new location?
1 Answers
TLDR; answer.
If the automaton starts with x==0
and moves through the locations without invariants, then automaton may delay, say 5
time units, then move to another location with x==5
, then delay again, say 3.141
time units, which moves x
to value 8.141
, and so on. Notice that clock x
can get to arbitrary real value (hence my arbitrary choices) by delaying and taking transitions, which means that all those possibilities need to be analysed. Uppaal captures all those possible values in the form of constraints (or the lack of them in this case when there are no invariants or guards, the simulator may show just x==y
because all clocks are synchronized).
Some Examples. Suppose we have a timed automaton as described:
Then the value of clock x
can evolve like this:
If we make 1000 simulations then the trajectories of x
value will look like this:
As you can see it slowly fills the lower half of the plane -- a zone. UPPAAL uses Difference Bound Matrices to describe and analyze such zones symbolically.
The plots above were drawn using the following queries:
simulate [<=50] { x }
simulate [<=50; 1000] { x }
Some context.
Uppaal implements timed automata with clock variables whose values change continuously with a rate (time derivative) of 1
.
So if the clock is reset to 0
and automaton arrives to a location without invariants (also not urgent, nor committed), then clocks are free to evolve, therefore can have arbitrary value from 0
to infinity
. Uppaal represents such valuations symbolically using constraints (intervals) packed into difference bound matrices (DBM). If an automaton takes a transition, then Uppaal will analyse all possible transitions satisfying the constraints at once. For example, if a location has an invariant x<=5
and edge has a guard x>=2
, then transition is available when x
is anywhere between 2
and 5
, therefore Uppaal will take a symbolic transition with constraints 2<=x && x<=5
which captures all those possible transitions at once. This allows analysis of infinitely many transitions in finite data structures and finite time.
Some common cases which may confuse the novice. If there are multiple automata in the system, then the passage of time is analysed globally, i.e. an invariant in one automaton will have an effect on other clocks in other automata, because all clocks are synchronized through global time.
Timed automata allow only integers in the guards and invariants, which in principle can be scaled to accomodate models with rational numbers. Uppaal also extends the timed automata with urgent, committed locations, select statements, broadcast synchronization, integer variables, function calls etc, which are still analysable under the same timed automata theory, but makes modeling more expressive and succint.
You can read more in Tutorial on Uppaal, under the documentation section of http://uppaal.org : http://www.it.uu.se/research/group/darts/uppaal/documentation.shtml#tutorials

- 1,483
- 1
- 11
- 26
-
Thank you so much. Is this the same for local clocks? I mean, clocks declared locally for a process. – user993257 May 08 '19 at 07:56
-
Yes, all clocks are treated equaly. It's just the local clocks can be instantiated together with a new process and they have a local access scope (processes cannot update clocks of other processes). – mariusm May 08 '19 at 08:07
-
1My understanding of the clock is somehow right based on your explanation. But I am still not getting the desired result on my model. – user993257 May 08 '19 at 12:38
-
What is the semantics of a location without a specified clock in Uppaal ? – user993257 May 09 '19 at 11:52
-
@user993257 what do you mean by "without a specified clock"? If there are no invariants on a location, then the time can pass (unless there is another process with an invariant on its current location). – mariusm May 09 '19 at 17:58
-
Thank you @mariusm. The challenge is I have a case where there is no invariant but time has refused to pass. The time is not evolving. On the edge from location 1 to 2 (No invariant on both location) is a guard of x==y, where x is the clock and y an integer which has been updated to 5 on the entring transition to location 1 but this condition refused to be meet. Therefore, resulting to deadlock. I was expecting the time to evolve so that x will eventually be 5 and the transition can be enabled. – user993257 May 10 '19 at 10:27
-
@user993257 you are probably looking at simulator, if so, select the deadlock transition and inspect the clock constraints. I think you will find out that the deadlock occurs passed value 5, i. e. transition is enabled only at 5, but the process is allowed to delay more (there is no invariant), and after 5 time units x>5 the transition is no longer available, hence deadlock. – mariusm May 12 '19 at 06:00
-
Thank you @ mariusm, very correct, all though I can't say categorically the value of x, what I see as the constraint at the point of the deadlock is x>0. what is the possible way I can resolve this?. Thanks – user993257 May 12 '19 at 12:25
-
@user993257 what are the guards on the outgoing edges? It would be best if you posted a screenshot of the simulator. – mariusm May 12 '19 at 12:33
-
I tried to paste the screenshot but no luck. I haven't done that before on this forum so, I guess I am not doing it the right way. – user993257 May 12 '19 at 13:07
-
Use gimp: capture, then copy and paste into question text – mariusm May 12 '19 at 13:09
-
No luck on pasting the screenshot – user993257 May 12 '19 at 15:35