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

Support for numeric fluents and action costs #92

Merged
merged 68 commits into from
Oct 18, 2023

Conversation

francescofuggitti
Copy link
Collaborator

@francescofuggitti francescofuggitti commented Oct 7, 2023

Proposed changes

In this PR, we add support for numeric fluents and action costs. It is built on top of the work originally proposed in #59. However, some updates on the lark domain and problem grammars and data structures have been applied to support all features of numeric fluents.

This PR primarily addresses issues #38 and #89, but it also fixes the issues in #93 and #96.

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 changed the title Support for numerical fluents and action costs Support for numeric fluents and action costs Oct 8, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2023

Codecov Report

Merging #92 (a18263c) into main (fe1013b) will decrease coverage by 2.67%.
The diff coverage is 80.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   90.77%   88.10%   -2.67%     
==========================================
  Files          24       25       +1     
  Lines        1398     1791     +393     
  Branches      247      332      +85     
==========================================
+ Hits         1269     1578     +309     
- Misses         93      154      +61     
- Partials       36       59      +23     
Flag Coverage Δ
unittests 88.10% <80.00%> (-2.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pddl/core.py 92.64% <100.00%> (+0.52%) ⬆️
pddl/custom_types.py 100.00% <100.00%> (ø)
pddl/formatter.py 96.77% <100.00%> (+0.88%) ⬆️
pddl/helpers/base.py 97.46% <100.00%> (+0.06%) ⬆️
pddl/logic/predicates.py 94.56% <ø> (ø)
pddl/logic/terms.py 92.98% <100.00%> (ø)
pddl/parser/symbols.py 100.00% <100.00%> (ø)
pddl/requirements.py 89.79% <100.00%> (+2.29%) ⬆️
pddl/logic/base.py 92.06% <95.00%> (+0.39%) ⬆️
pddl/parser/typed_list_parser.py 95.06% <95.23%> (+0.12%) ⬆️
... and 4 more

@francescofuggitti francescofuggitti marked this pull request as ready for review October 13, 2023 23:30
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.

Thank you so much for your efforts on this @francescofuggitti ! It's an epic addition. Especially by the diff count ;)

image

I suspect I'm missing some things that will come to light when we release this to the wild, but I've just made a few (mostly minor) comments/questions for you to consider.

pddl/_validation.py Outdated Show resolved Hide resolved
pddl/logic/functions.py Outdated Show resolved Hide resolved
pddl/parser/common.lark Outdated Show resolved Hide resolved
pddl/parser/domain.py Show resolved Hide resolved
pddl/parser/domain.py Show resolved Hide resolved
pddl/parser/problem.lark Outdated Show resolved Hide resolved
pddl/parser/problem.py Show resolved Hide resolved
pddl/parser/problem.py Show resolved Hide resolved
tests/test_domain.py Show resolved Hide resolved
pddl/_validation.py Outdated Show resolved Hide resolved
Copy link
Member

@marcofavorito marcofavorito left a comment

Choose a reason for hiding this comment

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

This is a monumental work @francescofuggitti, thank you so much. The tests witness that the feature is working (regardless of minor issues that might pop up in the future). Thanks!! 🙏

pddl/logic/base.py Outdated Show resolved Hide resolved
pddl/logic/base.py Outdated Show resolved Hide resolved
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.

Just some open question on what's all resolved. Rest for @marcofavorito to sign off on.

Copy link
Member

@marcofavorito marcofavorito left a comment

Choose a reason for hiding this comment

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

LGTM

@francescofuggitti francescofuggitti merged commit 137cb67 into main Oct 18, 2023
9 checks passed
@francescofuggitti francescofuggitti deleted the feat/numerical-fluents branch October 18, 2023 09:45
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.

5 participants