mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
65
lib/th_rewriter.h
Normal file
65
lib/th_rewriter.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
th_rewriter.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Rewriter for applying all builtin (cheap) theory rewrite rules.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo (leonardo) 2011-04-07
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef _TH_REWRITER_H_
|
||||
#define _TH_REWRITER_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"rewriter_types.h"
|
||||
#include"params.h"
|
||||
|
||||
class expr_substitution;
|
||||
|
||||
class th_rewriter {
|
||||
struct imp;
|
||||
imp * m_imp;
|
||||
params_ref m_params;
|
||||
public:
|
||||
th_rewriter(ast_manager & m, params_ref const & p = params_ref());
|
||||
~th_rewriter();
|
||||
|
||||
ast_manager & m () const;
|
||||
|
||||
void updt_params(params_ref const & p);
|
||||
static void get_param_descrs(param_descrs & r);
|
||||
|
||||
unsigned get_cache_size() const;
|
||||
unsigned get_num_steps() const;
|
||||
|
||||
void operator()(expr_ref& term);
|
||||
void operator()(expr * t, expr_ref & result);
|
||||
void operator()(expr * t, expr_ref & result, proof_ref & result_pr);
|
||||
void operator()(expr * n, unsigned num_bindings, expr * const * bindings, expr_ref & result);
|
||||
|
||||
void cancel() { set_cancel(true); }
|
||||
void reset_cancel() { set_cancel(false); }
|
||||
void set_cancel(bool f);
|
||||
void cleanup();
|
||||
void reset();
|
||||
|
||||
void set_substitution(expr_substitution * s);
|
||||
|
||||
// Dependency tracking is very coarse.
|
||||
// The rewriter just keeps accumulating the dependencies of the used substitutions.
|
||||
// The following methods are used to recover and reset them.
|
||||
// Remark: reset_used_dependecies will reset the internal cache if get_used_dependencies() != 0
|
||||
expr_dependency * get_used_dependencies();
|
||||
void reset_used_dependencies();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue