pub struct TypeInfo { /* private fields */ }Expand description
Stores resolved typechecking information.
Implementations§
Source§impl TypeInfo
impl TypeInfo
Sourcepub fn add_presort<S: Presort>(&mut self, span: Span) -> Result<(), TypeError>
pub fn add_presort<S: Presort>(&mut self, span: Span) -> Result<(), TypeError>
Adds a sort constructor to the typechecker’s known set of types.
Sourcepub fn get_sorts_by<S: Sort>(
&self,
pred: impl Fn(&Arc<S>) -> bool,
) -> Vec<Arc<S>>
pub fn get_sorts_by<S: Sort>( &self, pred: impl Fn(&Arc<S>) -> bool, ) -> Vec<Arc<S>>
Returns all sorts that satisfy the type and predicate.
Sourcepub fn get_sort_by<S: Sort>(&self, pred: impl Fn(&Arc<S>) -> bool) -> Arc<S>
pub fn get_sort_by<S: Sort>(&self, pred: impl Fn(&Arc<S>) -> bool) -> Arc<S>
Returns a sort that satisfies the type and predicate.
Sourcepub fn get_arcsorts_by(&self, f: impl Fn(&ArcSort) -> bool) -> Vec<ArcSort> ⓘ
pub fn get_arcsorts_by(&self, f: impl Fn(&ArcSort) -> bool) -> Vec<ArcSort> ⓘ
Returns all sorts that satisfy the predicate.
Sourcepub fn get_arcsort_by(&self, f: impl Fn(&ArcSort) -> bool) -> ArcSort
pub fn get_arcsort_by(&self, f: impl Fn(&ArcSort) -> bool) -> ArcSort
Returns a sort based on the predicate.
pub fn typecheck_facts( &self, symbol_gen: &mut SymbolGen, facts: &[Fact], ) -> Result<Vec<ResolvedFact>, TypeError>
pub fn get_sort_by_name(&self, sym: &str) -> Option<&ArcSort>
pub fn get_prims(&self, sym: &str) -> Option<&[PrimitiveWithId]>
pub fn is_primitive(&self, sym: &str) -> bool
pub fn get_func_type(&self, sym: &str) -> Option<&FuncType>
pub fn is_constructor(&self, sym: &str) -> bool
pub fn get_global_sort(&self, sym: &str) -> Option<&ArcSort>
pub fn is_global(&self, sym: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeInfo
impl !RefUnwindSafe for TypeInfo
impl Send for TypeInfo
impl Sync for TypeInfo
impl Unpin for TypeInfo
impl !UnwindSafe for TypeInfo
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> 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