mirror of
https://github.com/Z3Prover/z3
synced 2025-08-21 10:41:35 +00:00
fixing python build errors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2a6fa4af39
commit
b02fec91cc
7 changed files with 76 additions and 35 deletions
|
@ -19,7 +19,6 @@ Revision History:
|
|||
--*/
|
||||
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "ast/rewriter/rewriter.h"
|
||||
#include "ast/ast_pp.h"
|
||||
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ Revision History:
|
|||
#define EXPR_SAFE_REPLACE_H_
|
||||
|
||||
#include "ast/ast.h"
|
||||
#include "ast/rewriter/var_subst.h"
|
||||
|
||||
class expr_safe_replace {
|
||||
ast_manager& m;
|
||||
|
|
41
src/ast/rewriter/recfun_replace.h
Normal file
41
src/ast/rewriter/recfun_replace.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*++
|
||||
Copyright (c) 2018 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
recfun_replace.h
|
||||
|
||||
Abstract:
|
||||
|
||||
replace function for recfun.
|
||||
recfun_decl_plugin relies on being able to do expression replacement.
|
||||
It uses expr_safe_replace from ast/rewriter, which depends on ast.
|
||||
To break the dependency cycle we hoist the relevant functionality into
|
||||
an argument to functionality exposed by recfun::set_definition
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2018-11-01
|
||||
|
||||
Revision History:
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef RECFUN_REPLACE_H_
|
||||
#define RECFUN_REPLACE_H_
|
||||
|
||||
#include "ast/recfun_decl_plugin.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
|
||||
class recfun_replace : public recfun::replace {
|
||||
ast_manager& m;
|
||||
expr_safe_replace m_replace;
|
||||
public:
|
||||
recfun_replace(ast_manager& m): m(m), m_replace(m) {}
|
||||
void reset() override { m_replace.reset(); }
|
||||
void insert(expr* s, expr* t) { m_replace.insert(s, t); }
|
||||
expr_ref operator()(expr* e) { expr_ref r(m); m_replace(e, r); return r; }
|
||||
};
|
||||
|
||||
#endif /* RECFUN_REPLACE_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue