User Tools

Site Tools


software:cram:development_experiences:new_goals

This is an old revision of the document!


How to register and achieve a new goal

A plan for a new goal

Let's assume we wanna write a plan to achieve a new goal, e.g. to flip a pancake. Best practice is to put this plan into one of the source-files of a plan library, e.g. cram_plan_library:

(def-goal (achieve (flip-pancake ...))
  (with-designators ((action-desig 
                       (action `((to flip))))
                     ...)
    ...
    (perform action)))

If you want other packages to also use this plan, export the goal-symbol in the package.lisp of the your plan library. Make sure to also export all designator properties used in your plan:

(desig-props:def-desig-package cram-plan-library
 ...
 (:export #:...
          #:flip-pancake
          ...)
 (:desig-properties #:to #:flip ...))

How to use/achieve the new plan

software/cram/development_experiences/new_goals.1366976152.txt.gz · Last modified: 2016/05/19 09:18 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki