pub struct FuncDecl<'ctx> { /* private fields */ }
Expand description
Function declaration. Every constant and function have an associated declaration.
The declaration assigns a name, a sort (i.e., type), and for function the sort (i.e., type) of each of its arguments. Note that, in Z3, a constant is a function with 0 arguments.
See also:
Implementations§
source§impl<'ctx> FuncDecl<'ctx>
impl<'ctx> FuncDecl<'ctx>
pub fn new<S: Into<Symbol>>( ctx: &'ctx Context, name: S, domain: &[&Sort<'ctx>], range: &Sort<'ctx> ) -> Self
sourcepub fn arity(&self) -> usize
pub fn arity(&self) -> usize
Return the number of arguments of a function declaration.
If the function declaration is a constant, then the arity is 0
.
let f = FuncDecl::new(
&ctx,
"f",
&[&Sort::int(&ctx), &Sort::real(&ctx)],
&Sort::int(&ctx));
assert_eq!(f.arity(), 2);
Trait Implementations§
Auto Trait Implementations§
impl<'ctx> RefUnwindSafe for FuncDecl<'ctx>
impl<'ctx> !Send for FuncDecl<'ctx>
impl<'ctx> !Sync for FuncDecl<'ctx>
impl<'ctx> Unpin for FuncDecl<'ctx>
impl<'ctx> UnwindSafe for FuncDecl<'ctx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more