Struct mm0b_parser::Type[][src]

#[repr(C)]
pub struct Type(_);

An argument binder in a term/def or axiom/theorem.

  • Bit 63 (the high bit of the high byte) is 1 if this is a bound variable.
  • Bits 56-62 (the low 7 bits of the high byte) give the sort of the variable.
  • Bits 0-55 (the low 7 bytes) are a bitset giving the set of bound variables earlier in the list that this variable is allowed to depend on.

Implementations

impl Type[src]

pub fn into_inner(self) -> u64[src]

Get the u64 comprising a type

#[must_use]
pub fn new_of_sort(sort_num: u8) -> Self
[src]

Make a new Type of sort sort_num

#[must_use]
pub fn new(bound: bool) -> Self
[src]

A brand new Type; bool indicates whether it’s bound.

pub fn add_sort(&mut self, sort_id: SortId)[src]

Annotate a Type with a sort.

Since types are often built incrementally, you may have built a “blank” type that you knew was bound, but you’ll only know it’s sort later. This is how you add the sort. If the Type already had a sort, it’s overwritten by sort_id.

pub fn add_dep(&mut self, bv_idx: u64)[src]

Add a dependency on bv_idx

#[must_use]
pub fn depends_on(self, bv_idx: u64) -> bool
[src]

Does this type depend on the bth bound variable?

This is 0 indexed.

#[must_use]
pub fn bound(self) -> bool
[src]

True if this argument is a bound variable.

#[must_use]
pub fn sort(self) -> SortId
[src]

The sort of this variable.

#[must_use]
pub fn bound_digit(self) -> Option<u64>
[src]

If this is the type of a bound variable, return a u64 whose only activated bit is the bit indicating which bv it is.

#[must_use]
pub fn bound_pos(self) -> Option<u64>
[src]

The POSITION (1 - 55) of this bound variable, NOT the literal u64.

#[must_use]
pub fn has_deps(self) -> bool
[src]

Does this Type have dependencies?

#[must_use]
pub fn deps(self) -> Option<u64>
[src]

If this is a regular/not-bound variable, return a u64 whose only activated bits are the ones marking the bvs on which it depends.

#[must_use]
pub fn deps_unchecked(self) -> u64
[src]

Assuming this is a regular/not-bound variable, return a u64 whose only activated bits are the ones marking the bvs on which it depends.

#[must_use]
pub fn high_bit(self) -> Self
[src]

Get the high bit only, which holds the boundedness and the sort.

#[must_use]
pub fn disjoint(self, other: Self) -> bool
[src]

Are these two types totally bitwise-disjoint

Trait Implementations

impl BitAnd<Type> for Type[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAndAssign<Type> for Type[src]

impl BitOr<Type> for Type[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<Type> for Type[src]

impl Clone for Type[src]

impl Copy for Type[src]

impl Debug for Type[src]

impl Default for Type[src]

impl Eq for Type[src]

impl From<u64> for Type[src]

impl FromBytes for Type[src]

impl Hash for Type[src]

impl Not for Type[src]

type Output = Type

The resulting type after applying the ! operator.

impl PartialEq<Type> for Type[src]

impl StructuralEq for Type[src]

impl StructuralPartialEq for Type[src]

impl Unaligned for Type[src]

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.