22#include <unordered_set>
39static std::unordered_set<exprt, irep_hash>
47 const auto str_it = std::find(
arr.depth_begin(),
arr.depth_end(), str);
54 if(index_str_containing_qvar(e))
55 result.insert(to_index_expr(e).index());
118 const exprt &t = term.first;
154 const bool positive = it->second == 1;
168 std::ostringstream
stream;
205 const std::set<std::pair<exprt, exprt>> &
index_pairs,
206 const std::unordered_map<string_not_contains_constraintt, symbol_exprt>
209 std::vector<exprt>
lemmas;
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.
Base class for all expressions.
std::vector< exprt > operandst
depth_iteratort depth_end()
depth_iteratort depth_begin()
typet & type()
Return the type of the expression.
const irep_idt & id() const
Canonical representation of linear function, for instance, expression $x + x - y + 5 - 3$ would given...
exprt to_expr(bool negated=false) const
static exprt solve(linear_functiont f, const exprt &var, const exprt &val)
Return an expression y such that f(var <- y) = val.
linear_functiont(const exprt &f)
Put an expression f composed of additions and subtractions into its cannonical representation.
std::unordered_map< exprt, mp_integer, irep_hash > coefficients
std::string format()
Format the linear function as a string, can be used for debugging.
void add(const linear_functiont &other)
Make this function the sum of the current function with other.
mp_integer constant_coefficient
Binary multiplication Associativity is not specified.
The plus expression Associativity is not specified.
std::vector< exprt > instantiate_not_contains(const string_not_contains_constraintt &axiom, const std::set< std::pair< exprt, exprt > > &index_pairs, const std::unordered_map< string_not_contains_constraintt, symbol_exprt > &witnesses)
Instantiates a quantified formula representing not_contains by substituting the quantifiers and gener...
Expression to hold a symbol (variable)
The unary minus expression.
Forward depth-first search iterators These iterators' copy operations are expensive,...
bool replace_expr(const exprt &what, const exprt &by, exprt &dest)
#define PRECONDITION(CONDITION)
exprt conjunction(const exprt::operandst &op)
1) generates a conjunction for two or more operands 2) for one operand, returns the operand 3) return...
const minus_exprt & to_minus_expr(const exprt &expr)
Cast an exprt to a minus_exprt.
const unary_minus_exprt & to_unary_minus_expr(const exprt &expr)
Cast an exprt to a unary_minus_exprt.
Defines string constraints.
static bool contains(const exprt &index, const symbol_exprt &qvar)
Look for symbol qvar in the expression index and return true if found.
exprt instantiate(const string_constraintt &axiom, const exprt &str, const exprt &val)
Instantiates a string constraint by substituting the quantifiers.
static std::unordered_set< exprt, irep_hash > find_indexes(const exprt &expr, const exprt &str, const symbol_exprt &qvar)
Find indexes of str used in expr that contains qvar, for instance with arguments (str[k+1]=='a'),...
Defines related function for string constraints.
Constraints to encode non containement of strings.