You are on page 1of 4

UPPAAL ASSIGNMENT 1

Exercise 1 Read Section 2 of the UPPAAL Tutorial up to (and including) Definition 1 and the explanation just below. Also read Section 2 in TImed Automata paper upto Defintion 1 (you may skip the small section called Timed Bchi automata). Answer the following questions.

[1] What is a location? In timed automata location is correspond to node [2] What is a (location) invariant ? In timed safety automata, a location invariant is a local timing constraint that related to the specific location. In Figure 1(b) example, the invariant is y<=20 constraint at start and end constraint. [3] What is a (clock) guard? Clock guard is a time constraint that invoke or limiting an action in a state. In Figure 1(b) example the clock guard example are 20 and 50 [4] What is a (clock) reset? Time constraint that invoke the first action, or return all action to the first location. . In Figure 1(b) example the(clock)reset example is x:=0, y:=0.

Exercise 2 3. using the simulator create traces with the following properties: a) 1 Viking 2 reaches a state safe E<> Viking2.safe With the fastest mode diagnostic trace, the simulation trace result shows as follow:
(unsafe, unsafe, unsafe, unsafe, free) take : Viking1 Torch (-, unsafe, unsafe, unsafe,-) take : Viking2 Torch (-, -, unsafe, unsafe, two) release : Viking2 Torch (-, safe, unsafe, unsafe, one)

b) 2 Viking1 reaches a state safe E<> Viking2.safe With the fastest mode diagnostic trace, the simulation trace result shows as follow:
(unsafe, unsafe, unsafe, unsafe, free) take : Viking1 Torch (-, unsafe, unsafe, unsafe,-) Torch (-, unsafe, unsafe, unsafe, one) release : Viking1 Torch (safe, unsafe, unsafe, unsafe, free)

c) 3 Viking1 and Viking2 reach a state safe E<> Viking1.safe and Viking2.safe With the fastest mode diagnostic trace, the simulation trace result shows as follow: (unsafe, unsafe, unsafe, unsafe, free) take : Viking1 Torch (-, unsafe, unsafe, unsafe,-) take : Viking2 Torch (-, -, unsafe, unsafe, two) release : Viking1 Torch (safe,-, unsafe, unsafe, one) release : Viking2 Torch (safe, safe, unsafe, unsafe, free) 4. Check all properties that are pre-defined in the verifier. all pre-defined properties in verifier is satisfied A[] not deadlock E<> Viking1.safe E<> Viking2.safe E<> Viking1.safe and Viking2.safe E<> Viking3.safe A[] not (Viking4.safe and time<slowest) E<> Viking4.safe imply time>=slowest E<> Viking1.safe and Viking2.safe and Viking3.safe and Viking4.safe 5. Fastest diagnostic trace for reach ability property: E<> Viking1.safe and Viking2.safe and Viking3.safe and Viking4.safe With the fastest mode diagnostic trace, the simulation trace result shows as follow:
(unsafe, unsafe, unsafe, unsafe, free) take : Viking1 Torch (-, unsafe, unsafe, unsafe,-) take : Viking2 Torch (-, -, unsafe, unsafe, two) release : Viking1 Torch (safe,-, unsafe, unsafe, one) release : Viking2 Torch (safe, safe, unsafe, unsafe, free) take : Viking1 Torch (-, safe, unsafe, unsafe,-) Torch (-, safe, unsafe, unsafe, one) release : Viking1 Torch (unsafe, safe, unsafe, unsafe, free) take : Viking3 Torch (unsafe, safe, -, unsafe,-) take : Viking4 Torch (unsafe, safe, -,-, two)

: satisfied : satisfied : satisfied : satisfied : satisfied : satisfied : satisfied : satisfied

release : Viking3 Torch (unsafe, safe, safe,-, one) release : Viking4 Torch (unsafe, safe, safe, safe, free) take : Viking2 Torch (unsafe, -, safe, safe, -) Torch (unsafe, -, safe, safe, one) release : Viking2 Torch (unsafe, unsafe, safe, safe, free) take : Viking1 Torch (-, unsafe, safe, safe, -) take : Viking2 Torch (-, -, safe, safe, two) release : Viking1 Torch (safe,-, safe, safe, one) release : Viking2 Torch (safe, safe, safe, safe, free)

First: Viking1 go with Viking2, after arrive at the end of the bridge Viking1 go back again and bring back the torch. (15 time unit) Second: Viking3 go with Viking 4, after arrive at the end of the bridge, Viking2 Go back again and bring back the torch.(35 time unit: 25 time unit until Viking4 reach the safe state and 10 time unit for Viking2 to go back) Third: Viking2 pick up Viking1 and go crossing the bridge. All Viking reach the safe state. (15 time unit) 6. The minimum amount of time for all Viking to reach the safe state is 60 time units. 7.

Exercise 3 Using the simulator create traces with the following properties: a) 1 hits the state P1.cs and P2.wait
(A, A, A, A, A, A) P(1) (req, A, A, A, A, A) P(2) (req, req, A, A, A, A) P(2) (req, wait, A, A, A, A) P(1) (wait, wait, A, A, A, A) P(1) (cs, wait, A, A, A, A)

b) 2 hits all locations in P1 and P2.


(A, A, A, A, A, A) P(1) (req, A, A, A, A, A) P(2) (req, req, A, A, A, A) P(1) (wait, req, A, A, A, A)

P(2) (wait, wait, A, A, A, A) P(2) (wait, cs, A, A, A, A) P(2) (wait, A, A, A, A, A) P(1) (req, A, A, A, A, A) P(1) (wait, A, A, A, A, A) P(1) (cs, A, A, A, A, A) P(1) (A, A, A, A, A, A)

c) 3 takes all transitions in P1 and P2.


(A, A, A, A, A, A) P(1) (req, A, A, A, A, A) P(2) (req, req, A, A, A, A) P(1) (wait, req, A, A, A, A) P(2) (wait, wait, A, A, A, A) P(2) (wait, cs, A, A, A, A) P(2) (wait, A, A, A, A, A) P(1) (req, A, A, A, A, A) P(2) (req, req, A, A, A, A) P(2) (req, wait, A, A, A, A) P(1) (wait, wait, A, A, A, A) P(1) (cs, wait, A, A, A, A) P(1) (A, wait, A, A, A, A) P(2) (A, req, A, A, A, A) P(2) (A, wait, A, A, A, A) P(2) (A, cs, A, A, A, A)

Check all properties that are pre-defined in the verifier, all pre-defined properties in verifier is satisfied P(1).req --> P(1).wait :satisfied A[] not deadlock : satisfied A[] forall (i:id_t) forall (j:id_t) P(i).cs && P(j).cs imply i == j : satisfied

You might also like