Skip to main content

Sort

Struct Sort 

Source
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: SortHead

The sort constructor that is being applied.

§arguments: SArc<[SortArgument]>

The sort’s arguments.

Implementations§

Source§

impl Sort

Source

pub fn of(term: &Term) -> Result<Sort>

Alias for term.type_check(ctx) which provide a better notation.

Source§

impl Sort

Source

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§

Source§

impl Clone for Sort

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Sort

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Sort

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Sort

Source§

impl From<Identifier<'_>> for Sort

Source§

fn from(value: Identifier<'_>) -> Self

Converts to this type from the input type.
Source§

impl From<Sort> for Sort

Source§

fn from(value: Sort) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<Function>> From<T> for Sort

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl Hash for Sort

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'t> Into<Sort> for UFLIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for UFLRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for LIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for LRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for LIRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for NIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for NRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_UFLIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_UFLRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_UFNIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_UFNRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_LIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_LRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_NIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_NRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_LIRA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for ALIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_ALIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for UFALIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for QF_UFALIA_Sort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl Into<Sort> for CoreSort

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl Into<Sort> for RealsSort

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl Into<Sort> for IntsSort

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl Into<Sort> for RealsIntsSort

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl<'t> Into<Sort> for ArraysSort<'t>

Source§

fn into(self) -> Sort

Converts this type into the (usually inferred) input type.
Source§

impl PartialEq for Sort

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Pretty for Sort

Source§

fn pretty(&self) -> RcDoc<'static>

Source§

impl Resolve for Sort

Source§

fn resolve(&self, env: &Env, pool: &dyn TermPool, role: Role) -> Result<Self>

Perform name resolution on self. Read more
Source§

impl StructuralPartialEq for Sort

Source§

impl ToTerm for Sort

Source§

fn into_term_in(self, pool: &dyn TermPool) -> Term

Convert the object into a Term by uniquing in the given TermPool.
Source§

fn to_term_in(&self, pool: &dyn TermPool) -> Term

Convert the object (by reference) into a Term by uniquing in the given TermPool.
Source§

impl<'t> TryFrom<&'t Sort> for UFLIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for UFLRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for LIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for LRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for LIRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for NIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for NRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_UFLIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_UFLRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_UFNIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_UFNRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_LIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_LRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_NIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_NRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_LIRA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for ALIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_ALIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for UFALIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for QF_UFALIA_Sort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for CoreSort

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<CoreSort, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for RealsSort

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<RealsSort, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for IntsSort

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<IntsSort, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for RealsIntsSort

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<RealsIntsSort, Self::Error>

Performs the conversion.
Source§

impl<'t> TryFrom<&'t Sort> for ArraysSort<'t>

Source§

type Error = &'t Sort

The type returned in the event of a conversion error.
Source§

fn try_from(sort: &'t Sort) -> Result<ArraysSort<'t>, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Infer> for Sort

Source§

type Error = Diagnostic

The type returned in the event of a conversion error.
Source§

fn try_from(_value: Infer) -> Result<Self, Diagnostic>

Performs the conversion.
Source§

impl TryFrom<Term> for Sort

Source§

type Error = InvalidSortTerm

The type returned in the event of a conversion error.
Source§

fn try_from(term: Term) -> Result<Sort, InvalidSortTerm>

Performs the conversion.
Source§

impl TypeCheck for Sort

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Print for T
where T: Pretty,

Source§

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>

Render an object to the given fmt::Write formatter in width number of columns.
Source§

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§

fn println(&self, target: &mut dyn RenderTarget) -> Result<(), Error>

As print() but appends a new line at the end.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSort for T
where T: Resolve + TypeCheck + TryInto<Sort>, <T as TryInto<Sort>>::Error: Emit,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.