mirror of
https://github.com/Z3Prover/z3
synced 2025-05-02 21:37:02 +00:00
recfun
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fac114872f
commit
aa6e1badf2
9 changed files with 95 additions and 33 deletions
|
@ -2277,10 +2277,14 @@ namespace smt2 {
|
|||
parse_expr();
|
||||
if (m().get_sort(expr_stack().back()) != sort_stack().back())
|
||||
throw parser_exception("invalid function/constant definition, sort mismatch");
|
||||
if (is_fun)
|
||||
m_ctx.insert(id, num_vars, sort_stack().c_ptr() + sort_spos, expr_stack().back());
|
||||
else
|
||||
m_ctx.model_add(id, num_vars, sort_stack().c_ptr() + sort_spos, expr_stack().back());
|
||||
sort* const* sorts = sort_stack().c_ptr() + sort_spos;
|
||||
expr* t = expr_stack().back();
|
||||
if (is_fun) {
|
||||
m_ctx.insert(id, num_vars, sorts, t);
|
||||
}
|
||||
else {
|
||||
m_ctx.model_add(id, num_vars, sorts, t);
|
||||
}
|
||||
check_rparen("invalid function/constant definition, ')' expected");
|
||||
// restore stacks & env
|
||||
symbol_stack().shrink(sym_spos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue