pub struct Sort {
pub head: SortHead,
pub arguments: SArc<[SortArgument]>,
}Expand description
The sort of a term.
Sort represent the semantic notion of sort of a term, i.e. its type. Sorts are represented by the application of some arguments to a function, called sort constructor, whose range must be Sort::sort(), the sort of sorts.
In contrast to Term, sorts can be constructed directly and are not uniqued.
Most methods that would accept a Sort accept instead a generic instance of the ToSort trait. See its documentation for details.
Fields§
§head: SortHeadThe sort constructor that is being applied.
arguments: SArc<[SortArgument]>The sort’s arguments.
Implementations§
Source§impl Sort
impl Sort
Sourcepub const fn sort() -> Sort
pub const fn sort() -> Sort
The sort of sorts.
Sort::sort() returns a special sort, not provided by any theory, which is the sort of
terms representing sorts. In other words, a sort term such as (Array Int Real) has
sort Sort::sort().
let mut solver = Solver::new(&Config::default().logic("ALIA"))?;
// construct and resolve the term
let array = solver.lookup(term!(Array Int Int), Role::Sort)?;
let sort = Sort::of(&array)?; // deduce the sort of the term
assert_eq!(sort, Sort::sort()); // the resulting sort is `Sort::sort()`Trait Implementations§
impl Eq for Sort
Source§impl From<Identifier<'_>> for Sort
impl From<Identifier<'_>> for Sort
Source§fn from(value: Identifier<'_>) -> Self
fn from(value: Identifier<'_>) -> Self
Converts to this type from the input type.
Source§impl<'t> Into<Sort> for UFLIA_Sort<'t>
impl<'t> Into<Sort> for UFLIA_Sort<'t>
Source§impl<'t> Into<Sort> for UFLRA_Sort<'t>
impl<'t> Into<Sort> for UFLRA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_UFLIA_Sort<'t>
impl<'t> Into<Sort> for QF_UFLIA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_UFLRA_Sort<'t>
impl<'t> Into<Sort> for QF_UFLRA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_UFNIA_Sort<'t>
impl<'t> Into<Sort> for QF_UFNIA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_UFNRA_Sort<'t>
impl<'t> Into<Sort> for QF_UFNRA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_LIA_Sort<'t>
impl<'t> Into<Sort> for QF_LIA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_LRA_Sort<'t>
impl<'t> Into<Sort> for QF_LRA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_NIA_Sort<'t>
impl<'t> Into<Sort> for QF_NIA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_NRA_Sort<'t>
impl<'t> Into<Sort> for QF_NRA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_LIRA_Sort<'t>
impl<'t> Into<Sort> for QF_LIRA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_ALIA_Sort<'t>
impl<'t> Into<Sort> for QF_ALIA_Sort<'t>
Source§impl<'t> Into<Sort> for UFALIA_Sort<'t>
impl<'t> Into<Sort> for UFALIA_Sort<'t>
Source§impl<'t> Into<Sort> for QF_UFALIA_Sort<'t>
impl<'t> Into<Sort> for QF_UFALIA_Sort<'t>
Source§impl Into<Sort> for RealsIntsSort
impl Into<Sort> for RealsIntsSort
Source§impl<'t> Into<Sort> for ArraysSort<'t>
impl<'t> Into<Sort> for ArraysSort<'t>
impl StructuralPartialEq for Sort
Source§impl<'t> TryFrom<&'t Sort> for UFLIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for UFLIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for UFLRA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for UFLRA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_UFLIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_UFLIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_UFLRA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_UFLRA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_UFNIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_UFNIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_UFNRA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_UFNRA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_LIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_LIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_LRA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_LRA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_NIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_NIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_NRA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_NRA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_LIRA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_LIRA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_ALIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_ALIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for UFALIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for UFALIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for QF_UFALIA_Sort<'t>
impl<'t> TryFrom<&'t Sort> for QF_UFALIA_Sort<'t>
Source§impl<'t> TryFrom<&'t Sort> for RealsIntsSort
impl<'t> TryFrom<&'t Sort> for RealsIntsSort
Source§impl<'t> TryFrom<&'t Sort> for ArraysSort<'t>
impl<'t> TryFrom<&'t Sort> for ArraysSort<'t>
Source§impl TryFrom<Infer> for Sort
impl TryFrom<Infer> for Sort
Source§type Error = Diagnostic
type Error = Diagnostic
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for Sort
impl RefUnwindSafe for Sort
impl Send for Sort
impl Sync for Sort
impl Unpin for Sort
impl UnsafeUnpin for Sort
impl UnwindSafe for Sort
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Print for Twhere
T: Pretty,
impl<T> Print for Twhere
T: Pretty,
Source§fn render(&self, target: &mut dyn Write, width: u16) -> Result<(), Error>
fn render(&self, target: &mut dyn Write, width: u16) -> Result<(), Error>
Render an object to the given
target write stream in width number of columns.Source§fn render_fmt(&self, target: &mut dyn Write, width: u16) -> Result<(), Error>
fn render_fmt(&self, target: &mut dyn Write, width: u16) -> Result<(), Error>
Render an object to the given
fmt::Write formatter in width number of columns.Source§fn print(&self, target: &mut dyn RenderTarget) -> Result<(), Error>
fn print(&self, target: &mut dyn RenderTarget) -> Result<(), Error>
Prints an object to the given RenderTarget by calling render() with an
automatically detected
width parameter if a terminal is attached.Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
impl<T> ToSort for T
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.