Issue49

Title When the goal contains statically true atoms, the translator throws an exception
Priority bug Status resolved
Superseder Nosy List erez, malte
Assigned To malte Keywords
Optional summary

Created on 2009-11-19.14:25:15 by erez, last changed by malte.

Files
File name Uploaded Type Edit Remove
KEGG.tar.gz erez, 2009-11-19.14:25:15 application/x-gzip
svn-diff erez, 2009-11-19.14:25:39 application/octet-stream
Messages
msg128 (view) Author: malte Date: 2009-11-19.14:58:41
Renamed the issue, since this didn't happen with statically false atoms, only
with statically true atoms.

Added regression tests for this in r3575.

Fixed in r3756.
msg126 (view) Author: erez Date: 2009-11-19.14:25:39
This is the svn-diff of the "fix" I made
msg125 (view) Author: erez Date: 2009-11-19.14:25:15
When translating the attached domain and problem files, the following error occurs: 

Traceback (most recent call last):
  File "/home/batman/code/downward/trunk/downward/translate/translate.py", line
383, in <module>
    sas_task = pddl_to_sas(task)
  File "/home/batman/code/downward/trunk/downward/translate/translate.py", line
301, in pddl_to_sas
    task.init, goal_list, actions, axioms, task.use_min_cost_metric)
  File "/usr/lib/python2.5/contextlib.py", line 33, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/batman/code/downward/trunk/downward/translate/timers.py", line
32, in timing
    yield
  File "/home/batman/code/downward/trunk/downward/translate/translate.py", line
301, in pddl_to_sas
    task.init, goal_list, actions, axioms, task.use_min_cost_metric)
  File "/home/batman/code/downward/trunk/downward/translate/translate.py", line
244, in translate_task
    goal_pairs = translate_strips_conditions(goals, strips_to_sas, ranges,
mutex_dict, mutex_ranges).items()
  File "/home/batman/code/downward/trunk/downward/translate/translate.py", line
71, in translate_strips_conditions
    conditions, mutex_dict, mutex_ranges) is None:
  File "/home/batman/code/downward/trunk/downward/translate/translate.py", line
42, in translate_strips_conditions_aux
    for var, val in dictionary[atom]:
KeyError: <pddl.conditions.Atom object at 0xb7adb60c>

I did some digging around, and found that the atom that causes this problem is
non-fluent (does not change), and is therefore not in the dictionary, but it
does appear in the goal.
By adding a check if the atom is in the dictionary before the line that causes
the exception I was able to complete translation, but I am not sure if this is
correct.
History
Date User Action Args
2009-11-19 14:58:47maltesetstatus: chatting -> resolved
2009-11-19 14:58:41maltesetmessages: + msg128
title: When the goal contains non-fluent atoms, the translator throws an exception -> When the goal contains statically true atoms, the translator throws an exception
2009-11-19 14:25:39erezsetfiles: + svn-diff
messages: + msg126
2009-11-19 14:25:15erezcreate