12#ifndef CPROVER_ANSI_C_GOTO_CHECK_C_H
13#define CPROVER_ANSI_C_GOTO_CHECK_C_H
40#define OPT_GOTO_CHECK \
41 "(bounds-check)(pointer-check)(memory-leak-check)(memory-cleanup-check)" \
42 "(div-by-zero-check)(enum-range-check)" \
43 "(signed-overflow-check)(unsigned-overflow-check)" \
44 "(pointer-overflow-check)(conversion-check)(undefined-shift-check)" \
45 "(float-overflow-check)(nan-check)(no-built-in-assertions)" \
46 "(pointer-primitive-check)" \
47 "(retain-trivial-checks)" \
49 "(no-assertions)(no-assumptions)" \
52#define HELP_GOTO_CHECK \
53 " {y--bounds-check} \t enable array bounds checks\n" \
54 " {y--pointer-check} \t enable pointer checks\n" \
55 " {y--memory-leak-check} \t enable memory leak checks\n" \
56 " {y--memory-cleanup-check} \t enable memory cleanup checks\n" \
57 " {y--div-by-zero-check} \t enable division by zero checks\n" \
58 " {y--signed-overflow-check} \t " \
59 "enable signed arithmetic over- and underflow checks\n" \
60 " {y--unsigned-overflow-check} \t " \
61 "enable arithmetic over- and underflow checks\n" \
62 " {y--pointer-overflow-check} \t " \
63 "enable pointer arithmetic over- and underflow checks\n" \
64 " {y--conversion-check} \t " \
65 "check whether values can be represented after type cast\n" \
66 " {y--undefined-shift-check} \t check shift greater than bit-width\n" \
67 " {y--float-overflow-check} \t check floating-point for +/-Inf\n" \
68 " {y--nan-check} \t check floating-point for NaN\n" \
69 " {y--enum-range-check} \t " \
70 "checks that all enum type expressions have values in the enum range\n" \
71 " {y--pointer-primitive-check} \t " \
72 "checks that all pointers in pointer primitives are valid or null\n" \
73 " {y--retain-trivial-checks} \t include checks that are trivially true\n" \
74 " {y--error-label} {ulabel} \t check that label {ulabel} is unreachable\n" \
75 " {y--no-built-in-assertions} \t ignore assertions in built-in library\n" \
76 " {y--no-assertions} \t ignore user assertions\n" \
77 " {y--no-assumptions} \t ignore user assumptions\n" \
78 " {y--assert-to-assume} \t convert user assertions to assumptions\n"
81#define PARSE_OPTIONS_GOTO_CHECK(cmdline, options) \
82 options.set_option("bounds-check", cmdline.isset("bounds-check")); \
83 options.set_option("pointer-check", cmdline.isset("pointer-check")); \
84 options.set_option("memory-leak-check", cmdline.isset("memory-leak-check")); \
85 options.set_option("memory-cleanup-check", cmdline.isset("memory-cleanup-check")); \
86 options.set_option("div-by-zero-check", cmdline.isset("div-by-zero-check")); \
87 options.set_option("enum-range-check", cmdline.isset("enum-range-check")); \
88 options.set_option("signed-overflow-check", cmdline.isset("signed-overflow-check")); \
89 options.set_option("unsigned-overflow-check", cmdline.isset("unsigned-overflow-check")); \
90 options.set_option("pointer-overflow-check", cmdline.isset("pointer-overflow-check")); \
91 options.set_option("conversion-check", cmdline.isset("conversion-check")); \
92 options.set_option("undefined-shift-check", cmdline.isset("undefined-shift-check")); \
93 options.set_option("float-overflow-check", cmdline.isset("float-overflow-check")); \
94 options.set_option("nan-check", cmdline.isset("nan-check")); \
95 options.set_option("built-in-assertions", !cmdline.isset("no-built-in-assertions")); \
96 options.set_option("pointer-primitive-check", cmdline.isset("pointer-primitive-check")); \
97 options.set_option("retain-trivial-checks", \
98 cmdline.isset("retain-trivial-checks")); \
99 options.set_option("assertions", !cmdline.isset("no-assertions")); \
100 options.set_option("assumptions", !cmdline.isset("no-assumptions")); \
101 options.set_option("assert-to-assume", cmdline.isset("assert-to-assume")); \
102 options.set_option("retain-trivial", cmdline.isset("retain-trivial")); \
103 if(cmdline.isset("error-label")) \
104 options.set_option("error-label", cmdline.get_values("error-label")); \
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A collection of goto functions.
::goto_functiont goto_functiont
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void goto_check_c(const namespacet &ns, const optionst &options, goto_functionst &goto_functions, message_handlert &message_handler)
Goto Programs with Functions.