CBMC
function_harness_generator_options.h
Go to the documentation of this file.
1 /******************************************************************\
2 
3 Module: functions_harness_generator_options
4 
5 Author: Diffblue Ltd.
6 
7 \******************************************************************/
8 
9 #ifndef CPROVER_GOTO_HARNESS_FUNCTION_HARNESS_GENERATOR_OPTIONS_H
10 #define CPROVER_GOTO_HARNESS_FUNCTION_HARNESS_GENERATOR_OPTIONS_H
11 
13 
14 #define FUNCTION_HARNESS_GENERATOR_FUNCTION_OPT "function"
15 #define FUNCTION_HARNESS_GENERATOR_NONDET_GLOBALS_OPT "nondet-globals"
16 #define FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_ARRAY_OPT \
17  "treat-pointer-as-array"
18 #define FUNCTION_HARNESS_GENERATOR_TREAT_POINTERS_EQUAL_OPT \
19  "treat-pointers-equal"
20 #define FUNCTION_HARNESS_GENERATOR_ASSOCIATED_ARRAY_SIZE_OPT \
21  "associated-array-size"
22 #define FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_CSTRING \
23  "treat-pointer-as-cstring"
24 #define FUNCTION_HARNESS_GENERATOR_TREAT_POINTERS_EQUAL_MAYBE_OPT \
25  "treat-pointers-equal-maybe"
26 
27 #define FUNCTION_HARNESS_GENERATOR_OPTIONS \
28  "(" FUNCTION_HARNESS_GENERATOR_FUNCTION_OPT \
29  "):" \
30  "(" FUNCTION_HARNESS_GENERATOR_NONDET_GLOBALS_OPT \
31  ")" \
32  "(" FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_ARRAY_OPT \
33  "):" \
34  "(" FUNCTION_HARNESS_GENERATOR_TREAT_POINTERS_EQUAL_OPT \
35  "):" \
36  "(" FUNCTION_HARNESS_GENERATOR_ASSOCIATED_ARRAY_SIZE_OPT \
37  "):" \
38  "(" FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_CSTRING \
39  "):" \
40  "(" FUNCTION_HARNESS_GENERATOR_TREAT_POINTERS_EQUAL_MAYBE_OPT ")"
41 
42 #define FUNCTION_HARNESS_GENERATOR_HELP \
43  "function harness generator ({y--harness-type} {ycall-function}):\n" \
44  " {y--" FUNCTION_HARNESS_GENERATOR_FUNCTION_OPT \
45  "} {ufunction_name} \t " \
46  "the function the harness should call\n" \
47  " {y--" FUNCTION_HARNESS_GENERATOR_NONDET_GLOBALS_OPT \
48  "} \t " \
49  "set global variables to non-deterministic values in " \
50  "harness\n" COMMON_HARNESS_GENERATOR_HELP \
51  " {y--" FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_ARRAY_OPT \
52  "} {up} \t " \
53  "treat the function parameter with the name {up} as an array\n" \
54  " {y--" FUNCTION_HARNESS_GENERATOR_TREAT_POINTERS_EQUAL_OPT \
55  "} " \
56  "{up}{y,}{uq}{y,}{ur}[{y;}{us}{y,}{ut}] \t " \
57  "treat the function parameters {uq}{y,}{ur} equal to parameter {up}; " \
58  "{us} to {ut} and so on\n" \
59  " {y--" FUNCTION_HARNESS_GENERATOR_TREAT_POINTERS_EQUAL_MAYBE_OPT \
60  "} \t " \
61  "function parameters equality is non-deterministic\n" \
62  " {y--" FUNCTION_HARNESS_GENERATOR_ASSOCIATED_ARRAY_SIZE_OPT \
63  "} " \
64  "{uarray_name}{y:}{usize_name} \t " \
65  "set the parameter {usize_name} to the size of the array {uarray_name} " \
66  "(implies " \
67  "{y-- " FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_ARRAY_OPT \
68  "} " \
69  "{uarray_name})\n" \
70  " {y--" FUNCTION_HARNESS_GENERATOR_TREAT_POINTER_AS_CSTRING \
71  "} {up} \t " \
72  "treat the function parameter with the name {up} as a string of " \
73  "characters\n"
74 
75 #endif // CPROVER_GOTO_HARNESS_FUNCTION_HARNESS_GENERATOR_OPTIONS_H