@@ -12,22 +12,28 @@ name=${*:$#}
1212name=${name% .c}
1313args=${*: 5: $# -5}
1414
15+ input_c_file=" ${name} .c"
16+ input_goto_binary=" ${name} .gb"
17+ harness_c_file=" ${name} -harness.c"
18+
19+
20+
1521if [[ " ${is_windows} " == " true" ]]; then
16- $goto_cc " ${name} .c "
17- mv " ${name} .exe" " ${name} .gb "
22+ $goto_cc " $input_c_file "
23+ mv " ${name} .exe" " $input_goto_binary "
1824else
19- $goto_cc -o " ${name} .gb " " ${name} .c "
25+ $goto_cc -o " $input_goto_binary " " $input_c_file "
2026fi
2127
22- if [ -e " ${name} -mod.gb " ] ; then
23- rm -f " ${name} -mod.gb "
28+ if [ -e " $harness_c_file " ] ; then
29+ rm -f " $harness_c_file "
2430fi
2531
2632# `# some comment` is an inline comment - basically, cause bash to execute an empty command
27- $cbmc --show-goto-functions " ${name} .gb "
28- $goto_harness " ${name} .gb " " ${name} -mod.gb " --harness-function-name $entry_point ${args}
29- $cbmc --show-goto-functions " ${name} -mod.gb "
30- $cbmc --function $entry_point " ${name} -mod.gb " \
33+ $cbmc --show-goto-functions " $input_goto_binary "
34+ $goto_harness " $input_goto_binary " " $harness_c_file " --harness-function-name $entry_point ${args}
35+ $cbmc --show-goto-functions " $harness_c_file "
36+ $cbmc --function $entry_point " $input_c_file " " $harness_c_file " \
3137 --pointer-check ` # because we want to see out of bounds errors` \
3238 --unwind 11 ` # with the way we set up arrays symex can't figure out loop bounds automatically` \
3339 --unwinding-assertions ` # we want to make sure we don't accidentally pass tests because we didn't unwind enough` \
0 commit comments