pub struct Array<'ctx> { /* private fields */ }
Expand description
Ast
node representing an array value.
An array in Z3 is a mapping from indices to values.
Implementations§
Source§impl<'ctx> Array<'ctx>
impl<'ctx> Array<'ctx>
Sourcepub fn new_const<S: Into<Symbol>>(
ctx: &'ctx Context,
name: S,
domain: &Sort<'ctx>,
range: &Sort<'ctx>,
) -> Array<'ctx>
pub fn new_const<S: Into<Symbol>>( ctx: &'ctx Context, name: S, domain: &Sort<'ctx>, range: &Sort<'ctx>, ) -> Array<'ctx>
Create an Array
which maps from indices of the domain
Sort
to
values of the range
Sort
.
All values in the Array
will be unconstrained.
pub fn fresh_const( ctx: &'ctx Context, prefix: &str, domain: &Sort<'ctx>, range: &Sort<'ctx>, ) -> Array<'ctx>
Sourcepub fn const_array<A>(
ctx: &'ctx Context,
domain: &Sort<'ctx>,
val: &A,
) -> Array<'ctx>where
A: Ast<'ctx>,
pub fn const_array<A>(
ctx: &'ctx Context,
domain: &Sort<'ctx>,
val: &A,
) -> Array<'ctx>where
A: Ast<'ctx>,
Create a “constant array”, that is, an Array
initialized so that all of the
indices in the domain
map to the given value val
Trait Implementations§
Source§impl<'ctx> Ast<'ctx> for Array<'ctx>
impl<'ctx> Ast<'ctx> for Array<'ctx>
fn get_ctx(&self) -> &'ctx Context
fn get_z3_ast(&self) -> Z3_ast
Source§fn _safe_eq(&self, other: &Self) -> Result<Bool<'ctx>, SortDiffers<'ctx>>where
Self: Sized,
fn _safe_eq(&self, other: &Self) -> Result<Bool<'ctx>, SortDiffers<'ctx>>where
Self: Sized,
Compare this
Ast
with another Ast
, and get a Result. Errors if the sort does not
match for the two values.Source§fn simplify(&self) -> Selfwhere
Self: Sized,
fn simplify(&self) -> Selfwhere
Self: Sized,
Simplify the
Ast
. Returns a new Ast
which is equivalent,
but simplified using algebraic simplification rules, such as
constant propagation.Source§fn substitute<T: Ast<'ctx>>(&self, substitutions: &[(&T, &T)]) -> Selfwhere
Self: Sized,
fn substitute<T: Ast<'ctx>>(&self, substitutions: &[(&T, &T)]) -> Selfwhere
Self: Sized,
Performs substitution on the
Ast
. The slice substitutions
contains a
list of pairs with a “from” Ast
that will be substituted by a “to” Ast
.Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Return the number of children of this
Ast
. Read morefn safe_decl(&self) -> Result<FuncDecl<'ctx>, IsNotApp>
fn translate<'src_ctx>(&'src_ctx self, dest: &'ctx Context) -> Selfwhere
Self: Sized,
impl<'ctx> Eq for Array<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for Array<'ctx>
impl<'ctx> RefUnwindSafe for Array<'ctx>
impl<'ctx> !Send for Array<'ctx>
impl<'ctx> !Sync for Array<'ctx>
impl<'ctx> Unpin for Array<'ctx>
impl<'ctx> UnwindSafe for Array<'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