pub enum RewriteRule {
DistributeAndOverOr,
DistributeOrOverAnd,
FactorCommonAnd,
FactorCommonOr,
PushExistsInward,
PushForallInward,
PullExistsOutward,
PullForallOutward,
MergeNestedExists,
MergeNestedForall,
ReorderConjunctions,
ReorderDisjunctions,
}Expand description
Rewriting rule for generating equivalent expressions.
Variants§
DistributeAndOverOr
Distribute conjunction over disjunction: A ∧ (B ∨ C) → (A ∧ B) ∨ (A ∧ C)
DistributeOrOverAnd
Distribute disjunction over conjunction: A ∨ (B ∧ C) → (A ∨ B) ∧ (A ∨ C)
FactorCommonAnd
Factor common terms: (A ∧ B) ∨ (A ∧ C) → A ∧ (B ∨ C)
FactorCommonOr
Factor common terms: (A ∨ B) ∧ (A ∨ C) → A ∨ (B ∧ C)
PushExistsInward
Push quantifiers inward: ∃x. (P ∧ Q) → (∃x. P) ∧ Q (if x not in Q)
PushForallInward
Push quantifiers inward: ∀x. (P ∧ Q) → (∀x. P) ∧ Q (if x not in Q)
PullExistsOutward
Pull quantifiers outward: (∃x. P) ∧ Q → ∃x. (P ∧ Q) (if x not in Q)
PullForallOutward
Pull quantifiers outward: (∀x. P) ∧ Q → ∀x. (P ∧ Q) (if x not in Q)
MergeNestedExists
Convert nested quantifiers: ∃x. ∃y. P → ∃x,y. P
MergeNestedForall
Convert nested quantifiers: ∀x. ∀y. P → ∀x,y. P
ReorderConjunctions
Reorder conjunctions based on selectivity
ReorderDisjunctions
Reorder disjunctions based on short-circuit potential
Trait Implementations§
Source§impl Clone for RewriteRule
impl Clone for RewriteRule
Source§fn clone(&self) -> RewriteRule
fn clone(&self) -> RewriteRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RewriteRule
impl Debug for RewriteRule
Source§impl Hash for RewriteRule
impl Hash for RewriteRule
Source§impl PartialEq for RewriteRule
impl PartialEq for RewriteRule
impl Eq for RewriteRule
impl StructuralPartialEq for RewriteRule
Auto Trait Implementations§
impl Freeze for RewriteRule
impl RefUnwindSafe for RewriteRule
impl Send for RewriteRule
impl Sync for RewriteRule
impl Unpin for RewriteRule
impl UnwindSafe for RewriteRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.