Issue294

Title negative literals in :init should be allowed
Priority bug Status resolved
Superseder Nosy List erez, gabi, haz, jendrik, malte, rpgoldman
Assigned To gabi Keywords
Optional summary

Created on 2011-11-07.19:01:37 by malte, last changed by gabi.

Files
File name Uploaded Type Edit Remove
domain.pddl gabi, 2013-06-28.16:52:02 application/octet-stream
p2.pddl haz, 2013-06-25.17:20:04 application/octet-stream
problem_inconsistent_assignment.pddl gabi, 2013-06-28.16:53:01 application/octet-stream
problem_inconsistent_literal.pddl gabi, 2013-06-28.16:52:48 application/octet-stream
problem_warning.pddl gabi, 2013-06-28.16:52:35 application/octet-stream
problem_with_consistent_negative_literal.pddl gabi, 2013-06-28.16:52:25 application/octet-stream
Messages
msg2544 (view) Author: gabi Date: 2013-07-23.14:07:58
On the benchmarks, this change leads only to a difference of the translator
output on a few trucks-strips instances, but these are only re-orderings. -> Merged.
msg2530 (view) Author: jendrik Date: 2013-06-28.17:37:09
No, I don't think we need to change lab for this.
msg2529 (view) Author: gabi Date: 2013-06-28.16:52:02
The general validity test does not need a new issue because it is already
covered by issue215.

Malte, I will add the fix of the rest to my repository as soon as I have a
proper internet connection, you can get it from there for reviewing. I will also
upload a few test cases here.

Jendrik, I added you to the nosy list, because my fix changes the timing output
for "Parsing" to a block output (using block=True in timing in file
src/translate/timers.py)
Does this require a change in lab?
msg2527 (view) Author: malte Date: 2013-06-28.15:52:57
No objections to splitting to a separate issue, though we might as well choose a
new title for this one.

> So what do you mean with assignments in the first case?

Looks like an editing mistake. Replace

- duplicate literals or assignments should flag a warning or error; if we go for
a warning, then we should also make sure they are handled correctly

with

- duplicate literals should flag a warning or error; if we go for
a warning, then we should also make sure they are handled correctly

IIRC, there are actually IPC domains with duplicate atoms in the initial state
and we currently handle them correctly. But I'm not sure.
msg2526 (view) Author: gabi Date: 2013-06-28.15:48:40
Malte,

regarding your first two points:

- literals referring incorrect atoms (undeclared predicate, wrong arity, unknown
object) should all be flagged with a useful error message
- similarly for "=" assignments referring to undeclared functions, having wrong
arity, referring to unknown objects, or unsupported value (not a non-negative
integer)

I think this should not only be done in the initial state specification but
everywhere, so I would prefer to split this off to a separate issue. What do you
think?

Regarding two other points:

- duplicate literals or assignments should flag a warning or error; if we go for
a warning, then we should also make sure they are handled correctly
- similarly, duplicate assignments to a fluent should flag an error if
contradictory and a warning or error if assigning the same value twice

You seem to distinguish assignments to fluents and other assignments because "a
warning or error if assigning the same value twice" is already be covered by the
other point. So what do you mean with assignments in the first case?
msg2525 (view) Author: gabi Date: 2013-06-28.13:37:00
Ah, I see. Still, I do not see how fixing this issue would help there because
not mentioning an atom has a different semantics (false in PDDL, unspecified in
conformant planning).
msg2520 (view) Author: haz Date: 2013-06-25.17:20:04
Aye, for specifying uncertainty in the initial state. I've attached a conformant 
planning problem from the ring domain that uses a oneof clause (although no negated 
literals in this instance).
msg2519 (view) Author: gabi Date: 2013-06-25.17:05:53
Sorry, I do not understand what you mean with "oneof clauses". Mutex groups?
msg2518 (view) Author: haz Date: 2013-06-25.16:09:39
It's the oneof clauses that I was considering. Negative literals can appear in 
them, no?
msg2517 (view) Author: gabi Date: 2013-06-25.15:50:27
Christian, I don't think that allowing negative literals in :init would help for
domains with uncertainty. It would only add some sanity checks but atoms not
occurring in the :init section would still be false by default.
msg2307 (view) Author: haz Date: 2012-07-30.18:32:11
It would also remove one extra thing to modify for those who want to use the 
translator for domains with uncertainty in the initial state. I know I've used 
the translator code simply for parsing and the data structures it provides. I've 
subsequently had to add the support for negative initial literals (among other 
things) in doing so.
msg1884 (view) Author: malte Date: 2011-11-07.19:01:37
Forked off from issue292. See msg1879 for context.

Copying some text from there:
=============================================================================
Interesting, I never knew that negative literals in ":init" are allowed. But
they certainly are according to the PDDL 3.0 BNF.

They are, as Erez says, redundant, unless they clash with another positive
literal in the initial state, in which case I guess an error in the input should
be flagged. So they don't seem to serve a practical purpose. Nevertheless, we
should of course support them properly. While we're at it, we should make sure
that the following things in :init all work properly:

- literals referring incorrect atoms (undeclared predicate, wrong arity, unknown
object) should all be flagged with a useful error message
- similarly for "=" assignments referring to undeclared functions, having wrong
arity, referring to unknown objects, or unsupported value (not a non-negative
integer)
- duplicate literals or assignments should flag a warning or error; if we go for
a warning, then we should also make sure they are handled correctly
- negative literals should be allowed; if they clash with a positive literal, we
should report an error; otherwise, they can be ignored
- similarly, duplicate assignments to a fluent should flag an error if
contradictory and a warning or error if assigning the same value twice

Hope I didn't forget anything.
History
Date User Action Args
2013-07-23 14:07:58gabisetstatus: reviewing -> resolved
assignedto: malte -> gabi
messages: + msg2544
2013-06-28 17:37:09jendriksetmessages: + msg2530
2013-06-28 16:53:01gabisetfiles: + problem_inconsistent_assignment.pddl
2013-06-28 16:52:48gabisetfiles: + problem_inconsistent_literal.pddl
2013-06-28 16:52:35gabisetfiles: + problem_warning.pddl
2013-06-28 16:52:25gabisetfiles: + problem_with_consistent_negative_literal.pddl
2013-06-28 16:52:02gabisetstatus: chatting -> reviewing
nosy: + jendrik
messages: + msg2529
files: + domain.pddl
assignedto: malte
2013-06-28 15:52:57maltesetmessages: + msg2527
2013-06-28 15:48:40gabisetmessages: + msg2526
2013-06-28 13:37:00gabisetmessages: + msg2525
2013-06-25 17:20:04hazsetfiles: + p2.pddl
messages: + msg2520
2013-06-25 17:05:53gabisetmessages: + msg2519
2013-06-25 16:09:39hazsetmessages: + msg2518
2013-06-25 15:50:27gabisetnosy: + gabi
messages: + msg2517
2012-07-30 18:32:11hazsetnosy: + haz
messages: + msg2307
2011-11-07 19:01:37maltecreate