Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
ceb0444
all commits of old branch
Apr 23, 2016
5c2e297
all commits of old branch
Apr 23, 2016
3182257
all commits of old branch
Apr 23, 2016
87a561b
fixed compilation errors after merge
Apr 23, 2016
5c3468c
use cex analyser concrete with --inline
Apr 25, 2016
4fae501
made sure that the executable is named 2ls
Apr 25, 2016
3926b9e
bug fixes for abstract case
kumarmadhukar Apr 26, 2016
cf924bc
loop-specific unwinding code, in progress
kumarmadhukar Apr 26, 2016
78c3f8a
commented new code to check loop-specific unwinding
kumarmadhukar Apr 27, 2016
072f5b9
commented debug code
kumarmadhukar Apr 27, 2016
e3763bc
put unwinding suffix into ID_suffix attribute
Apr 28, 2016
bd1b95e
collect nondet vars in local_SSA
May 11, 2016
4ae34ef
add nondets as OUT vars to summary template for backwards analysis
May 11, 2016
3642d88
fixed various places where nondet_symbols in templates were not expected
May 11, 2016
f0d46d3
added a comment for new fields in loopt
kumarmadhukar May 13, 2016
ec5e73a
fixes to replace_globals when inlining
May 13, 2016
94f5e3c
nondet locals only once
May 13, 2016
c6087cc
fixed filtering of non-violating assertion instances before running s…
May 13, 2016
22b5caa
modified loop-specific unwinder to iterate over all loops
kumarmadhukar May 16, 2016
a16b350
selective unwinding code
kumarmadhukar May 20, 2016
1c4fca1
output unsat core for spurious cex, uses incremental solver debug fac…
May 20, 2016
a7fecc7
Srivas' examples
May 23, 2016
f7eac11
moved assertion into bar()
May 23, 2016
6d04201
recompute dependency graphs after unwinding
May 23, 2016
4644a57
fixed renaming of nondets on inlining
May 23, 2016
29857fe
propagate nondets in error summaries up to entry point
May 23, 2016
1d7192b
fixed use of ssa_expr in trace output
May 23, 2016
23ac3cc
minor bug fixes
kumarmadhukar May 24, 2016
c72065d
unsat core output (without using incremental solver debug mode)
May 25, 2016
786e15e
get reason for spuriousness
May 25, 2016
b0cf78b
to start with, add all functions and loop ids to reason
May 26, 2016
ce14c62
reason grouped by functions; identify callee by call site location
May 26, 2016
d0ce3c8
selective unwinding and inlining code - in progress
kumarmadhukar May 27, 2016
7655199
code for unwinding and inlining
kumarmadhukar May 27, 2016
972de28
minor fix in inlining code
kumarmadhukar May 28, 2016
ac5ce60
more k-induction tests
May 28, 2016
31fd784
spurious check refactoring started
May 28, 2016
fc6a15b
refactoring done, except loop continuations
May 28, 2016
04ab15b
loop-specific continuation conditions
May 28, 2016
624e2f3
update enable_expr after 0th unwinding
May 28, 2016
5e9883c
concrete only complete with inline
May 28, 2016
034901c
take into account enabling_expr in depgraph construction
May 29, 2016
682b15e
fixed all no-cex regressions for complete
May 29, 2016
2e3b964
factor out SSA refinements into separate classes
May 29, 2016
9dd6ae6
unwind output one-off
May 29, 2016
743a5f5
flag functions as inlined and debug output in ssa_refiner about what …
May 29, 2016
dca2ef7
recursive gathering of summaries and inlined functions
May 29, 2016
0777235
basic unsat-core based refinement selection
May 29, 2016
0d6fc1b
fully-unwound check fixed as far as possible
May 30, 2016
c328faa
unwind value propagation bug fixed (#5)
kumarmadhukar May 30, 2016
90e408a
check whether function has assertion was too semantic, we needed to s…
May 30, 2016
acc5de0
loop enabling expr fixed
May 30, 2016
eaa73f3
loop enabling expr fixed, removed superfluous variables
May 30, 2016
4fe616c
missing regressions
May 30, 2016
a0352c4
simplified example that exposes problem with monolithic --k-induction…
May 30, 2016
f3eac21
wrong assertions feeded into cex checker; output assignments in incre…
May 30, 2016
ffae69d
collecting renamed error assertions - still some of them are missed
May 30, 2016
badd85e
assertion renaming in cex_complete fixed
May 30, 2016
d1d8bf8
be more robust w.r.t. functions that are not in the SSA db
May 30, 2016
54980f3
assumptions must hold in backwards analysis
May 30, 2016
b7c42d5
clean up summary_checker_base
May 30, 2016
06849a2
check for inlined functions whether they have assertions
May 30, 2016
a9babc3
recursively collect assertions from inlined functions through inliner
May 30, 2016
6fb2966
sync
May 30, 2016
8fe6316
depgraph renaming problem fixed
May 31, 2016
8380936
inlined functions must not contain negated assertions; assertions are…
May 31, 2016
6b19c30
regression tests refactored
May 31, 2016
7beec89
partial upgrade to new cbmc version
Sep 17, 2016
f94dfc3
bounds simplification
peterschrammel Sep 18, 2016
d796c56
merge
Sep 17, 2016
6a82e76
merge
Sep 17, 2016
85a7af1
bounds simplification
peterschrammel Sep 18, 2016
b8ee5c9
Rebase bw cex
peterschrammel May 9, 2017
c5925c8
Improved gitignore
peterschrammel May 9, 2017
fe8f453
Clean up
peterschrammel May 9, 2017
9175a61
Spurious checker needs entry point function and goals need expression
peterschrammel Jun 2, 2017
0e17dbc
Runtime error fixes
rnbguy Jun 7, 2017
739537f
Fix to check only entry_point
rnbguy Jun 7, 2017
af995f9
Merge pull request #9 from rnbdev/comp-kind-fixes
peterschrammel Jun 7, 2017
2108cf4
Negation moved into cover_goals_ext
peterschrammel Jun 8, 2017
459ed5d
Deactivate assume after assert
peterschrammel Jun 8, 2017
baaf462
Fixed incorrect result from summarizer_bw_cex_concrete
rnbguy Jun 10, 2017
6a02ab2
Merge pull request #10 from rnbdev/comp-kind-fixes
peterschrammel Jun 22, 2017
50f067c
fixed spurious-check options
kumarmadhukar Jun 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ tests.log

# binaries
src/2ls/2ls

*.orig
*.bak
*\#
20 changes: 20 additions & 0 deletions regression/kiki-modular/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
default: tests.log

FLAGS = --verbosity 10

test:
@../test.pl -c "../../../src/summarizer/2ls $(FLAGS)"

tests.log: ../test.pl
@../test.pl -c "../../../src/summarizer/2ls $(FLAGS)"

show:
@for dir in *; do \
if [ -d "$$dir" ]; then \
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;

clean:
@rm -f *.log
@for dir in *; do rm -f $$dir/*.out; done;
180 changes: 180 additions & 0 deletions regression/kiki-modular/cex-struct1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@

#include <stdio.h>
#include <assert.h>

typedef struct{ int x; int y; int z; int w; int p; int q; int a; } foo;

foo func_1(foo f);
foo func_2(foo f);
foo func_3(foo f);
foo func_4(foo f);
foo func_5(foo f);
foo func_6(foo f);
foo func_7(foo f);
foo func_8(foo f);

foo func_1(foo f)
{
f.x = 23 + 12;
f.x = 4 - 1;
if(f.w > f.x) {f.q = 21 * f.z;} else {f.q = 4 / f.p;}
f.a = f.a + 1;
f.z = f.y * f.x;
f.x = 11 - f.p;
f.y = 1 - 19;
f.y = f.w - 14;
return f;
}

/**********************************************************************/

foo func_2(foo f)
{
if(f.y < f.q) {f.x = f.w / 24;} else {f.w = 18 / 3;}
f.w = f.p * f.q;
if(f.q < 6) {f.y = 25 - f.x;} else {f.q = f.y / f.w;}
f.a = f.a + 1;
if(f.x <= f.x) {f.z = 9 + f.x;} else {f.y = 1 + f.x;}
f.x = f.q / 25;
f.w = f.x - f.y;
f.x = 9 + f.y;
f.y = 24 - 2;
f.w = 10 + f.z;
return f;
}

/**********************************************************************/

foo func_3(foo f)
{
if(f.p == 12) {f.w = 22 + 7;} else {f.p = f.x + f.q;}
f.y = f.p + f.x;
f.w = 6 * f.y;
if(f.z <= 20) {f.q = 21 / 24;} else {f.w = f.q * f.w;}
f.w = f.y - 10;
f.q = 2 - 20;
f.x = f.x / 10;
f.p = 16 * 23;
f.w = 18 - 13;
f.w = f.p - 2;
f.z = 7 + f.w;
f.a = f.a + 1;
f.x = 16 / f.x;
return f;
}

/**********************************************************************/

foo func_4(foo f)
{
f.w = f.y + f.y;
f.q = 18 * 13;
f.y = f.z * f.y;
f.x = 1 * 25;
f.y = 4 / f.q;
f.x = f.p / 9;
f.a = f.a + 1;
if(f.x >= 7) {f.q = f.q / 8;} else {if(f.x < 9) {f.z = 16 + f.p;} else {f.x = f.w - 18;}}
f.y = 2 * 4;
f.q = 16 + f.x;
f.q = 16 * f.w;
if(f.w > 14) {f.q = 20 + 20;} else {f.x = 25 + 9;}
return f;
}

/**********************************************************************/

foo func_5(foo f)
{
f.a = f.a + 1;
if(f.x == 13) {f.p = 13 * f.x;} else {f.w = f.q / f.w;}
f.y = 21 * f.x;
f.p = 4 * 25;
if(f.p >= 24) {f.x = 11 * 6;} else {f.p = 9 * f.p;}
f.x = 3 + f.z;
f.x = f.x + 22;
f.z = 8 / 8;
f.q = 18 + f.x;
f.x = 5 * f.z;
f.y = f.w + f.w;
return f;
}

/**********************************************************************/

foo func_6(foo f)
{
f.y = f.w / f.q;
f.p = f.x + 8;
f.a = f.a + 1;
f.z = f.w * 20;
if(f.x < f.p) {f.x = f.z + 2;} else {f.y = f.y * f.x;}
if(f.y <= f.y) {f.q = f.y * f.w;} else {f.q = f.w - 13;}
f.p = 9 + f.y;
f.q = f.y / 14;
f.p = 18 / f.z;
if(f.w < f.p) {f.w = 17 * f.p;} else {f.p = f.y - 10;}
f.p = 3 / 14;
f.q = 10 - f.w;
if(f.y > 12) {f.z = f.q - 24;} else {f.x = f.z / 17;}
return f;
}

/**********************************************************************/

foo func_7(foo f)
{
f.q = f.q * 23;
f.w = 25 - f.w;
if(f.q < f.y) {f.w = 21 + f.z;} else {f.p = 16 - 1;}
f.y = f.z * f.z;
f.x = 5 * 16;
f.x = 11 + f.x;
f.z = f.y - f.y;
f.q = 11 - f.z;
f.a = f.a + 1;
return f;
}

/**********************************************************************/

foo func_8(foo f)
{
f.w = f.y - 15;
f.q = f.x + f.z;
f.y = 5 / 1;
if(f.q < 3) {f.p = 6 * f.x; } else {f.w = 8 + 21;}
f.p = 19 / f.p;
f.z = 4 / f.z;
if(f.x < 12) {f.p = f.y - 4; } else {f.x = 15 + 2;}
f.q = 19 / f.w;
if(f.p > 24) {f.z = 5 / 9;} else {f.w = f.x + f.z;}
f.z = f.z + 1;
f.a = f.a + 1;
if(f.z > f.y) {f.y = f.y + f.x;} else {f.y = 13 - 18;}
return f;
}


/**********************************************************************/

int main()
{
foo f0, f1, f2, f3, f4, f5, f6, f7, f8;

// __CPROVER_assume((f0.a >= 0) && (f0.a <= 9));
f0.a = 0;

f1 = func_1(f0);
/* f2 = func_2(f1);
f3 = func_3(f2);
f4 = func_4(f3);
f5 = func_5(f4);
f6 = func_6(f5);
f7 = func_7(f6);
f8 = func_8(f7);*/

assert(/*(f8.x + f8.y + f8.z + f8.w + f8.p + f8.q > 0) &&*/ (f1.a != 1)); // unsafe assertion

return 0;
}
6 changes: 6 additions & 0 deletions regression/kiki-modular/cex-struct1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
22 changes: 22 additions & 0 deletions regression/kiki-modular/cex-struct2/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

#include <stdio.h>
#include <assert.h>

typedef struct{ int a; } foo;

foo func_1(foo f)
{
f.a = f.a + 1;
return f;
}

int main()
{
foo f0, f1;
f0.a = 0;

f1 = func_1(f0);

assert((f1.a) != 1);
return 0;
}
6 changes: 6 additions & 0 deletions regression/kiki-modular/cex-struct2/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
23 changes: 23 additions & 0 deletions regression/kiki-modular/cex-struct3/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#include <stdio.h>
#include <assert.h>

typedef struct{ int x; int a; } foo;

foo func_1(foo f)
{
f.a = f.a + 1;
f.x = f.a;
return f;
}

int main()
{
foo f0, f1;
f0.a = 0;

f1 = func_1(f0);
assert(f1.a != 1); // unsafe assertion

return 0;
}
6 changes: 6 additions & 0 deletions regression/kiki-modular/cex-struct3/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
15 changes: 15 additions & 0 deletions regression/kiki-modular/cex1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <assert.h>

int foo(int x)
{
assert(x>5);
}

int main(int argc, char** argv)
{
int y;
if(y<=0) foo(y);

return 0;
}

6 changes: 6 additions & 0 deletions regression/kiki-modular/cex1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
21 changes: 21 additions & 0 deletions regression/kiki-modular/cex10/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <assert.h>

int error(int k){
assert(k != 3);
}

int inc(int x){
return (x+1);
};

int main(){
int num = 0;
num = inc(num);
num = inc(num);
num = inc(num);
error(num);
return 0;
}



6 changes: 6 additions & 0 deletions regression/kiki-modular/cex10/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
16 changes: 16 additions & 0 deletions regression/kiki-modular/cex13/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#include <assert.h>

void foo(int x)
{
assert(x==5);
}

int main(int argc, char** argv)
{
int y = 4;
foo(y);

return 0;
}

6 changes: 6 additions & 0 deletions regression/kiki-modular/cex13/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
16 changes: 16 additions & 0 deletions regression/kiki-modular/cex2/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#include <assert.h>

void foo(int x)
{
assert(x!=5);
}

int main(int argc, char** argv)
{
int y = 5;
foo(y);

return 0;
}

6 changes: 6 additions & 0 deletions regression/kiki-modular/cex2/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CORE
main.c
--havoc --k-induction --spurious-check complete
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
16 changes: 16 additions & 0 deletions regression/kiki-modular/cex3/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#include <assert.h>

int foo(int x)
{
assert(x!=5);
}

int main(int argc, char** argv)
{
int y;
if(y > 0) foo(y);

return 0;
}

Loading