Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

soar_ecore_api.c File Reference

The low-level interface to Soar. More...

Go to the source code of this file.

Functions

void soar_ecSetDefaultWmeDepth (int depth)
 soar_ecSetDefaultWmeDepth -- Set the default wme depth to a new value

int soar_ecOpenLog (const char *filename, char *mode)
 soar_ecOpenLog --

int soar_ecCloseLog ()
 soar_ecCloseLog -- Close the log file.

int soar_ecCaptureInput (const char *filename)
 soar_ecCaptureInput -- Captures the input sent to the agent during by external calls to add-wme and remove-wme.

int soar_ecReplayInput (const char *filename)
 soar_ecReplayInput -- Replays the input previously captured using the CaptureInput command.

void soar_ecGDSPrint ()
 soar_ecGDSPrint -- Debug routine for examing the GDS when necessary.

void soar_ecExplainChunkTrace (char *chunk_name)
 soar_ecExplainChunkTrace -- Explain how a chunk came into being

void soar_ecExplainChunkCondition (char *chunk_name, int cond_number)
 soar_ecExplainChunkCondition -- Explain how a particular condition of a chunk came into being

void soar_ecExplainChunkConditionList (char *chunk_name)
 soar_ecExplainChunkConditionList -- Explain how a chunks conditions came into being

void soar_ecPrintFiringsForProduction (const char *name)
 soar_ecPrintFiringsForProduction -- Print the number of times a production has fired.

void soar_ecPrintTopProductionFirings (int n)
 soar_ecPrintTopProductionFirings -- Print the top productions with respect to their frequency of firing.

void soar_exPrintMemoryPoolStatistics (void)
void soar_ecPrintMemoryStatistics (void)
 soar_ecPrintMemoryStatistics -- Print information about Soar's internal memory usage

void soar_ecPrintReteStatistics (void)
 soar_ecPrintReteStatistics -- Print information about the rete

void soar_ecPrintSystemStatistics (void)
 soar_ecPrintSystemStatistics -- Print information about the state of Soar

int soar_ecPrintDCHistogram (void)
 soar_ecPrintDCHistogram -- Print the decision cycle time histogram (if one has been kept)

int soar_ecPrintKTHistogram (void)
 soar_ecPrintKTHistogram -- Print the kernel time histogram (if one has been kept)

void soar_ecPrintMemories (int num_to_print, int to_print[])
 soar_ecPrintMemories -- Prints information about the memory usage of different production types

int soar_ecPrintAllProductionsOfType (int type, bool internal, bool print_fname, bool full_prod)
 soar_ecPrintAllProductionsOfType -- Print all productions of the specified type.

void soar_ecPrintAllProductionsWithInterruptSetting (enum soar_InterruptSetting interrupt_setting)
 soar_ecPrintAllProductionsWithInterruptSetting -- Prints all productions with the specified interrupt setting

int soar_ecAddWmeFilter (const char *szId, const char *szAttr, const char *szValue, bool adds, bool removes)
 soar_ecAddWmeFilter -- Add a wme filter to control which wmes are displayed

int soar_ecRemoveWmeFilter (const char *szId, const char *szAttr, const char *szValue, bool adds, bool removes)
 soar_ecRemoveWmeFilter -- Remove a previously specified wme filter

int soar_ecResetWmeFilters (bool adds, bool removes)
 soar_ecResetWmeFilters -- Remove all wme filters

void soar_ecListWmeFilters (bool adds, bool removes)
 soar_ecListWmeFilters -- Print a list of the wme filters which are currently active

int soar_ecSp (const char *rule, const char *sourceFile)
 soar_ecSp -- Source a production

void soar_ecPrintInternalSymbols (void)
 soar_ecPrintInternalSymbols -- Print Soar's internally allocated symbols

int soar_ecPrintPreferences (char *szId, char *szAttr, bool print_prod, wme_trace_type wtt)
 soar_ecPrintPreferences -- Print the preferences for a particular (id, attribute) pair

