Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Latest commit

 

History

History
124 lines (90 loc) · 4.46 KB

cmd_print.wiki

File metadata and controls

124 lines (90 loc) · 4.46 KB

  1. summary print command documentation

Table of Contents

print

Print items in working memory or production memory.

Synopsis

Default Aliases

|| `p` || `print` || || `pc` || `print --chunks` || || `wmes` || `print --internal` ||

Options

Printing items in production memory

What productions to print:

|| `-a, --all` || print the names of all productions currently loaded || || `-c, --chunks` || print the names of all chunks currently loaded || || `-D, --defaults` || print the names of all default productions currently loaded || || `-j, --justifications` || print the names of all justifications currently loaded. || || `-r, --rl` || Print Soar-RL rules || || `-T, --template` || Print Soar-RL templates || || `-u, --user` || print the names of all user productions currently loaded || || `production_name` || print the production named `production-name` ||

How to print the productions:

|| `-f, --full` || When printing productions, print the whole production. This is the default when printing a named production. || || `-F, --filename` || also prints the name of the file that contains the production. || || `-i, --internal` || items should be printed in their internal form. For productions, this means leaving conditions in their reordered (rete net) form. || || `-n, --name` || When printing productions, print only the name and not the whole production. This is the default when printing any category of productions, as opposed to a named production. ||

Printing items in working memory

|| `-d, --depth n` || This option overrides the default printing depth (see the [cmd_default_wme_depth] command for more detail). || || `-e, --exact` || Print only the wmes that match the pattern || || `-i, --internal` || items should be printed in their internal form. For working memory, this means printing the individual elements with their timetags and activation, rather than the objects. || || `-t, --tree` || wmes should be printed in in a tree form (one wme per line). || || `-v, --varprint` || Print identifiers enclosed in angle brackets. || || `identifier` || print the object `identifier`. `identifier` must be a valid Soar symbol such as _S1_ || || `pattern` || print the object whose working memory elements matching the given `pattern`. See Description for more information on printing objects matching a specific `pattern`. || || `timetag` || print the object in working memory with the given `timetag` ||

Printing the current subgoal stack

|| `-s, --stack` || Specifies that the Soar goal stack should be printed. By default this includes both states and operators. || || `-o, --operators` || When printing the stack, print only _operators_. || || `-S, --states` || When printing the stack, print only _states_. ||

Description

The print command is used to print items from production memory or working memory. It can take several kinds of arguments. When printing items from working memory, the Soar objects are printed unless the `--internal` flag is used, in which case the wmes themselves are printed.

The activation value is only printed if activation is turned on. See [cmd_wma].

The pattern is surrounded by parentheses. The `identifier`, `attribute`, and `value` must be valid Soar symbols or the wildcard symbol `*` which matches all occurrences. The optional `+` symbol restricts pattern matches to acceptable preferences. If wildcards are included, an object will be printed for each pattern match, even if this results in the same object being printed multiple times.

Examples

Print the objects in working memory (and their timetags) which have wmes with identifier `s1` and value `v2` (note: this will print the entire `s1` object for each match found):

Print the Soar stack which includes states and operators:

Print the named production in its RETE form:

Print the names of all user productions currently loaded:

Default print vs tree print:

See Also

[cmd_default_wme_depth] [cmd_wma]