concepts.pdsketch.strips.strips_expression.SSASPredicateApplicationExpression#

class SSASPredicateApplicationExpression[source]#

Bases: SBoolPredicateApplicationExpression

The representation for an SAS predicate expression. It is composed of a predicate name and an SAS index.

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.

sas_name

The name of the SAS predicate.

sas_index

The index of the SAS predicate.

__init__(sas_name, sas_index, negated, arguments)[source]#

Initialize an SAS predicate expression.

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

  • sas_index (int | None) – the index of the SAS predicate.

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

  • arguments (Sequence[Variable]) – the arguments of the predicate.

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

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()#

Iterate over the precondition predicate names in the expression.

Return type:

Iterable[str]

arguments: Tuple[Variable]#

The arguments of the predicate.

name: str#

The name of the predicate.

negated: bool#

Whether the predicate is negated.

sas_index: int | None#

The index of the SAS predicate. If None, it is a normal predicate.

sas_name: str#

The name of the SAS predicate.