12 #ifndef CPROVER_ANALYSES_STATIC_ANALYSIS_H 13 #define CPROVER_ANALYSES_STATIC_ANALYSIS_H 15 #ifndef USE_DEPRECATED_STATIC_ANALYSIS_H 16 #error Deprecated, use ai.h instead 21 #include <unordered_set> 63 std::ostream &out)
const 67 typedef std::unordered_set<exprt, irep_hash>
expr_sett;
73 std::list<exprt> &dest)
146 std::ostream &out)
const;
150 std::ostream &out)
const 152 output(goto_program,
"", out);
177 std::ostream &out)
const;
188 std::pair<unsigned, locationt>(l->location_number, l));
238 const exprt &
function,
246 const goto_functionst::function_mapt::const_iterator f_it,
262 std::list<exprt> &dest)=0;
280 typename state_mapt::iterator it=
state_map.find(l);
282 throw "failed to find state";
289 typename state_mapt::const_iterator it=
state_map.find(l);
291 throw "failed to find state";
313 typename state_mapt::iterator it=
state_map.find(l);
315 throw "failed to find state";
322 typename state_mapt::const_iterator it=
state_map.find(l);
324 throw "failed to find state";
331 return static_cast<T &
>(a).
merge(static_cast<const T &>(b), to);
336 return new T(static_cast<T &>(s));
347 std::list<exprt> &dest)
367 throw "not implemented";
388 static_cast<const T &>(b),
399 #endif // CPROVER_ANALYSES_STATIC_ANALYSIS_H
static exprt get_guard(locationt from, locationt to)
std::map< unsigned, locationt > working_sett
std::map< locationt, T > state_mapt
virtual statet & get_state(locationt l)=0
recursion_sett recursion_set
void sequential_fixedpoint(const goto_functionst &goto_functions)
virtual void transform(const namespacet &ns, locationt from, locationt to)=0
Goto Programs with Functions.
virtual void output(const goto_functionst &goto_functions, std::ostream &out) const
domain_baset::expr_sett expr_sett
virtual bool merge_shared(statet &a, const statet &b, locationt to)=0
static exprt get_return_lhs(locationt to)
bool fixedpoint(const goto_programt &goto_program, const goto_functionst &goto_functions)
goto_programt::const_targett locationt
virtual bool has_location(locationt l) const =0
static_analysist(const namespacet &_ns)
virtual const statet & get_state(locationt l) const
virtual statet * make_temporary_state(statet &s)=0
virtual void generate_state(locationt l)=0
functions_donet functions_done
concurrency_aware_static_analysist(const namespacet &_ns)
void do_function_call_rec(locationt l_call, locationt l_return, const exprt &function, const exprt::operandst &arguments, statet &new_state, const goto_functionst &goto_functions)
instructionst::const_iterator const_targett
void put_in_working_set(working_sett &working_set, locationt l)
goto_programt::const_targett locationt
virtual bool merge(statet &a, const statet &b, locationt to)=0
virtual void fixedpoint(const goto_functionst &goto_functions)
virtual void fixedpoint(const goto_functionst &goto_functions)
virtual void get_reference_set(const namespacet &ns, const exprt &expr, std::list< exprt > &dest)
void concurrent_fixedpoint(const goto_functionst &goto_functions)
std::unordered_set< exprt, irep_hash > expr_sett
virtual bool merge_shared(statet &a, const statet &b, goto_programt::const_targett to)
goto_programt::const_targett locationt
void output(const goto_programt &goto_program, std::ostream &out) const
virtual bool has_location(locationt l) const
virtual void get_reference_set(locationt l, const exprt &expr, std::list< exprt > &dest)=0
std::set< irep_idt > recursion_sett
const T & operator[](locationt l) const
virtual statet * make_temporary_state(statet &s)
std::vector< exprt > operandst
void generate_states(const goto_functionst &goto_functions)
T & operator[](locationt l)
A specialization of goto_program_templatet over goto programs in which instructions have codet type...
virtual void output(const namespacet &ns, std::ostream &out) const
virtual bool merge(statet &a, const statet &b, locationt to)
static locationt successor(locationt l)
std::set< irep_idt > functions_donet
virtual void get_reference_set(locationt l, const exprt &expr, std::list< exprt > &dest)
Base class for all expressions.
virtual void operator()(const goto_programt &goto_program)
virtual ~static_analysis_baset()
virtual void initialize(const goto_functionst &goto_functions)
virtual void update(const goto_programt &goto_program)
virtual void initialize(const namespacet &ns, locationt l)
virtual void generate_state(locationt l)
locationt get_next(working_sett &working_set)
void do_function_call(locationt l_call, locationt l_return, const goto_functionst &goto_functions, const goto_functionst::function_mapt::const_iterator f_it, const exprt::operandst &arguments, statet &new_state)
virtual statet & get_state(locationt l)
virtual void initialize(const goto_programt &goto_program)
virtual bool merge_shared(static_analysis_baset::statet &a, const static_analysis_baset::statet &b, goto_programt::const_targett to)
bool visit(locationt l, working_sett &working_set, const goto_programt &goto_program, const goto_functionst &goto_functions)
static_analysis_baset(const namespacet &_ns)