3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

load str decl plugin; recognize String sorted constants

This commit is contained in:
Murphy Berzish 2015-09-06 20:53:08 -04:00
parent 744d2e3c9c
commit 8137e022e3
8 changed files with 190 additions and 1 deletions

View file

@ -66,6 +66,16 @@ app * str_decl_plugin::mk_string(const char * val) {
return m_manager->mk_const(d);
}
void str_decl_plugin::get_op_names(svector<builtin_name> & op_names, symbol const & logic) {
// TODO
// we would do something like:
// op_names.push_back(builtin_name("<=",OP_LE));
}
void str_decl_plugin::get_sort_names(svector<builtin_name> & sort_names, symbol const & logic) {
sort_names.push_back(builtin_name("String", STRING_SORT));
}
bool str_recognizers::is_string(expr const * n, const char ** val) const {
if (!is_app_of(n, m_afid, OP_STR))
return false;

View file

@ -46,6 +46,10 @@ public:
unsigned arity, sort * const * domain, sort * range);
app * mk_string(const char * val);
virtual void get_op_names(svector<builtin_name> & op_names, symbol const & logic);
virtual void get_sort_names(svector<builtin_name> & sort_names, symbol const & logic);
// TODO
};