-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
270 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
trunk/examples/programs/toy/errorLocalization/toy/diamondCallEmpty.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-07 | ||
*/ | ||
|
||
procedure main() { | ||
var x: int; | ||
if (x > 0) { | ||
call callee(); | ||
} else { | ||
call callee(); | ||
} | ||
assert(false); | ||
} | ||
|
||
|
||
procedure callee() returns () | ||
{ | ||
} |
19 changes: 19 additions & 0 deletions
19
trunk/examples/programs/toy/errorLocalization/toy/diamondCallError.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-19 | ||
*/ | ||
|
||
procedure main() { | ||
var x: int; | ||
|
||
if (x > 2) { | ||
call foo(); | ||
} else { | ||
call foo(); | ||
} | ||
} | ||
|
||
procedure foo() returns () { | ||
assert false; | ||
} |
21 changes: 21 additions & 0 deletions
21
trunk/examples/programs/toy/errorLocalization/toy/diamondCallErrorUselessCond.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-19 | ||
*/ | ||
|
||
procedure main() { | ||
var x: int; | ||
|
||
if (true) { | ||
} | ||
if (x > 2) { | ||
call foo(); | ||
} else { | ||
call foo(); | ||
} | ||
} | ||
|
||
procedure foo() returns () { | ||
assert false; | ||
} |
30 changes: 30 additions & 0 deletions
30
trunk/examples/programs/toy/errorLocalization/toy/diamondCallGlobal.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-19 | ||
*/ | ||
|
||
var g: int; | ||
|
||
procedure main() returns (); | ||
modifies g; | ||
|
||
implementation main() { | ||
var x: int; | ||
|
||
g := 0; | ||
if (x > 2) { | ||
call foo(); | ||
} | ||
if (x <= 2) { | ||
call foo(); | ||
} | ||
assert(g == 0); | ||
} | ||
|
||
procedure foo() returns (); | ||
modifies g; | ||
|
||
implementation foo() returns () { | ||
g := 1; | ||
} |
20 changes: 20 additions & 0 deletions
20
trunk/examples/programs/toy/errorLocalization/toy/diamondDifferent.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-02 | ||
*/ | ||
|
||
|
||
procedure main() | ||
{ | ||
var x, y: int; | ||
|
||
y := 1; | ||
havoc x; | ||
if (x > 0) { | ||
y := 0; | ||
} else { | ||
x := 0; | ||
} | ||
assert(y == 1); | ||
} |
20 changes: 20 additions & 0 deletions
20
trunk/examples/programs/toy/errorLocalization/toy/diamondSame.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-30 | ||
*/ | ||
|
||
implementation main() returns () { | ||
var x: int; | ||
|
||
if (x > 0) { | ||
x := 0; | ||
} else { | ||
x := 0; | ||
} | ||
assert false; | ||
} | ||
|
||
procedure main() returns (); | ||
modifies ; | ||
modifies ; |
18 changes: 18 additions & 0 deletions
18
trunk/examples/programs/toy/errorLocalization/toy/emptyCall.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-14 | ||
*/ | ||
|
||
implementation main() returns (){ | ||
call init(); | ||
assert false; | ||
} | ||
|
||
implementation init() returns (){ | ||
} | ||
|
||
procedure main() returns (); | ||
modifies ; | ||
procedure init() returns (); | ||
modifies ; |
13 changes: 13 additions & 0 deletions
13
trunk/examples/programs/toy/errorLocalization/toy/emptyProgram.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-12 | ||
*/ | ||
|
||
implementation main() returns (){ | ||
assert false; | ||
} | ||
|
||
procedure main() returns (); | ||
modifies ; | ||
modifies ; |
13 changes: 13 additions & 0 deletions
13
trunk/examples/programs/toy/errorLocalization/toy/loopNondet1.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-25 | ||
*/ | ||
|
||
procedure main() returns () { | ||
var x: int; | ||
|
||
while (*) { | ||
} | ||
assert(x == 0); | ||
} |
14 changes: 14 additions & 0 deletions
14
trunk/examples/programs/toy/errorLocalization/toy/loopNondet2.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-25 | ||
*/ | ||
|
||
procedure main() returns () { | ||
var x: int; | ||
|
||
while (*) { | ||
x := 1; | ||
} | ||
assert(x == 0); | ||
} |
14 changes: 14 additions & 0 deletions
14
trunk/examples/programs/toy/errorLocalization/toy/loopNondet3.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-25 | ||
*/ | ||
|
||
procedure main() returns () { | ||
var x: int; | ||
|
||
while (*) { | ||
x := 0; | ||
} | ||
assert(x == 0); | ||
} |
14 changes: 14 additions & 0 deletions
14
trunk/examples/programs/toy/errorLocalization/toy/loopNondet4.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-25 | ||
*/ | ||
|
||
procedure main() returns () { | ||
var x: int; | ||
|
||
while (*) { | ||
x := x + 1; | ||
} | ||
assert(x == 0); | ||
} |
14 changes: 14 additions & 0 deletions
14
trunk/examples/programs/toy/errorLocalization/toy/loopNondet5.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-25 | ||
*/ | ||
|
||
procedure main() returns () { | ||
var x: int; | ||
|
||
while (*) { | ||
havoc x; | ||
} | ||
assert(x == 0); | ||
} |
14 changes: 14 additions & 0 deletions
14
trunk/examples/programs/toy/errorLocalization/toy/loopNondetInitVal.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-20 | ||
*/ | ||
|
||
procedure main() { | ||
var x,y: int; | ||
|
||
while (x > 0) { | ||
x := x - 1; | ||
} | ||
assert(y == 0); | ||
} |
26 changes: 26 additions & 0 deletions
26
trunk/examples/programs/toy/errorLocalization/toy/loopSeveralExits.bpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//#Unsafe | ||
/* | ||
* Author: Christian Schilling (schillic@informatik.uni-freiburg.de) | ||
* Date: 2017-06-28 | ||
*/ | ||
|
||
procedure main() { | ||
var x: int; | ||
|
||
while (x >= 0) { | ||
x := x - 1; | ||
if (x == 1) { | ||
break; | ||
} | ||
if (x == 4) { | ||
break; | ||
} | ||
if (x == 7) { | ||
break; | ||
} | ||
if (x == 10) { | ||
break; | ||
} | ||
} | ||
assert(x == 0); | ||
} |