-
Notifications
You must be signed in to change notification settings - Fork 1
/
Spec_withoutAssumptions_template.prompt
46 lines (36 loc) · 1.32 KB
/
Spec_withoutAssumptions_template.prompt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Translate the following into a TSL specification. Remember, this is what TSL code looks like:
```
always assume{
}
always guarantee{
//rotate the cube with the value of t (increments by 1 every frame)
[cube.rotation.y <- t];
}
```
```
always assume {
(room.somebodyEnters
-> (! room.empty W room.somebodyLeaves)) ;
((room.somebodyLeaves && room.empty)
-> (room.empty W room.somebodyEnters)) ;
(cm.ready || cm.standby || cm.busy) ;
(cm.ready -> (!cm.standby && !cm.busy)) ;
(cm.standby -> (!cm.busy && !cm.ready)) ;
(cm.busy -> (!cm.ready && !cm.standby)) ;
([ cm <- turnOn() ] && cm.standby
-> X cm.busy U ([ cm <- makeCoffee() ] || [ cm <- turnOff() ] R cm.ready)) ;
([ cm <- turnOff() ] && cm.ready
-> X cm.busy U ([ cm <- turnOn() ] R cm.standby)) ;
([ cm <- makeCoffee() ] && cm.ready
-> X cm.busy U (cm.finished && ([ cm <- makeCoffee() ] || [ cm <- turnOff() ] R cm.ready)));
}
always guarantee {
room.somebodyEnters
-> F (cm.ready W (room.somebodyLeaves && room.empty));
}
```
This is a complete listing of all functions and predicates you will need to use to create the spec. Everything else should be basic TSL language operators.
[[FUNCTIONS_AND_PREDICATES_GO_HERE]]
Natural language description:
[[NATURAL_LANGUAGE_SUMMARY_GOES_HERE]]
[[NATURAL_LANGUAGE_DESCRIPTION_GOES_HERE]]