[−][src]Struct z3::ast::Int
Ast
node representing an integer value.
Implementations
impl<'ctx> Int<'ctx>
[src]
impl<'ctx> Int<'ctx>
[src]
pub fn new_const<S: Into<Symbol>>(ctx: &'ctx Context, name: S) -> Int<'ctx>
[src]
pub fn fresh_const(ctx: &'ctx Context, prefix: &str) -> Int<'ctx>
[src]
pub fn from_i64(ctx: &'ctx Context, i: i64) -> Int<'ctx>
[src]
pub fn from_u64(ctx: &'ctx Context, u: u64) -> Int<'ctx>
[src]
pub fn as_i64(&self) -> Option<i64>
[src]
pub fn as_u64(&self) -> Option<u64>
[src]
pub fn from_real(ast: &Real<'ctx>) -> Int<'ctx>
[src]
pub fn to_real(&self) -> Real<'ctx>
[src]
Create a real from an integer.
This is just a convenience wrapper around
Real::from_int
; see notes there
pub fn from_bv(ast: &BV<'ctx>, signed: bool) -> Int<'ctx>
[src]
Create an integer from a bitvector.
Signed and unsigned version.
Examples
let bv = ast::BV::new_const(&ctx, "x", 32); solver.assert(&bv._eq(&ast::BV::from_i64(&ctx, -3, 32))); let x = ast::Int::from_bv(&bv, true); assert_eq!(solver.check(), SatResult::Sat); let model = solver.get_model(); assert_eq!(-3, model.eval(&x).unwrap().as_i64().unwrap());
pub fn to_ast(&self, sz: u32) -> BV<'ctx>
[src]
Create a bitvector from an integer.
This is just a convenience wrapper around
BV::from_int
; see notes there
pub fn translate<'dest_ctx>(&self, dest: &'dest_ctx Context) -> Int<'dest_ctx>
[src]
pub fn add(context: &'ctx Context, values: &[&Self]) -> Self
[src]
pub fn sub(context: &'ctx Context, values: &[&Self]) -> Self
[src]
pub fn mul(context: &'ctx Context, values: &[&Self]) -> Self
[src]
pub fn unary_minus(&self) -> Self
[src]
pub fn div(&self, other: &Self) -> Self
[src]
pub fn rem(&self, other: &Self) -> Self
[src]
pub fn modulo(&self, other: &Self) -> Self
[src]
pub fn power(&self, other: &Self) -> Self
[src]
pub fn lt(&self, other: &Self) -> Bool<'ctx>
[src]
pub fn le(&self, other: &Self) -> Bool<'ctx>
[src]
pub fn gt(&self, other: &Self) -> Bool<'ctx>
[src]
pub fn ge(&self, other: &Self) -> Bool<'ctx>
[src]
Trait Implementations
impl<'ctx> Ast<'ctx> for Int<'ctx>
[src]
fn new(ctx: &'ctx Context, ast: Z3_ast) -> Self
[src]
fn get_ctx(&self) -> &'ctx Context
[src]
fn get_z3_ast(&self) -> Z3_ast
[src]
fn _eq(&self, other: &Self) -> Bool<'ctx>
[src]
fn distinct(&self, other: &[&Self]) -> Bool<'ctx>
[src]
fn get_sort(&self) -> Sort<'ctx>
[src]
fn simplify(&self) -> Self
[src]
fn substitute<T: Ast<'ctx>>(&self, substitutions: &[(&T, &T)]) -> Self
[src]
impl<'ctx> Clone for Int<'ctx>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'ctx> Debug for Int<'ctx>
[src]
impl<'ctx> Display for Int<'ctx>
[src]
impl<'ctx> Drop for Int<'ctx>
[src]
impl<'ctx> Eq for Int<'ctx>
[src]
impl<'ctx> From<Int<'ctx>> for Z3_ast
[src]
impl<'ctx> From<Int<'ctx>> for Dynamic<'ctx>
[src]
impl<'ctx> Hash for Int<'ctx>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'ctx> PartialEq<Int<'ctx>> for Int<'ctx>
[src]
impl<'ctx> TryFrom<Dynamic<'ctx>> for Int<'ctx>
[src]
Auto Trait Implementations
impl<'ctx> RefUnwindSafe for Int<'ctx>
impl<'ctx> !Send for Int<'ctx>
impl<'ctx> !Sync for Int<'ctx>
impl<'ctx> Unpin for Int<'ctx>
impl<'ctx> UnwindSafe for Int<'ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,