-
Notifications
You must be signed in to change notification settings - Fork 1
/
Spec_withoutFunctions_template.prompt
36 lines (28 loc) · 1.16 KB
/
Spec_withoutFunctions_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
Translate the following into a TSL specification. Remember, this is what TSL code looks like:
```
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 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]]