8 The Plan tool
In addition to inject, the distribution also provides a tool for
running your programs in a read-eval-print loop, called plan. This
program takes a single, optional argument, which is the PLAN program file to
read in at the outset. After startuip, you will be prompted with a
-->
and you can respond with a valid PLAN expression to compute,
followed by semi-colon (or Ctrl-D). For example:
% bin/plan interp_tests/Helloworld.plan
--> 1 + 1;
2
--> doit();
1.1-1.6: Warning: service doit not declared.
[(158.130.6.143,3324);<loopback>] says : Hello world!
()
--> "hello "^"world";
hello world
-->
Note that because expressions are typechecked in isolation, you will get
warnings like
1.1-1.6: Warning: service doit not declared.
for services and functions defined in your included code files. The network
primitives are not available in this tool; if an expression evaluation tries
to use OnRemote or OnNeighbor the evaluation is aborted. Also, the Router
Services (as described in the PLAN Programmer's Guide [5]) are
not available on the read-eval-print loop.
Press Ctrl-C to exit the loop.