void soar_ecPrintProductionsBeingTraced ()
 soar_ecPrintProductionsBeingTraced -- Print a list of all the productions currently being traced (watched)

void soar_ecStopAllProductionTracing ()
 soar_ecStopAllProductionTracing -- Stop tracing all productions.

int soar_ecBeginTracingProductions (int n, const char **names)
 soar_ecBeginTracingProductions -- Begin tracing a set of productions

int soar_ecStopTracingProductions (int n, const char **names)
 soar_ecStopTracingProductions -- Stop tracing a set of productions

void soar_ecPrintMatchSet (wme_trace_type wtt, ms_trace_type mst)
 soar_ecPrintMatchSet -- Print the current match set (the productions which are matched)

int soar_ecPrintMatchInfoForProduction (const char *name, wme_trace_type wtt)
 soar_ecPrintMatchInfoForProduction -- Show detailed information as to why a production does or doesn't match

void soar_ecPrintMemoryPoolStatistics (void)
 soar_ecPrintMemoryPoolStatistics -- Print detailed information about Soar's internal memory usage

void soar_ecPrintAttentionLapseSettings (void)
int soar_ecWatchLevel (int level)
 soar_ecWatchLevel -- Set the watch level (the verbosity of output)


Detailed Description

The low-level interface to Soar.

Copyright 1995-2003 Carnegie Mellon University, University of Michigan, University of Southern California/Information Sciences Institute. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE SOAR CONSORTIUM ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SOAR CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Carnegie Mellon University, the University of Michigan, the University of Southern California/Information Sciences Institute, or the Soar consortium. =======================================================================

Id
soar_ecore_api.c,v 1.14 2003/12/11 16:32:44 toolshed Exp

Definition in file soar_ecore_api.c.


Function Documentation

int soar_ecAddWmeFilter const char *  szId,
const char *  szAttr,
const char *  szValue,
bool  adds,
bool  removes
 

soar_ecAddWmeFilter -- Add a wme filter to control which wmes are displayed

Normally, when wmes are printed during execution (as when watch 5 is set) all changes to working memory are displayed. Adding a wme filter, allows the user to select a subset of these changes for display.

wmes which match the filter are printed.

if the parameters to this function refer to identifiers, the identifier must already be in existence when then filter is added.

Parameters:
szId -> the id of a matching wme, or * for wildcard
szAttr -> the attribute of a matching wme, or *
szValue -> the value of a matching wme, or *
adds -> TRUE iff the filter should be applied to wmes which are being put into wm.
removes -> TRUE iff the filter should be applied to wmes which are being taken out of wm.
Returns:
An integer status
Return values:
0 Success.
-1 Fail, the specified identifier is invalid.
-2 Fail, the specified attribute is invalid.
-3 Fail, the specified valus is invalid.
-4 Fail, the filter already exists.

Definition at line 1185 of file soar_ecore_api.c.

References wme_filter_struct::adds, allocate_memory(), wme_filter_struct::attr, cons, cons_struct::first, wme_filter_struct::id, print(), read_wme_filter_component(), wme_filter_struct::removes, cons_struct::rest, Symbol, wme_filter_struct::value, and wme_filter.

Referenced by soar_Watch().

int soar_ecBeginTracingProductions int  n,
const char **  names
 

soar_ecBeginTracingProductions -- Begin tracing a set of productions

Parameters:
n -> the number of productions to begin tracing
names -> an array (length n ) of production names corrseponding to those which will be traced.
Returns:
An integer status value
Return values:
0 Success
-n The (n-1)th entry of the name array holds an invalid production name. No productions after this index were added to the watch list.

Definition at line 1502 of file soar_ecore_api.c.

References add_pwatch(), name_to_production(), print(), and production.

Referenced by soar_PWatch().

int soar_ecCaptureInput const char *  filename  ) 
 

soar_ecCaptureInput -- Captures the input sent to the agent during by external calls to add-wme and remove-wme.

Parameters:
-> filename the name of the capture file or NIL to stop capturing
Returns:
An integer value with the following semantics:
Return values:
0 Success
-1 Tried to close the capture file, but no file was open
-2 Tried to open the capture file, but a capture file was already open
-3 Could not open the specified file.
Side Effects:
A (potentially) big file will be created containing all the input which was received by the agent during execution.

Definition at line 138 of file soar_ecore_api.c.

Referenced by soar_CaptureInput().

int soar_ecCloseLog  ) 
 

soar_ecCloseLog -- Close the log file.

Returns:
An integer value with the following semantics:
Return values:
0 Success
-1 Fail, attempted to close, but no log file was open
Side Effects:
The log file (if opened) is closed.

Definition at line 114 of file soar_ecore_api.c.

References LOG_CALLBACK, soar_agent, soar_cPopCallback(), soar_exists_callback(), and soar_invoke_first_callback().

Referenced by soar_Log().

void soar_ecExplainChunkCondition char *  chunk_name,
int  cond_number
 

soar_ecExplainChunkCondition -- Explain how a particular condition of a chunk came into being

Parameters:
chunk_name -> the name of the chunk to explain
cond_number -> the number of the condition to examine

Definition at line 405 of file soar_ecore_api.c.

References explain_chunk_struct::backtrace, condition, explain_chunk_str, explain_trace(), find_chunk(), and find_ground().

Referenced by explain_chunk(), and soar_ExplainBacktraces().

void soar_ecExplainChunkConditionList char *  chunk_name  ) 
 

soar_ecExplainChunkConditionList -- Explain how a chunks conditions came into being

Prints the chunk, and then each condition and its associated ground wme. This is a less verbose version of soar_ecExplainChunkTrace

Parameters:
chunk_name -> the name of the chunk to explain
See also:
soar_exExplainChunkTrace

Definition at line 424 of file soar_ecore_api.c.

References explain_chunk_struct::actions, explain_chunk_struct::all_grounds, condition, explain_chunk_struct::conds, explain_chunk_str, find_chunk(), get_printer_output_column(), explain_chunk_struct::name, condition_struct::next, print(), print_action_list(), print_condition(), and print_condition_list().

Referenced by explain_cond_list(), and soar_ExplainBacktraces().

void soar_ecExplainChunkTrace char *  chunk_name  ) 
 

soar_ecExplainChunkTrace -- Explain how a chunk came into being

This function prints information about the productions which fired to yield the specified chunk. It is a more verbose version of soar_ecExplainChunkConditionList

Parameters:
chunk_name -> the name of the chunk to explain

Definition at line 393 of file soar_ecore_api.c.

References explain_chunk_str, explain_trace_chunk(), and find_chunk().

Referenced by explain_trace(), explain_trace_named_chunk(), and soar_ExplainBacktraces().

void soar_ecGDSPrint  ) 
 

soar_ecGDSPrint -- Debug routine for examing the GDS when necessary.

This is horribly inefficient and should not generally be used except when something is going wrong and you want to take a peak at the GDS

Definition at line 346 of file soar_ecore_api.c.

References wme_struct::acceptable, wme_struct::attr, wme_struct::gds, identifier_struct::gds, wme_struct::gds_next, gds_struct::goal, wme_struct::id, symbol_union::id, identifier_struct::lower_goal, print(), print_string(), print_with_symbols(), wme_struct::rete_next, Symbol, wme_struct::timetag, wme_struct::value, wme, and gds_struct::wmes_in_gds.

void soar_ecListWmeFilters bool  adds,
bool  removes
 

soar_ecListWmeFilters -- Print a list of the wme filters which are currently active

param "adds ->" TRUE iff the filters applying to wme additions should be listed param "removes ->" TRUE iff the filters applying to wme removals should be listed

