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

rhsfun.c

Go to the documentation of this file.
00001 /*************************************************************************
00002  *
00003  *  file:  rhsfun.c
00004  *
00005  * =======================================================================
00006  *                   RHS Function Management for Soar 6
00007  *
00008  * The system maintains a list of available RHS functions.  Functions
00009  * can appear on the RHS of productions either as values (in make actions
00010  * or as arguments to other function calls) or as stand-alone actions
00011  * (e.g., "write" and "halt").  When a function is executed, its C code
00012  * is called with one parameter--a (consed) list of the arguments (symbols).
00013  * The C function should return either a symbol (if all goes well) or NIL
00014  * (if an error occurred, or if the function is a stand-alone action).
00015  *
00016  * All available RHS functions should be setup at system startup time via
00017  * calls to add_rhs_function().  It takes as arguments the name of the
00018  * function (a symbol), a pointer to the corresponding C function, the
00019  * number of arguments the function expects (-1 if the function can take
00020  * any number of arguments), and flags indicating whether the function can
00021  * be a RHS value or a stand-alone action.
00022  *
00023  * Lookup_rhs_function() takes a symbol and returns the corresponding
00024  * rhs_function structure (or NIL if there is no such function).
00025  *
00026  * Init_built_in_rhs_functions() should be called at system startup time
00027  * to setup all the built-in functions.
00028  * =======================================================================
00029  *
00030  * Copyright 1995-2003 Carnegie Mellon University,
00031  *                                                                               University of Michigan,
00032  *                                                                               University of Southern California/Information
00033  *                                                                               Sciences Institute. All rights reserved.
00034  *                                                                              
00035  * Redistribution and use in source and binary forms, with or without
00036  * modification, are permitted provided that the following conditions are met:
00037  *
00038  * 1.   Redistributions of source code must retain the above copyright notice,
00039  *              this list of conditions and the following disclaimer. 
00040  * 2.   Redistributions in binary form must reproduce the above copyright notice,
00041  *              this list of conditions and the following disclaimer in the documentation
00042  *              and/or other materials provided with the distribution. 
00043  *
00044  * THIS SOFTWARE IS PROVIDED BY THE SOAR CONSORTIUM ``AS IS'' AND ANY EXPRESS OR
00045  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00046  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00047  * EVENT SHALL THE SOAR CONSORTIUM  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00048  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00049  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00050  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00051  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00052  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00053  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00054  * The views and conclusions contained in the software and documentation are
00055  * those of the authors and should not be interpreted as representing official
00056  * policies, either expressed or implied, of Carnegie Mellon University, the
00057  * University of Michigan, the University of Southern California/Information
00058  * Sciences Institute, or the Soar consortium.
00059  * =======================================================================
00060  */
00061 
00062 #include "soarkernel.h"
00063                                 /* #include <soar.h>    *//* kjh(CUSP-B10 (for Soar_Read) */
00064 #include <time.h>
00065 #include "rhsfun_math.h"
00066 #include "rhsfun.h"
00067 
00068 rhs_function *available_rhs_functions = NIL;
00069 
00070 void add_rhs_function(Symbol * name,
00071                       rhs_function_routine f,
00072                       int num_args_expected, bool can_be_rhs_value, bool can_be_stand_alone_action)
00073 {
00074     rhs_function *rf;
00075 
00076     if ((!can_be_rhs_value) && (!can_be_stand_alone_action)) {
00077         print("Internal error: attempt to add_rhs_function that can't appear anywhere\n");
00078         return;
00079     }
00080     for (rf = available_rhs_functions; rf != NIL; rf = rf->next)
00081         if (rf->name == name)
00082             break;
00083     if (rf) {
00084         print_with_symbols("Internal error: attempt to add_rhs_function that already exists: %y\n", name);
00085         return;
00086     }
00087     rf = allocate_memory(sizeof(rhs_function), MISCELLANEOUS_MEM_USAGE);
00088     rf->next = available_rhs_functions;
00089     available_rhs_functions = rf;
00090     rf->name = name;
00091     rf->f = f;
00092     rf->num_args_expected = num_args_expected;
00093     rf->can_be_rhs_value = can_be_rhs_value;
00094     rf->can_be_stand_alone_action = can_be_stand_alone_action;
00095 }
00096 
00097 rhs_function *lookup_rhs_function(Symbol * name)
00098 {
00099     rhs_function *rf;
00100 
00101     for (rf = available_rhs_functions; rf != NIL; rf = rf->next)
00102         if (rf->name == name)
00103             return rf;
00104     return NIL;
00105 }
00106 
00107 void remove_rhs_function(Symbol * name)
00108 {                               /* code from Koss 8/00 */
00109 
00110     rhs_function *rf = NIL, *prev;
00111 
00112     /* Find registered function by name */
00113     for (prev = NIL, rf = available_rhs_functions; rf != NIL; prev = rf, rf = rf->next)
00114         if (rf->name == name)
00115             break;
00116 
00117     /* If not found, there's a problem */
00118     if (rf == NIL) {
00119         fprintf(stderr, "Internal error: attempt to remove_rhs_function that does not exist.\n");
00120         print_with_symbols("Internal error: attempt to remove_rhs_function that does not exist: %y\n", name);
00121     }
00122 
00123     /* Else, remove it */
00124     else {
00125 
00126         /* Head of list special */
00127         if (prev == NIL)
00128             available_rhs_functions = rf->next;
00129         else
00130             prev->next = rf->next;
00131 
00132         free_memory(rf, MISCELLANEOUS_MEM_USAGE);
00133     }
00134 }
00135 
00136 /* ====================================================================
00137 
00138                Code for Executing Built-In RHS Functions
00139 
00140 ====================================================================  */
00141 
00142 /* MVP 6-8-94 */
00143 /* --------------------------------------------------------------------
00144                                User-Select
00145 -------------------------------------------------------------------- */
00146 Symbol *user_select_rhsfun(list * args)
00147 {
00148     Symbol *uselect;
00149 
00150     uselect = args->first;
00151 
00152     if (!strcmp(uselect->sc.name, "first")) {
00153         set_sysparam(USER_SELECT_MODE_SYSPARAM, USER_SELECT_FIRST);
00154         return NIL;
00155     }
00156 /* AGR 615 begin */
00157     if (!strcmp(uselect->sc.name, "last")) {
00158         set_sysparam(USER_SELECT_MODE_SYSPARAM, USER_SELECT_LAST);
00159         return NIL;
00160     }
00161 /* AGR 615 end */
00162     if ((!strcmp(uselect->sc.name, "ask")) || (!strcmp(uselect->sc.name, "t"))) {
00163         set_sysparam(USER_SELECT_MODE_SYSPARAM, USER_SELECT_ASK);
00164         return NIL;
00165     }
00166     if ((!strcmp(uselect->sc.name, "random")) || (!strcmp(uselect->sc.name, "nil"))) {
00167         set_sysparam(USER_SELECT_MODE_SYSPARAM, USER_SELECT_RANDOM);
00168         return NIL;
00169     }
00170     print("Expected first, ask, or random for new value of user-select.\n");
00171 
00172     return NIL;
00173 }
00174 
00175 /* --------------------------------------------------------------------
00176                                 Write
00177 
00178    Takes any number of arguments, and prints each one.
00179 -------------------------------------------------------------------- */
00180 
00181 Symbol *write_rhs_function_code(list * args)
00182 {
00183     Symbol *arg;
00184     char *string;
00185 
00186     for (; args != NIL; args = args->rest) {
00187         arg = args->first;
00188         /* --- Note use of FALSE here--print the symbol itself, not a rereadable
00189            version of it --- */
00190         string = symbol_to_string(arg, FALSE, NIL, 0);
00191         print_string(string);
00192     }
00193     return NIL;
00194 }
00195 
00196 /* --------------------------------------------------------------------
00197                                 Crlf
00198 
00199    Just returns a sym_constant whose print name is a line feed.
00200 -------------------------------------------------------------------- */
00201 
00202 Symbol *crlf_rhs_function_code(list * args)
00203 {
00204     args = args;                /* shuts up compiler */
00205     return make_sym_constant("\n");
00206 }
00207 
00208 /* --------------------------------------------------------------------
00209                                 Halt
00210 
00211    Just sets a flag indicating that the system has halted.
00212 -------------------------------------------------------------------- */
00213 
00214 Symbol *halt_rhs_function_code(list * args)
00215 {
00216     args = args;                /* shuts up compiler */
00217     current_agent(system_halted) = TRUE;
00218     return NIL;
00219 }
00220 
00221 /* --------------------------------------------------------------------
00222                               Interrupt
00223 
00224    This causes an interrupt at the end of the current preference phase.
00225    It sets stop_soar to TRUE, and reason_for_stopping to an appropriate
00226    string.
00227 -------------------------------------------------------------------- */
00228 
00229 /* MVP 6-27-94 */
00230 
00231 char *RHS_interrupt_msg = "*** RHS Function Interrupt ***";
00232 
00233 Symbol *interrupt_rhs_function_code(list * args)
00234 {
00235     char *ch;
00236 
00237     cons *c;
00238     agent *the_agent;
00239 
00240     args = args;                /* shuts up compiler */
00241 
00242     for (c = all_soar_agents; c != NIL; c = c->rest) {
00243         the_agent = ((agent *) c->first);
00244         the_agent->stop_soar = TRUE;
00245         the_agent->reason_for_stopping = RHS_interrupt_msg;
00246     }
00247 
00248     strncpy(current_agent(interrupt_source), "*** Interrupt from production ", INTERRUPT_SOURCE_SIZE);
00249     current_agent(interrupt_source)[INTERRUPT_SOURCE_SIZE - 1] = 0;
00250     ch = current_agent(interrupt_source);
00251     while (*ch)
00252         ch++;
00253     symbol_to_string(current_agent(production_being_fired)->name, TRUE, ch,
00254                      INTERRUPT_SOURCE_SIZE - (ch - current_agent(interrupt_source)));
00255     while (*ch)
00256         ch++;
00257     strncpy(ch, " ***", INTERRUPT_SOURCE_SIZE - (ch - current_agent(interrupt_source)));
00258     ch[INTERRUPT_SOURCE_SIZE - (ch - current_agent(interrupt_source)) - 1] = 0;
00259     current_agent(reason_for_stopping) = current_agent(interrupt_source);
00260     return NIL;
00261 }
00262 
00263 /* --------------------------------------------------------------------
00264                          Make-constant-symbol
00265 
00266    Returns a newly generated sym_constant.  If no arguments are given,
00267    the constant will start with "constant".  If one or more arguments
00268    are given, the constant will start with a string equal to the
00269    concatenation of those arguments.
00270 -------------------------------------------------------------------- */
00271 
00272 #define MAKE_CONSTANT_SYMBOL_BUF_SIZE 1024
00273 Symbol *make_constant_symbol_rhs_function_code(list * args)
00274 {
00275     char buf[MAKE_CONSTANT_SYMBOL_BUF_SIZE];    /* that ought to be long enough */
00276     char *string;
00277     cons *c;
00278 
00279     if (!args) {
00280         strncpy(buf, "constant", MAKE_CONSTANT_SYMBOL_BUF_SIZE);
00281         buf[MAKE_CONSTANT_SYMBOL_BUF_SIZE - 1] = 0;
00282     } else {
00283         buf[0] = 0;
00284         for (c = args; c != NIL; c = c->rest) {
00285             string = symbol_to_string(c->first, FALSE, NIL, 0);
00286             strncat(buf, string, MAKE_CONSTANT_SYMBOL_BUF_SIZE);
00287             buf[MAKE_CONSTANT_SYMBOL_BUF_SIZE - 1] = 0;
00288         }
00289     }
00290     if ((!args) && (!find_sym_constant(buf)))
00291         return make_sym_constant(buf);
00292     return generate_new_sym_constant(buf, &current_agent(mcs_counter));
00293 }
00294 
00295 /* --------------------------------------------------------------------
00296                                Timestamp
00297 
00298    Returns a newly generated sym_constant whose name is a representation
00299    of the current local time.
00300 -------------------------------------------------------------------- */
00301 
00302 #define TIMESTAMP_RHS_FUNCTION_CODE_BUF_SIZE 100
00303 Symbol *timestamp_rhs_function_code(list * args)
00304 {
00305     long now;
00306     struct tm *temp;
00307     char buf[TIMESTAMP_RHS_FUNCTION_CODE_BUF_SIZE];
00308 
00309     args = args;                /* shuts up compiler */
00310 
00311     now = time(NULL);
00312 #ifdef THINK_C
00313     temp = localtime((const time_t *) &now);
00314 #else
00315 #ifdef __SC__
00316     temp = localtime((const time_t *) &now);
00317 #else
00318 #ifdef __ultrix
00319     temp = localtime((const time_t *) &now);
00320 #else
00321 #ifdef MACINTOSH
00322     temp = localtime((const time_t *) &now);
00323 #else
00324     temp = localtime(&now);
00325 #endif
00326 #endif
00327 #endif
00328 #endif
00329     snprintf(buf, TIMESTAMP_RHS_FUNCTION_CODE_BUF_SIZE, "%d/%d/%d-%02d:%02d:%02d",
00330              temp->tm_mon + 1, temp->tm_mday, temp->tm_year, temp->tm_hour, temp->tm_min, temp->tm_sec);
00331     buf[TIMESTAMP_RHS_FUNCTION_CODE_BUF_SIZE - 1] = 0;  /* snprintf doesn't set last char to null if output is truncated */
00332     return make_sym_constant(buf);
00333 }
00334 
00335 /* --------------------------------------------------------------------
00336                               Accept
00337 
00338    Waits for the user to type a line of input; then returns the first
00339    symbol from that line.
00340 -------------------------------------------------------------------- */
00341 
00342 Symbol *accept_rhs_function_code(list * args)
00343 {
00344     char buf[2000], *s;
00345     Symbol *sym;
00346 
00347     args = args;                /* shuts up compiler */
00348 
00349     for (;;) {
00350         s = fgets(buf, 2000, stdin);
00351         /*    s = Soar_Read(soar_agent, buf, 2000); *//* kjh(CUSP-B10) */
00352         if (!s) {
00353             /* s==NIL means immediate eof encountered or read error occurred */
00354             return NIL;
00355         }
00356         s = buf;
00357         sym = get_next_io_symbol_from_text_input_line(&s);
00358         if (sym)
00359             break;
00360     }
00361     symbol_add_ref(sym);
00362     release_io_symbol(sym);     /* because it was obtained using get_io_... */
00363     return sym;
00364 }
00365 
00366 /* ---------------------------------------------------------------------
00367   Capitalize a Symbol
00368 ------------------------------------------------------------------------ */
00369 
00370 #include <ctype.h>
00371 
00372 Symbol *capitalize_symbol_rhs_function_code(list * args)
00373 {
00374     char *symbol_to_capitalize;
00375     Symbol *sym;
00376 
00377     if (!args) {
00378         print("Error: 'capitalize-symbol' function called with no arguments.\n");
00379         return NIL;
00380     }
00381 
00382     sym = (Symbol *) args->first;
00383     if (sym->common.symbol_type != SYM_CONSTANT_SYMBOL_TYPE) {
00384         print_with_symbols("Error: non-symbol (%y) passed to capitalize-symbol function.\n", sym);
00385         return NIL;
00386     }
00387 
00388     if (args->rest) {
00389         print("Error: 'capitalize-symbol' takes exactly 1 argument.\n");
00390         return NIL;
00391     }
00392 
00393     symbol_to_capitalize = symbol_to_string(sym, FALSE, NIL, 0);
00394     symbol_to_capitalize = savestring(symbol_to_capitalize);
00395     *symbol_to_capitalize = (char) toupper(*symbol_to_capitalize);
00396     return make_sym_constant(symbol_to_capitalize);
00397 }
00398 
00399 /* AGR 520 begin     6-May-94 */
00400 /* ------------------------------------------------------------
00401    2 general purpose rhs functions by Gary.
00402 ------------------------------------------------------------
00403 
00404 They are invoked in the following manner, and I use them
00405 to produce nice traces.
00406 
00407    (ifeq <a> <b> abc def)
00408 and 
00409    (strlen <a>)
00410 
00411 ifeq -- checks if the first argument is "eq" to the second argument
00412         if it is then it returns the third argument else the fourth.
00413         It is useful in similar situations to the "?" notation in C.
00414         Contrary to earlier belief, all 4 arguments are required.
00415 
00416         examples:
00417            (sp trace-juggling
00418             (goal <g> ^state.ball.position <pos>)
00419            -->
00420             (write (ifeq <pos> at-top        |    o    | ||) (crlf)
00421                    (ifeq <pos> left-middle   | o       | ||)
00422                    (ifeq <pos> right-middle  |       o | ||) (crlf)
00423                    (ifeq <pos> left-hand     |o        | ||)
00424                    (ifeq <pos> right-hand    |        o| ||) (crlf)
00425                                              |V_______V|    (crlf))
00426             )
00427 
00428             This outputs with a single production one of the following
00429             pictures depending on the ball's position (providing the ball
00430             is not dropped of course. Then it outputs empty hands. :-)
00431 
00432                                          o
00433                          o                              o
00434            o                                                           o
00435            V-------V    V-------V    V-------V    V-------V    V-------V
00436                      or           or           or           or
00437 
00438            for a ball that takes this path.
00439 
00440                o
00441             o     o
00442            o       o
00443            V-------V
00444 
00445            Basically this is useful when you don't want the trace to
00446            match the internal working memory structure.
00447 
00448 strlen <val> - returns the string length of the output string so that
00449                one can get the output to line up nicely. This is useful
00450                along with ifeq when the output string varies in length.
00451 
00452            example:
00453 
00454               (strlen |abc|) returns 3
00455 
00456               (write (ifeq (strlen <foo>) 3 | | ||)
00457                      (ifeq (strlen <foo>) 2 |  | ||)
00458                      (ifeq (strlen <foo>) 1 |   | ||) <foo>)
00459 
00460                   writes foo padding on the left with enough blanks so that
00461                   the length of the output is always at least 4 characters.
00462 
00463 ------------------------------------------------------------ */
00464 
00465 Symbol *ifeq_rhs_function_code(list * args)
00466 {
00467     Symbol *arg1, *arg2;
00468     cons *c;
00469 
00470     if (!args) {
00471         print("Error: 'ifeq' function called with no arguments\n");
00472         return NIL;
00473     }
00474 
00475     /* --- two or more arguments --- */
00476     arg1 = args->first;
00477     c = args->rest;
00478     arg2 = c->first;
00479     c = c->rest;
00480 
00481     if (arg1 == arg2) {
00482         symbol_add_ref((Symbol *) (c->first));
00483         return c->first;
00484     } else if (c->rest) {
00485         symbol_add_ref((Symbol *) (c->rest->first));
00486         return c->rest->first;
00487     } else
00488         return NIL;
00489 }
00490 
00491 Symbol *strlen_rhs_function_code(list * args)
00492 {
00493     Symbol *arg;
00494     char *string;
00495 
00496     arg = args->first;
00497 
00498     /* --- Note use of FALSE here--print the symbol itself, not a rereadable
00499        version of it --- */
00500     string = symbol_to_string(arg, FALSE, NIL, 0);
00501 
00502     return make_int_constant(strlen(string));
00503 }
00504 
00505 /* AGR 520     end */
00506 
00507 /* --------------------------------------------------------------------
00508                               dont_learn
00509 
00510 Hack for learning.  Allow user to denote states in which learning
00511 shouldn't occur when "learning" is set to "except".
00512 -------------------------------------------------------------------- */
00513 
00514 Symbol *dont_learn_rhs_function_code(list * args)
00515 {
00516     Symbol *state;
00517 
00518     if (!args) {
00519         print("Error: 'dont-learn' function called with no arg.\n");
00520         return NIL;
00521     }
00522 
00523     state = (Symbol *) args->first;
00524     if (state->common.symbol_type != IDENTIFIER_SYMBOL_TYPE) {
00525         print_with_symbols("Error: non-identifier (%y) passed to dont-learn function.\n", state);
00526         return NIL;
00527     } else if (!state->id.isa_goal) {
00528         print_with_symbols("Error: identifier passed to dont-learn is not a state: %y.\n", state);
00529     }
00530 
00531     if (args->rest) {
00532         print("Error: 'dont-learn' takes exactly 1 argument.\n");
00533         return NIL;
00534     }
00535 
00536     if (!member_of_list(state, current_agent(chunk_free_problem_spaces))) {
00537         push(state, current_agent(chunk_free_problem_spaces));
00538         /* print_with_symbols("State  %y  added to chunk_free_list.\n",state); */
00539     }
00540     return NIL;
00541 
00542 }
00543 
00544 /* --------------------------------------------------------------------
00545                               force_learn
00546 
00547 Hack for learning.  Allow user to denote states in which learning
00548 should occur when "learning" is set to "only".
00549 -------------------------------------------------------------------- */
00550 
00551 Symbol *force_learn_rhs_function_code(list * args)
00552 {
00553     Symbol *state;
00554 
00555     if (!args) {
00556         print("Error: 'force-learn' function called with no arg.\n");
00557         return NIL;
00558     }
00559 
00560     state = (Symbol *) args->first;
00561     if (state->common.symbol_type != IDENTIFIER_SYMBOL_TYPE) {
00562         print_with_symbols("Error: non-identifier (%y) passed to force-learn function.\n", state);
00563         return NIL;
00564     } else if (!state->id.isa_goal) {
00565         print_with_symbols("Error: identifier passed to force-learn is not a state: %y.\n", state);
00566     }
00567 
00568     if (args->rest) {
00569         print("Error: 'force-learn' takes exactly 1 argument.\n");
00570         return NIL;
00571     }
00572 
00573     if (!member_of_list(state, current_agent(chunky_problem_spaces))) {
00574         push(state, current_agent(chunky_problem_spaces));
00575         /* print_with_symbols("State  %y  added to chunky_list.\n",state); */
00576     }
00577     return NIL;
00578 
00579 }
00580 
00581 /* ====================================================================
00582 
00583                   Initialize the Built-In RHS Functions
00584 
00585 ====================================================================  */
00586 
00587 void init_built_in_rhs_functions(void)
00588 {
00589     add_rhs_function(make_sym_constant("write"), write_rhs_function_code, -1, FALSE, TRUE);
00590     add_rhs_function(make_sym_constant("crlf"), crlf_rhs_function_code, 0, TRUE, FALSE);
00591     add_rhs_function(make_sym_constant("halt"), halt_rhs_function_code, 0, FALSE, TRUE);
00592     add_rhs_function(make_sym_constant("interrupt"), interrupt_rhs_function_code, 0, FALSE, TRUE);
00593     add_rhs_function(make_sym_constant("make-constant-symbol"),
00594                      make_constant_symbol_rhs_function_code, -1, TRUE, FALSE);
00595     add_rhs_function(make_sym_constant("timestamp"), timestamp_rhs_function_code, 0, TRUE, FALSE);
00596     add_rhs_function(make_sym_constant("accept"), accept_rhs_function_code, 0, TRUE, FALSE);
00597     add_rhs_function(make_sym_constant("capitalize-symbol"), capitalize_symbol_rhs_function_code, 1, TRUE, FALSE);
00598 /* AGR 520  begin */
00599     add_rhs_function(make_sym_constant("ifeq"), ifeq_rhs_function_code, 4, TRUE, FALSE);
00600     add_rhs_function(make_sym_constant("strlen"), strlen_rhs_function_code, 1, TRUE, FALSE);
00601 /* AGR 520  end   */
00602 
00603     add_rhs_function(make_sym_constant("dont-learn"), dont_learn_rhs_function_code, 1, FALSE, TRUE);
00604     add_rhs_function(make_sym_constant("force-learn"), force_learn_rhs_function_code, 1, FALSE, TRUE);
00605 
00606     init_built_in_rhs_math_functions();
00607 }
00608 
00609 void remove_built_in_rhs_functions(void)
00610 {
00611 
00612     remove_rhs_function(make_sym_constant("write"));
00613     remove_rhs_function(make_sym_constant("crlf"));
00614     remove_rhs_function(make_sym_constant("halt"));
00615     remove_rhs_function(make_sym_constant("interrupt"));
00616     remove_rhs_function(make_sym_constant("make-constant-symbol"));
00617     remove_rhs_function(make_sym_constant("timestamp"));
00618     remove_rhs_function(make_sym_constant("accept"));
00619     remove_rhs_function(make_sym_constant("capitalize-symbol"));
00620     remove_rhs_function(make_sym_constant("ifeq"));
00621     remove_rhs_function(make_sym_constant("strlen"));
00622     remove_rhs_function(make_sym_constant("dont-learn"));
00623     remove_rhs_function(make_sym_constant("force-learn"));
00624 
00625     remove_built_in_rhs_math_functions();
00626 }

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