Repository navigation
v0.1.6: case-insensitive plan name lookup (ISS-027) - #3
Merged
Merged
Conversation
PDDL names are case-insensitive and UPF's PDDLReader lower-cases domain and problem text, but plan tokens were looked up exactly as written. A plan using the declared capitalisation (satellite p02-p05 objects such as Star0/GroundStation1, pogo_stick actions such as CRAFT_PLANK) failed the structure phase with "not declared" errors. VAL accepts these plans. _name_candidates now also tries the lower-case form (and lower-case with "-" as "_") after the existing candidates, so names that already resolved pick the same schema/object as before. Error messages and step display keep the name as written in the plan. Adds tests/test_case_insensitivity.py and a satellite p02 fixture.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PDDLReaderlower-cases domain and problem text (unified_planning/io/pddl_reader.py,parse_problem_string), but_validate_plan_structurelooked plan tokens up exactly as written._name_candidatesonly retried-as_.(turn_to satellite0 Star0 GroundStation1)(IPC satellite p02–p05) or(CRAFT_PLANK ...)(pogo_stick), failed withAction ... is not declared in domain/object ... is not declared in problem. VAL accepts these plans.get_state_transitiongoes through the samevalidate()path, so it failed the same way._name_candidatesnow also triesname.lower()andname.lower().replace("-", "_"), after the existing candidates. Any name that already resolved picks the same schema or object as before. Error messages and step display still show the name as written in the plan.0.1.6and CHANGELOG entry.Found in pddl-copilot-experiments
OPEN_ISSUES.mdISS-027.Not changed
_→-(plango_backagainst domaingo-back) was never resolved and still isn't. Only the existing-→_retry is kept. Adding the reverse direction would make non-case plans pass and is out of scope here.Test plan
pytest: 67 passed, 8 skipped (58 before + 9 new)main(the unknown-action error test and the lower-case hyphen test already passed there)../pddl-copilot-experiments/domainsanddomains-anon: 12,880 runs per version, compared onstatus+failed_step.planagainstdomain.pddlanddomain_neg.pddlwith its problem, 4,000 runs) and syntax-only on every domain and domain+problem pair (880 runs): 0 differences, 0 exceptions. The corpus plans are all lower-case, so the bug doesn't show up there.STRUCTURE_ERROR→VALID/INVALID(satellite, tpp, counters, gardening, pogo_stick).STRUCTURE_ERROR→VALID/INVALID.statusandfailed_stepas its lower-case original.New tests (
tests/test_case_insensitivity.py)-/_with lower case (still works) and with upper casetests/fixtures/satellite/)Follow-up (after release, pddl-copilot repo)
plugins/pddl-validator/requirements.txt→pddl-pyvalidator>=0.1.6, then runbash plugins/pddl-validator/tests/verify.sh. No frozen corpus in pddl-copilot-experiments gets re-graded.