Skip to main content

NormalForm

Struct NormalForm 

Source
pub struct NormalForm {
    pub kind: NormalFormKind,
    pub result_type: Arc<LemmaType>,
    pub fold_types: Vec<Arc<LemmaType>>,
    pub source: Option<Source>,
    pub origin: Option<NormalFormId>,
    pub rule_ref: Option<RulePath>,
}
Expand description

One node in THE DAG: algebraic Kind, stamped result type, optional conversion span, optional fold origin, optional rule use-site identity.

A rule use-site shares the completed body’s Kind (same child ids) and sets rule_ref. Type is the graph rule type (RulePath) or data resolved type (rule-target DataPath) — not the post-rewrite body cell type. Cons keys on (kind, rule_ref, result_type) so a rule reference never collapses into the bare body cell, and DataPath leaves that differ only in resolved type stay distinct.

Fields§

§kind: NormalFormKind§result_type: Arc<LemmaType>

Type of the value this cell evaluates to. Stamped at planning.

§fold_types: Vec<Arc<LemmaType>>

For Sum/Product: type after folding children[..=k]. Empty for other kinds. fold_types.last() equals result_type for n-ary arithmetic.

§source: Option<Source>

Span for unit-conversion nodes; does not affect sharing.

§origin: Option<NormalFormId>

Pre-image destroyed by a fold; blocks sharing when present.

§rule_ref: Option<RulePath>

Use-site of a named rule (None on ordinary cells).

Trait Implementations§

Source§

impl Clone for NormalForm

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NormalForm

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for NormalForm

§

impl Freeze for NormalForm
where *const u8 is !null: Freeze, PhantomData<u32>: Freeze, *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const TypedLiteral is !null: Freeze, PhantomData<TypedLiteral>: Freeze, PhantomData<PathSegment>: Freeze, *const ArcInner<RowInstance> is !null: Freeze, PhantomData<ArcInner<RowInstance>>: Freeze, *const InstanceKey is !null: Freeze, PhantomData<InstanceKey>: Freeze, *const ArcInner<[TypedLiteral]> is !null: Freeze, PhantomData<ArcInner<[TypedLiteral]>>: Freeze, *const ArcInner<RowStore> is !null: Freeze, PhantomData<ArcInner<RowStore>>: Freeze, *const ArcInner<LemmaType> is !null: Freeze, PhantomData<ArcInner<LemmaType>>: Freeze, *const ArcInner<KeyIndex> is !null: Freeze, PhantomData<ArcInner<KeyIndex>>: Freeze, PhantomData<u8>: Freeze, PhantomData<ArithmeticTerm>: Freeze, PhantomData<NormalFormId>: Freeze, PhantomData<(NormalFormId, NormalFormId)>: Freeze, *const ArcInner<[DispatchKey]> is !null: Freeze, PhantomData<ArcInner<[DispatchKey]>>: Freeze, PhantomData<DispatchRegion>: Freeze, PhantomData<String>: Freeze, PhantomData<RowEnd>: Freeze, *const ArcInner<SpecIdentity> is !null: Freeze, PhantomData<ArcInner<SpecIdentity>>: Freeze, PhantomData<DataPath>: Freeze, PhantomData<Arc<LemmaType>>: Freeze, *const ArcInner<PathBuf> is !null: Freeze, PhantomData<ArcInner<PathBuf>>: Freeze,

§

impl Move for NormalForm

§

impl RefUnwindSafe for NormalForm

§

impl Send for NormalForm
where RawVecInner: Send, Arc<str>: Send, BoxRaw<TypedLiteral>: Send, Arc<RowInstance>: Send, BoxRaw<InstanceKey>: Send, Arc<[TypedLiteral]>: Send, Arc<RowStore>: Send, Arc<LemmaType>: Send, Arc<KeyIndex>: Send, Arc<[DispatchKey]>: Send, Arc<SpecIdentity>: Send, Arc<PathBuf>: Send,

§

impl Sync for NormalForm
where RawVecInner: Sync, Arc<str>: Sync, BoxRaw<TypedLiteral>: Sync, Arc<RowInstance>: Sync, BoxRaw<InstanceKey>: Sync, Arc<[TypedLiteral]>: Sync, Arc<RowStore>: Sync, Arc<LemmaType>: Sync, Arc<KeyIndex>: Sync, Arc<[DispatchKey]>: Sync, Arc<SpecIdentity>: Sync, Arc<PathBuf>: Sync,

§

impl Unpin for NormalForm

§

impl UnsafeUnpin for NormalForm
where *const u8 is !null: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, *const ArcInner<str> is !null: UnsafeUnpin, PhantomData<ArcInner<str>>: UnsafeUnpin, *const TypedLiteral is !null: UnsafeUnpin, PhantomData<TypedLiteral>: UnsafeUnpin, PhantomData<PathSegment>: UnsafeUnpin, *const ArcInner<RowInstance> is !null: UnsafeUnpin, PhantomData<ArcInner<RowInstance>>: UnsafeUnpin, *const InstanceKey is !null: UnsafeUnpin, PhantomData<InstanceKey>: UnsafeUnpin, *const ArcInner<[TypedLiteral]> is !null: UnsafeUnpin, PhantomData<ArcInner<[TypedLiteral]>>: UnsafeUnpin, *const ArcInner<RowStore> is !null: UnsafeUnpin, PhantomData<ArcInner<RowStore>>: UnsafeUnpin, *const ArcInner<LemmaType> is !null: UnsafeUnpin, PhantomData<ArcInner<LemmaType>>: UnsafeUnpin, *const ArcInner<KeyIndex> is !null: UnsafeUnpin, PhantomData<ArcInner<KeyIndex>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<ArithmeticTerm>: UnsafeUnpin, PhantomData<NormalFormId>: UnsafeUnpin, PhantomData<(NormalFormId, NormalFormId)>: UnsafeUnpin, *const ArcInner<[DispatchKey]> is !null: UnsafeUnpin, PhantomData<ArcInner<[DispatchKey]>>: UnsafeUnpin, PhantomData<DispatchRegion>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, PhantomData<RowEnd>: UnsafeUnpin, *const ArcInner<SpecIdentity> is !null: UnsafeUnpin, PhantomData<ArcInner<SpecIdentity>>: UnsafeUnpin, PhantomData<DataPath>: UnsafeUnpin, PhantomData<Arc<LemmaType>>: UnsafeUnpin, *const ArcInner<PathBuf> is !null: UnsafeUnpin, PhantomData<ArcInner<PathBuf>>: UnsafeUnpin,

§

impl UnwindSafe for NormalForm

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.