133 const exprt constr2 =
146 const not_exprt witness_diff(witness_eq);
151 and_exprt(bound_witness, witness_diff)));
175 std::make_pair(str,
fresh_symbol(
"hash", return_type)));
176 const exprt hash = pair.first->second;
243 and_exprt(
s1.axiom_for_length_le(
s2.length()),
s1.axiom_for_length_gt(x)),
244 and_exprt(
s1.axiom_for_length_ge(
s2.length()),
s2.axiom_for_length_gt(x)));
245 const and_exprt cond1(ret_char_diff, guard1);
247 and_exprt(
s2.axiom_for_length_gt(
s1.length()),
s1.axiom_for_has_length(x)),
248 and_exprt(
s1.axiom_for_length_gt(
s2.length()),
s2.axiom_for_has_length(x)));
249 const and_exprt cond2(ret_length_diff, guard2);
278 const typet &return_type=f.type();
281 auto pair=intern_of_string.insert(
282 std::make_pair(str, fresh_symbol(
"pool", return_type)));
291 for(
auto it : intern_of_string)
296 for(
auto it : intern_of_string)
310 str.axiom_for_length_gt(i),
311 axiom_for_is_positive_index(i)))))));
exprt add_axioms_for_compare_to(const function_application_exprt &f)
Lexicographic comparison of two strings.
The type of an expression.
Generates string constraints to link results from string functions with their arguments.
A generic base class for relations, i.e., binary predicates.
application of (mathematical) function
exprt add_axioms_for_equals(const function_application_exprt &f)
Equality of the content of two strings.
std::map< array_string_exprt, exprt > hash_code_of_string
symbol_exprt fresh_univ_index(const irep_idt &prefix, const typet &type)
generate an index symbol to be used as an universaly quantified variable
symbol_exprt fresh_boolean(const irep_idt &prefix)
generate a Boolean symbol which is existentially quantified
const irep_idt & id() const
DEPRECATED("use instrument_cover_goals(goto_programt &goto_program," "const cover_instrumenterst &instrumenters," "message_handlert &message_handler, const irep_idt mode) instead") void instrument_cover_goals(const symbol_tablet &symbol_table
Instruments goto program for a given coverage criterion.
exprt add_axioms_for_hash_code(const function_application_exprt &f)
Value that is identical for strings with the same content.
#define PRECONDITION(CONDITION)
exprt add_axioms_for_equals_ignore_case(const function_application_exprt &f)
Equality of the content ignoring case of characters.
bitvector_typet index_type()
exprt disjunction(const exprt::operandst &op)
std::vector< exprt > operandst
static constant_exprt constant_char(int i, const typet &char_type)
generate constant character expression with character type.
symbol_exprt fresh_exist_index(const irep_idt &prefix, const typet &type)
generate an index symbol which is existentially quantified
Base class for all expressions.
Universally quantified string constraint
static exprt character_equals_ignore_case(exprt char1, exprt char2, exprt char_a, exprt char_A, exprt char_Z)
Returns an expression which is true when the two given characters are equal when ignoring case for AS...
std::vector< exprt > lemmas
Expression to hold a symbol (variable)
const typet & subtype() const
std::vector< string_constraintt > constraints
std::map< string_not_contains_constraintt, symbol_exprt > witness
bitvector_typet char_type()
array_string_exprt get_string_expr(const exprt &expr)
casts an expression to a string expression, or fetches the actual string_exprt in the case of a symbo...
symbol_generatort fresh_symbol
exprt axiom_for_is_positive_index(const exprt &x)
expression true exactly when the index is positive