最后活跃于 2 days ago

A model of a driver assistance function.

修订 699430a3392682c8a95d066dcbbb7365f0595f8d

driver-assist.nv 原始文件 Playground
1|# Model based off of https://beza1e1.tuxen.de/tla-plus.html #|
2|# Driving Assist #|
3 :author: "June Gardner"
4
5|:state: off :seatbelt: unknown| :state: fault
6|:state: off :sensors: broken | :state: fault
7|:state: off :brakes: broken | :state: fault
8
9|:state: off :seatbelt: off | :state: temporary fault
10|:state: off :sensors: blind| :state: temporary fault
11|:state: off | :state: active
12
13|:state: active :seatbelt: off | :state: temporary fault
14|:state: active :sensors: blind | :state: temporary fault
15|:state: active :seatbelt: unknown| :state: fault
16|:state: active :seatbelt: broken | :state: fault
17
18|:state: temporary fault :seatbelt: on :sensors: ok :brakes: ok|
19 :state: active
20|:state: temporary fault :seatbelt: unknown| :state: fault
21|:state: temporary fault :sensors: broken | :state: fault
22|:state: temporary fault :brakes: broken | :state: fault
23
24|:state: fault| :state: off
25
26|:: activate driver assist|
27 :state: active
28
29|:: gather data from sensors|
30 :sensors: blind
31 :brakes: broken
32
33|:: the system should be in the $x state :state: $x|
34 :passed:
35|:: the system should be in the $x $y state :state: $x $y|
36 :passed:
37|:: the system should be in the $x state|
38 :failed:
39 :expected: $x
40|:: the system should be in the $x $y state|
41 :failed:
42 :expected: $x $y
43|:: the system should be $x|
44 :: the system should be in the $x state
45
46||:: activate driver assist
47 :: gather data from sensors
48 :: the system should be off