Enum cop::fof::Form [−][src]
Variants
Atom(P, Args<C, V>)
Quant(Quantifier, V, Box<Form<P, C, V>>)
Implementations
impl<P: Clone, C: Clone> Form<P, C, usize>
[src]
pub fn eq_constant(c: &C, arity: Arity) -> Option<Self>
[src]
Produce the substitution axiom for the given constant of arity.
pub fn eq_predicate(p: &P, arity: Arity) -> Option<Self>
[src]
Produce the substitution axiom for the given predicate of arity.
pub fn eq_axioms(preds: Vec<(&P, Arity)>, consts: Vec<(&C, Arity)>) -> Self
[src]
Produce equality axioms from a sequence of predicates and constants.
Assume that c1, ..., cm
and p1, ..., pn
are
substitution axioms for the given constants and predicates.
Then the final output will be
c1 & ... & cm & p1 & ... & pn & refl & sym & trans
,
where the conjunction is associated to the right.
impl<P, C, V> Form<P, C, V>
[src]
pub fn bin(l: Self, o: Op, r: Self) -> Self
[src]
pub fn bins(fms: impl Iterator<Item = Self>, op: Op) -> Option<Self>
[src]
pub fn imp(l: Self, r: Self) -> Self
[src]
pub fn quant(q: Quantifier, v: V, fm: Self) -> Self
[src]
pub fn quants(q: Quantifier, vs: impl Iterator<Item = V>, fm: Self) -> Self
[src]
pub fn forall(v: V, fm: Self) -> Self
[src]
pub fn foralls(vs: impl Iterator<Item = V>, fm: Self) -> Self
[src]
pub fn add_premise(self, premise: Self) -> Self
[src]
pub fn conjoin_right(self, iter: impl Iterator<Item = Self>) -> Self
[src]
Return self & (fn & (... & (f2 & f1)))
.
pub fn map_predicates<Q>(self, f: &mut impl FnMut(P) -> Q) -> Form<Q, C, V>
[src]
pub fn map_constants<D>(self, f: &mut impl FnMut(C) -> D) -> Form<P, D, V>
[src]
pub fn map_vars<W>(self, f: &mut impl FnMut(V) -> W) -> Form<P, C, W>
[src]
pub fn map_form(self, f: impl Fn(Self) -> Self) -> Self
[src]
pub fn subforms(&self) -> Box<dyn Iterator<Item = &Form<P, C, V>>>
[src]
pub fn predicates(&self) -> impl Iterator<Item = (&P, Arity)>
[src]
pub fn constants(&self) -> impl Iterator<Item = (&C, Arity)>
[src]
pub fn order(self) -> (Self, BigUint)
[src]
Sort the formula by ascending number of paths.
let a = Form::Atom("a", Args::new()); let b = Form::Atom("b", Args::new()); let c = Form::Atom("c", Args::new()); let ab: Form<_, (), ()> = a | b; let abc = ab.clone() & c.clone(); let cab = c.clone() & ab.clone(); assert_eq!(abc.order(), (cab, BigUint::from(2 as usize)));
pub fn fix(self, f: &impl Fn(Self) -> (Change, Self)) -> Self
[src]
pub fn unfold_impl(self) -> (Change, Self)
[src]
pub fn unfold_neg(self) -> (Change, Self)
[src]
pub fn nnf(self) -> Self
[src]
impl<P: Clone, C, V> Form<P, C, V>
[src]
impl<P: Clone, C: Clone, V: Clone> Form<P, C, V>
[src]
pub fn unfold_eqfm_disj_conj(self) -> (Change, Self)
[src]
Unfold logical equivalence with a disjunction of conjunctions.
Used in (nondefinitional) leanCoP.
pub fn unfold_eqfm_conj_impl(self) -> (Change, Self)
[src]
Unfold logical equivalence with a conjunction of implications.
Used in nanoCoP.
pub fn cnf(self) -> Self
[src]
impl<P: Eq, C: Eq, V> Form<P, C, V>
[src]
pub fn predconst_unique(&self) -> (Vec<(&P, Arity)>, Vec<(&C, Arity)>)
[src]
Corresponds to leanCoP’s collect_predfunc
.
impl<P, C, V: Clone + Eq + Hash> Form<P, C, V>
[src]
pub fn fresh_vars<W>(
self,
map: &mut HashMap<V, W>,
st: &mut W::State
) -> Form<P, C, W> where
W: Clone + Fresh,
[src]
self,
map: &mut HashMap<V, W>,
st: &mut W::State
) -> Form<P, C, W> where
W: Clone + Fresh,
impl<P, C: Clone + Fresh, V: Clone + Eq + Hash> Form<P, C, V>
[src]
pub fn skolem_outer(self, st: &mut SkolemState<C, V>) -> Self
[src]
Trait Implementations
impl<P, C, V> BitAnd<Form<P, C, V>> for Form<P, C, V>
[src]
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: Self) -> Self
[src]
impl<P, C, V> BitOr<Form<P, C, V>> for Form<P, C, V>
[src]
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, rhs: Self) -> Self
[src]
impl<P: Clone, C: Clone, V: Clone> Clone for Form<P, C, V>
[src]
impl<P: Debug, C: Debug, V: Debug> Debug for Form<P, C, V>
[src]
impl<P: Display, C: Display, V: Display> Display for Form<P, C, V>
[src]
impl<P: Eq, C: Eq, V: Eq> Eq for Form<P, C, V>
[src]
impl<P, C, V> From<Form<P, C, V>> for Clause<Lit<P, C, V>> where
P: Clone + Eq + Neg<Output = P>,
C: Clone + Eq,
V: Clone + Eq,
[src]
P: Clone + Eq + Neg<Output = P>,
C: Clone + Eq,
V: Clone + Eq,
impl<P, C, V> From<Form<P, C, V>> for Matrix<Lit<P, C, V>> where
P: Clone + Eq + Neg<Output = P>,
C: Clone + Eq,
V: Clone + Eq,
[src]
P: Clone + Eq + Neg<Output = P>,
C: Clone + Eq,
V: Clone + Eq,
impl<P: Neg<Output = P>, C, V> From<Form<P, C, V>> for Lit<P, C, V>
[src]
impl<P, C, V> Neg for Form<P, C, V>
[src]
impl<P: PartialEq, C: PartialEq, V: PartialEq> PartialEq<Form<P, C, V>> for Form<P, C, V>
[src]
impl<P, C, V> StructuralEq for Form<P, C, V>
[src]
impl<P, C, V> StructuralPartialEq for Form<P, C, V>
[src]
Auto Trait Implementations
impl<P, C, V> RefUnwindSafe for Form<P, C, V> where
C: RefUnwindSafe,
P: RefUnwindSafe,
V: RefUnwindSafe,
C: RefUnwindSafe,
P: RefUnwindSafe,
V: RefUnwindSafe,
impl<P, C, V> Send for Form<P, C, V> where
C: Send,
P: Send,
V: Send,
C: Send,
P: Send,
V: Send,
impl<P, C, V> Sync for Form<P, C, V> where
C: Sync,
P: Sync,
V: Sync,
C: Sync,
P: Sync,
V: Sync,
impl<P, C, V> Unpin for Form<P, C, V> where
C: Unpin,
P: Unpin,
V: Unpin,
C: Unpin,
P: Unpin,
V: Unpin,
impl<P, C, V> UnwindSafe for Form<P, C, V> where
C: UnwindSafe,
P: UnwindSafe,
V: UnwindSafe,
C: UnwindSafe,
P: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,