-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSpec_template.prompt
38 lines (30 loc) · 1.3 KB
/
Spec_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
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)));
((p 2 3) && [ g <- 1 ] -> ! ([ g <- 2 ]) W [ g <- 3 ]);
([ g <- 1 ] -> ((! ([ g <- 2 ]) W [ g <- 3 ])));
}
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]]