NAME

print - Print a Soar object

SYNOPSIS

print [ -depth n] [ -internal ] [item*]
print -stack [ -goal | -operator ]*

DESCRIPTION

The print command is used to print items from production memory or working memory. The items to be printed may be one of the following:

production-name
print the production named production-name
identifier
print the object identifier. identifier must be a valid Soar symbol.
integer
print the working memory element with the timetag integer
pattern
print the working memory elements matching the given pattern. The pattern is interpreted by the Soar kernel so it must be surrounded by curly braces or double quotes to avoid being parsed by Tcl. A pattern has the following form:
       (identifier ^attribute value [+])

The pattern is surrounded by parentheses. The identifier, attribute, and value must be valid Soar symbols or the wildcard symbol * which matches all occurences. The optional + symbol restricts pattern matches to acceptable preferences.

OPTIONS

-depth n
This option overrides the default printing depth (see the default-print-depth command for more detail). Note that a -depth 0 argument is meaningful only with accompanying integer and pattern arguments. It causes only the matching working memory elements to be printed, instead of all elements whose identifier is an identifier in one of the matching working memory elements.
-internal
Specifies that objects should be printed in their internal form. For productions, this means leaving conditions in their reordered (rete net) form. For working memory elements, this means printing the individual elements with their timetags, rather than the objects.
-stack
Specifies that the Soar goal stack should be printed. By default this includes both goals and operators. The stack listing can be restricted by adding the -goal and -operator restrictions. Giving both options is equivalent to the default.

EXAMPLES

print -internal {(s1 ^* v2)}
Print the working memory elements (and their timetags) which have the identifier s1 as object and v2 as value.
print -stack
Print the Soar goal stack which includes goal states and operators.

SEE ALSO

default-print-depth