pub struct RefinementContext { /* private fields */ }Expand description
Refinement type checking context.
Implementations§
Source§impl RefinementContext
impl RefinementContext
pub fn new() -> Self
Sourcepub fn bind(&mut self, name: impl Into<String>, typ: RefinementType)
pub fn bind(&mut self, name: impl Into<String>, typ: RefinementType)
Bind a variable to a refinement type
Sourcepub fn get_type(&self, name: &str) -> Option<&RefinementType>
pub fn get_type(&self, name: &str) -> Option<&RefinementType>
Get the type of a variable
Sourcepub fn check_refinement(&self, refinement: &TLExpr) -> bool
pub fn check_refinement(&self, refinement: &TLExpr) -> bool
Check if a refinement is satisfied under current assumptions
Trait Implementations§
Source§impl Clone for RefinementContext
impl Clone for RefinementContext
Source§fn clone(&self) -> RefinementContext
fn clone(&self) -> RefinementContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RefinementContext
impl Debug for RefinementContext
Source§impl Default for RefinementContext
impl Default for RefinementContext
Source§fn default() -> RefinementContext
fn default() -> RefinementContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RefinementContext
impl RefUnwindSafe for RefinementContext
impl Send for RefinementContext
impl Sync for RefinementContext
impl Unpin for RefinementContext
impl UnwindSafe for RefinementContext
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