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

Fix printing of empty Ands and Ors #83

Merged
merged 2 commits into from
Jun 23, 2023
Merged

Fix printing of empty Ands and Ors #83

merged 2 commits into from
Jun 23, 2023

Conversation

francescofuggitti
Copy link
Collaborator

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

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

@francescofuggitti francescofuggitti requested review from marcofavorito and haz and removed request for marcofavorito June 21, 2023 18:46
Copy link
Contributor

@haz haz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, it all looks perfect to me! Can't say I can ever recall seeing the empty or in PDDL, but it all makes sense.

@haz haz merged commit f54e187 into main Jun 23, 2023
@ssardina
Copy link
Contributor

ssardina commented Feb 6, 2024

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
Copy link
Contributor

haz commented Feb 6, 2024

@ssardina I believe so, yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants