20 #ifndef CPROVER_SOLVERS_REFINEMENT_STRING_REFINEMENT_H
21 #define CPROVER_SOLVERS_REFINEMENT_STRING_REFINEMENT_H
31 #define OPT_STRING_REFINEMENT \
32 "(no-refine-strings)" \
33 "(string-printable)" \
34 "(string-input-value):" \
35 "(string-non-empty)" \
36 "(max-nondet-string-length):"
38 #define HELP_STRING_REFINEMENT \
39 " {y--no-refine-strings} \t turn off string refinement\n" \
40 " {y--string-printable} \t restrict to printable strings and characters\n" \
41 " {y--string-non-empty} \t restrict to non-empty strings (experimental)\n" \
42 " {y--string-input-value} {ust} \t " \
43 "restrict non-null strings to a fixed value {ust}; the switch can be used " \
44 "multiple times to give several strings\n" \
45 " {y--max-nondet-string-length} {un} \t " \
46 "bound the length of nondet (e.g. input) strings. Default is " + \
47 std::to_string(MAX_CONCRETE_STRING_SIZE - 1) + \
48 "; note that setting the value higher than this does not work " \
49 "with {y--trace} or {y--validate-trace}.\n"
53 #define OPT_STRING_REFINEMENT_CBMC \
57 #define HELP_STRING_REFINEMENT_CBMC \
58 " {y--refine-strings} \t use string refinement (experimental)\n" \
59 " {y--string-printable} \t restrict to printable strings (experimental)\n"
61 #define DEFAULT_MAX_NB_REFINEMENT std::numeric_limits<size_t>::max()
86 void set_to(
const exprt &expr,
bool value)
override;
126 const std::vector<equal_exprt> &equations,
134 const bool left_propagate);
Abstraction Refinement Loop.
resultt
Result of running the decision procedure.
Base class for all expressions.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
virtual std::string solver_text() const =0
Keep track of dependencies between strings.
string_constraint_generatort generator
std::string decision_procedure_text() const override
Return a textual description of the decision procedure.
union_find_replacet symbol_resolve
std::vector< exprt > equations
decision_proceduret::resultt dec_solve(const exprt &) override
Main decision procedure of the solver.
string_refinementt(const infot &)
std::set< exprt > seen_instances
void set_to(const exprt &expr, bool value) override
Record the constraints to ensure that the expression is true when the boolean is true and false other...
string_dependenciest dependencies
index_set_pairt index_sets
exprt get(const exprt &expr) const override
Evaluates the given expression in the valuation found by string_refinementt::dec_solve.
std::vector< exprt > current_constraints
void add_lemma(const exprt &lemma, bool simplify_lemma=true)
Add the given lemma to the solver.
Generation of fresh symbols of a given type.
Similar interface to union-find for expressions, with a function for replacing sub-expressions by the...
Generates string constraints to link results from string functions with their arguments.
Keeps track of dependencies between strings.
exprt substitute_array_access(exprt expr, symbol_generatort &symbol_generator, const bool left_propagate)
Create an equivalent expression where array accesses and 'with' expressions are replaced by 'if' expr...
exprt substitute_array_lists(exprt expr, std::size_t string_max_length)
union_find_replacet string_identifiers_resolution_from_equations(const std::vector< equal_exprt > &equations, const namespacet &ns, messaget::mstreamt &stream)
Symbol resolution for expressions of type string typet.
std::size_t refinement_bound
string_refinementt constructor arguments