Skip to content

Commit 8c147d8

Browse files
committed
Everything kind of solved. NuSVM exercise
1 parent 12f83d1 commit 8c147d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: temperature_sensor.smv

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ASSIGN
1313
init(memory[2]) := 0sd32_0;
1414
init(oldest) := 0;
1515
init(state) := 0;
16-
init(sleep) := 0sd1_0;
16+
init(sleep) := 0sd1_1;
1717
init(cpu_temperature) := 0sd32_0;
1818
init(sensor_temperature) := 0sd32_0;
1919

@@ -72,10 +72,11 @@ SPEC AX(state = 5 -> sleep = 0sd1_1);
7272

7373
-- When the sensor is not sleeping, then the ISR is executed.
7474

75-
LTLSPEC (sleep = 0sd1_1 | state != 0) U (sleep = 0sd1_1)
75+
SPEC AG (sleep = 0sd1_0 -> state != 0) -- state != 0) U (sleep = 0sd1_1)
7676

7777
-- If the ISR is not executed, then the sensor is sleeping.
7878

79+
SPEC AG (state = 0 -> sleep = 0sd1_1);
7980
LTLSPEC (state = 0 | sleep = 0sd1_1) U (state != 0)
8081

8182
-- When the ISR is not executed, then the value of memory at the previous value of oldest is equal to cpu.temperature.

0 commit comments

Comments
 (0)