40 #ifndef CPROVER_ANALYSES_AI_DOMAIN_H
41 #define CPROVER_ANALYSES_AI_DOMAIN_H
182 virtual std::unique_ptr<statet>
copy(
const statet &s)
const = 0;
198 template <
typename domainT>
208 return std::make_unique<domainT>(
static_cast<const domainT &
>(s));
215 return static_cast<domainT &
>(dest).
merge(
216 static_cast<const domainT &
>(src), from, to);
220 template <
typename domainT>
231 auto d = std::make_unique<domainT>();
233 return std::unique_ptr<statet>(d.release());
237 template <
typename domainT>
248 auto d = std::make_unique<domainT>(l);
250 return std::unique_ptr<statet>(d.release());
Abstract Interpretation history.
This is the basic interface of the abstract interpreter with default implementations of the core func...
The interface offered by a domain, allows code to manipulate domains without knowing their exact type...
virtual bool is_bottom() const =0
virtual void transform(const irep_idt &function_from, trace_ptrt from, const irep_idt &function_to, trace_ptrt to, ai_baset &ai, const namespacet &ns)=0
how function calls are treated: a) there is an edge from each call site to the function head b) there...
virtual void make_bottom()=0
no states
ai_domain_baset()
The constructor is expected to produce 'false' or 'bottom' A default constructor is not part of the d...
virtual void make_entry()
Make this domain a reasonable entry-point state For most domains top is sufficient.
virtual xmlt output_xml(const ai_baset &ai, const namespacet &ns) const
virtual exprt to_predicate(void) const
Gives a Boolean condition that is true for all values represented by the domain.
ai_history_baset::trace_ptrt trace_ptrt
virtual jsont output_json(const ai_baset &ai, const namespacet &ns) const
virtual void make_top()=0
all states – the analysis doesn't use this directly (see make_entry) and domains may refuse to implem...
goto_programt::const_targett locationt
virtual bool ai_simplify_lhs(exprt &condition, const namespacet &ns) const
Simplifies the expression but keeps it as an l-value.
virtual void output(std::ostream &, const ai_baset &, const namespacet &) const
virtual bool is_top() const =0
virtual bool ai_simplify(exprt &condition, const namespacet &) const
also add
virtual ~ai_domain_baset()
ai_domain_baset(const ai_domain_baset &old)
A copy constructor is part of the domain interface.
virtual std::unique_ptr< statet > make(locationt l) const =0
ai_domain_baset::trace_ptrt trace_ptrt
virtual ~ai_domain_factory_baset()
ai_domain_baset::locationt locationt
virtual std::unique_ptr< statet > copy(const statet &s) const =0
virtual bool merge(statet &dest, const statet &src, trace_ptrt from, trace_ptrt to) const =0
ai_domain_factory_baset::trace_ptrt trace_ptrt
std::unique_ptr< statet > make(locationt l) const override
ai_domain_factory_baset::locationt locationt
ai_domain_factory_baset::statet statet
ai_domain_factory_baset::locationt locationt
std::unique_ptr< statet > make(locationt l) const override
ai_domain_factory_baset::trace_ptrt trace_ptrt
ai_domain_factory_baset::statet statet
ai_domain_factory_baset::statet statet
ai_domain_factory_baset::locationt locationt
std::unique_ptr< statet > copy(const statet &s) const override
ai_domain_factory_baset::trace_ptrt trace_ptrt
bool merge(statet &dest, const statet &src, trace_ptrt from, trace_ptrt to) const override
std::shared_ptr< const ai_history_baset > trace_ptrt
History objects are intended to be immutable so they can be shared to reduce memory overhead.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
The Boolean constant false.
instructionst::const_iterator const_targett
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The Boolean constant true.
#define CHECK_RETURN(CONDITION)