NAME

stop-soar - Stop Soar

SYNOPSIS

stop-soar [ -self [reason-string] ]

DESCRIPTION

Agents may be run using the run command. The stop-soar command stops any running Soar agents. It sets a flag in the Soar kernel so that Soar will stop running at a "safe" point and return control to the user. This operates exactly as if the user had issued a control-C (SIGINT) interrupt to the Soar process.

-self
Stop only the soar agent where the command is issued. All other agents continue running as previously specified.
reason-string
An optional string following -self which will be printed when Soar is stopped, to indicate why it was stopped. If left blank, no message will be printed when Soar is stopped.

This command is usually not issued at the command line prompt. A more common use of this command is as a side-effect of pressing a button on a Graphical User Interface (GUI), or as a monitor to be executed at a specific Soar Event. For example, a user may wish to examine an agent's "matches" after the Soar Decision Phase. In order to do this in Soar 8, the user must register a monitor, or callback, to issue the "stop-soar -self" command for the event, after-decision-phase-cycle.

EXAMPLES

This example shows how to stop Soar8 after this decision phase using stop-soar -self in a monitor to stop after the decision phase so that memory can be examined.

 monitor -add {stop-soar -self "after decision phase"} \
        after-decision-phase-cycle

WARNINGS

If the graphical interface doesn't periodically do a Tcl "update" command, then it may not be possible to interrupt a Soar agent from the command line.

SEE ALSO

run, monitor, matches