mirror of
https://github.com/Z3Prover/z3
synced 2025-07-31 00:13:16 +00:00
Datalog improvements:
- add cancel status - display statistics on cancel (by me & Nikolaj) Signed-off-by: Nuno Lopes <t-nclaud@microsoft.com>
This commit is contained in:
parent
25a41d48dc
commit
1cece1c1fb
10 changed files with 142 additions and 77 deletions
|
@ -22,6 +22,7 @@ Revision History:
|
|||
#define _REL_CONTEXT_H_
|
||||
#include "ast.h"
|
||||
#include "dl_relation_manager.h"
|
||||
#include "dl_instruction.h"
|
||||
#include "lbool.h"
|
||||
|
||||
namespace datalog {
|
||||
|
@ -35,10 +36,11 @@ namespace datalog {
|
|||
ast_manager& m;
|
||||
relation_manager m_rmanager;
|
||||
expr_ref m_answer;
|
||||
volatile bool m_cancel;
|
||||
relation_base * m_last_result_relation;
|
||||
decl_set m_output_preds;
|
||||
fact_vector m_table_facts;
|
||||
execution_context m_ectx;
|
||||
instruction_block m_code;
|
||||
|
||||
void reset_negated_tables();
|
||||
|
||||
|
@ -53,8 +55,8 @@ namespace datalog {
|
|||
|
||||
relation_manager & get_rmanager();
|
||||
const relation_manager & get_rmanager() const;
|
||||
ast_manager& get_manager() { return m; }
|
||||
context& get_context() { return m_context; }
|
||||
ast_manager& get_manager() const { return m; }
|
||||
context& get_context() const { return m_context; }
|
||||
relation_base & get_relation(func_decl * pred);
|
||||
relation_base * try_get_relation(func_decl * pred) const;
|
||||
expr_ref get_last_answer() { return m_answer; }
|
||||
|
@ -70,10 +72,6 @@ namespace datalog {
|
|||
|
||||
void inherit_predicate_kind(func_decl* new_pred, func_decl* orig_pred);
|
||||
|
||||
void cancel() { m_cancel = true; }
|
||||
|
||||
void cleanup() { m_cancel = false; }
|
||||
|
||||
|
||||
/**
|
||||
\brief Restrict the set of used predicates to \c res.
|
||||
|
@ -107,6 +105,8 @@ namespace datalog {
|
|||
void display_output_facts(std::ostream & out) const;
|
||||
void display_facts(std::ostream & out) const;
|
||||
|
||||
void display_profile(std::ostream& out) const;
|
||||
|
||||
lbool saturate();
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue