mirror of
https://github.com/Z3Prover/z3
synced 2025-10-07 16:31:55 +00:00
add check_relation for integrity checking of relational operations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1111c0494f
commit
16f80fce92
15 changed files with 837 additions and 139 deletions
|
@ -34,6 +34,7 @@ Revision History:
|
|||
#include"dl_finite_product_relation.h"
|
||||
#include"product_set.h"
|
||||
#include"udoc_relation.h"
|
||||
#include"check_relation.h"
|
||||
#include"dl_lazy_table.h"
|
||||
#include"dl_sparse_table.h"
|
||||
#include"dl_table.h"
|
||||
|
@ -118,6 +119,7 @@ namespace datalog {
|
|||
rm.register_plugin(alloc(karr_relation_plugin, rm));
|
||||
rm.register_plugin(alloc(product_set_plugin, rm));
|
||||
rm.register_plugin(alloc(udoc_plugin, rm));
|
||||
rm.register_plugin(alloc(check_relation_plugin, rm));
|
||||
}
|
||||
|
||||
rel_context::~rel_context() {
|
||||
|
@ -575,6 +577,24 @@ namespace datalog {
|
|||
m_ectx.collect_statistics(st);
|
||||
}
|
||||
|
||||
void rel_context::updt_params() {
|
||||
if (m_context.check_relation() != symbol::null) {
|
||||
symbol cr("check_relation");
|
||||
m_context.set_default_relation(cr);
|
||||
relation_plugin* p = get_rmanager().get_relation_plugin(cr);
|
||||
SASSERT(p);
|
||||
check_relation_plugin* p1 = dynamic_cast<check_relation_plugin*>(p);
|
||||
relation_plugin* p2 = get_rmanager().get_relation_plugin(m_context.check_relation());
|
||||
SASSERT(p2);
|
||||
SASSERT(p1 != p2);
|
||||
p1->set_plugin(p2);
|
||||
get_rmanager().set_favourite_plugin(p1);
|
||||
if (m_context.check_relation() == symbol("doc")) {
|
||||
m_context.set_unbound_compressor(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rel_context::inherit_predicate_kind(func_decl* new_pred, func_decl* orig_pred) {
|
||||
if (orig_pred) {
|
||||
family_id target_kind = get_rmanager().get_requested_predicate_kind(orig_pred);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue