Unoffical Production System
Feb 2011 version 0.4 (UPS-0.3) Aug 2008 UPS (uPS-99) Unoffical Production System 1999 Glenn Takanishi uPS's original code is from Dirk Kalp's CParaOPS5 released 1990 into the public domain. LHS ==> RHS if (condition), then (action) The production system loop follows the Match->Resolve->Action, MRA, cycle or path. The principle software components supporting the MRA cycle are embedded in the match.c, resolve.c and action.c modules. ----- A wme is printed out in the standard attribute and value format (e.g., ^color red). The print format can be switched back to vector by using the -z0 switch on the cmd line or using the top level command, wmefmt, when using the command interpreter. Commands and switches can be determined by using the help command. The significant ones are: Litbind Classbind The switch "-y" allows the user to specify how large a symbol table to allocate. This increases the flexibility of the system and allows the user to optimize the memory usage without having to meddle around in the source code. The size of symbol table is specified in terms of the maximum number of symbols. The switch "--" causes the rest of the commandline arguments to be passed to the routine in ops_user_init(). This routine and the correspoding routine it ops_user_exit() are supplied to facilitate the embedding of the OPS5 system in other programs. These routines are defined as bf no-op routines in user.c and are to be filled by the user to perform application-specific initialization and clean-up respectively. The compiler supports an additional switch ``-n''. This switch allows the user to partition the output file into multiple files which can then be compiled and linked together. This is especially useful for ops5 since many C compilers choke on large arrays that are generated for RHS actions. ops5 -n150 weaver.l will partition the file weaver.l into smaller files containing no more than 150 productions per file and then compile them into seperate C files (weaver.c, weaver1.c, weaver2.c etc.). See the file "rubik.cmd.MACH" in the "lib" subdirectory (or "rubik.cmd" in "programs" after you've configured the system) for details and an example. 8-2-08 cd ./ops5/demo cmd ttt ttt (play tic-tac-toe)