-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixes and improvements in the parsing of typed lists #82
Commits on Jun 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e3a249e - Browse repository at this point
Copy the full SHA e3a249eView commit details
Commits on Jun 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 658dc62 - Browse repository at this point
Copy the full SHA 658dc62View commit details -
test: fix blocksworld_fond/p01.pddl goal
The goal was just '(and )', restore the original reachability goal.
Configuration menu - View commit details
-
Copy full SHA for d7d0534 - Browse repository at this point
Copy the full SHA d7d0534View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5b509c - Browse repository at this point
Copy the full SHA d5b509cView commit details -
This commit adds the parsing utility class "TypesIndex". TypesIndex is an index for PDDL types and PDDL names/variables. It is used to index PDDL names and variables by their types. OrderedDict is used to preserve the order of the types and the names, e.g. for predicate variables. Other types of validations are performed to ensure that the types index is consistent. In this commit, it is used only to parse typed lists of names (not variables).
Configuration menu - View commit details
-
Copy full SHA for 3c53e3f - Browse repository at this point
Copy the full SHA 3c53e3fView commit details -
feat: changing domain parser behaviour on typed_list_name (backward c…
…ompatible) This commit changes the way typed_list_name rule is parsed. This does not change the parsing behaviour from the user perspective, but it is a non-functional change to improve the performances of the Lark parser. With the previous version of the rule 'typed_list_name: NAME+ TYPE_SEP primitive_type (typed_list_name)', the Lark parser internals would perform a recursive call whenever a typed_list_name is matched. This might cause an arbitrarily long stack of calls whenever the parser got an input like: ``` element1 - t1 element2 - t1 element3 t1 ... ``` The above list of tokens is parsed as: ``` element1 - t1 <typed_list_name> element2 - t1 <typed_list_name> element3 - t1 <typed_list_name> ... ``` For large inputs, this will easily hit the recursion depth limit. With the new approach, the entire list of tokens is parsed at once. This adds some complexity in the parsing function for the typed_list_name rule, but we have more control in how the parsing is performed; in particular, we can parse the tokens *iteratively* rather than *recursively*. Finally, the NAME* pattern is appended at the end of the typed_list_name rule. This is because, according to the syntax specification, the last sublist of names might be non-typed. The implementation exploits the newly added TypesIndex class which handles corner cases and syntax errors (e.g. duplicated entries in the list).
Configuration menu - View commit details
-
Copy full SHA for 3cf8cb4 - Browse repository at this point
Copy the full SHA 3cf8cb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf25df5 - Browse repository at this point
Copy the full SHA cf25df5View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccb5097 - Browse repository at this point
Copy the full SHA ccb5097View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a7836c - Browse repository at this point
Copy the full SHA 7a7836cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1e3316 - Browse repository at this point
Copy the full SHA f1e3316View commit details -
chore: sort Symbols in alphanumerical order
The order is taken from pag. 168 of the PDDL textbook, where colon ':' is ignored in determining the order.
Configuration menu - View commit details
-
Copy full SHA for 48ffa56 - Browse repository at this point
Copy the full SHA 48ffa56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 976f481 - Browse repository at this point
Copy the full SHA 976f481View commit details -
Configuration menu - View commit details
-
Copy full SHA for 889b3fc - Browse repository at this point
Copy the full SHA 889b3fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 73e4fac - Browse repository at this point
Copy the full SHA 73e4facView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2dded9 - Browse repository at this point
Copy the full SHA d2dded9View commit details -
docs: fix types argument passed to Domain in README
The value of type dict passed to the Domain constructor in the README is set to None, denoting the fact that the type has no parent type.
Configuration menu - View commit details
-
Copy full SHA for 67d3b1d - Browse repository at this point
Copy the full SHA 67d3b1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 124a60a - Browse repository at this point
Copy the full SHA 124a60aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03abf7d - Browse repository at this point
Copy the full SHA 03abf7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 04fe2f8 - Browse repository at this point
Copy the full SHA 04fe2f8View commit details -
refactor: more Requirements to its own module pddl.requirements
This is needed to accomodate future changes and to avoid circular imports.
Configuration menu - View commit details
-
Copy full SHA for 1a35939 - Browse repository at this point
Copy the full SHA 1a35939View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3ab1aa - Browse repository at this point
Copy the full SHA c3ab1aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 35f333b - Browse repository at this point
Copy the full SHA 35f333bView commit details -
chore: used 'validate' instead of 'assert_'
in this way, PDDLValidationError is raised, rather than the generic AssertionError.
Configuration menu - View commit details
-
Copy full SHA for 529d35d - Browse repository at this point
Copy the full SHA 529d35dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d264a8 - Browse repository at this point
Copy the full SHA 0d264a8View commit details -
chore: change the way requirements are set in a Problem object
If the requirements set is given, use it. Otherwise, take the requirements from the domain.
Configuration menu - View commit details
-
Copy full SHA for 03e632b - Browse repository at this point
Copy the full SHA 03e632bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f232127 - Browse repository at this point
Copy the full SHA f232127View commit details -
feat: add TypeChecker utility class and use it for checking (both dom…
…ain and problem) constants
Configuration menu - View commit details
-
Copy full SHA for 1586db1 - Browse repository at this point
Copy the full SHA 1586db1View commit details -
fix: improve Problem initialize regarding requirements and domain_nam…
…e vs domain Problem objects can be instantiated in two ways: either with a domain object, or without it. If with a domain object, then both the attributes/args domain_name and requirements must be validated against the provided domain. Otherwise, the provided arguments are used to set the attributes. The domain setter will reset both requirements and domain_name attributes. The property getter of requirements will return empty set even when it was not specified (therefore, interpreting absence of requirements section as empty set of requirements).
Configuration menu - View commit details
-
Copy full SHA for e879efb - Browse repository at this point
Copy the full SHA e879efbView commit details -
test: refactor parametrized tests
- The parser tests are split in two modules: one for domain's, the other for problem's parser tests. - The parametrization over PDDL fixture files of the parser tests is changed. Now we iterate over all problems, and for each problem we also parse the respective domain, and then we check the validity of the problem against the domain (via the implicit call to the Problem.check method, triggered by the Problem.domain property setter).
Configuration menu - View commit details
-
Copy full SHA for 771c6fc - Browse repository at this point
Copy the full SHA 771c6fcView commit details -
build: bump minimum Python interpreter supported to 3.8
The main motivation is that Python 3.7 is going to reach the end of life at the end of June 2023. Another reason is that we are going to use some language features available only for >=3.8 (e.g. functools.singledispatchmethod).
Configuration menu - View commit details
-
Copy full SHA for 2d35e8c - Browse repository at this point
Copy the full SHA 2d35e8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 190a7c5 - Browse repository at this point
Copy the full SHA 190a7c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4376e54 - Browse repository at this point
Copy the full SHA 4376e54View commit details -
Configuration menu - View commit details
-
Copy full SHA for a511022 - Browse repository at this point
Copy the full SHA a511022View commit details -
refactor: move Action class in its own module core.action
Needed to avoid circular imports.
Configuration menu - View commit details
-
Copy full SHA for 3d02538 - Browse repository at this point
Copy the full SHA 3d02538View commit details -
Configuration menu - View commit details
-
Copy full SHA for 617cfd7 - Browse repository at this point
Copy the full SHA 617cfd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdddfbf - Browse repository at this point
Copy the full SHA bdddfbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b3e7ad - Browse repository at this point
Copy the full SHA 7b3e7adView commit details
Commits on Jun 8, 2023
-
fix: move keyword validation inside class contructors
This commit adds keyword validation for 'name' types. In particuar, instead of using the raw 'name' constructor, we added 'parse_name' and use it across modules. The same is done for 'types', except that the 'object' keyword should be ignored. This change is very helpful as the input validation is done during the initialization of the PDDL objects. The keyword validation functions have been moved to the pddl.custom_types module.
Configuration menu - View commit details
-
Copy full SHA for a12e34b - Browse repository at this point
Copy the full SHA a12e34bView commit details
Commits on Jun 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f0e79af - Browse repository at this point
Copy the full SHA f0e79afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c41830 - Browse repository at this point
Copy the full SHA 8c41830View commit details -
feat: allow repetition in variable list
Although not very common, a list of variables might contain duplicated entries. For example, this allows to define a predicate like P(?x, ?x).
Configuration menu - View commit details
-
Copy full SHA for eb2429d - Browse repository at this point
Copy the full SHA eb2429dView commit details -
test: improve 'test_variables_repetition_allowed_if_same_type'
add tests on multi-types, predicates, action parameters/preconditions/effects.
Configuration menu - View commit details
-
Copy full SHA for 9a16858 - Browse repository at this point
Copy the full SHA 9a16858View commit details -
Update .github/workflows/docs.yml
from @francescofuggitti PR comment Co-authored-by: Francesco Fuggitti <francesco.fuggitti@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a6367ba - Browse repository at this point
Copy the full SHA a6367baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c67fde - Browse repository at this point
Copy the full SHA 2c67fdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8e0a2b - Browse repository at this point
Copy the full SHA b8e0a2bView commit details -
feat: check terms consistency wrt type tag
i.e. terms with the same name should have the same type tags.
Configuration menu - View commit details
-
Copy full SHA for 3661f64 - Browse repository at this point
Copy the full SHA 3661f64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 924c88c - Browse repository at this point
Copy the full SHA 924c88cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7996d1 - Browse repository at this point
Copy the full SHA f7996d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5858b3 - Browse repository at this point
Copy the full SHA f5858b3View commit details
Commits on Jun 13, 2023
-
- types are now printed correctly in the :constants section - in the :objects section, the objects are grouped by type (as in constants) - minor fixes in how :init and :goal are printed (they are always printed even if empty). The code changes added here are to be considered temporary, since a refactoring of the formatting module is required. Nevertheless, the printing of the typing information of constants will remain.
Configuration menu - View commit details
-
Copy full SHA for edcc295 - Browse repository at this point
Copy the full SHA edcc295View commit details -
fix: update error message in case a name inherits from multiple types
This should make the error more clear to the user: instead of just saying that the name is "already present" in the list, we clarify that the problem is that not only it occurs, but it is because it occurs (again) as inheriting name.
Configuration menu - View commit details
-
Copy full SHA for 97b379f - Browse repository at this point
Copy the full SHA 97b379fView commit details