Definition at line 1337 of file soar_ecore_api.c.

References wme_filter_struct::adds, wme_filter_struct::attr, cons, cons_struct::first, wme_filter_struct::id, print(), print_with_symbols(), wme_filter_struct::removes, cons_struct::rest, wme_filter_struct::value, and wme_filter.

Referenced by soar_Watch().

int soar_ecOpenLog const char *  filename,
char *  mode
 

soar_ecOpenLog --

Parameters:
-> mode either "w" to write to a new file or "a" to append to an existing file
-> filename the file's name
Returns:
An integer value with the following semantics:
Return values:
0 Success
-2 Fail, attempted to open, but a lo
Side Effects:
A log file is opened to which output is echoed.

Definition at line 84 of file soar_ecore_api.c.

References cb_soar_PrintToFile(), LOG_CALLBACK, soar_agent, soar_callback_data, soar_callback_fn, soar_callback_free_fn, soar_cPushCallback(), and soar_invoke_first_callback().

Referenced by soar_Log().

int soar_ecPrintAllProductionsOfType int  type,
bool  internal,
bool  print_fname,
bool  full_prod
 

soar_ecPrintAllProductionsOfType -- Print all productions of the specified type.

Parameters:
type -> the type of production
internal -> TRUE iff the internal representation should be used
print_fname -> TRUE iff the file from which the production was loaded should also be printed
full_prod -> TRUE if the full production should be printed FALSE if only the name should be printed
Returns:
An integer representing the status of the operation
Return values:
0 Success
-1 Fail, invalid type

Definition at line 1121 of file soar_ecore_api.c.

References production_struct::filename, production_struct::name, production_struct::next, production_struct::prev, print(), print_production(), print_string(), print_with_symbols(), and production.

Referenced by soar_Print().

void soar_ecPrintAllProductionsWithInterruptSetting enum soar_InterruptSetting  interrupt_setting  ) 
 

soar_ecPrintAllProductionsWithInterruptSetting -- Prints all productions with the specified interrupt setting

Parameters:
-> interrupt_setting INTERRUPT_ON or INTERRUPT_OFF (INTERRUPT_PRINT will never match)

Definition at line 1161 of file soar_ecore_api.c.

References production_struct::interrupt, INTERRUPT_OFF, INTERRUPT_ON, production_struct::name, variable_struct::name, production_struct::next, production_struct::prev, print(), production, and symbol_union::var.

Referenced by soar_Interrupt().

void soar_ecPrintAttentionLapseSettings void   ) 
 

Definition at line 1590 of file soar_ecore_api.c.

References print().

int soar_ecPrintDCHistogram void   ) 
 

soar_ecPrintDCHistogram -- Print the decision cycle time histogram (if one has been kept)

Definition at line 1013 of file soar_ecore_api.c.

References print(), SOAR_OK, and timer_value().

Referenced by soar_Stats().

void soar_ecPrintFiringsForProduction const char *  name  ) 
 

soar_ecPrintFiringsForProduction -- Print the number of times a production has fired.

This prints the number of times that particular production has fired, or "No production named <name>" if the specified production is not defined.

Parameters:
-> name the name of the specified production
Side Effects:

Definition at line 475 of file soar_ecore_api.c.

References production_struct::firing_count, name_to_production(), print(), and production.

Referenced by soar_FiringCounts().

void soar_ecPrintInternalSymbols void   ) 
 

soar_ecPrintInternalSymbols -- Print Soar's internally allocated symbols

Definition at line 1422 of file soar_ecore_api.c.

References do_for_all_items_in_hash_table(), print_string(), and print_sym().

Referenced by print_internal_symbols(), and soar_InternalSymbols().

int soar_ecPrintKTHistogram void   ) 
 

soar_ecPrintKTHistogram -- Print the kernel time histogram (if one has been kept)

