mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 08:28:44 +00:00
fix #6127 again
this time adding inheritance to the recfun plugin so it properly contains the recursive definitions from the source.
This commit is contained in:
parent
6ed2b444b5
commit
0353fc38ff
5 changed files with 86 additions and 17 deletions
|
@ -21,6 +21,7 @@ Revision History:
|
|||
|
||||
#include "ast/ast.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/ast_translation.h"
|
||||
#include "util/obj_hashtable.h"
|
||||
|
||||
namespace recfun {
|
||||
|
@ -62,6 +63,12 @@ namespace recfun {
|
|||
def * m_def; //<! definition this is a part of
|
||||
bool m_immediate; //<! does `rhs` contain no defined_fun/case_pred?
|
||||
|
||||
case_def(ast_manager& m):
|
||||
m_pred(m),
|
||||
m_guards(m),
|
||||
m_rhs(m)
|
||||
{}
|
||||
|
||||
case_def(ast_manager & m,
|
||||
family_id fid,
|
||||
def * d,
|
||||
|
@ -132,6 +139,8 @@ namespace recfun {
|
|||
bool is_fun_macro() const { return m_cases.size() == 1; }
|
||||
bool is_fun_defined() const { return !is_fun_macro(); }
|
||||
|
||||
def* copy(util& dst, ast_translation& tr);
|
||||
|
||||
};
|
||||
|
||||
// definition to be complete (missing RHS)
|
||||
|
@ -205,6 +214,8 @@ namespace recfun {
|
|||
|
||||
expr_ref redirect_ite(replace& subst, unsigned n, var * const* vars, expr * e);
|
||||
|
||||
void inherit(decl_plugin* other, ast_translation& tr) override;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue