Struct KernelProgram
pub struct KernelProgram { /* private fields */ }Description
A completely validated, immutable Semantic Kernel model.
This is the only model form accepted by the reference interpreter. It is
compiled from one Snapshot revision, owns the selected definitions,
and cannot observe later Graph Federation commits.
Implementations§
§impl KernelProgram
impl KernelProgram
pub fn compose_boundary_physical_junction(
&self,
connection: Id<Connection>,
) -> Result<BoundaryJunctionResidual, Diagnostic>
pub fn compose_boundary_physical_junction( &self, connection: Id<Connection>, ) -> Result<BoundaryJunctionResidual, Diagnostic>
Compose trace-continuity and outward-flux-balance roots for one validated boundary-physical Connection.
§Errors
Returns EQ0302 if connection is not a closed field-valued junction
in this immutable program.
§impl KernelProgram
impl KernelProgram
pub fn compose_scalar_physical_subsystem(
&self,
connection: Id<Connection>,
) -> Result<ComposedResidualSystem, Diagnostic>
pub fn compose_scalar_physical_subsystem( &self, connection: Id<Connection>, ) -> Result<ComposedResidualSystem, Diagnostic>
Compose the closed scalar physical subsystem containing connection.
The immutable result is canonical and is the only Phase 1 handoff to later interpreter or Operator-IR execution work.
§Errors
Returns EQ0302 when the selected Connection is not a validated scalar
physical junction in this program.
§impl KernelProgram
impl KernelProgram
pub fn from_snapshot(
snapshot: &Snapshot,
model: OntologyId<Model>,
) -> Result<KernelProgram, Vec<Diagnostic>>
pub fn from_snapshot( snapshot: &Snapshot, model: OntologyId<Model>, ) -> Result<KernelProgram, Vec<Diagnostic>>
Select a ModelView from an immutable snapshot and validate all
cross-node invariants required for execution.
Validation is diagnostic-accumulating: independent faults are returned together in deterministic graph order.
§Errors
Returns diagnostics when the view is absent, its semantic topology is not closed, a symbol is unresolved, dimensions conflict, activation or clock wiring is ambiguous, or a connection contract is invalid.
pub fn from_snapshot_with_geometry(
snapshot: &Snapshot,
model: OntologyId<Model>,
geometry: &[CanonicalGeometryRef<'_>],
) -> Result<KernelProgram, Vec<Diagnostic>>
pub fn from_snapshot_with_geometry( snapshot: &Snapshot, model: OntologyId<Model>, geometry: &[CanonicalGeometryRef<'_>], ) -> Result<KernelProgram, Vec<Diagnostic>>
Select and validate a Model together with its exact closed canonical geometry bundle.
Artifact order is irrelevant. Every distinct geometry digest named by the Model must be supplied exactly once, and no unreferenced artifact is accepted. The returned program retains only internally derived spatial support facts, never artifact bytes or borrowed references.
§Errors
Returns diagnostics for the ordinary model invariants, an inexact artifact bundle, invalid entity-set selections, or unsupported geometry use.
§impl KernelProgram
impl KernelProgram
pub const fn revision(&self) -> Revision
pub const fn revision(&self) -> Revision
Graph Federation revision captured by this program.
pub const fn model(&self) -> OntologyId<Model>
pub const fn model(&self) -> OntologyId<Model>
Selected Standard Ontology ModelView identifier.
pub fn node(&self, id: RawId) -> Option<&KernelNode>
pub fn node(&self, id: RawId) -> Option<&KernelNode>
Look up a validated kernel definition.
pub fn value(&self, id: RawId) -> Option<DynQuantity>
pub fn value(&self, id: RawId) -> Option<DynQuantity>
Revision-local Field initial value or Parameter value.
This captures SetValue operations visible in the source snapshot;
it is intentionally separate from the immutable node definition.
pub fn nodes(&self) -> impl ExactSizeIterator
pub fn nodes(&self) -> impl ExactSizeIterator
Kernel definitions in deterministic (kind, ULID) order.
pub fn edges(&self) -> &[Edge]
pub fn edges(&self) -> &[Edge]
Validated internal model edges in deterministic order.
pub fn boundary(&self) -> &BTreeSet<RawId>
pub fn boundary(&self) -> &BTreeSet<RawId>
Model boundary Ports in deterministic order.
pub fn resolved_cartesian_bounds(
&self,
domain: Id<Domain>,
) -> Result<&[AxisBounds], Diagnostic>
pub fn resolved_cartesian_bounds( &self, domain: Id<Domain>, ) -> Result<&[AxisBounds], Diagnostic>
Resolve the accepted Cartesian bounds for one Domain.
This is the single metric projection of fixed and Parameter-backed coordinate recipes. Callers must not interpret raw sources independently.
§Errors
Returns EQ0302 when domain is absent or is not an accepted
Cartesian box.
pub fn typed_relation_residual(
&self,
relation: Id<Relation>,
) -> Result<TypedResidual<RawId>, Vec<Diagnostic>>
pub fn typed_relation_residual( &self, relation: Id<Relation>, ) -> Result<TypedResidual<RawId>, Vec<Diagnostic>>
Reconstruct the exact typed residual owned by one accepted Relation.
The returned proof is the only input accepted by componentwise Operator scalarization. Symbol types and spatial support are therefore derived from this immutable program rather than supplied as a parallel caller-owned shape array.
§Errors
Returns deterministic diagnostics when relation is absent or is not
a Relation in this accepted program. Re-inference failures indicate a
violated internal invariant and retain the original expression path.
Trait Implementations§
§impl Clone for KernelProgram
impl Clone for KernelProgram
§impl Debug for KernelProgram
impl Debug for KernelProgram
§impl PartialEq for KernelProgram
impl PartialEq for KernelProgram
§fn eq(&self, other: &KernelProgram) -> bool
fn eq(&self, other: &KernelProgram) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KernelProgram
Auto Trait Implementations§
impl Freeze for KernelProgram
impl RefUnwindSafe for KernelProgram
impl Send for KernelProgram
impl Sync for KernelProgram
impl Unpin for KernelProgram
impl UnsafeUnpin for KernelProgram
impl UnwindSafe for KernelProgram
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.