Definition at line 1057 of file soar_ecore_api.c.

References print(), SOAR_OK, and timer_value().

Referenced by soar_Stats().

int soar_ecPrintMatchInfoForProduction const char *  name,
wme_trace_type  wtt
 

soar_ecPrintMatchInfoForProduction -- Show detailed information as to why a production does or doesn't match

Parameters:
name -> the name of the production being scrutenized
wtt -> specifies how much information about the wmes which are part of the match should be printed. Must be one of:
  • NONE_WME_TRACE don't print anything
  • TIMETAG_WME_TRACE print only the timetag
  • FULL_WME_TRACE print the entire wme
Returns:
An integer status
Return values:
0 Success
-1 Fail, production not found.

Definition at line 1545 of file soar_ecore_api.c.

References name_to_production(), production_struct::p_node, print_partial_match_information(), production, and wme_trace_type.

Referenced by soar_Matches().

void soar_ecPrintMatchSet wme_trace_type  wtt,
ms_trace_type  mst
 

soar_ecPrintMatchSet -- Print the current match set (the productions which are matched)

Parameters:
wtt -> specifies how much information about the wmes which are part of the match should be printed. Must be one of:
  • NONE_WME_TRACE don't print anything
  • TIMETAG_WME_TRACE print only the timetag
  • FULL_WME_TRACE print the entire wme
mst -> specifies which type of matches should be printed. Must be onw of:
  • MS_ASSERT_RETRACT print all matches
  • MS_ASSERT print only assertions
  • MS_RETRACT print only retractions

Definition at line 1540 of file soar_ecore_api.c.

References ms_trace_type, print_match_set(), and wme_trace_type.

Referenced by soar_Matches().

void soar_ecPrintMemories int  num,
int  to_print[]
 

soar_ecPrintMemories -- Prints information about the memory usage of different production types

Parameters:
num -> the number of productions in each category to print or -1 to print all of them
to_print -> An array of size NUM_PRODUCTIONS_TYPES in which each slot:
  • USER _PRODUCTION_TYPE
  • DEFAULT_PRODUCTION_TYPE
  • CHUNK_PRODUCTION_TYPE
  • JUSTIFICATION_PRODUCTION_TYPE is set to TRUE if it is to be printed and FALSE otherwise.

Definition at line 1082 of file soar_ecore_api.c.

References allocate_memory(), count_rete_tokens_for_production(), free_memory(), production_memory_use_struct::mem, production_memory_use_struct::name, production_struct::name, production_struct::next, production_memory_use_struct::next, print(), print_memories_insert_in_list(), print_with_symbols(), production, and production_memory_use.

Referenced by print_memories(), and soar_Memories().

void soar_ecPrintMemoryPoolStatistics void   ) 
 

soar_ecPrintMemoryPoolStatistics -- Print detailed information about Soar's internal memory usage

Soar uses its own memory allocation scheme to store much of its data. Memory is allocated from one of a number of memory pools, associated with a particular agent. This function shows information about the size and free space of these pools

Definition at line 1560 of file soar_ecore_api.c.

References memory_pool_struct::item_size, memory_pool_struct::items_per_block, memory_pool, memory_pool_struct::name, memory_pool_struct::next, memory_pool_struct::num_blocks, print(), print_spaces(), print_string(), and memory_pool_struct::used_count.

Referenced by parse_memory_stats(), and print_memory_pool_statistics().

void soar_ecPrintMemoryStatistics void   ) 
 

soar_ecPrintMemoryStatistics -- Print information about Soar's internal memory usage

This function gives an overview of Soar's memory usage without examining each pool in any depth.

Definition at line 588 of file soar_ecore_api.c.

References print().

Referenced by parse_memory_stats(), and print_memory_statistics().

int soar_ecPrintPreferences char *  szId,
char *  szAttr,
bool  print_prod,
wme_trace_type  wtt
 

