60 log.debug() <<
"BMC at " << source_location.
as_string() <<
" (depth "
73 log.statistics() <<
"aborting path on assume(false) at "
74 << state.
source.
pc->source_location() <<
" thread "
79 log.statistics() <<
": " << c;
81 log.statistics() <<
log.eom;
89 (!cur_pc->is_end_function() ||
99 cur_pc->is_goto() && cur_pc->get_target() != state.
source.
pc &&
100 cur_pc->condition() ==
true)
113 const guardt prev_guard = goto_state.guard;
123 prev_pc->condition() !=
true)
134 tvt abort_unwind_decision;
135 unsigned this_loop_limit = std::numeric_limits<unsigned>::max();
139 abort_unwind_decision =
140 handler(context, source.
pc->loop_number, unwind, this_loop_limit);
141 if(abort_unwind_decision.
is_known())
151 if(!limit.has_value())
152 abort_unwind_decision =
tvt(
false);
154 abort_unwind_decision =
tvt(unwind >= *limit);
158 abort_unwind_decision.
is_known(),
"unwind decision should be taken by now");
159 bool abort = abort_unwind_decision.
is_true();
161 log.statistics() << (abort ?
"Not unwinding" :
"Unwinding") <<
" loop " <<
id
162 <<
" iteration " << unwind;
164 if(this_loop_limit != std::numeric_limits<unsigned>::max())
165 log.statistics() <<
" (" << this_loop_limit <<
" max)";
167 log.statistics() <<
" " << source.
pc->source_location() <<
" thread "
178 tvt abort_unwind_decision;
179 unsigned this_loop_limit = std::numeric_limits<unsigned>::max();
183 abort_unwind_decision = handler(
id, unwind, this_loop_limit);
184 if(abort_unwind_decision.
is_known())
192 auto limit =
unwindset.get_limit(
id, thread_nr);
194 if(!limit.has_value())
195 abort_unwind_decision =
tvt(
false);
197 abort_unwind_decision =
tvt(unwind > *limit);
201 abort_unwind_decision.
is_known(),
"unwind decision should be taken by now");
202 bool abort = abort_unwind_decision.
is_true();
204 if(unwind > 0 || abort)
208 log.statistics() << (abort ?
"Not unwinding" :
"Unwinding") <<
" recursion "
211 if(this_loop_limit != std::numeric_limits<unsigned>::max())
212 log.statistics() <<
" (" << this_loop_limit <<
" max)";
214 log.statistics() <<
log.eom;
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
static irep_idt loop_id(const irep_idt &function_id, const instructiont &instruction)
Human-readable loop name.
instructionst::const_iterator const_targett
Container for data that varies per program point, e.g.
unsigned depth
Distance from entry.
symex_targett::sourcet source
goto_symex_statet statet
A type abbreviation for goto_symex_statet.
const symbol_table_baset & outer_symbol_table
The symbol table associated with the goto-program being executed.
irep_idt language_mode
language_mode: ID_java, ID_C or another language identifier if we know the source language in use,...
static get_goto_functiont get_goto_function(abstract_goto_modelt &goto_model)
Return a function to get/load a goto function from the given goto model Create a default delegate to ...
virtual void symex_step(const get_goto_functiont &get_goto_function, statet &state)
Called for each step in the symbolic execution This calls print_symex_step to print symex's current i...
path_storaget & path_storage
Symbolic execution paths to be resumed later.
guard_managert & guard_manager
Used to create guards.
goto_symext(message_handlert &mh, const symbol_table_baset &outer_symbol_table, symex_target_equationt &_target, const optionst &options, path_storaget &path_storage, guard_managert &guard_manager)
Construct a goto_symext to execute a particular program.
namespacet ns
Initialized just before symbolic execution begins, to point to both outer_symbol_table and the symbol...
virtual void merge_goto(const symex_targett::sourcet &source, goto_statet &&goto_state, statet &state)
Merge a single branch, the symbolic state of which is held in goto_state, into the current overall sy...
std::function< const goto_functionst::goto_functiont &(const irep_idt &)> get_goto_functiont
The type of delegate functions that retrieve a goto_functiont for a particular function identifier.
messaget log
The messaget to write log messages to.
Class that provides messages with a built-in verbosity 'level'.
mstreamt & status() const
Storage for symbolic execution paths to be resumed later.
std::string as_string() const
const irep_idt & display_name() const
Return language specific display name if present.
symex_coveraget symex_coverage
bool get_unwind_recursion(const irep_idt &identifier, unsigned thread_nr, unsigned unwind) override
std::vector< loop_unwind_handlert > loop_unwind_handlers
Callbacks that may provide an unwind/do-not-unwind decision for a loop.
void merge_goto(const symex_targett::sourcet &source, goto_statet &&goto_state, statet &state) override
Merge a single branch, the symbolic state of which is held in goto_state, into the current overall sy...
source_locationt last_source_location
std::vector< recursion_unwind_handlert > recursion_unwind_handlers
Callbacks that may provide an unwind/do-not-unwind decision for a recursive call.
symex_bmct(message_handlert &mh, const symbol_tablet &outer_symbol_table, symex_target_equationt &_target, const optionst &options, path_storaget &path_storage, guard_managert &guard_manager, unwindsett &unwindset)
void symex_step(const get_goto_functiont &get_goto_function, statet &state) override
show progress
bool should_stop_unwind(const symex_targett::sourcet &source, const call_stackt &context, unsigned unwind) override
Determine whether to unwind a loop.
const bool record_coverage
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
guard_expr_managert guard_managert
static std::unordered_set< irep_idt > init_symbol(const symbolt &sym, code_blockt &code_block, symbol_table_baset &symbol_table, const source_locationt &source_location, bool assume_init_pointers_not_null, const java_object_factory_parameterst &object_factory_parameters, const select_pointer_typet &pointer_type_selector, bool string_refinement_enabled, message_handlert &message_handler)
exprt simplify_expr(exprt src, const namespacet &ns)
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
#define INITIALIZE_FUNCTION
Identifies source in the context of symbolic execution.
goto_programt::const_targett pc
Bounded Model Checking for ANSI-C.