pub struct ProofEnvironment {
pub symbols: Vec<String>,
pub stats: ProofStats,
/* private fields */
}Expand description
The proof environment bundles verification state.
One instance per thread (not Sync due to interior state).
Create with ProofEnvironment::new() which pre-loads RuVector type
declarations.
§Example
ⓘ
use ruvector_verified::ProofEnvironment;
let mut env = ProofEnvironment::new();
let proof = env.prove_dim_eq(128, 128).unwrap();Fields§
§symbols: Vec<String>Registered built-in symbol names.
stats: ProofStatsStatistics.
Implementations§
Source§impl ProofEnvironment
impl ProofEnvironment
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new proof environment pre-loaded with RuVector type declarations.
Sourcepub fn alloc_term(&mut self) -> u32
pub fn alloc_term(&mut self) -> u32
Allocate a new proof term ID.
Sourcepub fn require_symbol(&self, name: &str) -> Result<usize>
pub fn require_symbol(&self, name: &str) -> Result<usize>
Require a symbol index, or return DeclarationNotFound.
Sourcepub fn cache_lookup(&mut self, key: u64) -> Option<u32>
pub fn cache_lookup(&mut self, key: u64) -> Option<u32>
Check the proof cache for a previously verified proof.
Sourcepub fn cache_insert(&mut self, key: u64, proof_id: u32)
pub fn cache_insert(&mut self, key: u64, proof_id: u32)
Insert a verified proof into the cache.
Sourcepub fn stats(&self) -> &ProofStats
pub fn stats(&self) -> &ProofStats
Get verification statistics.
Sourcepub fn terms_allocated(&self) -> u32
pub fn terms_allocated(&self) -> u32
Number of terms allocated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProofEnvironment
impl RefUnwindSafe for ProofEnvironment
impl Send for ProofEnvironment
impl Sync for ProofEnvironment
impl Unpin for ProofEnvironment
impl UnsafeUnpin for ProofEnvironment
impl UnwindSafe for ProofEnvironment
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