Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PDDL true predicate for adl compilation #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions plan4past/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def compile(self):

cm = CompilationManager(self.formula)
new_fluents, new_effs, new_goal = cm.get_problem_extension()
new_fluents.append(TRUE_ATOM)
self._fresh_atoms = set(new_fluents)
self._yesterday_mapping = cm.get_yesterday_mapping()
self._yesterday_dictionary = cm.yesterday_dictionary
Expand All @@ -306,7 +305,7 @@ def _compile_domain(
self, new_fluents, new_effs, new_goal
): # pylint: disable=arguments-differ
"""Compute the new domain."""
new_predicates = [self.pylogics2pddl(fluent) for fluent in new_fluents]
new_predicates = [self.pylogics2pddl(fluent) for fluent in new_fluents] + [TRUE_PREDICATE]
new_whens_positive = [
self.effect_conversion(eff, positive=True) for eff in new_effs
]
Expand Down
4 changes: 2 additions & 2 deletions plan4past/utils/pylogics2pddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from pylogics.syntax.pltl import Atomic as PLTLAtomic
from pylogics.syntax.pltl import PropositionalTrue

from plan4past.constants import TRUE_ATOM
from plan4past.constants import TRUE_PREDICATE
from plan4past.helpers.utils import check_
from plan4past.helpers.yesterday_atom_helper import YesterdayAtom

Expand Down Expand Up @@ -62,7 +62,7 @@ def translate(self, obj: Formula) -> PddlFormula:
@translate.register
def translate_true(self, _formula: PropositionalTrue) -> PddlFormula:
"""Compute the PDDL version of a true formula."""
return TRUE_ATOM
return TRUE_PREDICATE

@translate.register
def translate_atomic(self, formula: PLTLAtomic) -> PddlFormula:
Expand Down
Loading