pub struct Literal<T = IRTerm> {
pub positive: bool,
pub position: Option<SpannedPosition>,
pub predicate: Predicate,
pub args: Vec<T>,
}Fields
positive: boolTrue if if this is a positive literal, else it’s a negated literal. Double negations should be collapsed, if any.
position: Option<SpannedPosition>predicate: Predicateargs: Vec<T>Implementations
sourceimpl Literal
impl Literal
pub fn signature(&self) -> Signature
pub fn variables(&self, include_anonymous: bool) -> HashSet<IRTerm>
sourcepub fn unmangle(self) -> Literal
pub fn unmangle(self) -> Literal
Unmangles this literal if it represents an operator. Replaces it’s predicate name and removes argument used for matching the operator.
pub fn negated(&self) -> Literal
sourceimpl<T> Literal<T>
impl<T> Literal<T>
pub fn with_position(self, position: Option<SpannedPosition>) -> Literal<T>
Trait Implementations
sourceimpl From<Literal<ModusTerm>> for Expression
impl From<Literal<ModusTerm>> for Expression
sourceimpl RenameWithSubstitution<IRTerm> for Literal<IRTerm>
impl RenameWithSubstitution<IRTerm> for Literal<IRTerm>
type Output = Literal<IRTerm>
fn rename_with_sub(&self) -> (Self::Output, Substitution<IRTerm>)
sourceimpl Substitute<IRTerm> for Literal<IRTerm>
impl Substitute<IRTerm> for Literal<IRTerm>
type Output = Literal
fn substitute(&self, s: &Substitution<IRTerm>) -> Self::Output
impl<T: Eq> Eq for Literal<T>
impl<T> StructuralEq for Literal<T>
impl<T> StructuralPartialEq for Literal<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Literal<T> where
T: RefUnwindSafe,
impl<T> Send for Literal<T> where
T: Send,
impl<T> Sync for Literal<T> where
T: Sync,
impl<T> Unpin for Literal<T> where
T: Unpin,
impl<T> UnwindSafe for Literal<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more