Skip to content

Goto analyzer 6 part3 #1645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <assert.h>

int main()
{
Expand Down
10 changes: 5 additions & 5 deletions regression/goto-analyzer/constant_propagation_01/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation1.c
--constants --simplify out.goto
CORE
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 12, function calls: 2$
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 5, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 12, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <assert.h>

int main()
{
Expand Down
3 changes: 0 additions & 3 deletions regression/goto-analyzer/constant_propagation_02/original

This file was deleted.

81 changes: 0 additions & 81 deletions regression/goto-analyzer/constant_propagation_02/simplified

This file was deleted.

10 changes: 5 additions & 5 deletions regression/goto-analyzer/constant_propagation_02/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_02.c
--constants --simplify out.goto
CORE
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 6, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <assert.h>

int main()
{
Expand Down
8 changes: 4 additions & 4 deletions regression/goto-analyzer/constant_propagation_03/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_03.c
--constants --simplify out.goto
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
^Simplified: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <assert.h>

int main()
{
Expand Down
8 changes: 4 additions & 4 deletions regression/goto-analyzer/constant_propagation_04/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_04.c
--constants --simplify out.goto
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
^Simplified: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <assert.h>

int main()
{
Expand Down
4 changes: 2 additions & 2 deletions regression/goto-analyzer/constant_propagation_05/test.desc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FUTURE
constant_propagation_05.c
main.c
--constants --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file constant_propagation_05.c line 12 function main, assertion j!=3: FAILURE (if reachable)$
^\[main.assertion.1\] file main.c line 12 function main, assertion j!=3: Failure (if reachable)$
--
^warning: ignoring
13 changes: 13 additions & 0 deletions regression/goto-analyzer/constant_propagation_06/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

int main()
{
int i=0, j=2;

while (i<50)
{
i++;
j++;
}
assert(i<51);
}

15 changes: 4 additions & 11 deletions regression/goto-analyzer/constant_propagation_06/test.desc
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
FUTURE
constant_propagation_06.c
--intervals --verify
CORE
main.c
--constants --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file constant_propagation_06.c line 8 function main, assertion i>=10: SUCCESS$
^\[main.assertion.2\] file constant_propagation_06.c line 11 function main, assertion i!=30: SUCCESS$
^\[main.assertion.3\] file constant_propagation_06.c line 14 function main, assertion i!=15: UNKNOWN$
^\[main.assertion.4\] file constant_propagation_06.c line 17 function main, assertion 0: SUCCESS$
^\[main.assertion.5\] file constant_propagation_06.c line 20 function main, assertion j>=10: SUCCESS$
^\[main.assertion.6\] file constant_propagation_06.c line 23 function main, assertion i>=j: UNKNOWN$
^\[main.assertion.7\] file constant_propagation_06.c line 26 function main, assertion i>=11: SUCCESS$
^\[main.assertion.8\] file constant_propagation_06.c line 29 function main, assertion j<100: SUCCESS$
^\[main.assertion.1\] file main.c line 11 function main, assertion i\s*<\s*51: Unknown$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
signed int i;
Expand Down
7 changes: 4 additions & 3 deletions regression/goto-analyzer/constant_propagation_07/test.desc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FUTURE
constant_propagation_07.c
--constants --verify
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file constant_propagation_07.c line 12 function main, assertion i<51: UNKNOWN$
^Simplified: assert: 1, assume: 0, goto: 4, assigns: 10, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 1, assigns: 10, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int a[2];
Expand Down
9 changes: 4 additions & 5 deletions regression/goto-analyzer/constant_propagation_08/test.desc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FUTURE
constant_propagation_08.c
--intervals --verify
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file constant_propagation_08.c line 12 function main, assertion i<50: UNKNOWN$
^\[main.assertion.2\] file constant_propagation_08.c line 13 function main, assertion i<51: UNKNOWN$
^\[main.assertion.3\] file constant_propagation_08.c line 14 function main, assertion i<52: SUCCESS$
^Simplified: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 4, assigns: 13, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int a[2]={0,0};
Expand Down
8 changes: 4 additions & 4 deletions regression/goto-analyzer/constant_propagation_09/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_09.c
--intervals --verify
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
******** Function main
^\[main.assertion.1\] file constant_propagation_09.c line 12 function main, assertion j<52: UNKNOWN$
^Simplified: assert: 1, assume: 0, goto: 3, assigns: 4, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int a[2]={0,0};
Expand Down
7 changes: 3 additions & 4 deletions regression/goto-analyzer/constant_propagation_10/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FUTURE
constant_propagation_10.c
--constants --simplify out.goto
main.c
--constants --verify
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 4, assigns: 10, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 1, assigns: 10, function calls: 2$
^\[main.assertion.1\] file main.c line 10 function main, assertion a\[0\]==2: Failure$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int a[2]={0,0};
Expand Down
8 changes: 4 additions & 4 deletions regression/goto-analyzer/constant_propagation_11/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_11.c
--constants --simplify out.goto
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 4, assigns: 13, function calls: 2$
^Simplified: assert: 1, assume: 0, goto: 0$
^Unmodified: assert: 0, assume: 0, goto: 0$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int i=0, y;
Expand Down
8 changes: 4 additions & 4 deletions regression/goto-analyzer/constant_propagation_12/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_12.c
--constants --simplify out.goto
main.c
--constants --simplify out.gb
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 3, assigns: 4, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 4, function calls: 0$
^Unmodified: assert: 0, assume: 0, goto: 2, assigns: 11, function calls: 2$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int i=0, y;
Expand Down
4 changes: 2 additions & 2 deletions regression/goto-analyzer/constant_propagation_13/test.desc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FUTURE
constant_propagation_13.c
main.c
--constants --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file constant_propagation_13.c line 10 function main, assertion a\[0\]==2: FAILURE$
^\[main.assertion.1\] file main.c line 9 function main, assertion y==0: Failure (if reachable)$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int a[2]={0,0};
Expand Down
8 changes: 4 additions & 4 deletions regression/goto-analyzer/constant_propagation_14/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FUTURE
constant_propagation_14.c
--constants --simplify out.goto
main.c
--constants --verify
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
^UNKNOWN: assert: 0, assume: 0, goto: 0$
^\[main.assertion.1\] file main.c line 11 function main, assertion a\[0\]==1 || a\[0\]==2: Success$
^\[main.assertion.2\] file main.c line 12 function main, assertion a\[0\]==1 && a\[0\]==2: Failure$
--
^warning: ignoring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>

int main()
{
int a[2]={0,0};
Expand Down
7 changes: 3 additions & 4 deletions regression/goto-analyzer/constant_propagation_15/test.desc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FUTURE
constant_propagation_15.c
--constants --simplify out.goto
main.c
--constants --verify
^EXIT=0$
^SIGNAL=0$
^SIMPLIFIED: assert: 1, assume: 0, goto: 1, assigns: 4, function calls: 0$
^UNMODIFIED: assert: 0, assume: 0, goto: 2, assigns: 11, function calls: 2$
^\[main.assertion.1\] file main.c line 9 function main, assertion a\[0\]==2: Failure$
--
^warning: ignoring
Loading