Soar::WM - Traverse Soar working memory dumps
use Soar::WM qw(wm_root_from_file); my $root = wm_root_from_file('/path/to/wme/dump'); print $root->id; #probably prints S1 #or my $wm = Soar::WM->new(text => '(S1 ^foo bar) (S2 ^boo far)'); my $wme = $wm->get_wme('s2');
This module represents Soar's working memory. It can be used for traversing and manipulating WME dumps generated by Soar.
Soar::WM - Perl extension for representing Soar working memory given a WME dump file
Creates a new instance of Soar::WM. The arguments to this method are the same as those to wm_root.
Argument: string working memory element ID ('S1', 'Z33', etc.); since WME ID's are always uppercase, this method is case insensitive.
Returns a Soar::WM::Element instance representing the given ID.
This is a shortcut for:
It's single argument is the path to a WME dump file, or an opened file handle for one. It returns a Soar::WM::Element object representing the root of the given WME dump.
This function reads in a Soar WME dump and returnes a Soar::WM::Element representing its root. It takes a named argument, file or text. Using
wm_root(file=$fileGlob)>, you can create an object given the path to a WME dump file.
wm_root(text='(S1 ^foo bar)')>, you can create an object using a given WME dump text. If neither argument is specified, this function will wait for input from standard in.
The homepage for the Soar cognitive architecture is here: http://sitemaker.umich.edu/soar/home.
Nathan Glenn <firstname.lastname@example.org>
This software is copyright (c) 2012 by Nathan Glenn.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.