File tree Expand file tree Collapse file tree 23 files changed +33
-24
lines changed
associated-size-parameter
do-not-use-nondet-for-recursion
do-not-use-nondet-for-selecting-pointers-to-treat-as-equal
nondet_elements_longer_lists_global
nondet_elements_longer_lists
nondet_initialize_static_arrays
nondet_strings_should_only_have_zero_at_end
pointer-function-parameters-equal-maybe
pointer-function-parameters-equal-simple
pointer-function-parameters-struct-mutual-recursion
pointer-function-parameters-struct-non-recursive
pointer-function-parameters-struct-simple-recursion-2
pointer-function-parameters-struct-simple-recursion
pointer-to-array-function-parameters-max-size
pointer-to-array-function-parameters-min-size
pointer-to-array-function-parameters-multi-arg-right
pointer-to-array-function-parameters-with-size
pointer-to-array-function-parameters
recursive-structs-follow-new-tags-beyond-depth-limit Expand file tree Collapse file tree 23 files changed +33
-24
lines changed Original file line number Diff line number Diff line change 1
1
CORE
2
2
example.c
3
- --harness-type call-function --function test --treat-pointer-as-array arr
3
+ --harness-type call-function --function test --treat-pointer-as-array arr _ --no-standard-checks
4
4
VERIFICATION SUCCESSFUL
5
5
^EXIT=0$
6
6
^SIGNAL=0$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --harness-type call-function --function test --associated-array-size array:size
3
+ --harness-type call-function --function test --associated-array-size array:size _ --no-standard-checks
4
4
VERIFICATION SUCCESSFUL
5
5
^EXIT=0$
6
6
^SIGNAL=0$
Original file line number Diff line number Diff line change 22
22
fi
23
23
24
24
args=${*: 1: $# -1}
25
-
25
+ if [[ " $args " != * " _ " * ]]
26
+ then
27
+ args_harness=$args
28
+ args_cbmc=" "
29
+ else
30
+ args_harness=" ${args%% " _ " * } "
31
+ args_cbmc=" ${args#* " _ " } "
32
+ fi
26
33
27
34
cleanup ()
28
35
{
54
61
55
62
# `# some comment` is an inline comment - basically, cause bash to execute an empty command
56
63
$cbmc --show-goto-functions " $input_goto_binary "
57
- $goto_harness " $input_goto_binary " " $harness_file " --harness-function-name $entry_point ${args }
64
+ $goto_harness " $input_goto_binary " " $harness_file " --harness-function-name $entry_point ${args_harness }
58
65
$cbmc --show-goto-functions " $harness_file "
59
66
if [[ " ${harness_file} " == " harness.gb" ]]; then
60
67
$cbmc --function $entry_point " $harness_file " \
61
68
--pointer-check ` # because we want to see out of bounds errors` \
62
69
--unwind 11 ` # with the way we set up arrays symex can't figure out loop bounds automatically` \
63
70
--unwinding-assertions ` # we want to make sure we don't accidentally pass tests because we didn't unwind enough` \
71
+ ${args_cbmc} ` # extra cbmc-related arguments` \
64
72
# cbmc args end
65
73
else
66
74
$cbmc --function $entry_point " $input_c_file " " $harness_file " \
67
75
--pointer-check ` # because we want to see out of bounds errors` \
68
76
--unwind 11 ` # with the way we set up arrays symex can't figure out loop bounds automatically` \
69
77
--unwinding-assertions ` # we want to make sure we don't accidentally pass tests because we didn't unwind enough` \
78
+ ${args_cbmc} ` # extra cbmc-related arguments` \
70
79
# cbmc args end
71
80
fi
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
- --function test --harness-type call-function
3
+ --function test --harness-type call-function _ --no-standard-checks
4
4
\[test.assertion.1\] line \d+ assertion list: SUCCESS
5
5
\[test.assertion.2\] line \d+ assertion list->next: FAILURE
6
6
\[test.assertion.3\] line \d+ assertion !\(list->next != \(\(struct linked_list \*\).*\)\): FAILURE
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
- --function test --harness-type call-function --treat-pointers-equal x,y --treat-pointers-equal-maybe
3
+ --function test --harness-type call-function --treat-pointers-equal x,y --treat-pointers-equal-maybe _ --no-standard-checks
4
4
should_make_equal
5
5
\[test.assertion.1\] line 3 assertion x: SUCCESS
6
6
\[test.assertion.2\] line 4 assertion y: SUCCESS
Original file line number Diff line number Diff line change 1
1
CORE
2
2
test.c
3
- --function entry_point --harness-type call-function --associated-array-size array_with_size:size
3
+ --function entry_point --harness-type call-function --associated-array-size array_with_size:size _ --no-standard-checks
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
6
--
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --harness-type call-function --max-nondet-tree-depth 4 --min-null-tree-depth 1 --function test_function
3
+ --harness-type call-function --max-nondet-tree-depth 4 --min-null-tree-depth 1 --function test_function _ --no-standard-checks
4
4
\[test_function.assertion.\d+\] line \d+ assertion list_walker->datum == \+\+i: SUCCESS
5
5
^EXIT=0$
6
6
^SIGNAL=0$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --harness-type call-function --max-nondet-tree-depth 4 --min-null-tree-depth 1 --function test_function --nondet-globals
3
+ --harness-type call-function --max-nondet-tree-depth 4 --min-null-tree-depth 1 --function test_function --nondet-globals _ --no-standard-checks
4
4
\[test_function.assertion.\d+\] line \d+ assertion list_walker->datum == \+\+i: SUCCESS
5
5
^EXIT=0$
6
6
^SIGNAL=0$
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --function func --min-null-tree-depth 10 --max-nondet-tree-depth 4 --harness-type call-function
3
+ --function func --min-null-tree-depth 10 --max-nondet-tree-depth 4 --harness-type call-function _ --no-standard-checks
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
6
VERIFICATION SUCCESSFUL
Original file line number Diff line number Diff line change 1
1
CORE
2
2
main.c
3
- --harness-type call-function --function function --treat-pointer-as-cstring pointer --associated-array-size pointer:size
3
+ --harness-type call-function --function function --treat-pointer-as-cstring pointer --associated-array-size pointer:size _ --no-standard-checks
4
4
\[function.assertion.\d+\] line \d+ assertion pointer\[size - 1\] == \'\\0\': SUCCESS
5
5
^VERIFICATION SUCCESSFUL$
6
6
^EXIT=0$
You can’t perform that action at this time.
0 commit comments