robot command

golog.l: An Efficient Golog Interpreter for Embedded Systems using Picolisp

prolog, golog, picolisp pilog!

Golog is a robot programming and plan language. It is a logic programming language for software agents.

Here we present a version of plain-vanilla "golog" - written in the picolisp flavour of prolog, which is called pilog.

So now, for platforms on which picolisp is available, golog is available too. (Picolisp is written in C.) Moreover, platforms on which the extremely portable flavor of picolisp (called "miniPicoLisp") is available, golog.l is now available, also.

Why might one want to use golog in pilog? Because it is both tiny and fast. With the miniPicoLisp executable (or shared library) tipping the scales at only 100 to 150k -- depending on platform and build options, -- and with pilog.l and golog.l loaded, this has to be the smallest footprint golog around.

And this golog has a respectable prolog and lisp under the hood. Might be just right for certain niches, like, embedded systems, for example.

  • golog.l

  • An interlinear translation of golog from a standard prolog into pilog.

  • elevator.l

  • simple elevator example translated into pilog

To test this, first you'll need picolisp (miniPicoLisp is fine, also).

For example, to run the "simple elevator" example explained in Knowledge in Action, Raymond Reiter, 2001, page 130: "Running the Elevator Program", we translate the prolog -

do(pi(n,?(on(n)) : goFloor(n)),s0,S).

to pilog golog. This might be:

(? (do (Seq (pi n (Question (On n))) (goFloor n)) s0 @S))

From the command line (with golog.l and elevator.l in the current directory), you could test the simple elevator golog program like this:

$ ./pil golog.l elevator.l -t_all

Also see: examples of pilog

Questions or comments? Write ds at

Last modified: 2011-07-23, 18:37

© 2011 …

powered by phpSQLiteCMS