pub struct GoalDecomposition {
pub goal: Predicate,
pub subgoals: Vec<Predicate>,
pub rule_applied: Option<Rule>,
pub local_solutions: Vec<bool>,
pub depth: usize,
}Expand description
Goal decomposition tracking for distributed reasoning
Fields§
§goal: PredicateThe original goal
subgoals: Vec<Predicate>Subgoals after decomposition
rule_applied: Option<Rule>The rule used for decomposition (if any)
local_solutions: Vec<bool>Whether each subgoal was solved locally
depth: usizeDepth in the decomposition tree
Implementations§
Source§impl GoalDecomposition
impl GoalDecomposition
Sourcepub fn apply_rule(&mut self, rule: &Rule)
pub fn apply_rule(&mut self, rule: &Rule)
Apply a rule to decompose the goal
Sourcepub fn mark_solved(&mut self, index: usize)
pub fn mark_solved(&mut self, index: usize)
Mark a subgoal as solved locally
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all subgoals are solved
Sourcepub fn unsolved_subgoals(&self) -> Vec<&Predicate>
pub fn unsolved_subgoals(&self) -> Vec<&Predicate>
Get unsolved subgoals (for distributed forwarding)
Trait Implementations§
Source§impl Clone for GoalDecomposition
impl Clone for GoalDecomposition
Source§fn clone(&self) -> GoalDecomposition
fn clone(&self) -> GoalDecomposition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GoalDecomposition
impl RefUnwindSafe for GoalDecomposition
impl Send for GoalDecomposition
impl Sync for GoalDecomposition
impl Unpin for GoalDecomposition
impl UnwindSafe for GoalDecomposition
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
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