mirror of
https://github.com/Z3Prover/z3
synced 2025-10-04 23:13:57 +00:00
support for IndexOf in theory_str
This commit is contained in:
parent
db2a5854e9
commit
881e3056f3
2 changed files with 117 additions and 2 deletions
|
@ -111,6 +111,7 @@ namespace smt {
|
|||
ptr_vector<enode> m_axiom_StartsWith_todo;
|
||||
ptr_vector<enode> m_axiom_EndsWith_todo;
|
||||
ptr_vector<enode> m_axiom_Contains_todo;
|
||||
ptr_vector<enode> m_axiom_Indexof_todo;
|
||||
|
||||
// hashtable of all exprs for which we've already set up term-specific axioms --
|
||||
// this prevents infinite recursive descent with respect to axioms that
|
||||
|
@ -156,6 +157,7 @@ namespace smt {
|
|||
app * mk_strlen(expr * e);
|
||||
expr * mk_concat(expr * n1, expr * n2);
|
||||
expr * mk_concat_const_str(expr * n1, expr * n2);
|
||||
app * mk_contains(expr * haystack, expr * needle);
|
||||
|
||||
literal mk_literal(expr* _e);
|
||||
app * mk_int(int n);
|
||||
|
@ -168,6 +170,7 @@ namespace smt {
|
|||
|
||||
void track_variable_scope(expr * var);
|
||||
app * mk_str_var(std::string name);
|
||||
app * mk_int_var(std::string name);
|
||||
app * mk_nonempty_str_var();
|
||||
app * mk_internal_xor_var();
|
||||
expr * mk_internal_valTest_var(expr * node, int len, int vTries);
|
||||
|
@ -186,6 +189,8 @@ namespace smt {
|
|||
bool is_EndsWith(enode const * n) const { return is_EndsWith(n->get_owner()); }
|
||||
bool is_Contains(app const * a) const { return a->is_app_of(get_id(), OP_STR_CONTAINS); }
|
||||
bool is_Contains(enode const * n) const { return is_Contains(n->get_owner()); }
|
||||
bool is_Indexof(app const * a) const { return a->is_app_of(get_id(), OP_STR_INDEXOF); }
|
||||
bool is_Indexof(enode const * n) const { return is_Indexof(n->get_owner()); }
|
||||
|
||||
void instantiate_concat_axiom(enode * cat);
|
||||
void instantiate_basic_string_axioms(enode * str);
|
||||
|
@ -195,6 +200,7 @@ namespace smt {
|
|||
void instantiate_axiom_StartsWith(enode * e);
|
||||
void instantiate_axiom_EndsWith(enode * e);
|
||||
void instantiate_axiom_Contains(enode * e);
|
||||
void instantiate_axiom_Indexof(enode * e);
|
||||
|
||||
void set_up_axioms(expr * ex);
|
||||
void handle_equality(expr * lhs, expr * rhs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue