3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-11 13:40:52 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-02-26 02:06:15 -08:00
parent 56e4ee3273
commit ea1089e980
5 changed files with 27 additions and 6 deletions

View file

@ -640,6 +640,16 @@ namespace datatype {
return result;
}
bool util::is_considered_uninterpreted(func_decl * f, unsigned n, expr* const* args) {
if (is_accessor(f)) {
func_decl* c = get_accessor_constructor(f);
SASSERT(n == 1);
if (is_constructor(args[0]))
return to_app(args[0])->get_decl() != c;
return false;
}
return false;
}
bool util::is_fully_interp(sort * s) const {
SASSERT(is_datatype(s));

View file

@ -345,6 +345,8 @@ namespace datatype {
bool is_is(app const * f) const { return is_app_of(f, fid(), OP_DT_IS);}
bool is_is(expr const * e) const { return is_app(e) && is_is(to_app(e)); }
bool is_recognizer(expr const * f) const { return is_app(f) && (is_recognizer0(to_app(f)) || is_is(to_app(f))); }
bool is_considered_uninterpreted(func_decl * f, unsigned n, expr* const* args);
MATCH_UNARY(is_recognizer);
bool is_accessor(expr const* e) const { return is_app(e) && is_app_of(to_app(e), fid(), OP_DT_ACCESSOR); }
MATCH_UNARY(is_accessor);