soar_ecPrintPreferences -- Print the preferences for a particular (id, attribute) pair

Definition at line 1436 of file soar_ecore_api.c.

References find_slot(), preference_struct::next, preference, preference_name, slot_struct::preferences, print(), print_preference_and_source(), print_with_symbols(), read_attribute_from_string(), read_id_or_context_var_from_string(), slot, SOAR_ERROR, Symbol, and wme_trace_type.

Referenced by soar_Preferences().

void soar_ecPrintProductionsBeingTraced  ) 
 

soar_ecPrintProductionsBeingTraced -- Print a list of all the productions currently being traced (watched)

Definition at line 1473 of file soar_ecore_api.c.

References cons, cons_struct::first, print_with_symbols(), production, and cons_struct::rest.

Referenced by soar_PWatch().

void soar_ecPrintReteStatistics void   ) 
 

soar_ecPrintReteStatistics -- Print information about the rete

Definition at line 605 of file soar_ecore_api.c.

References print(), print_node_count_statistics(), and print_null_activation_stats().

Referenced by parse_rete_stats(), and print_rete_statistics().

void soar_ecPrintSystemStatistics void   ) 
 

soar_ecPrintSystemStatistics -- Print information about the state of Soar

This function prints a variety of information about Soar's current state. Most importantly, it includes how long Soar has been running (both in seconds, and decision cycles).

Definition at line 617 of file soar_ecore_api.c.

References DECISION_PHASE, DETERMINE_LEVEL_PHASE, INPUT_PHASE, OUTPUT_PHASE, PREFERENCE_PHASE, print(), soar_version_string, start_timer(), stop_timer(), timer_value(), and WM_PHASE.

Referenced by parse_system_stats().

void soar_ecPrintTopProductionFirings int  n  ) 
 

soar_ecPrintTopProductionFirings -- Print the top productions with respect to their frequency of firing.

Prints the top firing produtions and the number of times they have fired. If no productions are defined, then "*** No productions defined ***" is printed.

Parameters:
n -> the number of productions to print

Definition at line 498 of file soar_ecore_api.c.

References allocate_memory(), compare_firing_counts(), free_memory(), print(), print_with_symbols(), and production.

Referenced by soar_FiringCounts().

int soar_ecRemoveWmeFilter const char *  idStr,
const char *  attrStr,
const char *  valueStr,
bool  adds,
bool  removes
 

soar_ecRemoveWmeFilter -- Remove a previously specified wme filter

Parameters:
szId -> the id string specified when the wme was added
szAttr -> the attribute string specified when the wme was added
szValue -> the value string specified when the wme was added
adds -> the same value as specified when the filter was added
removes -> the same value as specified when the filter was added
Returns:
An integer status
Return values:
0 Success.
-1 Fail, the specified identifier is invalid.
-2 Fail, the specified attribute is invalid.
-3 Fail, the specified valus is invalid.
-4 Fail, the filter could not be found.

Definition at line 1251 of file soar_ecore_api.c.

References wme_filter_struct::adds, wme_filter_struct::attr, cons, cons_struct::first, free_memory(), wme_filter_struct::id, read_wme_filter_component(), wme_filter_struct::removes, cons_struct::rest, Symbol, wme_filter_struct::value, and wme_filter.

Referenced by soar_Watch().

int soar_ecReplayInput const char *  filename  ) 
 

soar_ecReplayInput -- Replays the input previously captured using the CaptureInput command.

Parameters:
-> filename the name of the capture file or NIL to stop capturing
Returns:
An integer value with the following semantics:
Return values:
0 Success
-1 Could not open the specified file.
-2 Incorrect file header.
Side Effects:
Adds (or removes) an input function corresponding to the current agent. Constructs an array based on the contents of the input file which is used to supply input to the agent at run-time

Definition at line 175 of file soar_ecore_api.c.

