mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
fix crash in explanation generation. Codeplex issue 181
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
8ea7a1905f
commit
64e2011d42
4 changed files with 6 additions and 4 deletions
|
@ -884,14 +884,15 @@ namespace datalog {
|
|||
struct uninterpreted_function_finder_proc {
|
||||
ast_manager& m;
|
||||
datatype_util m_dt;
|
||||
dl_decl_util m_dl;
|
||||
bool m_found;
|
||||
func_decl* m_func;
|
||||
uninterpreted_function_finder_proc(ast_manager& m):
|
||||
m(m), m_dt(m), m_found(false), m_func(0) {}
|
||||
m(m), m_dt(m), m_dl(m), m_found(false), m_func(0) {}
|
||||
void operator()(var * n) { }
|
||||
void operator()(quantifier * n) { }
|
||||
void operator()(app * n) {
|
||||
if (is_uninterp(n)) {
|
||||
if (is_uninterp(n) && !m_dl.is_rule_sort(n->get_decl()->get_range())) {
|
||||
m_found = true;
|
||||
m_func = n->get_decl();
|
||||
}
|
||||
|
|
|
@ -828,7 +828,7 @@ namespace datalog {
|
|||
SASSERT(&expl_singleton->get_plugin()==m_er_plugin);
|
||||
m_e_fact_relation = static_cast<explanation_relation *>(expl_singleton);
|
||||
}
|
||||
func_decl_set const& predicates = m_context.get_predicates();
|
||||
func_decl_set predicates(m_context.get_predicates());
|
||||
decl_set::iterator it = predicates.begin();
|
||||
decl_set::iterator end = predicates.end();
|
||||
for (; it!=end; ++it) {
|
||||
|
|
|
@ -734,6 +734,7 @@ namespace datalog {
|
|||
|
||||
relation_union_fn * relation_manager::mk_union_fn(const relation_base & tgt, const relation_base & src,
|
||||
const relation_base * delta) {
|
||||
TRACE("dl", tout << src.get_plugin().get_name() << " " << tgt.get_plugin().get_name() << "\n";);
|
||||
relation_union_fn * res = tgt.get_plugin().mk_union_fn(tgt, src, delta);
|
||||
if(!res && &tgt.get_plugin()!=&src.get_plugin()) {
|
||||
res = src.get_plugin().mk_union_fn(tgt, src, delta);
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace datalog {
|
|||
{}
|
||||
|
||||
virtual bool can_handle_signature(const relation_signature & sig) {
|
||||
return true;
|
||||
return get_manager().get_context().karr();
|
||||
}
|
||||
|
||||
static symbol get_name() { return symbol("karr_relation"); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue