Skip to main content

ValidatedForm

Enum ValidatedForm 

Source
pub enum ValidatedForm {
    Sem {
        s: SymbolId,
        p: SymbolId,
        o: Value,
        source: SymbolId,
        source_kind: SourceKind,
        confidence: Confidence,
        valid_at: ClockTime,
        projected: bool,
    },
    Epi {
        event_id: SymbolId,
        kind: SymbolId,
        participants: Vec<SymbolId>,
        location: SymbolId,
        at_time: ClockTime,
        observed_at: ClockTime,
        source: SymbolId,
        source_kind: SourceKind,
        confidence: Confidence,
    },
    Pro {
        rule_id: SymbolId,
        trigger: Value,
        action: Value,
        precondition: Option<Value>,
        scope: SymbolId,
        source: SymbolId,
        source_kind: SourceKind,
        confidence: Confidence,
    },
    Inf {
        s: SymbolId,
        p: SymbolId,
        o: Value,
        derived_from: Vec<SymbolId>,
        method: SymbolId,
        confidence: Confidence,
        valid_at: ClockTime,
        projected: bool,
    },
    Alias {
        a: SymbolId,
        b: SymbolId,
    },
    Rename {
        old: SymbolId,
        new: SymbolId,
    },
    Retire {
        name: SymbolId,
        reason: Option<String>,
    },
    Correct {
        target_episode: SymbolId,
        corrected: Box<ValidatedForm>,
    },
    Promote {
        name: SymbolId,
    },
    Query {
        selector: Option<Value>,
        keywords: BoundKeywords,
    },
    Episode {
        action: EpisodeAction,
        label: Option<String>,
        parent_episode: Option<SymbolId>,
        retracts: Vec<SymbolId>,
    },
    Flag {
        action: FlagAction,
        memory: SymbolId,
        actor: SymbolId,
    },
}
Expand description

An AST form after the semantic stage: typed fields are extracted from keyword bags; grounding + confidence + clock invariants are enforced.

Consumed by the canonical-form emitter.

Variants§

§

Sem

Semantic memory write.

Fields

§s: SymbolId

Subject symbol.

§p: SymbolId

Predicate symbol.

§o: Value

Object value.

§source: SymbolId

Source symbol (the grounding anchor).

§source_kind: SourceKind

Derived grounding kind from the source symbol’s canonical name.

§confidence: Confidence

Stored confidence — clamped by source bound.

§valid_at: ClockTime

Valid-time.

§projected: bool

Whether this memory is a projection about future state.

§

Epi

Episodic memory write.

Fields

§event_id: SymbolId

Stable event ID.

§kind: SymbolId

Event-type symbol.

§participants: Vec<SymbolId>

Participant symbols (may be empty).

§location: SymbolId

Location symbol.

§at_time: ClockTime

Event time.

§observed_at: ClockTime

Observation time — must be >= at_time.

§source: SymbolId

Source symbol (the witness).

§source_kind: SourceKind

Derived grounding kind.

§confidence: Confidence

Confidence.

§

Pro

Procedural memory write.

Fields

§rule_id: SymbolId

Stable rule ID.

§trigger: Value

Trigger value.

§action: Value

Action value.

§precondition: Option<Value>

Optional precondition.

§scope: SymbolId

Scope symbol.

§source: SymbolId

Source symbol.

§source_kind: SourceKind

Derived grounding kind.

§confidence: Confidence

Confidence.

§

Inf

Inferential memory write.

Fields

§s: SymbolId

Subject.

§p: SymbolId

Predicate.

§o: Value

Object.

§derived_from: Vec<SymbolId>

Non-empty list of parent memories.

§method: SymbolId

Inference method symbol (validated at bind time).

§confidence: Confidence

Confidence.

§valid_at: ClockTime

Valid-time.

§projected: bool

Projection flag.

§

Alias

Alias declaration.

Fields

§a: SymbolId

First symbol.

§b: SymbolId

Second symbol.

§

Rename

Rename — old name becomes alias of new.

Fields

§old: SymbolId

Previous canonical.

§new: SymbolId

New canonical.

§

Retire

Retire a symbol.

Fields

§name: SymbolId

Target.

§reason: Option<String>

Optional reason.

§

Correct

Correct a prior Episodic memory.

Fields

§target_episode: SymbolId

Target episode.

§corrected: Box<ValidatedForm>

Corrected Episodic body.

§

Promote

Promote an ephemeral memory.

Fields

§name: SymbolId

Target symbol.

§

Query

Read-path query.

Fields

§selector: Option<Value>

Optional positional selector.

§keywords: BoundKeywords

Remaining keyword arguments (uninterpreted at this stage).

§

Episode

Explicit Episode-boundary directive — pass-through from bind. The semantic stage enforces “at most one Episode directive per batch” so the emitter can trust the batch carries a single deterministic intent.

Fields

§action: EpisodeAction

Open or close.

§label: Option<String>

Optional label.

§parent_episode: Option<SymbolId>

Optional parent Episode.

§retracts: Vec<SymbolId>

Retracted Episodes.

§

Flag

Pin / unpin / authoritative flag write — pass-through from bind. See confidence-decay.md §§ 7 / 8.

Fields

§action: FlagAction

Which flag operation.

§memory: SymbolId

Target memory.

§actor: SymbolId

Invoking agent / operator.

Trait Implementations§

Source§

impl Clone for ValidatedForm

Source§

fn clone(&self) -> ValidatedForm

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ValidatedForm

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ValidatedForm

Source§

fn eq(&self, other: &ValidatedForm) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ValidatedForm

Auto Trait Implementations§

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more