Type Alias cop::tptp::STerm

source ·
pub type STerm = Term<String, String>;
Expand description

String term.

Aliased Type§

enum STerm {
    C(String, Args<Term<String, String>>),
    V(String),
}

Variants§

§

C(String, Args<Term<String, String>>)

Constant with arguments applied to it

§

V(String)

Variable

Implementations§

source§

impl<C, V> Term<C, V>

source

pub fn map_constants<D>(self, f: &mut impl FnMut(C) -> D) -> Term<D, V>

Apply function to the constants of the term.

source

pub fn map_vars<W>(self, f: &mut impl FnMut(V) -> Term<C, W>) -> Term<C, W>

Apply function to the variables of the term.

source

pub fn constants(&self) -> Box<dyn Iterator<Item = (&C, usize)> + '_>

Return all constants occurring in the term.

source

pub fn vars(&self) -> Box<dyn Iterator<Item = &V> + '_>

Return all variables occurring in the term.

source§

impl<C: Clone, V: Clone + Eq + Hash> Term<C, V>

source

pub fn subst(self, sub: &HashMap<V, Term<C, V>>) -> Self

Apply a substitution to the term.

source§

impl<C: Eq, V> Term<C, V>

source

pub fn const_unique(&self) -> Vec<(&C, usize)>

Corresponds to leanCoP’s collect_func.

source§

impl<C: Fresh, V> Term<C, V>

source

pub fn skolem(st: &mut C::State, args: Vec<V>) -> Self

Return a fresh Skolem function and apply a sequence of variables.

Trait Implementations§

source§

impl<C: Clone, V: Clone> Clone for Term<C, V>

source§

fn clone(&self) -> Term<C, V>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<C: Debug, V: Debug> Debug for Term<C, V>

source§

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

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

impl<C: Display, V: Display> Display for Term<C, V>

source§

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

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

impl From<DefinedTerm<'_>> for STerm

source§

fn from(tm: DefinedTerm<'_>) -> Self

Converts to this type from the input type.
source§

impl From<DefinedTerm<'_>> for STerm

source§

fn from(tm: DefinedTerm<'_>) -> Self

Converts to this type from the input type.
source§

impl From<FunctionTerm<'_>> for STerm

source§

fn from(tm: FunctionTerm<'_>) -> Self

Converts to this type from the input type.
source§

impl From<PlainTerm<'_>> for STerm

source§

fn from(tm: PlainTerm<'_>) -> Self

Converts to this type from the input type.
source§

impl From<Term<'_>> for STerm

source§

fn from(tm: Term<'_>) -> Self

Converts to this type from the input type.
source§

impl<C: PartialEq, V: PartialEq> PartialEq<Term<C, V>> for Term<C, V>

source§

fn eq(&self, other: &Term<C, V>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C: Eq, V: Eq> Eq for Term<C, V>

source§

impl<C, V> StructuralEq for Term<C, V>

source§

impl<C, V> StructuralPartialEq for Term<C, V>