References action, captured_action_struct::action, ADD_WME, allocate_memory(), captured_action_struct::args, sapiwme_st::attr, captured_action, captured_action_struct::dc, sapiwme_st::id, captured_action_struct::next, print(), REMOVE_WME, replay_input_wme(), soar_agent, soar_cAddInputFunction(), soar_cRemoveInputFunction(), soarapi_wme, sapiwme_st::timetag, and sapiwme_st::value.

Referenced by soar_ReplayInput().

int soar_ecResetWmeFilters bool  adds,
bool  removes
 

soar_ecResetWmeFilters -- Remove all wme filters

Returns:
An interger status
Return values:
0 Success
-1 No removes were performed

Definition at line 1307 of file soar_ecore_api.c.

References wme_filter_struct::adds, wme_filter_struct::attr, cons, cons_struct::first, free_memory(), wme_filter_struct::id, print(), print_with_symbols(), wme_filter_struct::removes, cons_struct::rest, wme_filter_struct::value, and wme_filter.

Referenced by soar_Watch().

void soar_ecSetDefaultWmeDepth int  depth  ) 
 

soar_ecSetDefaultWmeDepth -- Set the default wme depth to a new value

The default wme depth indicates how much substructure should be printed when wmes are displayed. The default wme depth can be overridden by using the -depth flag with the print command.

Parameters:
-> depth the new default wme depth.
Side Effects:
The agent's default wme depth is modified.

Definition at line 68 of file soar_ecore_api.c.

Referenced by soar_DefaultWmeDepth().

int soar_ecSp const char *  rule,
const char *  sourceFile
 

soar_ecSp -- Source a production

Parses a production in text representation and loads it into the rete.

Parameters:
rule -> the textual representation of the production
sourceFile -> the file from which the production was loaded or NULL
Returns:
An integer status code
Return values:
0 Success
-1 Fail, production could not be parsed

Definition at line 1352 of file soar_ecore_api.c.

References production_struct::filename, get_lexeme(), make_memory_block_for_string(), production_struct::name, sym_constant_struct::name, parse_production(), print(), production, symbol_union::sc, set_lexer_allow_ids(), soar_agent, soar_alternate_input(), and production_struct::type.

Referenced by soar_Sp().

void soar_ecStopAllProductionTracing  ) 
 

soar_ecStopAllProductionTracing -- Stop tracing all productions.

Definition at line 1482 of file soar_ecore_api.c.

References cons, production, remove_pwatch(), and cons_struct::rest.

Referenced by soar_PWatch().

int soar_ecStopTracingProductions int  n,
const char **  names
 

soar_ecStopTracingProductions -- Stop tracing a set of productions

Parameters:
n -> the number of productions to stop tracing
names -> an array (length n ) of production names corrseponding to those which will no longer be traced .
Returns:
An integer status value
Return values:
0 Success
-n The (n-1)th entry of the name array holds an invalid production name. No productions after this index were added to the watch list.

Definition at line 1521 of file soar_ecore_api.c.

References name_to_production(), print(), production, and remove_pwatch().

Referenced by soar_PWatch().

int soar_ecWatchLevel int  level  ) 
 

soar_ecWatchLevel -- Set the watch level (the verbosity of output)

Parameters:
-> level 0 - 5
Returns:
An integer value with the following semantics:
Return values:
0 Success
-1 Invalid Level

Definition at line 1608 of file soar_ecore_api.c.

References set_sysparam().

Referenced by set_watch_setting(), and soar_Watch().

void soar_exPrintMemoryPoolStatistics void   ) 
 

Definition at line 558 of file soar_ecore_api.c.

References memory_pool_struct::item_size, memory_pool_struct::items_per_block, memory_pool, memory_pool_struct::name, memory_pool_struct::next, memory_pool_struct::num_blocks, print(), print_spaces(), print_string(), and memory_pool_struct::used_count.


Generated on Thu Dec 11 13:00:32 2003 for Soar Kernel by doxygen 1.3.5