pub enum NormalFormKind {
Show 29 variants
Leaf(LeafKind),
Sum(Vec<ArithmeticTerm>),
Product(Vec<ArithmeticTerm>),
Subtract(NormalFormId, NormalFormId),
Divide(NormalFormId, NormalFormId),
Power(NormalFormId, NormalFormId),
Modulo(NormalFormId, NormalFormId),
Negate(NormalFormId),
Reciprocal(NormalFormId),
Comparison(NormalFormId, ComparisonComputation, NormalFormId),
Logical(LogicalConnective, Vec<NormalFormId>),
Not(NormalFormId),
MathOp(MathematicalComputation, NormalFormId),
StepRounding(RoundingMode, NormalFormId, Option<NormalFormId>),
UnitConversion(NormalFormId, SemanticConversionTarget),
Veto(VetoExpression),
DateRelative(DateRelativeKind, NormalFormId),
DateCalendar(DateCalendarKind, CalendarPeriodUnit, NormalFormId),
RangeLiteral(NormalFormId, NormalFormId),
PastFutureRange(DateRelativeKind, NormalFormId),
RangeContainment(NormalFormId, NormalFormId),
RangeBound(RangeBound, NormalFormId),
ResultIsVeto(NormalFormId),
Now,
Piecewise(Vec<(NormalFormId, NormalFormId)>),
OrderedDispatch {
scrutinee: NormalFormId,
boundaries: Arc<[DispatchKey]>,
regions: Vec<DispatchRegion>,
},
SpecMember {
base: NormalFormId,
path: Vec<String>,
name: String,
row: RowRead,
},
RowField {
level: u32,
identity: SpecIdentity,
end: RowEnd,
qualifier: Option<Vec<String>>,
},
ListCommand {
list: NormalFormId,
op: NormalFormListOp,
args: Vec<NormalFormId>,
row_level: Option<u32>,
},
}Expand description
Algebraic structure only. Children are NormalFormId. Hash/Eq drive cons —
no source spans or rule-ref identity here (those live on NormalForm).
Variants§
Leaf(LeafKind)
Sum(Vec<ArithmeticTerm>)
Product(Vec<ArithmeticTerm>)
Subtract(NormalFormId, NormalFormId)
Divide(NormalFormId, NormalFormId)
Power(NormalFormId, NormalFormId)
Modulo(NormalFormId, NormalFormId)
Negate(NormalFormId)
Reciprocal(NormalFormId)
Comparison(NormalFormId, ComparisonComputation, NormalFormId)
Logical(LogicalConnective, Vec<NormalFormId>)
Logical operands in source order.
Not(NormalFormId)
MathOp(MathematicalComputation, NormalFormId)
StepRounding(RoundingMode, NormalFormId, Option<NormalFormId>)
operand -> round or operand -> round step.
UnitConversion(NormalFormId, SemanticConversionTarget)
Veto(VetoExpression)
DateRelative(DateRelativeKind, NormalFormId)
DateCalendar(DateCalendarKind, CalendarPeriodUnit, NormalFormId)
RangeLiteral(NormalFormId, NormalFormId)
PastFutureRange(DateRelativeKind, NormalFormId)
RangeContainment(NormalFormId, NormalFormId)
RangeBound(RangeBound, NormalFormId)
ResultIsVeto(NormalFormId)
Now
Piecewise(Vec<(NormalFormId, NormalFormId)>)
OrderedDispatch
A Self::Piecewise over one scrutinee, decided by binary search instead
of a linear arm scan. Built by [ordered_dispatch], which always records
the pre-image as origin, so explanation keeps reading the Piecewise.
Fields
scrutinee: NormalFormIdboundaries: Arc<[DispatchKey]>Sorted, deduplicated, all of one DispatchKey class.
Shared so plan extract / rebuild clones are a refcount bump.
regions: Vec<DispatchRegion>Exactly [region_count] entries; see [crate::planning::ordered_dispatch].
SpecMember
Read member path.name of the row base yields, in that row’s context.
RowField
Field end of the current row of the instance-list command at level
(0 = outermost), read through the template plan of identity.
Fields
identity: SpecIdentityListCommand
row_level is set when argument cells read the current list row at that
level, through LeafKind::RowValue or Self::RowField.
Implementations§
Source§impl NormalFormKind
impl NormalFormKind
Sourcepub fn for_each_child(&self, f: impl FnMut(NormalFormId))
pub fn for_each_child(&self, f: impl FnMut(NormalFormId))
Calls f on each child cell id in evaluation order. Piecewise yields cond, body
per arm from index 0; OrderedDispatch yields the scrutinee then every region body.
Sourcepub fn children(&self) -> Vec<NormalFormId>
pub fn children(&self) -> Vec<NormalFormId>
Child cell ids in Self::for_each_child order.
Trait Implementations§
Source§impl Clone for NormalFormKind
impl Clone for NormalFormKind
Source§impl Debug for NormalFormKind
impl Debug for NormalFormKind
impl Eq for NormalFormKind
Source§impl Hash for NormalFormKind
impl Hash for NormalFormKind
Source§impl PartialEq for NormalFormKind
impl PartialEq for NormalFormKind
impl StructuralPartialEq for NormalFormKind
Auto Trait Implementations§
impl Forget for NormalFormKind
impl Freeze for NormalFormKind
impl Move for NormalFormKind
impl RefUnwindSafe for NormalFormKind
impl Send for NormalFormKind
impl Sync for NormalFormKind
impl Unpin for NormalFormKind
impl UnsafeUnpin for NormalFormKind
impl UnwindSafe for NormalFormKind
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.