Skip to main content

SemanticLogicTaskProgram

Struct SemanticLogicTaskProgram 

Source
pub struct SemanticLogicTaskProgram { /* private fields */ }
Expand description

A self-contained XLOG program whose three selected zero-arity queries define a semantic task’s positive support. Compilation preserves the authored source; observation executes the canonical GPU evaluator before deriving any result. Presence is True and absence is Neither, never negative support. Other native observers may produce False or Both; all four values share the same task-result contract. Source facts are the complete concrete inputs, and query ordinals retain the caller’s order. No caller-supplied answers enter this adapter.

Implementations§

Source§

impl SemanticLogicTaskProgram

Source

pub fn compile(source: String, query_ordinals: [usize; 3]) -> Result<Self>

Compile a complete source program and select three zero-arity query results. This performs no GPU execution; the native semantic owner calls observe during cold binding, including when restoring a retained task.

Source

pub fn with_editable_program( self, editable: Arc<SemanticProgramAdmission>, ) -> Self

Bind the independently admitted editable source to the observer without deriving candidate syntax or order from the observer’s expected answers.

Trait Implementations§

Source§

impl Debug for SemanticLogicTaskProgram

Source§

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

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

impl SemanticTaskProgram for SemanticLogicTaskProgram

Source§

fn editable_program(&self) -> Option<&SemanticProgramAdmission>

A cold, independently admitted mutable source bank. The observer may report expected truth but never chooses editable rules or fact order.
Source§

fn observe( &self, provider: Arc<CudaKernelProvider>, ) -> Result<SemanticTaskObservation, SemanticTransitionError>

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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

Source§

type Output = T

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