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

Refer to line errors in Parser #3

Closed
meneguzzi opened this issue Oct 11, 2016 · 6 comments
Closed

Refer to line errors in Parser #3

meneguzzi opened this issue Oct 11, 2016 · 6 comments

Comments

@meneguzzi
Copy link
Contributor

I'm getting errors of the type:

hype.sh healthcare.ujshop pbhealthcare-test.ujshop
Script at  /Users/meneguzzi/Documents/workspace-planning/HyperTension_U
Axiom p parameters redefined, from ["?c", "c1", ["?t"]] to ["?c", "c2", ["?t"]]
/Users/meneguzzi/Documents/workspace-planning/HyperTension_U/UJSHOP_Parser.rb:157:in `parse_domain'
/Users/meneguzzi/Documents/workspace-planning/HyperTension_U/Hype.rb:32:in `parse'
/Users/meneguzzi/Documents/workspace-planning/HyperTension_U/Hype.rb:81:in `<main>'

But I simply cannot find where exactly in the files these errors are coming from. It's sort of urgent to sort it out.

Best,

Felipe

@Maumagnaguagno
Copy link
Owner

These errors are coming from healthcare.ujshop#L69 and healthcare.ujshop#L73.

The parser is currently testing the axiom name, p in this case, not the signature with constants and arity.
Do you want something like this (:- (a ?var1 C1) (...)) as (:- (a ?var1 ?var2) (and (call = ?var2 C1) (...))?
Line reference would require a massive change in the parser.

@Maumagnaguagno
Copy link
Owner

Recent commits disabled axiom exceptions, now we are stuck at list variables, such as (?t).

@meneguzzi
Copy link
Contributor Author

How did you know the line where it came from?
I did not understand the second comment.

@Maumagnaguagno
Copy link
Owner

Maumagnaguagno commented Oct 12, 2016

It is an axiom p exception with ["?c", "c1", ["?t"]] parameters , CTRL+F (:- (p ?c C1 (?t)).
The message does not contain the line number, but it is enough to find.

The parser still needs to handle constant matching, like C1, and lists, like (?t), before all axioms are supported.

@meneguzzi
Copy link
Contributor Author

Let's try to deal with the constants first then. Check the boxes here when you are finished:

  • Handling constants in axiom declarations
  • Handling lists in variable place names

@Maumagnaguagno
Copy link
Owner

This issue is really looking like issue #1.
I will close this one and continue reporting there about axioms and lists.
Adding line numbers to parser is currently a wontfix.

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

No branches or pull requests

2 participants