|
| facts |
|
| rules |
|
| objects |
|
| new_name |
|
def translate.pddl_to_prolog.PrologProgram.convert_trivial_rules |
( |
|
self | ) |
|
Convert rules with an empty condition into facts.
This must be called after bounding rule effects, so that rules with an
empty condition must necessarily have a variable-free effect.
Variable-free effects are the only ones for which a distinction between
ground and symbolic atoms is not necessary.
def translate.pddl_to_prolog.PrologProgram.remove_free_effect_variables |
( |
|
self | ) |
|
Remove free effect variables like the variable Y in the rule
p(X, Y) :- q(X). This is done by introducing a new predicate
@object, setting it true for all objects, and translating the above
rule to p(X, Y) :- q(X), @object(Y).
After calling this, no new objects should be introduced!
def translate.pddl_to_prolog.PrologProgram.split_duplicate_arguments |
( |
|
self | ) |
|
Make sure that no variable occurs twice within the same symbolic fact,
like the variable X does in p(X, Y, X). This is done by renaming the second
and following occurrences of the variable and adding equality conditions.
For example p(X, Y, X) is translated to p(X, Y, X@0) with the additional
condition =(X, X@0); the equality predicate must be appropriately instantiated
somewhere else.
The documentation for this class was generated from the following file:
- translate/pddl_to_prolog.py