init - first working version

This commit is contained in:
2025-10-27 01:14:12 -04:00
parent 6cc22d4f17
commit 9b0f340c0b
24 changed files with 1277 additions and 12 deletions

29
tests/replay/3-jump.pml Normal file
View File

@@ -0,0 +1,29 @@
// INTENDED BEHAVIOR: no violation
// explanation: can only replay once
chan c = [8] of { byte };
byte q=1;
init {
c!5;
}
active proctype consume() {
MAIN:
do
:: c ? 5 -> goto PROC1;
od
PROC1:
do
:: c ? 5 -> goto PROC2;
od
PROC2:
do
:: c ? 5 -> goto PROC3;
od
PROC3:
q=0;
}
ltl proc {
always !(q == 0);
}

View File

@@ -0,0 +1,34 @@
// INTENDED BEHAVIOR: violation
// explanation: replay, but in a different order than received
chan c = [8] of { byte };
byte q=1;
init {
c!5;
c!3;
}
active proctype consume() {
MAIN:
do
:: c ? 5 -> goto PROC1;
od
PROC1:
do
:: c ? 3 -> goto PROC2;
od
PROC2:
do
:: c ? 3 -> goto PROC3;
od
PROC3:
do
:: c ? 5 -> goto PROC4;
od
PROC4:
q=0;
}
ltl proc {
always !(q == 0);
}

View File

@@ -0,0 +1,24 @@
// INTENDED BEHAVIOR: violation
chan c = [8] of { byte };
byte q=1;
init {
c!5;
}
active proctype consume() {
MAIN:
do
:: c ? 5 -> goto PROC1;
od
PROC1:
do
:: c ? 5 -> goto PROC2;
od
PROC2:
q=0;
}
ltl proc {
always !(q == 0);
}

View File

@@ -0,0 +1,19 @@
chan c = [8] of { byte };
byte q=1;
init {
c!5;
}
active proctype consume() {
MAIN:
do
:: c ? 5 -> goto PROC;
od
PROC:
q=0;
}
ltl proc {
eventually (q == 0);
}