File tree Expand file tree Collapse file tree
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 Original file line number Diff line number Diff line change 11CORE
22example.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
44VERIFICATION SUCCESSFUL
55^EXIT=0$
66^SIGNAL=0$
Original file line number Diff line number Diff line change 11CORE
22main.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
44VERIFICATION SUCCESSFUL
55^EXIT=0$
66^SIGNAL=0$
Original file line number Diff line number Diff line change 2222fi
2323
2424args=${*: 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
2633
2734cleanup ()
2835{
5461
5562# `# some comment` is an inline comment - basically, cause bash to execute an empty command
5663$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 }
5865$cbmc --show-goto-functions " $harness_file "
5966if [[ " ${harness_file} " == " harness.gb" ]]; then
6067 $cbmc --function $entry_point " $harness_file " \
6168 --pointer-check ` # because we want to see out of bounds errors` \
6269 --unwind 11 ` # with the way we set up arrays symex can't figure out loop bounds automatically` \
6370 --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` \
6472 # cbmc args end
6573else
6674$cbmc --function $entry_point " $input_c_file " " $harness_file " \
6775 --pointer-check ` # because we want to see out of bounds errors` \
6876 --unwind 11 ` # with the way we set up arrays symex can't figure out loop bounds automatically` \
6977 --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` \
7079 # cbmc args end
7180fi
Original file line number Diff line number Diff line change 11CORE
22test.c
3- --function test --harness-type call-function
3+ --function test --harness-type call-function _ --no-standard-checks
44\[test.assertion.1\] line \d+ assertion list: SUCCESS
55\[test.assertion.2\] line \d+ assertion list->next: FAILURE
66\[test.assertion.3\] line \d+ assertion !\(list->next != \(\(struct linked_list \*\).*\)\): FAILURE
Original file line number Diff line number Diff line change 11CORE
22test.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
44should_make_equal
55\[test.assertion.1\] line 3 assertion x: SUCCESS
66\[test.assertion.2\] line 4 assertion y: SUCCESS
Original file line number Diff line number Diff line change 11CORE
22test.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
44^EXIT=0$
55^SIGNAL=0$
66--
Original file line number Diff line number Diff line change 11CORE
22main.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
44\[test_function.assertion.\d+\] line \d+ assertion list_walker->datum == \+\+i: SUCCESS
55^EXIT=0$
66^SIGNAL=0$
Original file line number Diff line number Diff line change 11CORE
22main.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
44\[test_function.assertion.\d+\] line \d+ assertion list_walker->datum == \+\+i: SUCCESS
55^EXIT=0$
66^SIGNAL=0$
Original file line number Diff line number Diff line change 11CORE
22main.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
44^EXIT=0$
55^SIGNAL=0$
66VERIFICATION SUCCESSFUL
Original file line number Diff line number Diff line change 11CORE
22main.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
44\[function.assertion.\d+\] line \d+ assertion pointer\[size - 1\] == \'\\0\': SUCCESS
55^VERIFICATION SUCCESSFUL$
66^EXIT=0$
You can’t perform that action at this time.
0 commit comments