AI-Planning / pddl

Unquestionable PDDL 3.1 parser
https://ai-planning.github.io/pddl/
MIT License
85 stars 27 forks source link

Fix printing of empty Ands and Ors #83

Closed francescofuggitti closed 1 year ago

francescofuggitti commented 1 year ago

Fixes

The empty And() formula resulted in the TrueFormula (true), which is not part of PDDL and, therefore, not recognized by planners. The same happened for the empty Or() formula.

Proposed changes

In this PR, we fix such behavior and simplify the code structure by removing the TrueFormula() and the FalseFormula(). We also update the rest of the code.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply.

ssardina commented 8 months ago

For the records, TRUE would be And() and FALSE would be Or() after this PR right? (I used to use TrueFormula which is not there anymore after this PR)

haz commented 8 months ago

@ssardina I believe so, yep!