Function-application constructors, sort-erased #
applyN takes an array and apply to apply4 are the fixed-arity spellings over it, so any
arity is reachable. All of them build APPLY_UF, whose first child is the function itself.
They flatten. Applying a term that is already an APPLY_UF appends to its children rather
than nesting, so apply2 (← apply f i) b and applyN f #[i, b] build the same (f i b). A nested
application would hold a function-sorted term, which cvc5 admits only under a higher-order logic.
A partial application is legal. cvc5 accepts fewer arguments than the function's arity and
gives the result the remaining function sort: applying (-> Int Bool Int) to one Int yields a
term of sort (-> Bool Int). Too many arguments is an error, and so is none — APPLY_UF wants at
least two children, the function and one argument.
applyHo is the different one: it is HO_APPLY, consumes exactly one argument whatever the
arity, and needs a higher-order logic.
Application of a single argument, leaving any remaining ones unapplied.
Needs a higher-order logic; Term.apply and Term.applyN are ordinary application.
Equations
- f.applyHo arg = Cvc.runUnsafe✝ fun (tm : cvc5.TermManager) => tm.mkTerm cvc5.Kind.HO_APPLY #[f, arg]
Instances For
Fun's operators, taken apart one level, sort-erased.
- applyHo
[Ω]
(f arg : Term)
: View.Fun
Application of a single argument, leaving any remaining ones unapplied.
Needs a higher-order logic;
Term.applyandTerm.applyNare ordinary application.
Instances For
Applies a function to the given arguments, however many.
Saturating when they fill the domain, and a partial application otherwise — cvc5 answers a term of the remaining function sort rather than refusing. More arguments than the domain has is an error, as is passing none.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The view of an application #
View.Apply takes an APPLY_UF apart; applyHo has the generated View.Fun.
An uninterpreted function's application, taken apart one level, sort-erased.
- apply
[Ω]
(f : Term)
(args : Args)
: View.Apply
f a₁ … aₙ, possibly a partial application.
Instances For
Takes a term apart one level, if it is an uninterpreted function's application.
Equations
- One or more equations did not get rendered due to their size.