Skip to content

Commit

Permalink
Merge pull request #79 from Naoki-Hiraoka/eus-pddl
Browse files Browse the repository at this point in the history
[pddl_panner/src/eus-pddl.l] support multiple simbols for 'forall and 'exists
  • Loading branch information
k-okada authored Oct 2, 2023
2 parents 76b5d35 + ef340c0 commit 7ca3e3b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions pddl/pddl_planner/src/eus-pddl.l
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,11 @@
(ret (mapcar #'(lambda(obj)
(if (equal (caddr v) (cdr obj))
(multiple-value-bind (va ar) param
(send self :check-state st (caddr ss) (list (append va (list (car v))) (append ar (list (car obj))))))
nil)
(send self :check-state
st
(if (= (length v) 3) (caddr ss) (list (car ss) (if (eq '- (cadr v)) (cdddr v) (cdr v)) (caddr ss)))
(list (append va (list (car v))) (append ar (list (car obj))))))
nil)
)
objects)))
(null (every #'null ret))))
Expand All @@ -688,8 +691,11 @@
(ret (mapcar #'(lambda(obj)
(if (equal (caddr v) (cdr obj))
(multiple-value-bind (va ar) param
(send self :check-state st (caddr ss) (list (append va (list (car v))) (append ar (list (car obj))))))
t)
(send self :check-state
st
(if (= (length v) 3) (caddr ss) (list (car ss) (if (eq '- (cadr v)) (cdddr v) (cdr v)) (caddr ss)))
(list (append va (list (car v))) (append ar (list (car obj))))))
t)
)
objects)))
(null (some #'null ret))))
Expand Down Expand Up @@ -782,9 +788,12 @@
('forall
(let ((v (cadr ee)))
(dolist (obj objects)
(when (equal (caddr v) (cdr obj))
(when (equal (cadr (memq '- v)) (cdr obj))
(multiple-value-bind (va ar) param
(setq tmp-st (send self :change-state tmp-st (caddr ee) (list (append va (list (car v))) (append ar (list (car obj)))))))))
(setq tmp-st (send self :change-state
tmp-st
(if (= (length v) 3) (caddr ee) (list (car ee) (if (eq '- (cadr v)) (cdddr v) (cdr v)) (caddr ee)))
(list (append va (list (car v))) (append ar (list (car obj)))))))))
tmp-st))
('when
(case (caadr ee)
Expand Down

0 comments on commit 7ca3e3b

Please sign in to comment.