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

exposing algebraic numbers in the API (working in progress)

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-07 17:48:57 -08:00
parent c350943c78
commit c011b05b61
8 changed files with 440 additions and 3 deletions

View file

@ -184,7 +184,7 @@ public:
virtual expr * get_some_value(sort * s);
void set_cancel(bool f);
virtual void set_cancel(bool f);
};
class arith_util {

View file

@ -1336,6 +1336,12 @@ ast_manager::~ast_manager() {
}
}
void ast_manager::set_cancel(bool f) {
for (unsigned i = 0; i < m_plugins.size(); i++) {
m_plugins[i]->set_cancel(f);
}
}
void ast_manager::compact_memory() {
m_alloc.consolidate();
unsigned capacity = m_ast_table.capacity();

View file

@ -921,6 +921,8 @@ public:
virtual ~decl_plugin() {}
virtual void finalize() {}
virtual void set_cancel(bool f) {}
virtual decl_plugin * mk_fresh() = 0;
family_id get_family_id() const { return m_family_id; }
@ -1400,6 +1402,9 @@ public:
ast_manager(ast_manager const & src, bool disable_proofs = false);
~ast_manager();
// propagate cancellation signal to decl_plugins
void set_cancel(bool f);
bool has_trace_stream() const { return m_trace_stream != 0; }
std::ostream & trace_stream() { SASSERT(has_trace_stream()); return *m_trace_stream; }