Skip to end of metadata
Go to start of metadata

The new Prova main() is hosted by the ProvaCommunicatorImpl class. This allows running a Prova agent as a scripting language, which requires the following command-line arguments:

  1. agent name,
  2. password (unused for now),
  3. starting rulebase (with possibly included goals that are immediately run synchronously).

Optionally, the timeout for the agent could be specified after that with -t <timeout in seconds>. Specifying the option -t -1 allows the agent to run indefinitely, accepting goals as messages and responding by other actions. If the timeout parameter is not provided, the engine executes all goals in the starting rulebase and then if no internal messages were sent (as is the case with a typical rulebase that has no message sending or receiving), it exits to the command shell. Otherwise, it looks for one second long period of inactivity when no messages are detected and then exits to the command shell.

The binary Prova distribution allows running the Prova interpreter from command line using

The list of command-line arguments is passed to the starting rulebase as global constants: $0,$1..,$N.

Here is an example of the arguments passed to the agent:

The following rulebase test001_args.prova then prints one solution Parent=molecular_function.

Labels: