pub enum GoalDescription {
AtomicFormula(AtomicFormula<Term>),
Literal(TermLiteral),
And(Vec<GoalDescription>),
Or(Vec<GoalDescription>),
Not(Box<GoalDescription>),
Imply(Box<GoalDescription>, Box<GoalDescription>),
Exists(TypedVariables, Box<GoalDescription>),
ForAll(TypedVariables, Box<GoalDescription>),
FluentComparison(FluentComparison),
}Expand description
A goal description.
§Usage
Used by GoalDescription itself, as well as PreferenceGoalDescription, ConditionalEffect,
TimedGoalDescription, DerivedPredicate and
ConstraintGoalDescriptionInner.
Variants§
AtomicFormula(AtomicFormula<Term>)
An atomic formula, <atomic formula(term)>.
Literal(TermLiteral)
§Requirements
Requires Negative Preconditions.
And(Vec<GoalDescription>)
A conjunction, (and <GD>*).
Or(Vec<GoalDescription>)
§Requirements
Requires Disjunctive Preconditions.
Not(Box<GoalDescription>)
§Requirements
Requires Disjunctive Preconditions.
Imply(Box<GoalDescription>, Box<GoalDescription>)
§Requirements
Requires Disjunctive Preconditions.
Exists(TypedVariables, Box<GoalDescription>)
§Requirements
Requires Existential Preconditions.
ForAll(TypedVariables, Box<GoalDescription>)
§Requirements
Requires Universal Preconditions.
FluentComparison(FluentComparison)
§Requirements
Requires Numeric Fluents.
Implementations§
Source§impl GoalDescription
impl GoalDescription
Sourcepub const fn atomic_formula(value: AtomicFormula<Term>) -> Self
pub const fn atomic_formula(value: AtomicFormula<Term>) -> Self
Creates a goal from an atomic formula.
Sourcepub fn new_atomic_formula(value: AtomicFormula<Term>) -> Self
pub fn new_atomic_formula(value: AtomicFormula<Term>) -> Self
Alias for Self::atomic_formula.
Sourcepub const fn literal(value: TermLiteral) -> Self
pub const fn literal(value: TermLiteral) -> Self
Creates a goal from a literal, e.g. (not <atomic formula(term)>).
Sourcepub fn new_literal(value: TermLiteral) -> Self
pub fn new_literal(value: TermLiteral) -> Self
Alias for Self::literal.
Sourcepub fn and<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
pub fn and<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
Creates a conjunction (and <GD>*).
Sourcepub fn new_and<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
pub fn new_and<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
Alias for Self::and.
Sourcepub fn or<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
pub fn or<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
Creates a disjunction (or <GD>*).
Sourcepub fn new_or<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
pub fn new_or<T: IntoIterator<Item = GoalDescription>>(values: T) -> Self
Alias for Self::or.
Sourcepub fn not(value: GoalDescription) -> Self
pub fn not(value: GoalDescription) -> Self
Creates a negation (not <GD>).
Source§impl GoalDescription
impl GoalDescription
Sourcepub fn new_not(value: GoalDescription) -> Self
pub fn new_not(value: GoalDescription) -> Self
Alias for Self::not.
Sourcepub fn imply_tuple(tuple: (GoalDescription, GoalDescription)) -> Self
pub fn imply_tuple(tuple: (GoalDescription, GoalDescription)) -> Self
Creates an implication (imply <GD> <GD>) from a (premise, conclusion) tuple.
Sourcepub fn new_imply_tuple(tuple: (GoalDescription, GoalDescription)) -> Self
pub fn new_imply_tuple(tuple: (GoalDescription, GoalDescription)) -> Self
Alias for Self::imply_tuple.
Sourcepub fn imply(a: GoalDescription, b: GoalDescription) -> Self
pub fn imply(a: GoalDescription, b: GoalDescription) -> Self
Creates an implication (imply a b).
Sourcepub fn new_imply(a: GoalDescription, b: GoalDescription) -> Self
pub fn new_imply(a: GoalDescription, b: GoalDescription) -> Self
Alias for Self::imply.
Sourcepub fn exists_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
pub fn exists_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
Creates an existential quantification (exists (<variables>) <GD>) from a tuple.
Sourcepub fn new_exists_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
pub fn new_exists_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
Alias for Self::exists_tuple.
Sourcepub fn exists(variables: TypedVariables, gd: GoalDescription) -> Self
pub fn exists(variables: TypedVariables, gd: GoalDescription) -> Self
Creates an existential quantification (exists (<variables>) <GD>).
Sourcepub fn new_exists(variables: TypedVariables, gd: GoalDescription) -> Self
pub fn new_exists(variables: TypedVariables, gd: GoalDescription) -> Self
Alias for Self::exists.
Sourcepub fn forall_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
pub fn forall_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
Creates a universal quantification (forall (<variables>) <GD>) from a tuple.
Sourcepub fn new_forall_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
pub fn new_forall_tuple(tuple: (TypedVariables, GoalDescription)) -> Self
Alias for Self::forall_tuple.
Sourcepub fn forall(variables: TypedVariables, gd: GoalDescription) -> Self
pub fn forall(variables: TypedVariables, gd: GoalDescription) -> Self
Creates a universal quantification (forall (<variables>) <GD>).
Sourcepub fn new_forall(variables: TypedVariables, gd: GoalDescription) -> Self
pub fn new_forall(variables: TypedVariables, gd: GoalDescription) -> Self
Alias for Self::forall.
Sourcepub const fn fluent_comparison(f_comp: FluentComparison) -> Self
pub const fn fluent_comparison(f_comp: FluentComparison) -> Self
Creates a numeric fluent comparison, e.g. (> <f-exp> <f-exp>).
Sourcepub fn new_f_comp(f_comp: FluentComparison) -> Self
pub fn new_f_comp(f_comp: FluentComparison) -> Self
Alias for Self::fluent_comparison.
Trait Implementations§
Source§impl AsRef<GoalDescription> for DerivedPredicate
impl AsRef<GoalDescription> for DerivedPredicate
Source§fn as_ref(&self) -> &GoalDescription
fn as_ref(&self) -> &GoalDescription
Source§impl Clone for GoalDescription
impl Clone for GoalDescription
Source§impl Debug for GoalDescription
impl Debug for GoalDescription
Source§impl<'de> Deserialize<'de> for GoalDescription
Available on crate feature serde only.
impl<'de> Deserialize<'de> for GoalDescription
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl From<GoalDescription> for ConstraintGoalDescriptionInner
impl From<GoalDescription> for ConstraintGoalDescriptionInner
Source§fn from(value: GoalDescription) -> Self
fn from(value: GoalDescription) -> Self
Source§impl From<GoalDescription> for PreferenceGoalDescription
impl From<GoalDescription> for PreferenceGoalDescription
Source§fn from(value: GoalDescription) -> Self
fn from(value: GoalDescription) -> Self
Source§impl From<GoalDescription> for Preference
impl From<GoalDescription> for Preference
Source§fn from(value: GoalDescription) -> Self
fn from(value: GoalDescription) -> Self
Source§impl Not for GoalDescription
impl Not for GoalDescription
Source§impl Parser for GoalDescription
Available on crate feature parser only.
impl Parser for GoalDescription
parser only.Source§type Item = GoalDescription
type Item = GoalDescription
Self except for
DurationConstraint, which may be empty.Source§impl PartialEq for GoalDescription
impl PartialEq for GoalDescription
Source§impl Serialize for GoalDescription
Available on crate feature serde only.
impl Serialize for GoalDescription
serde only.impl StructuralPartialEq for GoalDescription
Source§impl Visitor<GoalDescription, RcDoc<'static>> for PrettyRenderer
Available on crate feature pretty only.
impl Visitor<GoalDescription, RcDoc<'static>> for PrettyRenderer
pretty only.Source§fn visit(&self, value: &GoalDescription) -> RcDoc<'static>
fn visit(&self, value: &GoalDescription) -> RcDoc<'static>
value and returns the result.Auto Trait Implementations§
impl Forget for GoalDescription
impl Freeze for GoalDescription
impl Move for GoalDescription
impl RefUnwindSafe for GoalDescription
impl Send for GoalDescription
impl Sync for GoalDescription
impl Unpin for GoalDescription
impl UnsafeUnpin for GoalDescription
impl UnwindSafe for GoalDescription
Blanket Implementations§
Source§impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
Source§fn accept_mut(&self, v: &mut V) -> O
fn accept_mut(&self, v: &mut V) -> O
v visit self.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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Pretty for Twhere
T: PrettyVisit,
impl<T> Pretty for Twhere
T: PrettyVisit,
Source§impl<T> PrettyVisit for T
impl<T> PrettyVisit for T
Source§fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
pretty only.self with the renderer r.