concepts.dm.pdsketch.strips.strips_expression.SBoolPredicateApplicationExpression#

class SBoolPredicateApplicationExpression[source]#

Bases: SBoolOutputExpression

The base class for STRIPS expressions that output a boolean value based on a predicate.

Methods

from_function_application_expression(expression)

ground(variable_dict[, state, negated, ...])

Ground the expression according to the given variable dictionary.

iter_effect_predicates()

Iterate over the effect predicate names in the expression.

iter_precondition_predicates()

Iterate over the precondition predicate names in the expression.

Attributes

name

The name of the predicate.

arguments

The arguments of the predicate.

negated

Whether the predicate is negated.

__init__(name, negated, arguments)[source]#

Initialize a boolean predicate expression.

Parameters:
  • name (str) – the name of the predicate.

  • negated (bool) – whether the predicate is negated.

  • arguments (Sequence[Variable | str]) – the arguments of the predicate. Either variables or str (constants).

__new__(**kwargs)#
classmethod from_function_application_expression(expression, negated=False)[source]#
Parameters:
ground(variable_dict, state=None, negated=False, return_proposition=False)[source]#

Ground the expression according to the given variable dictionary.

Parameters:
  • variable_dict (Dict[str, str]) – the variable dictionary.

  • state (SState | Set[str] | None) – the state to ground the expression on. If None, the expression will be grounded without considering the state.

  • negated (bool) – whether the predicate is negated.

  • return_proposition (bool) – whether to return a SProposition instead of a GSSimpleBoolExpression

Returns:

the grounded expression. Will be a GSSimpleBoolExpression if return_proposition is False, otherwise a SProposition.

iter_effect_predicates()#

Iterate over the effect predicate names in the expression.

Return type:

Iterable[str]

iter_precondition_predicates()[source]#

Iterate over the precondition predicate names in the expression.

Return type:

Iterable[str]

arguments: Tuple[Variable | str]#

The arguments of the predicate.

name: str#

The name of the predicate.

negated: bool#

Whether the predicate is negated.