Loading...
Searching...
No Matches
nondet.cpp File Reference
+ Include dependency graph for nondet.cpp:
Go to the source code of this file.
Gets a fresh nondet choice in range (min_value, max_value).
Pick nondeterministically between imperative actions 'switch_cases'.
Function Documentation
◆ generate_nondet_int() [1/3]
const std::string &
basename_prefix,
)
◆ generate_nondet_int() [2/3]
const std::string &
basename_prefix,
)
◆ generate_nondet_int() [3/3]
const std::string &
basename_prefix,
)
Gets a fresh nondet choice in range (min_value, max_value).
GOTO generated resembles:
ASSUME(name_prefix::nondet_int >= min_value)
ASSUME(name_prefix::nondet_int <= max_value)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
@ NONDET
havocs the pointer to an nondet pointer
- Parameters
-
min_value Minimum value (inclusive) of returned int.
max_value Maximum value (inclusive) of returned int.
basename_prefix Basename prefix for the fresh symbol name generated.
int_type The type of the int used to non-deterministically choose one of the switch cases.
allocate_objects Handles allocation of new objects.
source_location The location to mark the generated int with.
[out] instructions Output instructions are written to 'instructions'. These declare, nondet-initialise and range-constrain (with assume statements) a fresh integer.
- Returns
- Returns a symbol expression for the resulting integer.
Definition at line 72 of file nondet.cpp.
◆ generate_nondet_switch()
Pick nondeterministically between imperative actions 'switch_cases'.
- Parameters
-
name_prefix Name prefix for fresh symbols (should be function id)
switch_cases List of codet objects to execute in each switch case.
int_type The type of the int used to non-deterministically choose one of the switch cases.
mode Mode (language) of the symbol to be generated.
source_location The location to mark the generated int with.
symbol_table The global symbol table.
- Returns
- Returns a nondet-switch choosing between switch_cases. The resulting switch block has no default case.
Definition at line 91 of file nondet.cpp.