mirror of
https://github.com/Z3Prover/z3
synced 2025-05-09 00:35:47 +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
62
lib/expr_replacer.h
Normal file
62
lib/expr_replacer.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
expr_replacer.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Abstract (functor) for replacing expressions.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo (leonardo) 2011-04-29
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef _EXPR_REPLACER_H_
|
||||
#define _EXPR_REPLACER_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"expr_substitution.h"
|
||||
#include"params.h"
|
||||
|
||||
/**
|
||||
\brief Abstract interface for functors that replace constants with expressions.
|
||||
*/
|
||||
class expr_replacer {
|
||||
struct scoped_set_subst;
|
||||
public:
|
||||
virtual ~expr_replacer() {}
|
||||
|
||||
virtual ast_manager & m() const = 0;
|
||||
virtual void set_substitution(expr_substitution * s) = 0;
|
||||
|
||||
virtual void operator()(expr * t, expr_ref & result, proof_ref & result_pr, expr_dependency_ref & deps) = 0;
|
||||
virtual void operator()(expr * t, expr_ref & result, proof_ref & result_pr);
|
||||
virtual void operator()(expr * t, expr_ref & result);
|
||||
virtual void operator()(expr_ref & t) { expr_ref s(t, m()); (*this)(s, t); }
|
||||
|
||||
void cancel() { set_cancel(true); }
|
||||
void reset_cancel() { set_cancel(false); }
|
||||
virtual void set_cancel(bool f) = 0;
|
||||
virtual unsigned get_num_steps() const { return 0; }
|
||||
|
||||
|
||||
void apply_substitution(expr * s, expr * def, proof * def_pr, expr_ref & t);
|
||||
void apply_substitution(expr * s, expr * def, expr_ref & t);
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Create a vanilla replacer. It just applies the substitution.
|
||||
*/
|
||||
expr_replacer * mk_default_expr_replacer(ast_manager & m);
|
||||
|
||||
/**
|
||||
\brief Apply substitution and simplify.
|
||||
*/
|
||||
expr_replacer * mk_expr_simp_replacer(ast_manager & m, params_ref const & p = params_ref());
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue