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

Failing to parse numerical domains #145

Open
Martin36 opened this issue Feb 14, 2025 · 1 comment
Open

Failing to parse numerical domains #145

Martin36 opened this issue Feb 14, 2025 · 1 comment
Labels
bug Something isn't working parsing PDDL2.1

Comments

@Martin36
Copy link

When I try to parse a numerical domain e.g. containing at least one function with a numerical output, the parsing fails with the error: tarski.errors.UndefinedElement: Undefined element "number" (error msg: None).

Here is a minimal example of this:

import tarski
from tarski.io import PDDLReader, FstripsWriter
from tarski.theories import Theory

theories = [Theory.EQUALITY, Theory.ARITHMETIC]

bw = tarski.language(name="bw", theories=theories)

block = bw.sort('block')

width = bw.function('width', block, bw.Real)

problem = tarski.fstrips.create_fstrips_problem(bw, problem_name='prob1', domain_name="bw")

writer = FstripsWriter(problem)
writer.write_domain('bw_domain.pddl')

reader = PDDLReader(raise_on_error=True, theories=theories)
reader.parse_domain('bw_domain.pddl')

It is based on the example from the documentation here: https://tarski.readthedocs.io/en/latest/notebooks/first-order-logics.html#Terms-and-Formulas

@miquelramirez miquelramirez added bug Something isn't working parsing PDDL2.1 labels Feb 14, 2025
@miquelramirez
Copy link
Member

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parsing PDDL2.1
Projects
None yet
Development

No branches or pull requests

2 participants