#[repr(C)]pub struct Analyzer { /* private fields */ }Implementations§
Source§impl Analyzer
impl Analyzer
Sourcepub fn set_z3_default_fallback(&self, enabled: bool) -> Result<()>
pub fn set_z3_default_fallback(&self, enabled: bool) -> Result<()>
Set whether default-strength queries try Z3 after native analysis fails.
Enabled by default and preserved by deep_clone. Stronger queries and direct Z3
APIs are unaffected. This does not clear accepted premises or solver state.
Sourcepub fn deep_clone(&self) -> Result<Self>
pub fn deep_clone(&self) -> Result<Self>
A copy of the analyzer and the facts it knows (sym.AnalyzerClone).
Sourcepub fn sync_constraint_context(&self, context: &ObjectRef) -> Result<()>
pub fn sync_constraint_context(&self, context: &ObjectRef) -> Result<()>
Synchronize with a sym.ConstraintContext captured at its current position.
The context is an opaque FFI object until typed constraint bindings are available. Switching contexts removes facts that are no longer present. Mutating the context after this call takes effect only after another synchronization.
Sourcepub fn const_int_bound(&self, expr: impl IntoExpr) -> Result<ConstIntBound>
pub fn const_int_bound(&self, expr: impl IntoExpr) -> Result<ConstIntBound>
The constant bounds of expr (sym.AnalyzerConstIntBound).
Sourcepub fn const_int_bound_is_bound(&self, var: impl Into<Var>) -> Result<bool>
pub fn const_int_bound_is_bound(&self, var: impl Into<Var>) -> Result<bool>
Whether var has constant bounds recorded (sym.AnalyzerConstIntBoundIsBound).
Sourcepub fn modular_set(&self, expr: impl IntoExpr) -> Result<ModularSet>
pub fn modular_set(&self, expr: impl IntoExpr) -> Result<ModularSet>
The modular set coeff * x + base of expr (sym.AnalyzerModularSet).
Sourcepub fn int_set(
&self,
expr: impl IntoExpr,
dom_map: Option<&Map<Var, IntSet>>,
) -> Result<IntSet>
pub fn int_set( &self, expr: impl IntoExpr, dom_map: Option<&Map<Var, IntSet>>, ) -> Result<IntSet>
The integer set expr covers, with the variables of dom_map over their sets
(sym.AnalyzerIntSet).
Sourcepub fn simplify(&self, expr: impl IntoExpr, steps: i32) -> Result<Expr>
pub fn simplify(&self, expr: impl IntoExpr, steps: i32) -> Result<Expr>
Simplify expr, alternating the rewrite and canonical simplifiers steps times
(sym.AnalyzerSimplify).
Sourcepub fn rewrite_simplify(&self, expr: impl IntoExpr) -> Result<Expr>
pub fn rewrite_simplify(&self, expr: impl IntoExpr) -> Result<Expr>
Simplify expr by rewrite rules (sym.AnalyzerRewriteSimplify).
Sourcepub fn canonical_simplify(&self, expr: impl IntoExpr) -> Result<Expr>
pub fn canonical_simplify(&self, expr: impl IntoExpr) -> Result<Expr>
Simplify expr into canonical form (sym.AnalyzerCanonicalSimplify).
Sourcepub fn rewrite_simplify_stats(&self) -> Result<RewriteSimplifierStats>
pub fn rewrite_simplify_stats(&self) -> Result<RewriteSimplifierStats>
The counters of the rewrite simplifier (sym.AnalyzerGetRewriteSimplifyStats).
Sourcepub fn reset_rewrite_simplify_stats(&self) -> Result<()>
pub fn reset_rewrite_simplify_stats(&self) -> Result<()>
Zero the counters of the rewrite simplifier (sym.AnalyzerResetRewriteSimplifyStats).
Sourcepub fn set_maximum_rewrite_steps(&self, maximum: i64) -> Result<()>
pub fn set_maximum_rewrite_steps(&self, maximum: i64) -> Result<()>
Cap the rewrites of one rewrite simplification; 0 is no cap
(sym.AnalyzerSetMaximumRewriteSteps).
Sourcepub fn can_prove(
&self,
expr: impl IntoExpr,
strength: ProofStrength,
) -> Result<bool>
pub fn can_prove( &self, expr: impl IntoExpr, strength: ProofStrength, ) -> Result<bool>
Whether expr is provably true (sym.AnalyzerCanProve).
Sourcepub fn can_prove_equal(
&self,
lhs: impl IntoExpr,
rhs: impl IntoExpr,
) -> Result<bool>
pub fn can_prove_equal( &self, lhs: impl IntoExpr, rhs: impl IntoExpr, ) -> Result<bool>
Whether lhs == rhs is provably true (sym.AnalyzerCanProveEqual).
Sourcepub fn try_compare(
&self,
lhs: impl IntoExpr,
rhs: impl IntoExpr,
) -> Result<CompareResult>
pub fn try_compare( &self, lhs: impl IntoExpr, rhs: impl IntoExpr, ) -> Result<CompareResult>
The relation of lhs to rhs the known comparisons imply (sym.AnalyzerTryCompare).
Sourcepub fn is_z3_enabled(&self) -> Result<bool>
pub fn is_z3_enabled(&self) -> Result<bool>
Whether the analyzer was built with the Z3 prover (sym.AnalyzerIsZ3Enabled).
Sourcepub fn smtlib2(&self, expr: Option<&Expr>) -> Result<String>
pub fn smtlib2(&self, expr: Option<&Expr>) -> Result<String>
The facts the Z3 prover knows, and expr to prove if given, as an SMT-LIB2 script
(sym.AnalyzerGetSMTLIB2).
Sourcepub fn set_z3_timeout_ms(&self, timeout_ms: u32) -> Result<()>
pub fn set_z3_timeout_ms(&self, timeout_ms: u32) -> Result<()>
Bound each Z3 proof by timeout_ms milliseconds (sym.AnalyzerSetZ3TimeoutMs).
Sourcepub fn set_z3_rlimit(&self, rlimit: u32) -> Result<()>
pub fn set_z3_rlimit(&self, rlimit: u32) -> Result<()>
Bound each Z3 proof by the resource limit rlimit (sym.AnalyzerSetZ3RLimit).
Trait Implementations§
Source§impl AnyCompatible for Analyzer
impl AnyCompatible for Analyzer
Source§unsafe fn is_undefined(field: *const Self) -> bool
unsafe fn is_undefined(field: *const Self) -> bool
field, which holds a value of this type or all-zero bytes,
holds all-zero bytes that are no value of this type, as a null object
reference, a string of type index None or a zero device type: a field
that a creator left undefined for reflection to set, as C++ UnsafeInit
leaves a reference undefined (null). Unlike a C++ undefined reference,
it is no value; a nullable reference is Option<T>, whose None is a
defined value. Read moreSource§unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
Source§unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
Source§unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
Source§unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
Source§unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
Source§fn get_mismatch_type_info(data: &TVMFFIAny) -> String
fn get_mismatch_type_info(data: &TVMFFIAny) -> String
Source§fn type_schema() -> String
fn type_schema() -> String
TypeTraits<T>::TypeSchema writes, which the type schemas of functions
and fields embed. Read moreSource§impl<'a> ArgIntoRef for &'a Analyzer
impl<'a> ArgIntoRef for &'a Analyzer
Source§impl ArgIntoRef for Analyzer
impl ArgIntoRef for Analyzer
Source§impl Deref for Analyzer
impl Deref for Analyzer
Source§type Target = AnalyzerObj
type Target = AnalyzerObj
Source§fn deref(&self) -> &AnalyzerObj
fn deref(&self) -> &AnalyzerObj
Source§impl<'a> IntoArgHolder for &'a Analyzer
impl<'a> IntoArgHolder for &'a Analyzer
Source§impl IntoArgHolder for Analyzer
impl IntoArgHolder for Analyzer
Source§impl ObjectRefCore for Analyzer
impl ObjectRefCore for Analyzer
type ContainerType = <ObjectArc<AnalyzerObj> as Deref>::Target
fn data(this: &Self) -> &ObjectArc<Self::ContainerType>
fn into_data(this: Self) -> ObjectArc<Self::ContainerType>
Source§unsafe fn from_data(data: ObjectArc<Self::ContainerType>) -> Self
unsafe fn from_data(data: ObjectArc<Self::ContainerType>) -> Self
Source§fn same_as<Other>(&self, other: &Other) -> boolwhere
Other: ObjectRefCore,
fn same_as<Other>(&self, other: &Other) -> boolwhere
Other: ObjectRefCore,
Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectCore,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectCore,
Auto Trait Implementations§
impl Freeze for Analyzer
impl RefUnwindSafe for Analyzer
impl Send for Analyzer
impl Sync for Analyzer
impl Unpin for Analyzer
impl UnwindSafe for Analyzer
Blanket Implementations§
Source§impl<T> ArgType for Twhere
T: ObjectRefCore + AnyCompatible + 'static,
impl<T> ArgType for Twhere
T: ObjectRefCore + AnyCompatible + 'static,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ObjectRefCast for Twhere
T: ObjectRefCore + AnyCompatible,
impl<T> ObjectRefCast for Twhere
T: ObjectRefCore + AnyCompatible,
Source§fn try_cast<B>(self) -> Result<B, Error>where
B: ObjectRefCore + AnyCompatible,
fn try_cast<B>(self) -> Result<B, Error>where
B: ObjectRefCore + AnyCompatible,
self and rewrap the underlying object as B without copying.