Go to the documentation of this file.
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
22 #include <unordered_set>
72 typedef std::unordered_set<exprt, irep_hash>
expr_sett;
78 std::list<exprt> &dest)
135 const irep_idt &function_identifier,
152 std::ostream &out)
const;
156 std::ostream &out)
const
183 std::ostream &out)
const;
194 std::pair<unsigned, locationt>(l->location_number, l));
199 const irep_idt &function_identifier,
213 const irep_idt &function_identifier,
248 const exprt &
function,
258 const goto_functionst::function_mapt::const_iterator f_it,
274 std::list<exprt> &dest)=0;
292 typename state_mapt::iterator it=
state_map.find(l);
294 throw std::out_of_range(
"failed to find state");
301 typename state_mapt::const_iterator it=
state_map.find(l);
303 throw std::out_of_range(
"failed to find state");
325 typename state_mapt::iterator it=
state_map.find(l);
327 throw std::out_of_range(
"failed to find state");
334 typename state_mapt::const_iterator it=
state_map.find(l);
336 throw std::out_of_range(
"failed to find state");
343 return static_cast<T &
>(a).
merge(
static_cast<const T &
>(b), to);
348 return util_make_unique<T>(
static_cast<T &
>(s));
359 std::list<exprt> &dest)
379 throw "not implemented";
400 static_cast<const T &
>(b),
411 #endif // CPROVER_ANALYSES_STATIC_ANALYSIS_H
void sequential_fixedpoint(const goto_functionst &goto_functions)
std::map< locationt, T > state_mapt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
virtual void output(const goto_functionst &goto_functions, std::ostream &out) const
domain_baset::expr_sett expr_sett
virtual std::unique_ptr< statet > make_temporary_state(statet &s)
static_analysis_baset(const namespacet &_ns)
virtual void get_reference_set(const namespacet &, const exprt &, std::list< exprt > &dest)
virtual void fixedpoint(const goto_functionst &goto_functions)
void do_function_call(const irep_idt &calling_function, 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 bool has_location(locationt l) const =0
static_analysist(const namespacet &_ns)
virtual void generate_state(locationt l)=0
virtual bool merge_shared(statet &, const statet &, goto_programt::const_targett)
std::map< unsigned, locationt > working_sett
virtual void transform(const namespacet &ns, const irep_idt &function_from, locationt from, const irep_idt &function_to, locationt to)=0
concurrency_aware_static_analysist(const namespacet &_ns)
virtual void output(const namespacet &, std::ostream &) const
Base class for all expressions.
bool visit(const irep_idt &function_identifier, locationt l, working_sett &working_set, const goto_programt &goto_program, const goto_functionst &goto_functions)
functions_donet functions_done
virtual bool merge_shared(statet &a, const statet &b, locationt to)=0
static exprt get_return_lhs(locationt to)
void put_in_working_set(working_sett &working_set, locationt l)
virtual const statet & get_state(locationt l) const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void do_function_call_rec(const irep_idt &calling_function, locationt l_call, locationt l_return, const exprt &function, const exprt::operandst &arguments, statet &new_state, const goto_functionst &goto_functions)
goto_programt::const_targett locationt
virtual bool has_location(locationt l) const
std::set< irep_idt > recursion_sett
goto_programt::const_targett locationt
void concurrent_fixedpoint(const goto_functionst &goto_functions)
virtual void operator()(const irep_idt &function_identifier, const goto_programt &goto_program)
virtual void fixedpoint(const goto_functionst &goto_functions)
virtual bool merge(statet &a, const statet &b, locationt to)=0
std::unordered_set< exprt, irep_hash > expr_sett
virtual bool merge_shared(static_analysis_baset::statet &a, const static_analysis_baset::statet &b, goto_programt::const_targett to)
std::vector< exprt > operandst
virtual void get_reference_set(locationt l, const exprt &expr, std::list< exprt > &dest)=0
virtual bool merge(statet &a, const statet &b, locationt to)
virtual void initialize(const goto_functionst &goto_functions)
const T & operator[](locationt l) const
goto_programt::const_targett locationt
virtual void get_reference_set(locationt l, const exprt &expr, std::list< exprt > &dest)
void generate_states(const goto_functionst &goto_functions)
A collection of goto functions.
void output(const goto_programt &goto_program, std::ostream &out) const
static locationt successor(locationt l)
T & operator[](locationt l)
virtual ~static_analysis_baset()
A generic container class for the GOTO intermediate representation of one function.
virtual statet & get_state(locationt l)
instructionst::const_iterator const_targett
static exprt get_guard(locationt from, locationt to)
std::set< irep_idt > functions_donet
virtual std::unique_ptr< statet > make_temporary_state(statet &s)=0
virtual statet & get_state(locationt l)=0
virtual void update(const goto_programt &goto_program)
recursion_sett recursion_set
virtual void initialize(const goto_programt &goto_program)
virtual void initialize(const namespacet &, locationt)
bool fixedpoint(const irep_idt &function_identifier, const goto_programt &goto_program, const goto_functionst &goto_functions)
virtual void generate_state(locationt l)
locationt get_next(working_sett &working_set)