This question builds on a previous question about forall clauses. I would like to limit the forall with a 'when' statement as shown below:
(:durative-action finish
:parameters (?r - robot ?p - part)
:duration ( = ?duration 1)
:condition (and
(at start (robot_free ?r))
(at start (forall (?f - fastener_loc)
when (part_fastener ?p ?f)
(loc_not_fastened ?f)
)
)
)
:effect (and
(at start(not (robot_free ?r)))
(at end (part_free ?p))
(at end (robot_free ?r))
)
)
This works without the 'when' statement. When I include the 'when' statement, I receive several errors:
Error: Syntax error in durative-action declaration.
Error: Unreadable structure
Error: Syntax error in domain
Thanks in advance for any help.