Go to the documentation of this file.
20 #ifndef CPROVER_SOLVERS_REFINEMENT_STRING_REFINEMENT_H
21 #define CPROVER_SOLVERS_REFINEMENT_STRING_REFINEMENT_H
32 #define OPT_STRING_REFINEMENT \
33 "(no-refine-strings)" \
34 "(string-printable)" \
35 "(string-input-value):" \
36 "(string-non-empty)" \
37 "(max-nondet-string-length):"
39 #define HELP_STRING_REFINEMENT \
40 " --no-refine-strings turn off string refinement\n" \
41 " --string-printable restrict to printable strings and characters\n" \
42 " --string-non-empty restrict to non-empty strings (experimental)\n" \
43 " --string-input-value st restrict non-null strings to a fixed value st;\n" \
44 " the switch can be used multiple times to give\n" \
45 " several strings\n" \
46 " --max-nondet-string-length n bound the length of nondet (e.g. input) strings.\n" \
47 " Default is " + std::to_string(MAX_CONCRETE_STRING_SIZE - 1) + "; note that\n" \
48 " setting the value higher than this does not work\n" \
49 " with --trace or --validate-trace.\n"
53 #define OPT_STRING_REFINEMENT_CBMC \
57 #define HELP_STRING_REFINEMENT_CBMC \
58 " --refine-strings use string refinement (experimental)\n" \
59 " --string-printable restrict to printable strings (experimental)\n"
62 #define DEFAULT_MAX_NB_REFINEMENT std::numeric_limits<size_t>::max()
87 void set_to(
const exprt &expr,
bool value)
override;
125 const std::vector<equal_exprt> &equations,
133 const bool left_propagate);
string_constraint_generatort generator
virtual const std::string solver_text()=0
std::vector< exprt > current_constraints
std::size_t refinement_bound
Base class for all expressions.
index_set_pairt index_sets
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Generation of fresh symbols of a given type.
exprt get(const exprt &expr) const override
Evaluates the given expression in the valuation found by string_refinementt::dec_solve.
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 symbol_resolve
resultt
Result of running the decision procedure.
decision_proceduret::resultt dec_solve() override
Main decision procedure of the solver.
string_dependenciest dependencies
Similar interface to union-find for expressions, with a function for replacing sub-expressions by the...
Keep track of dependencies between strings.
std::string decision_procedure_text() const override
Return a textual description of the decision procedure.
std::vector< exprt > equations
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.
void add_lemma(const exprt &lemma, bool simplify_lemma=true)
Add the given lemma to the solver.
string_refinementt constructor arguments
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_refinementt(const infot &)
std::set< exprt > seen_instances