3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-11-18 21:14:50 -08:00
parent 4587575649
commit 518ef9f916
7 changed files with 31 additions and 1 deletions

View file

@ -1050,6 +1050,12 @@ public:
*/
virtual bool is_value(app * a) const { return false; }
/**
\brief return true if the expression can be used as a model value.
*/
virtual bool is_model_value(app* a) const { return is_value(a); }
/**
\brief Return true if \c a is a unique plugin value.
The following property should hold for unique theory values:

View file

@ -705,6 +705,17 @@ bool seq_decl_plugin::is_value(app* e) const {
}
}
bool seq_decl_plugin::is_model_value(app* e) const {
if (is_app_of(e, m_family_id, OP_SEQ_EMPTY))
return true;
if (is_app_of(e, m_family_id, OP_STRING_CONST))
return true;
if (is_app_of(e, m_family_id, OP_SEQ_UNIT) &&
m_manager->is_value(e->get_arg(0)))
return true;
return false;
}
bool seq_decl_plugin::are_equal(app* a, app* b) const {
if (a == b) return true;
// handle concatenations

View file

@ -179,6 +179,8 @@ public:
bool is_value(app * e) const override;
bool is_model_value(app* e) const override;
bool is_unique_value(app * e) const override;
bool are_equal(app* a, app* b) const override;