mcrl2::data::sort_terms

Struct BasicSortRef

Source
pub struct BasicSortRef<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> BasicSortRef<'a>

Source

pub fn copy<'b>(&'b self) -> BasicSortRef<'b>

Source

pub fn protect(&self) -> BasicSort

Source§

impl BasicSortRef<'_>

Source

pub fn name(&self) -> &str

Returns the name of the sort.

Methods from Deref<Target = ATermRef<'a>>§

Source

pub fn protect(&self) -> ATerm

Protects the reference on the thread local protection pool.

Source

pub fn protect_global(&self) -> ATermGlobal

Protects the reference on the global protection pool.

Source

pub fn upgrade<'b: 'a>(&'a self, parent: &ATermRef<'b>) -> ATermRef<'b>

This allows us to extend our borrowed lifetime from ’a to ’b based on existing parent term which has lifetime ’b.

The main usecase is to establish transitive lifetimes. For example given a term t from which we borrow u = t.arg(0) then we cannot have u.arg(0) live as long as t since the intermediate temporary u is dropped. However, since we know that u.arg(0) is a subterm of t we can upgrade its lifetime to the lifetime of t using this function.

§Safety

This function might only be used if witness is a parent term of the current term.

Source

pub fn arg(&self, index: usize) -> ATermRef<'_>

Returns the indexed argument of the term

Source

pub fn arguments(&self) -> ATermArgs<'_>

Returns the list of arguments as a collection

Source

pub fn copy(&self) -> ATermRef<'_>

Makes a copy of the term with the same lifetime as itself.

Source

pub fn is_default(&self) -> bool

Returns whether the term is the default term (not initialised)

Source

pub fn is_list(&self) -> bool

Returns true iff this is an aterm_list

Source

pub fn is_empty_list(&self) -> bool

Returns true iff this is the empty aterm_list

Source

pub fn is_int(&self) -> bool

Returns true iff this is a aterm_int

Source

pub fn get_head_symbol(&self) -> SymbolRef<'_>

Returns the head function symbol of the term.

Source

pub fn iter(&self) -> TermIterator<'_>

Returns an iterator over all arguments of the term that runs in pre order traversal of the term trees.

Source

pub fn require_valid(&self)

Panics if the term is default

Trait Implementations§

Source§

impl<'a> Borrow<ATermRef<'a>> for BasicSortRef<'a>

Source§

fn borrow(&self) -> &ATermRef<'a>

Immutably borrows from an owned value. Read more
Source§

impl<'a> Debug for BasicSortRef<'a>

Source§

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

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

impl<'a> Default for BasicSortRef<'a>

Source§

fn default() -> BasicSortRef<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> Deref for BasicSortRef<'a>

Source§

type Target = ATermRef<'a>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'a> From<ATermRef<'a>> for BasicSortRef<'a>

Source§

fn from(term: ATermRef<'a>) -> BasicSortRef<'a>

Converts to this type from the input type.
Source§

impl<'a> Hash for BasicSortRef<'a>

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<'a> Into<ATermRef<'a>> for BasicSortRef<'a>

Source§

fn into(self) -> ATermRef<'a>

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

impl<'a> Markable for BasicSortRef<'a>

Source§

fn mark(&self, todo: Todo<'_>)

Marks all the ATermRefs to prevent them from being garbage collected.
Source§

fn contains_term(&self, term: &ATermRef<'_>) -> bool

Should return true iff the given term is contained in the object. Used for runtime checks.
Source§

fn len(&self) -> usize

Returns the number of terms in the instance, used to delay garbage collection.
Source§

fn is_empty(&self) -> bool

Returns true iff the container is empty.
Source§

impl<'a> Ord for BasicSortRef<'a>

Source§

fn cmp(&self, other: &BasicSortRef<'a>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<'a> PartialEq for BasicSortRef<'a>

Source§

fn eq(&self, other: &BasicSortRef<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> PartialOrd for BasicSortRef<'a>

Source§

fn partial_cmp(&self, other: &BasicSortRef<'a>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> Eq for BasicSortRef<'a>

Source§

impl<'a> StructuralPartialEq for BasicSortRef<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for BasicSortRef<'a>

§

impl<'a> RefUnwindSafe for BasicSortRef<'a>

§

impl<'a> Send for BasicSortRef<'a>

§

impl<'a> Sync for BasicSortRef<'a>

§

impl<'a> Unpin for BasicSortRef<'a>

§

impl<'a> UnwindSafe for BasicSortRef<'a>

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> 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<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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V