39 out <<
interval.second.lower <<
" <= ";
42 out <<
" <= " <<
interval.second.upper;
51 out <<
interval.second.lower <<
" <= ";
54 out <<
" <= " <<
interval.second.upper;
71 switch(instruction.
type())
91 if(
from->get_target() != next)
107 const auto &lhs = instruction.
call_lhs();
115 DATA_INVARIANT(
false,
"Exceptions must be removed before analysis");
118 DATA_INVARIANT(
false,
"SET_RETURN_VALUE must be removed before analysis");
131 DATA_INVARIANT(
false,
"Unclear what is a safe over-approximation of OTHER");
136 DATA_INVARIANT(
false,
"Only complete instructions can be analyzed");
166 for(int_mapt::iterator it=
int_map.begin();
171 const int_mapt::const_iterator
b_it=
b.int_map.find(it->first);
172 if(
b_it==
b.int_map.end())
181 if(it->second!=previous)
188 for(float_mapt::iterator it=
float_map.begin();
191 const float_mapt::const_iterator
b_it=
b.float_map.begin();
192 if(
b_it==
b.float_map.end())
200 it->second.join(
b_it->second);
201 if(it->second!=previous)
270 std::cout <<
"assume_rec: "
295 fi.make_le_than(
tmp);
320 fi.make_ge_than(
tmp);
345 if(
rhs_i.is_bottom())
370 if(rel.id() ==
ID_lt)
372 else if(rel.id() ==
ID_le)
374 else if(rel.id() ==
ID_gt)
376 else if(rel.id() ==
ID_ge)
394 for(
const auto &op : cond.
operands())
402 for(
const auto &op : cond.
operands())
500 a.assume(condition, ns);
This is the basic interface of the abstract interpreter with default implementations of the core func...
ai_history_baset::trace_ptrt trace_ptrt
goto_programt::const_targett locationt
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
A base class for relations, i.e., binary predicates whose two operands have the same type.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::vector< exprt > operandst
bool is_true() const
Return whether the expression is a constant representing true.
bool is_constant() const
Return whether the expression is a constant.
typet & type()
Return the type of the expression.
The Boolean constant false.
This class represents an instruction in the GOTO intermediate representation.
const symbol_exprt & dead_symbol() const
Get the symbol for DEAD.
const exprt & call_lhs() const
Get the lhs of a FUNCTION_CALL (may be nil)
const symbol_exprt & decl_symbol() const
Get the declared symbol for DECL.
const exprt & assign_lhs() const
Get the lhs of the assignment for ASSIGN.
const exprt & assign_rhs() const
Get the rhs of the assignment for ASSIGN.
const exprt & condition() const
Get the condition of gotos, assume, assert.
goto_program_instruction_typet type() const
What kind of instruction?
An IEEE 754 floating-point value, including specificiation.
void assign(const exprt &lhs, const exprt &rhs)
static bool is_int(const typet &src)
void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const override
bool is_bottom() const override final
void make_bottom() final override
no states
void assume_rec(const exprt &, bool negation=false)
bool join(const interval_domaint &b)
Sets *this to the mathematical join between the two domains.
void transform(const irep_idt &function_from, trace_ptrt trace_from, const irep_idt &function_to, trace_ptrt trace_to, ai_baset &ai, const namespacet &ns) final override
how function calls are treated: a) there is an edge from each call site to the function head b) there...
exprt make_expression(const symbol_exprt &) const
void havoc_rec(const exprt &)
void assume(const exprt &, const namespacet &)
virtual bool ai_simplify(exprt &condition, const namespacet &ns) const override
Uses the abstract state to simplify a given expression using context- specific information.
static bool is_float(const typet &src)
void make_le_than(const T &v)
void join(const interval_templatet< T > &i)
void make_ge_than(const T &v)
const irep_idt & id() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
The Boolean constant true.
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
exprt simplify_expr(exprt src, const namespacet &ns)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
exprt conjunction(const exprt::operandst &op)
1) generates a conjunction for two or more operands 2) for one operand, returns the operand 3) return...
API to expression classes.
const binary_relation_exprt & to_binary_relation_expr(const exprt &expr)
Cast an exprt to a binary_relation_exprt.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
const not_exprt & to_not_expr(const exprt &expr)
Cast an exprt to an not_exprt.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.