[][src]Enum smt2::Term

pub enum Term<E: Environment> {
    Const(E::Constant),
    Var {
        index: usize,
        id: E::Ident,
    },
    Let {
        bindings: Vec<Binding<E>>,
        body: Box<Typed<Term<E>>>,
    },
    Forall {
        vars: Vec<SortedVar<E>>,
        body: Box<Typed<Term<E>>>,
    },
    Exists {
        vars: Vec<SortedVar<E>>,
        body: Box<Typed<Term<E>>>,
    },
    Match {
        term: Box<Typed<Term<E>>>,
        cases: Vec<MatchCase<E>>,
    },
    Apply {
        fun: E::Function,
        args: Box<Vec<Typed<Term<E>>>>,
    },
}

A term.

Variants

Const(E::Constant)
Var

Fields of Var

index: usize

unique identified in the current variable environment.

id: E::Ident

non-unique identifier.

Let

Fields of Let

bindings: Vec<Binding<E>>body: Box<Typed<Term<E>>>
Forall

Fields of Forall

vars: Vec<SortedVar<E>>body: Box<Typed<Term<E>>>
Exists

Fields of Exists

vars: Vec<SortedVar<E>>body: Box<Typed<Term<E>>>
Match

Fields of Match

term: Box<Typed<Term<E>>>cases: Vec<MatchCase<E>>
Apply

Fields of Apply

fun: E::Functionargs: Box<Vec<Typed<Term<E>>>>

Implementations

impl<E: Environment> Term<E>[src]

pub fn apply(
    fun: E::Function,
    args: Vec<Typed<Term<E>>>,
    sort: GroundSort<E::Sort>
) -> Typed<Term<E>>
[src]

Trait Implementations

impl<E: Environment> Display for Term<E> where
    E::Constant: Display,
    E::Ident: Display,
    E::Function: Display,
    E::Sort: Display
[src]

impl<E: Environment> From<Term<E>> for Located<Term> where
    E::Constant: Display,
    E::Ident: Display,
    E::Function: Display,
    E::Sort: Display
[src]

impl<E: Environment> Typable for Term<E>[src]

type Sort = E::Sort

type Environment = E

Auto Trait Implementations

impl<E> RefUnwindSafe for Term<E> where
    <E as Environment>::Constant: RefUnwindSafe,
    <E as Environment>::Function: RefUnwindSafe,
    <E as Environment>::Ident: RefUnwindSafe,
    <E as Environment>::Sort: RefUnwindSafe

impl<E> Send for Term<E> where
    <E as Environment>::Constant: Send,
    <E as Environment>::Function: Send,
    <E as Environment>::Ident: Send,
    <E as Environment>::Sort: Send

impl<E> Sync for Term<E> where
    <E as Environment>::Constant: Sync,
    <E as Environment>::Function: Sync,
    <E as Environment>::Ident: Sync,
    <E as Environment>::Sort: Sync

impl<E> Unpin for Term<E> where
    <E as Environment>::Constant: Unpin,
    <E as Environment>::Function: Unpin,
    <E as Environment>::Ident: Unpin,
    <E as Environment>::Sort: Unpin

impl<E> UnwindSafe for Term<E> where
    <E as Environment>::Constant: UnwindSafe,
    <E as Environment>::Function: UnwindSafe,
    <E as Environment>::Ident: UnwindSafe,
    <E as Environment>::Sort: UnwindSafe

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> ToString for T where
    T: Display + ?Sized
[src]

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.