Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorials:intermediate:performing_plans [2019/02/04 17:46] – Updated syntax errors due to renamed packages in v0.70 (action-desig -> action-grounding + cram_plan_library -> cram_executive) amartutorials:intermediate:performing_plans [2022/03/30 21:19] – [Plan goals] schimpf
Line 1: Line 1:
-====== Performing Activities ======+====== Performing Actions ======
  
 ===== Basic functionality ===== ===== Basic functionality =====
Line 15: Line 15:
  
 <code lisp> <code lisp>
-CL-USER> (cpl:def-cram-function eat (stuff+CL-USER> (cpl:def-cram-function eat (&key ((:yummy ?yummy)) &allow-other-keys) 
-           (format t "hmmm... nomnomnom... ~a~%" stuff))+           (declare (type (or string null) ?yummy)
 +           (format t "hmmm... nomnomnom... ~a~%" ?yummy))
 </code> </code>
  
Line 23: Line 24:
 <code lisp> <code lisp>
 CL-USER> (prolog:def-fact-group eating-plans (desig:action-grounding) CL-USER> (prolog:def-fact-group eating-plans (desig:action-grounding)
-           (prolog:<- (desig:action-grounding ?action-designator (eat ?object)) +             (prolog:<- (desig:action-grounding ?action-designator (eat ?action-designator)) 
-             (desig:desig-prop ?action-designator (:to :eat)) +                        (desig:desig-prop ?action-designator (:to :eat)) 
-             (desig:desig-prop ?action-designator (:yummy ?object))))+                        (desig:desig-prop ?action-designator (:yummy ?object))))
 </code> </code>
  
Line 62: Line 63:
 CL-USER> (defparameter *pizza-eaten-p* nil) CL-USER> (defparameter *pizza-eaten-p* nil)
 *PIZZA-EATEN-P* *PIZZA-EATEN-P*
-CL-USER> (cpl:def-cram-function eat (stuff+CL-USER> (cpl:def-cram-function eat (&key ((:yummy ?yummy)) &allow-other-keys) 
-           (format t "hmmm... nomnomnom... ~a~%" stuff)+           (declare (type (or string null) ?yummy)
 +           (format t "hmmm... nomnomnom... ~a~%" ?yummy)
            (setf *pizza-eaten-p* t))            (setf *pizza-eaten-p* t))
 STYLE-WARNING: redefining COMMON-LISP-USER::EAT in DEFUN STYLE-WARNING: redefining COMMON-LISP-USER::EAT in DEFUN
 EAT EAT
 CL-USER> (prolog:def-fact-group eating-occasions () CL-USER> (prolog:def-fact-group eating-occasions ()
-           (prolog:<- (cram-plan-occasions-events::object-eaten ?object)+           (prolog:<- (:object-eaten ?object)
              (prolog:symbol-value *pizza-eaten-p* ?eaten)              (prolog:symbol-value *pizza-eaten-p* ?eaten)
              (prolog:lisp-pred identity ?eaten)))              (prolog:lisp-pred identity ?eaten)))