Skip to main content

BoundForm

Enum BoundForm 

Source
pub enum BoundForm {
    Sem {
        s: SymbolId,
        p: SymbolId,
        o: Value,
        keywords: BoundKeywords,
    },
    Epi {
        event_id: SymbolId,
        kind: SymbolId,
        participants: Vec<SymbolId>,
        location: SymbolId,
        keywords: BoundKeywords,
    },
    Pro {
        rule_id: SymbolId,
        trigger: Value,
        action: Value,
        keywords: BoundKeywords,
    },
    Inf {
        s: SymbolId,
        p: SymbolId,
        o: Value,
        derived_from: Vec<SymbolId>,
        method: SymbolId,
        keywords: BoundKeywords,
    },
    Alias {
        a: SymbolId,
        b: SymbolId,
    },
    Rename {
        old: SymbolId,
        new: SymbolId,
    },
    Retire {
        name: SymbolId,
        reason: Option<String>,
    },
    Correct {
        target_episode: SymbolId,
        corrected: Box<BoundForm>,
    },
    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 with all RawSymbolNames resolved to SymbolIds and all RawValues converted to typed Values.

Produced by bind. Consumed by the Semantic pipeline stage.

Variants§

§

Sem

Semantic memory write.

Fields

§s: SymbolId

Subject.

§p: SymbolId

Predicate.

§o: Value

Object.

§keywords: BoundKeywords

Keyword arguments: src, c, v, optionally projected.

§

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.

§keywords: BoundKeywords

Keyword arguments: at, obs, src, c.

§

Pro

Procedural memory write.

Fields

§rule_id: SymbolId

Stable rule ID.

§trigger: Value

Trigger value.

§action: Value

Action value.

§keywords: BoundKeywords

Keyword arguments: scp, src, c, optional pre.

§

Inf

Inferential memory write.

Fields

§s: SymbolId

Subject.

§p: SymbolId

Predicate.

§o: Value

Object.

§derived_from: Vec<SymbolId>

Parent memory symbols.

§method: SymbolId

Registered inference-method symbol.

§keywords: BoundKeywords

Keyword arguments: c, v, optional projected.

§

Alias

Alias declaration.

Fields

§a: SymbolId

First symbol.

§b: SymbolId

Second symbol.

§

Rename

Rename — old name becomes alias of new (already canonical).

Fields

§old: SymbolId

The previous canonical.

§new: SymbolId

The 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

The Episode being corrected.

§corrected: Box<BoundForm>

The corrected Episodic body.

§

Promote

Promote an ephemeral memory to canonical.

Fields

§name: SymbolId

The ephemeral memory symbol.

§

Query

Read-path query.

Fields

§selector: Option<Value>

Optional positional selector.

§keywords: BoundKeywords

Remaining keyword arguments.

§

Episode

Explicit Episode-boundary directive (episode-semantics.md § 3.2). :close variants carry no metadata; :start variants may carry any combination of label / parent / retracts.

Fields

§action: EpisodeAction

Whether this form opens or closes an Episode.

§label: Option<String>

Optional human-readable label — already checked for length during bind so the semantic stage can trust it.

§parent_episode: Option<SymbolId>

Resolved parent Episode SymbolId, if set.

§retracts: Vec<SymbolId>

Resolved retracted-Episode SymbolIds.

§

Flag

Pin / unpin / authoritative flag write.

Fields

§action: FlagAction

Which flag operation.

§memory: SymbolId

The memory being pinned / unpinned / (un)marked.

§actor: SymbolId

The invoking agent / operator (required per confidence-decay.md §§ 7 / 8 audit trail).

Trait Implementations§

Source§

impl Clone for BoundForm

Source§

fn clone(&self) -> BoundForm

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 BoundForm

Source§

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

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

impl PartialEq for BoundForm

Source§

fn eq(&self, other: &BoundForm) -> 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 BoundForm

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