1/*******************************************************************\
7\*******************************************************************/
21 : goto_program(goto_program)
31 if(!instruction.is_assign())
39 // Compare the types recursively for a point where the rhs is more
43 return {
true, instruction.source_location()};
48 return {
true, instruction.assign_rhs().find_source_location()};
65 // Look in each child that has the same type as the root
71 // Is this child more const-qualified than the root
78 // Recursively check the children of this child
126 // We have a pointer to something, but the thing it is pointing to can't be
127 // modified normally, but can through this pointer
130 // Check the subtypes if they are pointers
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
bool is_type_at_least_as_const_as(const typet &type_more_const, const typet &type_compare) const
A simple check to check the type_more_const is at least as const as type compare.
bool does_type_preserve_const_correctness(const typet *target_type, const typet *source_type) const
A recursive check that handles when assigning a source value to a target, is the assignment a loss of...
does_remove_constt(const goto_programt &)
A naive analysis to look for casts that remove const-ness from pointers.
std::pair< bool, source_locationt > operator()() const
A naive analysis to look for casts that remove const-ness from pointers.
const goto_programt & goto_program
bool does_expr_lose_const(const exprt &expr) const
Search the expression tree to look for any children that have the same base type, but a less strict c...
Base class for all expressions.
typet & type()
Return the type of the expression.
This class represents an instruction in the GOTO intermediate representation.
A generic container class for the GOTO intermediate representation of one function.
const irep_idt & id() const
The type of an expression, extends irept.
API to expression classes for Pointers.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
#define PRECONDITION(CONDITION)