pub struct Array {
pub id: TermId,
pub domain: SortId,
pub range: SortId,
}Expand description
An array-sorted term, analogous to z3::Array<'ctx, D, R>.
Arrays are modelled by the theory of arrays (select/store).
The domain and range sorts are recorded for convenience but the
authoritative sort information lives inside the TermManager.
Fields§
§id: TermIdThe underlying term identifier.
domain: SortIdThe index (domain) sort of this array.
range: SortIdThe element (range) sort of this array.
Implementations§
Source§impl Array
impl Array
Sourcepub fn from_id(id: TermId, domain: SortId, range: SortId) -> Self
pub fn from_id(id: TermId, domain: SortId, range: SortId) -> Self
Wrap a raw TermId as an Array with known domain/range sorts.
Sourcepub fn new_const(
ctx: &Z3Context,
name: &str,
domain: SortId,
range: SortId,
) -> Self
pub fn new_const( ctx: &Z3Context, name: &str, domain: SortId, range: SortId, ) -> Self
Declare a fresh array constant named name with the given domain/range sorts.
Creates the array sort via SortManager::array and then declares a
variable of that sort.
Sourcepub fn select(ctx: &Z3Context, arr: &Array, idx: TermId) -> TermId
pub fn select(ctx: &Z3Context, arr: &Array, idx: TermId) -> TermId
Select an element from arr at index idx.
Returns a raw TermId whose sort is arr.range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Array
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnsafeUnpin for Array
impl UnwindSafe for Array
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more