Skip to content

Commit

Permalink
Merge pull request #672 from utwente-fmt/veymont-check-test-cases
Browse files Browse the repository at this point in the history
Veymont fix bugs and test cases
  • Loading branch information
bobismijnnaam authored Jul 23, 2021
2 parents 23678b2 + f37a126 commit 6627bd1
Show file tree
Hide file tree
Showing 63 changed files with 160 additions and 154 deletions.
4 changes: 2 additions & 2 deletions examples/veymont-check/checkLTS/ltstest.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// -*- tab-width:4 ; indent-tabs-mode:nil -*-
//:: cases LTSMethodCallTest
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass

class Role {
Expand Down
8 changes: 4 additions & 4 deletions examples/veymont-check/checkLTS/simpleifelse.pvl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -*- tab-width:4 ; indent-tabs-mode:nil -*-
//:: cases SimpleIfElse
//:: suite session-generate
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass

class Role {
Expand Down Expand Up @@ -39,10 +38,11 @@ class Main {
requires a.x == 0 && b.x == 8 && c.x == 4;
ensures a.x == b.x && b.x == c.x;
void run() {

assert (a.left != a.x) == (b.left != b.x) && (b.left != b.x) == (c.left != c.x);
if(a.left != a.x && b.left != b.x && c.left != c.x) {
a.x = a.x + 1;
}
assert (a.left != 2) == (b.left != 3) && (b.left != 3) == (c.left != 4);
if(a.left != 2 && b.left != 3 && c.left != 4) {
b.x = 5;
} else {
Expand Down
5 changes: 2 additions & 3 deletions examples/veymont-check/checkLTS/simplemethodcall.pvl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -*- tab-width:4 ; indent-tabs-mode:nil -*-
//:: cases SimpleMethodCall
//:: suite session-generate
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass

class Role {
Expand Down
6 changes: 3 additions & 3 deletions examples/veymont-check/checkLTS/simplewhile.pvl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -*- tab-width:4 ; indent-tabs-mode:nil -*-
//:: cases SimpleWhile
//:: suite session-generate
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass

class Role {
Expand Down Expand Up @@ -45,6 +44,7 @@ class Main {
loop_invariant Perm(a.left, 1) ** Perm(b.left, 1) ** Perm(c.left, 1);
loop_invariant b.x - c.x == c.x - a.x;
loop_invariant b.left == a.x && c.left == b.x && a.left == c.x;
loop_invariant (a.left != a.x) == (b.left != b.x) && (b.left != b.x) == (c.left != c.x);
while(a.left != a.x && b.left != b.x && c.left != c.x) {
a.x = a.x + 1;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/MainConstructorArg.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorArg
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/NoMain.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases NoMain
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class SomeClass {

Expand Down
6 changes: 3 additions & 3 deletions examples/veymont-check/checkMainClass/NoMainConstructor.pvl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//:: cases NoMainConstructor
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {


void run() {

}
}
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/NoMainMethod.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainMethod
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/NoMainMethod2.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainMethod2
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/NoRunArg.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases NoRunArg
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/NoRunMethod.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases NoRunMethod
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases OtherMainConstructor
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/TwoMainConstructors.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases TwoMainConstructors
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
4 changes: 2 additions & 2 deletions examples/veymont-check/checkMainClass/WrongRunType.pvl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases WrongRunType
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorAssignmenWrongType
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorAssignNoRole
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorBlock
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorNonRoleAssignment
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorNonRoleAssignment2
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorNonRoleAssignment3
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorNonRoleAssignment4
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainConstructorWrongRoleNr
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases ConstructorCall
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases ConstructorCall2
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases ForLoop
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases GuardedRecursion
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases GuardedRecursion2
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases IfCondition
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases MainMethodCall
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases NewNonRoleObject
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//:: cases NewRoleObject
//:: suite session-check
//:: tools session
//:: verdict Pass
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Role a,b;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases NonRoleMethodCall
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases PureMethodCall
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases RoleFieldAssignment
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {
Role a;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases WaitStatement
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases WhileCondition
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases WrongAssignment
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases WrongAssignment2
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases WrongSyntax
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Error
class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//:: cases AbsenceRecursion
//:: suite session-check
//:: tools session
//:: suite veymont veymont-check
//:: option --veymont tmp.pvl
//:: verdict Pass
class Main {

Expand Down
Loading

0 comments on commit 6627bd1

Please sign in to comment.