Hi all,
I found that the translator fails to parse a certain type of domain files as
shown in the following. The problem disappears when I rename the predicate
`reachable`, which has the same name as a PDDL type `reachable`, to some other
name like `foo`. Attached are the minimal reproducible test cases, including 4
PDDL files and the result log files.
``` lisp
(define (domain cell-assembly-eachparts)
(:requirements :strips :typing)
(:types arm position - object
reachable - position
table - reachable) ;;;; **********
(:predicates
(reachable ?arm - arm ?to - reachable) ;;;; ********************
(at ?obj - object ?pos - position))
(:action move-arm
:parameters (?arm - arm ?from ?to - reachable) ;;;; **************
:precondition (and (at ?arm ?from)
(reachable ?arm ?to)) ;;;; ********************
:effect (and (at ?arm ?to)
(not (at ?arm ?from)))))
```
the translator log is
```
Parsing...
Parsing: [0.000s CPU, 0.001s wall-clock]
Normalizing task... [0.000s CPU, 0.000s wall-clock]
Instantiating...
Generating Datalog program... [0.000s CPU, 0.000s wall-clock]
Normalizing Datalog program...
Trivial rules: Converted to facts.
Normalizing Datalog program: [0.000s CPU, 0.001s wall-clock]
Preparing model... [0.000s CPU, 0.000s wall-clock]
Generated 5 rules.
Computing model... Traceback (most recent call last):
File "/mnt/video/guicho/repos/downward/src/translate/translate.py", line 676,
in <module>
main()
File "/mnt/video/guicho/repos/downward/src/translate/translate.py", line 666,
in main
sas_task = pddl_to_sas(task)
File "/mnt/video/guicho/repos/downward/src/translate/translate.py", line 498,
in pddl_to_sas
reachable_action_params) = instantiate.explore(task)
File "/mnt/video/guicho/repos/downward/src/translate/instantiate.py", line 75,
in explore
model = build_model.compute_model(prog)
File "/mnt/video/guicho/repos/downward/src/translate/build_model.py", line
324, in compute_model
rule.update_index(next_atom, cond_index)
File "/mnt/video/guicho/repos/downward/src/translate/build_model.py", line 97,
in update_index
for position in self.common_var_positions[cond_index]]
IndexError: tuple index out of range
Command exited with non-zero status 1
real 0.08
user 0.06
sys 0.01
maxmem 13256
```
|