[BACK]Return to usage.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/usage.c, Revision 1.1

1.1     ! maekawa     1: #include <stdio.h>
        !             2: #include "datatype.h"
        !             3: #include "stackm.h"
        !             4: #include "extern.h"
        !             5:
        !             6: /* A list of undocumented commands for debugging.
        !             7:
        !             8:   (red@) (debug) switch_function
        !             9: */
        !            10:
        !            11: void Kusage(ob)
        !            12: struct object ob;
        !            13: {
        !            14:   char *s;
        !            15:   printf("\n");
        !            16:   if (ob.tag != Sdollar) {
        !            17:     printf("Type in ? in order to see system dictionary.\n");
        !            18:     printf("$keyword$ usage  ; \n");
        !            19:   }else {
        !            20:     s = ob.lc.str;
        !            21:     Kusage2(stdout,s);
        !            22:   }
        !            23:
        !            24: }
        !            25:
        !            26: #define fppp fprintf
        !            27:
        !            28: void Kusage2(fp,s)
        !            29: FILE *fp;
        !            30: char *s;
        !            31: {
        !            32:   /*int n,i; fprintf(stderr,"\n%d: ",strlen(s));
        !            33:   for (i=0; i<strlen(s); i++) fprintf(stderr," %x",s[i]);*/
        !            34:   if (strcmp(s,"add")==0) {
        !            35:     fppp(fp,"<< obj1 obj2 add obj3 >>\n");
        !            36:     fppp(fp,"obj3 is the sum of obj1 and obj2.\n");
        !            37:     fppp(fp,"If obj1=f1/f2, obj2=g1/g2, then obj3 is given by (g2 f1 + f2 g1)/(f2 g2)\n");
        !            38:     fppp(fp,"Example:  2 3 add ::  ==> 5\n");
        !            39:   } else if (strcmp(s,"[")==0 || strcmp(s,"]")==0) {
        !            40:     fppp(fp,"[ and ] are used to construct an array.\n");
        !            41:     fppp(fp,"The left bracket [ is an operator that leaves an object called\n");
        !            42:     fppp(fp,"a mark on the stack. The interpreter puts more objects\n");
        !            43:     fppp(fp,"until it encounters a right bracket, which creates\n");
        !            44:     fppp(fp,"an array. So, it is possible to construct an array, for example, in the way\n");
        !            45:     fppp(fp," [  1  2  [ 2 1 roll 3] ] print ==> [1 [2 3]]\n");
        !            46:   } else if (strcmp(s,"aload")==0) {
        !            47:     fppp(fp,"<< [f1 f2 ... fn] aload f1 f2 ... fn [f1 ... fn] >>\n");
        !            48:     fppp(fp,"The primitive aload decomposes an array into the set of the elements.\n");
        !            49:     fppp(fp,"Example: [(x1+1) (23)] aload length ===> (x1+1) (23) 2\n");
        !            50:   }else if (strcmp(s,"lt")==0 || strcmp(s,"gt")==0 || strcmp(s,"eq")==0) {
        !            51:     fppp(fp,"<< o1 o2 lt r1  >> or  <<  o1 o2 gt r1 >> or <<  o1 o2 gt r1 >>\n");
        !            52:     fppp(fp,"integer r1;\n");
        !            53:     fppp(fp,"These premitives compare objects o1 and o2.\n");
        !            54:     fppp(fp,"[lt (less than), gt (greater than), eq (equal)]\n");
        !            55:     fppp(fp,"The result is r1 which is integer object.\n");
        !            56:     fppp(fp,"Here, 1 means true and 0 means false.\n");
        !            57:     fppp(fp,"Example:  (abc) (bca) eq ::  ===> 0\n");
        !            58:   }else if (strcmp(s,"bye")==0 || strcmp(s,"QUIT")==0 || strcmp(s,"quit")==0) {
        !            59:     fppp(fp,"The bye or QUIT or quit statement terminates the kan/sm1.\n");
        !            60:   }else if (strcmp(s,"cat_n")==0) {
        !            61:     fppp(fp,"<< s1 s2 ... sn n cat_n s1s2...sn >>\n");
        !            62:     fppp(fp,"string s1, s2, ..., sn ; integer n ; string s1s2...sn\n");
        !            63:     fppp(fp,"The primitive cat_n concatnates the strings(dollars) s1 ... sn.\n");
        !            64:     fppp(fp,"Example: (ab c) (2) 2 cat_n ===> (ab c2)\n"); /*\hrule*/
        !            65:   }else if (strcmp(s,"cclass") == 0) {
        !            66:     fppp(fp,"<< [super-class-tag, o1, o2, ...] size [class-tag] cclass [class-tag, o1, o2, .... ] >>\n");
        !            67:   }else if (strcmp(s,"closefile")==0) {
        !            68:     fppp(fp,"<< fd closefile >>\n");
        !            69:     fppp(fp,"file fd;\n");
        !            70:   }else if (strcmp(s,"coefficients")==0 || strcmp(s,"coeff")==0) {
        !            71:     fppp(fp,"<< f v coeff [exponents coefficients] >>\n");
        !            72:     fppp(fp,"poly f,v; list of integers exponents; list of poly coefficients;\n");
        !            73:     fppp(fp,"The primitive coeff returns the array of exponents and\n");
        !            74:     fppp(fp,"the array of coefficients of the polynomial f with respect to\n");
        !            75:     fppp(fp,"the variable v.\n");
        !            76:     fppp(fp,"The primitive coefficients have not yet removed for a compatibility with the old macro packages.\n");
        !            77:     fppp(fp,"Note that the data type of each element of exponents is <Poly>(9) and it may cause a trouble when p>0.\n");
        !            78:     fppp(fp,"cf. dc,  (interger) dc\n");
        !            79:     fppp(fp,"C-functions: Kparts2, parts2\n");
        !            80:     fppp(fp,"Example: [(x,y) ring_of_polynomials [[(x) 1 (y) 1]] weight_vector\n");
        !            81:     fppp(fp,"           0] define_ring\n");
        !            82:     fppp(fp,"         (x^2+ x y + x). (x). coeff print ;\n");
        !            83:     fppp(fp,"  ===>  [ [ 2 , 1 ] , [1 , y+1] ]\n");
        !            84:   }else if (strcmp(s,"copy")==0) {
        !            85:     fppp(fp,"<< f1 f2 ... fn n copy f1 f2 ... fn f1 f2 ... fn >>\n");
        !            86:     fppp(fp,"The primitive copy_n duplicates the objects f1 f2 ... fn.\n");
        !            87:     fppp(fp,"integer n;\n");
        !            88:     fppp(fp,"Example: (x1+1) 1 copy ===> (x1+1) (x1+1)\n");
        !            89:     fppp(fp,"<<copy>> copies the values of the objects.  cf. dup\n");
        !            90:   }else if (strcmp(s,"data_conversion")==0) {
        !            91:     fppp(fp,"<< obj (type?) data_conversion type >>\n");
        !            92:     fppp(fp,"<< obj (type??) data_conversion type >>\n");
        !            93:     fppp(fp,"<< obj (key word) data_conversion obj >>\n");
        !            94:     fppp(fp,"integer type; object obj;\n");
        !            95:     fppp(fp,"Key words: null, integer, literal, dollar, string, poly, universalNumber,\n");
        !            96:     fppp(fp,"           ring, numerator, denominator, double, cancel,\n");
        !            97:     fppp(fp,"           map, orderMatrix, error, \n");
        !            98:     fppp(fp," or [(class) (class-name)].\n");
        !            99:     fppp(fp,"The primitive reports and converts the data type of obj.\n");
        !           100:     fppp(fp,"Example: (2) (integer) data_conversion ===> 2\n");
        !           101:   }else if (strcmp(s,"def")==0 || strcmp(s,"set")==0) {
        !           102:     fppp(fp,"<< /name object def >>  or  << object /name set >>\n");
        !           103:     fppp(fp,"The primitive def or set binds the object to the name\n");
        !           104:     fppp(fp,"Example: /abc (23) def    abc :: ---> (23)\n");
        !           105:     fppp(fp,"Example: (23) /abc set    abc :: ---> (23)\n");
        !           106:   }else if (strcmp(s,"degree")==0) {
        !           107:     fppp(fp,"<< f  v  degree  deg >>\n");
        !           108:     fppp(fp,"poly f,v; integer deg;\n");
        !           109:     fppp(fp,"deg is the degree of the polynomial f with respect to the variable v.\n");
        !           110:     fppp(fp,"Example: (x^3 + x h + 1).  (x).  degree :: ---> 3\n");
        !           111:   }else if (strcmp(s,"div") == 0) {
        !           112:     fppp(fp,"<< obj1  obj2 div obj3 >>\n");
        !           113:     fppp(fp,"obj3 is obj1/obj2\n");
        !           114:     fppp(fp,"cf. data_conversion (numerator, denominator, cancel)\n");
        !           115:   }else if (strcmp(s,"dup") == 0) {
        !           116:     fppp(fp,"<< obj dup obj obj >>\n");
        !           117:     fppp(fp,"cf. 1 copy. Dup copies the object by the pointer.\n");
        !           118:   }else if (strcmp(s,"elimination_order")==0) {
        !           119:     fppp(fp,"<< (v1,...,vm) elimination_order >>\n");
        !           120:     fppp(fp,"The primitive returns the weight matrix where the variables\n");
        !           121:     fppp(fp,"v1, ..., vm are most expensive terms.\n");
        !           122:     fppp(fp,"cf. define_ring, define_qring.\n");
        !           123:   }else if (strcmp(s,"error")==0) {
        !           124:     fppp(fp,"<<error>> causes kan/sm1 error.\n");
        !           125:     fppp(fp,"<< s error >>   string s;\n");
        !           126:     fppp(fp,"s is printed as the error message.\n");
        !           127:   }else if (strcmp(s,"eval")==0) {
        !           128:     fppp(fp,"<< [$key$ arguments] eval >>\n");
        !           129:     fppp(fp,"key :   \n");
        !           130:   }else if (strcmp(s,"exec")==0) {
        !           131:     fppp(fp,"<< { executable array } exec >>\n");
        !           132:     fppp(fp,"The primitive exec executes each primitive in the executable\n");
        !           133:     fppp(fp,"array sequentially.\n");
        !           134:     fppp(fp,"Example: {1 2 add print pop} exec ;\n");
        !           135:     fppp(fp,"    ===> 3\n");
        !           136:   }else if (strcmp(s,"extension")==0) {
        !           137:     fppp(fp,"<< obj1 extension obj2 >>\n");
        !           138:     fppp(fp,"array of object obj1; object obj2; \n");
        !           139:     fppp(fp,"The first element of the obj1 should be the key word tag.\n");
        !           140:     fppp(fp,"<< extension >> is used to install a new function to a system. cf.ext.c and plugin/\n");
        !           141:     fppp(fp,"  [(parse) string] extension result-integer \n");
        !           142:     fppp(fp,"  [(chattr) num literal] extension result-object \n");
        !           143:     fppp(fp,"  [(chattrs) num ] extension result-object \n");
        !           144:     fppp(fp,"  [(defaultPolyRing) num ] extension result-object \n");
        !           145:     fppp(fp,"  [(flush) ] extension null \n");
        !           146:     fppp(fp,"  [(getpid) ] extension result-integer \n");
        !           147:     fppp(fp,"  [(getenv) envName] extension valueOfEnvName \n");
        !           148:     fppp(fp,"  [(stat) fname] extension v \n");
        !           149:     fppp(fp,"       v = [null,[(error no), p] or [0, [ ]]\n");
        !           150:     fppp(fp,"  [(forkExec) argList fdList sigblock] extension pid\n");
        !           151:     fppp(fp,"  [(getchild)] extension listOfPid (generated by forkExec)\n");
        !           152:     fppp(fp,"  [(keywords) ] extension array-of-names-of-primitives \n");
        !           153:     fppp(fp,"  [(getUniqueFileName) path] extension newName \n");
        !           154:     fppp(fp,"  [(outputObjectToFile) path obj] extension null \n");
        !           155:     /* fppp(fp,"  [(asir0) string] extension result-object \n"); */
        !           156:     fppp(fp,"See also plugin-* in ??. \n");
        !           157:   }else if (strcmp(s,"file")==0) {
        !           158:     fppp(fp,"<< filename mode file fd >>\n");
        !           159:     fppp(fp,"string filename, mode; file fd;\n");
        !           160:     fppp(fp,"It opens the <<filename>> with the <<mode>>. <<fd>> is the\n");
        !           161:     fppp(fp,"file descripter and is used in writestring and closefile.\n");
        !           162:     fppp(fp,"If filename part is an integer, it calls fdopen() and returns the file descripter.\n");
        !           163:   }else if (strcmp(s,"for")==0) {
        !           164:     fppp(fp,"<<init inc limit {executable array} for >>\n");
        !           165:     fppp(fp,"integer init inc limit;\n");
        !           166:     fppp(fp,"Repeat the executable array.\n");
        !           167:     fppp(fp,"Example: [ 1 1 3 {(a)} for] ::---> [1 (a) 2 (a) 3 (a)]\n");
        !           168:   }else if (strcmp(s,"gbext")==0) {
        !           169:     fppp(fp,"<< obj1 gbext obj2 >>\n");
        !           170:     fppp(fp,"array of objects obj1;");
        !           171:     fppp(fp,"The first element of the obj1 should be the key word tag.\n");
        !           172:     fppp(fp,"<< gbext >> is used to call auxiliary functions for g-basis computation. \n");
        !           173:     fppp(fp,"  [(isReducible) poly1 poly2 ] gbext integer \n");
        !           174:     fppp(fp,"  [(lcm) poly1 poly2] gbext poly \n");
        !           175:     fppp(fp,"  [(grade) poly1 ] gbext integer \n");
        !           176:     fppp(fp,"  [(mod) poly1 universalNumber] gbext poly \n");
        !           177:     fppp(fp,"          poly = poly1 mod universalNumber where char=0 and \n");
        !           178:     fppp(fp,"          poly and poly2 belong to a same ring.\n");
        !           179:     fppp(fp,"  [(tomodp) poly1 ring] gbext poly, char(ring)>0. \n");
        !           180:     fppp(fp,"          poly = poly1 mod char(ring) where poly belongs to ring.\n");
        !           181:     fppp(fp,"  [(tomod0) poly1 ring] gbext poly, char(ring)=0. \n");
        !           182:     fppp(fp,"  [(divByN) poly1 n(universalNumber)] gbext [qpoly rpoly] \n");
        !           183:     fppp(fp,"     where poly1 = n*qpoly+rpoly.\n");
        !           184:     fppp(fp,"     (see also cancelCoeff) \n");
        !           185:     fppp(fp,"  [(isConstant) poly] gbext bool \n");
        !           186:     fppp(fp,"  [(lcoeff) poly] gbext poly \n");
        !           187:     fppp(fp,"  [(lmonom) poly] gbext poly \n");
        !           188:     fppp(fp,"  [(schreyerSkelton) array_of_poly] gbext array \n");
        !           189:     fppp(fp,"  [(toes) array_of_poly] gbext poly \n");
        !           190:     fppp(fp,"  [(isOrdered) poly] gbext poly \n");
        !           191:   }else if (strcmp(s,"get")==0) {
        !           192:     fppp(fp,"<< [f0 f1 ... fn] k get fk >>\n");
        !           193:     fppp(fp,"integer k;");
        !           194:     fppp(fp,"The primitive gets the k-th element of a given array.\n");
        !           195:     fppp(fp,"Example: [1 4 3] 1 get :: ---> 4\n");
        !           196:   }else if (strcmp(s,"goto")==0) {
        !           197:     fppp(fp,"<< label goto >>\n");
        !           198:     fppp(fp,"literal label;\n");
        !           199:     fppp(fp,"Break the loops and jump to the <<literal>>.\n");
        !           200:     fppp(fp,"The label <<literal>> has to be out of all the loops.\n");
        !           201:     fppp(fp,"You cannot jump inside of the executable array { .... }.\n");
        !           202:     fppp(fp,"Example: /point goto (skip me) message /point \n");
        !           203:   }else if (strcmp(s,"groebner")==0) {
        !           204:     fppp(fp,"<< [[f1 ... fn] [options]] groebner \n");
        !           205:     fppp(fp,"   [[g1 ... gm] backward-transformation syzygy]>>\n");
        !           206:     fppp(fp,"poly f1, ..., fn; poly g1, ..., gm;\n");
        !           207:     fppp(fp,"optional return value: matrix of poly backward-transformation, syzygy;\n");
        !           208:     fppp(fp,"Computation of the Groebner basis of f1,...,fn. The basis is {g1,...,gm}.\n");
        !           209:     fppp(fp,"Options:  << (needBack), (needSyz), (countDown) number (StopDegree) number, (forceReduction)>>\n");
        !           210:     fppp(fp,"Flags:<< [(ReduceLowerTerms) 1] system_variable >>\n");
        !           211:     fppp(fp,"      << [(UseCriterion1) 0]    system_variable >>\n");
        !           212:     fppp(fp,"      << [(UseCriterion2B) 0]   system_variable >>\n");
        !           213:     fppp(fp,"      << [(Sugar) 0]            system_variable >>\n");
        !           214:     fppp(fp,"      << [(Homogenize) 1]       system_variable >>\n");
        !           215:     fppp(fp,"      << [(CheckHomogenization) 1] system_variable >>\n");
        !           216:     fppp(fp,"      << [(Statistics) 1]       system_variable >>\n");
        !           217:     fppp(fp,"      << [(KanGBmessage) 1]     system_variable >>\n");
        !           218:     fppp(fp,"      << [(Verbose) 0]          system_variable >>\n");
        !           219:     fppp(fp,"Example: [(x0,x1) ring_of_polynomials 0] define_ring\n");
        !           220:     fppp(fp,"         [(x0^2+x1^2-h^2). (x0 x1 -4 h^2).] /ff set ;\n");
        !           221:     fppp(fp,"         [ff] groebner /gg set ;\n");
        !           222:     fppp(fp,"         gg ::\n");
        !           223:     fppp(fp,"cf. homogenize, groebner_sugar, define_ring, \n");
        !           224:     fppp(fp,"    ring_of_polynomials, ring_of_differential_operators.\n");
        !           225:   }else if (strcmp(s,"homogenize") == 0) {
        !           226:     fppp(fp,"<< f homogenize g >>\n");
        !           227:     fppp(fp,"poly f,g;\n");
        !           228:     fppp(fp,"array of poly f,g;\n");
        !           229:   }else if (strcmp(s,"idiv") == 0) {
        !           230:     fppp(fp,"<< a b idiv a/b >>\n");
        !           231:     fppp(fp,"int a,b,a/b;\n");
        !           232:     fppp(fp,"Example:  5 2 idiv ::  ===> 2\n");
        !           233:   }else if (strcmp(s,"ifelse") == 0) {
        !           234:     fppp(fp,"<< condition { true case } { false case } ifelse >>\n"); /*:*/
        !           235:                                           /* Tenuki mark --------------^ */
        !           236:     fppp(fp,"integer condition;\n");
        !           237:     fppp(fp,"If condition is non-zero, then true-case will be executed,\n");
        !           238:     fppp(fp,"else false-case will be executed.\n");
        !           239:   }else if (strcmp(s,"index") == 0) {
        !           240:     fppp(fp,"<<  a_0 ... a_{n-1} n index a_0 ... a_{n-1} a_0 >>\n");/*:*/
        !           241:     fppp(fp,"integer n; \n");
        !           242:     fppp(fp,"It takes a_0 from the stack.\n");
        !           243:   }else if (strcmp(s,"init")==0) {
        !           244:     fppp(fp,"<< f init h >>\n");
        !           245:     fppp(fp,"<< f weight_vector init h >>\n");
        !           246:     fppp(fp,"poly f,h; array of integer weight_vector;\n");
        !           247:     fppp(fp,"h is the initial term of the polynomial f.\n");
        !           248:     fppp(fp,"Example: (2 x^3 + 3 x + 1). init :: ---> 2 x^3\n");
        !           249:     fppp(fp,"Example: [(x^3+1). (x h+ h^5).] {init} map ::\n");
        !           250:     fppp(fp,"Example: (x+1). [0 1 1 1] init ::    cf. weightv \n");
        !           251:   }else if (strcmp(s,"lc")==0) {
        !           252:     fppp(fp,"<< obj lc leftCell >>\n");
        !           253:     fppp(fp,"class leftCell;\n");
        !           254:     fppp(fp,"leftCell is the left cell of the obj of which type must be class.\n");
        !           255:   }else if (strcmp(s,"length")==0) {
        !           256:     fppp(fp,"<< [a0 a1 ... an] length <n+1> >>\n");
        !           257:     fppp(fp,"<< s length p >>\n");
        !           258:     fppp(fp,"integer <n+1>; integer p; string s;\n");
        !           259:     fppp(fp,"It returns the length of the argument. p is the length of the string.\n");
        !           260:   }else if (strcmp(s,"load")==0) {
        !           261:     fppp(fp,"<< /literal load obj >>\n");
        !           262:     fppp(fp,"<<load>> gets the value of <<literal>>.\n");
        !           263:   }else if (strcmp(s,"loop") == 0) {
        !           264:     fppp(fp,"<< {executable array} loop >>\n"); /*:*/
        !           265:     fppp(fp,"cf. exit\n");
        !           266:   }else if (strcmp(s,"map")==0) {
        !           267:     fppp(fp,"<< [f1 ... fn] {code} map [f1 {code}exec ... fn {code}exec] >>\n");
        !           268:     fppp(fp,"map applies {code} to each element in [f1 ... fn].\n");
        !           269:     fppp(fp,"Example: [1 2 3] {1 add} map ===> [2 3 4]\n");
        !           270:   }else if (strcmp(s,"mpzext") == 0) {
        !           271:     fppp(fp,"[(key) arguments] mpzext ans\n"); /*:*/
        !           272:     fppp(fp,"It calls mpz functions.\n");
        !           273:     fppp(fp,"arguments should be numbers(universalNumber).\n");
        !           274:     fppp(fp,"Keys: gcd, tdiv_qr, cancel, powm, probab_prim_p, sqrt, and, ior, com\n");
        !           275:     fppp(fp,"For details, see gmp-2.0.2/texinfo.tex.\n");
        !           276:   }else if (strcmp(s,"mul") ==0) {
        !           277:     fppp(fp,"obj1 obj2 mul obj3\n");
        !           278:     fppp(fp,"obj3 = obj1 * obj2\n");
        !           279:   }else if (strcmp(s,"newcontext") == 0) {
        !           280:     fppp(fp,"<< name super newcontext class.Context >>\n"); /*:*/
        !           281:     fppp(fp,"It creates new context and new user dictionary.\n"); /*:*/
        !           282:     fppp(fp,"Ex. (mycontext) StandardContextp newcontext /nc set.\n");
        !           283:     fppp(fp,"cf. setcontext.\n");
        !           284:   }else if (strcmp(s,"newstack") == 0) {
        !           285:     fppp(fp,"<< size newstack class.OperandStack >>\n"); /*:*/
        !           286:     fppp(fp,"cf. setstack, stdstack.\n");
        !           287:   }else if (strcmp(s,"pop")==0) {
        !           288:     fppp(fp,"<< obj pop >>  \n"); /*:*/
        !           289:     fppp(fp,"It removes the obj from the stack.\n");
        !           290:   }else if (strcmp(s,"principal")==0) {
        !           291:     fppp(fp,"<< obj principal obj >>  Get the principal part.\n"); /*:*/
        !           292:     fppp(fp,"This is an old command. init should be used.\n");
        !           293:     fppp(fp,"Example: (x Dx + Dy^2+ y Dx Dy). [(Dx) 1 (Dy) 1] weightv init\n");
        !           294:   }else if (strcmp(s,"print")==0) {
        !           295:     fppp(fp,"<< obj print >> \n"); /*:*/
        !           296:     fppp(fp,"Print the object to stdout. cf. obj (string) dc \n");
        !           297:   }else if (strcmp(s,"print_switch_status")==0) {
        !           298:     fppp(fp,"<< print_switch_status >>\n"); /*:*/
        !           299:     fppp(fp,"cf. switch_function\n");
        !           300:   }else if (strcmp(s,"primmsg")==0) {
        !           301:     fppp(fp,"<< { executable array } primmsg >> \n");
        !           302:     fppp(fp,"The << executable array >> is executed in the PrimitiveContext.\n");
        !           303:     fppp(fp,"cf. sendmsg, sendmsg2, supmsg2, system_variable\n");
        !           304:   }else if (strcmp(s,"pstack")==0) {
        !           305:     fppp(fp,"<< pstack >>\n");
        !           306:     fppp(fp,"The operator prints the entire contents of the stack.\n");
        !           307:   }else if (strcmp(s,"pushfile")==0) {
        !           308:     fppp(fp,"<< filename pushfile sss >>\n");
        !           309:     fppp(fp,"string filename, sss ; \n");
        !           310:     fppp(fp,"Read the file and push the contents of file as the string.\n");
        !           311:     fppp(fp,"The file will be search in the search path as run operator.\n");
        !           312:     fppp(fp,"Example: (myfile.txt) pushfile /sss set \n");
        !           313:     fppp(fp,"cf:  [(parse) sss] extension\n");
        !           314:   }else if (strcmp(s,"put")==0) {
        !           315:     fppp(fp,"<< [a0 a1 ... ap] i any put >>\n");
        !           316:     fppp(fp,"<< [a0 a1 ... ap] multi-index any put >>\n");
        !           317:     fppp(fp,"<< s i any put >>\n");
        !           318:     fppp(fp,"integer i; string s; array of integers multi-index;\n");
        !           319:     fppp(fp,"The operator put <<any>> at the place i.\n");
        !           320:     fppp(fp,"Example: /a [1 2 3] def  a 2 (Hi) put a :: --->[1 2 (Hi)]\n");
        !           321:     fppp(fp,"Example: /a [[1 2] [3 4]] def  a [0 1] 10 put a :: --->\n");
        !           322:     fppp(fp,"                                               [[1 10] [3 4]]\n");
        !           323:   }else if (strcmp(s,"rc")==0) {
        !           324:     fppp(fp,"<< obj rc rightCell >>\n");
        !           325:     fppp(fp,"rightCell is the right cell of the obj of which type must be class.\n");
        !           326:     fppp(fp,"class rightCell;\n");
        !           327:   }else if (strcmp(s,"reduction")==0) {
        !           328:     fppp(fp,"<< f [g_1 g_2 ... g_m] reduction [h c0 syz input] >>\n");
        !           329:     fppp(fp,"poly f, g1_1, ..., g_m, h, c0; array of poly syz, input;\n");
        !           330:     fppp(fp,"h is the normal of f by {g1 .... fm}.\n");
        !           331:     fppp(fp,"h = c0 f + \\sum syz_i g_i \n");
        !           332:   }else if (strcmp(s,"replace")==0) {
        !           333:     fppp(fp,"<< f [[L1 R1] ... [Ln Rn]] replace g >>\n");
        !           334:     fppp(fp,"poly f, L1, R1, ..., Ln, Rn, g; \n");
        !           335:     fppp(fp,"<<replace>> applies the rules L1-->R1, ..., Ln-->Rn to transform f.\n");
        !           336:     fppp(fp,"Example: (x^2+x+1). [[(x). (2).]] replace :: ---> 7\n");
        !           337:   }else if (strcmp(s,"roll")==0) {
        !           338:     fppp(fp,"<< f(n-1) ... f(0) n j roll f(j-1 mod n) f(j-2 mod n) ... f(j-n mod n) >>\n");
        !           339:     fppp(fp,"integer n, j;\n");
        !           340:     fppp(fp,"Example: [(a) (b) (c) 3 1 roll] ::  ==>[(c) (a) (b)]\n");
        !           341:   }else if (strcmp(s,"run") == 0) {
        !           342:     fppp(fp,"<< filename run >>\n"); /*:*/
        !           343:     fppp(fp,"string filename ;\n"); /*:*/
        !           344:     fppp(fp,"Example. (restriction.sm1) run \n");
        !           345:     fppp(fp,"File will be searched in the current directory, /usr/local/lib/sm1,\n");
        !           346:     fppp(fp,"and the directory specified by the environment variable LOAD_SM1_PATH\n");
        !           347:     fppp(fp,"Example. setenv LOAD_SM1_PATH ~/lib/sm1/ \n");
        !           348:   }else if (strcmp(s,"sendmsg") == 0) {
        !           349:     fppp(fp,"<< obj { executable array } sendmsg >>\n"); /*:*/
        !           350:     fppp(fp,"When obj is in k-class (i.e. obj is of the form \n");
        !           351:     fppp(fp," [<<class.Context>> , body ]), then the CurrentContextp is changed\n");
        !           352:     fppp(fp,"to <<class.Context>> and the obj <<executable array>> will be executed.\n");
        !           353:     fppp(fp,"If not, CurrentContextp is changed to the PrimitiveContextp and\n");
        !           354:     fppp(fp,"the obj <<executable array>> will be executed.\n");
        !           355:     fppp(fp,"cf. setcontext, newcontext, StandardContextp, system_variable,\n");
        !           356:     fppp(fp,"    sendmsg2, primmsg, supmsg2.\n");
        !           357:   }else if (strcmp(s,"sendmsg2") == 0) {
        !           358:     fppp(fp,"<< obj2 obj3 { executable array } sendmsg2 >>\n"); /*:*/
        !           359:     fppp(fp,"Context is determined by obj2 if obj2 is class.context.\n");
        !           360:     fppp(fp,"If not, it is determined by obj3 if obj2 is class.context.\n");
        !           361:     fppp(fp,"cf. sendmsg.\n");
        !           362:   }else if (strcmp(s,"set_order_by_matrix")==0) {
        !           363:     fppp(fp,"<< order-matrix set_order_by_matrix >>\n"); /*:*/
        !           364:     fppp(fp,"matrix of integers order-matrix; \n");
        !           365:     fppp(fp,"cf. weight_vector, show_ring, elimination_order, switch_function\n");
        !           366:     fppp(fp,"    system_variable \n");
        !           367:   }else if (strcmp(s,"set_timer")==0) {
        !           368:     fppp(fp,"cf. timer\n"); /*:*/
        !           369:   }else if (strcmp(s,"set_up_ring@")==0) {
        !           370:     fppp(fp,"<< [x-variables] [d-variables] [p c l m n cc ll mm nn next] order-matrix \n");
        !           371:     fppp(fp,"   [(keyword) value (keyword) value ....]  set_up_ring@ >>\n");
        !           372:     fppp(fp,"<<next>> is the optional argument. The last argument is also optional.\n");
        !           373:     fppp(fp,"Keywords are mpMult, coeffient ring, valuation, characteristic,\n");
        !           374:     fppp(fp,"             schreyer, ringName.\n\n");
        !           375:     fppp(fp,"1.When [x[0] .... x[n-1]] [D[0] .... D[n-1]] is given as the lists\n");
        !           376:     fppp(fp,"  of variables, D[0] is usually used as the variable for homogenization\n");
        !           377:     fppp(fp,"  and x[n-1] is used for the variable for the graduation.\n");
        !           378:     fppp(fp,"2.Order matrix should be given in the order x[n-1] ... x[0], D[n-1]...D[0]\n");
        !           379:     fppp(fp,"3.0<=i<c : commutative; c<=i<l : q-difference;\n");
        !           380:     fppp(fp,"  l<=i<m : difference(better not to use it); m<=i<n : differential;\n");
        !           381:     fppp(fp,"4.Graduation variables :\n");
        !           382:     fppp(fp,"  cc<=i<c : commutative; ll<=i<l : q-difference;\n");
        !           383:     fppp(fp,"  mm<=i<m : difference;  nn<=i<n : differential;\n");
        !           384:     fppp(fp,"  If you do not use graduation variables, set, for example, cc=c.\n");
        !           385:     fppp(fp,"5.c-cc>0 or l-ll>0 or m-mm>0 or n-nn>0 must be held.\n\n");
        !           386:     fppp(fp,"Example: [$H$ $x$ $y$ $e$] [$h$ $Dx$ $Dy$ $E$]\n");
        !           387:     fppp(fp,"         [0 1 1 1 4 1 1 1 3]\n");
        !           388:     fppp(fp,"        (  e y x H   E Dy Dx h )\n");
        !           389:     fppp(fp,"         [[1 1 1 1   1 1  1  0]\n");
        !           390:     fppp(fp,"          [1 0 0 0   0 0  0  0]\n");
        !           391:     fppp(fp,"          [0 0 0 0   0 1  0  0]\n");
        !           392:     fppp(fp,"           ........\n\n");
        !           393:     fppp(fp,"cf. polynomial_ring, ring_of_..., groebner.\n");
        !           394:   }else if (strcmp(s,"setcontext")==0) {
        !           395:     fppp(fp,"<< class.Context setcontext >>\n");
        !           396:     fppp(fp,"Change the CurrentContextp (and the user dictionary) ");
        !           397:     fppp(fp,"to class.Context.\n");
        !           398:     fppp(fp,"Ex. (mynew) StandardContextp newcontext /cp set cp setcontext\n");
        !           399:     fppp(fp,"cf. system_variable(CurrentContextp), newcontext,\n");
        !           400:     fppp(fp,"    show_user_dictionary, StandardContextp.\n");
        !           401:   }else if (strcmp(s,"setstack")==0) {
        !           402:     fppp(fp,"<< class.OperandStack setstack >>\n");
        !           403:     fppp(fp,"Change the current operand stack to class.OperandStack.\n");
        !           404:     fppp(fp,"Ex. 1000 newstack /st set  st setstack\n");
        !           405:     fppp(fp,"cf. newstack, stdstack\n");
        !           406:   }else if (strcmp(s,"show_ring")==0 ) {
        !           407:     fppp(fp,"<< show_ring >>\n"); /*:*/
        !           408:     fppp(fp,"cf. set_up_ring.\n");
        !           409:   }else if (strcmp(s,"show_systemdictionary") == 0 || strcmp(s,"show_user_dictionary")==0 ) {
        !           410:     fppp(fp,"<< show_systemdictionary >>  << show_user_dictionary >>\n"); /*:*/
        !           411:   }else if (strcmp(s,"spol")==0) {
        !           412:     fppp(fp,"<< f  g spol  [ [c d] r] >>\n"); /*:*/
        !           413:     fppp(fp,"poly f, g, c, d, r;\n");
        !           414:     fppp(fp,"r is the s-polynomial of f and g.\n");
        !           415:     fppp(fp," r = c f + d g\n");
        !           416:   }else if (strcmp(s,"stdstack")==0) {
        !           417:     fppp(fp,"<< stdstack >>\n");
        !           418:     fppp(fp,"Change the current operand stack to the standard stack.\n");
        !           419:     fppp(fp,"cf. newstack, setstack\n");
        !           420:   }else if (strcmp(s,"sub") ==0) {
        !           421:     fppp(fp,"obj1 obj2 sub obj3\n");
        !           422:     fppp(fp,"obj3 = obj1 - obj2.\n");
        !           423:   }else if (strcmp(s,"supercontext")==0) {
        !           424:     fppp(fp,"<< class.Context supercontext class.Context2 >>\n"); /*:*/
        !           425:     fppp(fp,"cf. setcontext, newcontext\n");
        !           426:   }else if (strcmp(s,"supmsg2") == 0) {
        !           427:     fppp(fp,"<< obj2 obj3 { executable array } supmsg2 >>\n"); /*:*/
        !           428:     fppp(fp,"Context is the super of obj2 or obj3.\n");
        !           429:     fppp(fp,"cf. sendmsg, sendmsg2, primmsg.\n");
        !           430:   }else if (strcmp(s,"switch_function")==0) {
        !           431:     fppp(fp,"<< (function) (name) switch_function >>\n"); /*:*/
        !           432:     fppp(fp,"<< (report) (function) switch_function value >>\n"); /*:*/
        !           433:     fppp(fp,"cf. print_switch_status, getOptions, restoreOptions.\n");
        !           434:   }else if (strcmp(s,"system")==0) {
        !           435:     fppp(fp,"<< command system >>\n"); /*:*/
        !           436:     fppp(fp,"string command; \n");
        !           437:     fppp(fp,"Execute unix command.\n");
        !           438:     fppp(fp,"Example: (ls) system \n");
        !           439:   }else if (strcmp(s,"system_variable")==0) {
        !           440:     fppp(fp,"<< [(key word)] system_variable result >> or\n");
        !           441:     fppp(fp,"<< [(key word) value] system_variable result >>\n");
        !           442:     fppp(fp,"<< [(key word) optional arg] system_variable result >>\n");
        !           443:     fppp(fp,"The primitive returns the value of a given system constant.\n");
        !           444:     fppp(fp,"The primitive sets the value of a given system constant.\n");
        !           445:     fppp(fp,"PrintDollar [0,1,2], Wrap, P, N, NN, M, MM, L, LL, C, CC,ringName\n");
        !           446:     fppp(fp,"CurrentRingp, Verbose, UseCriterion1, UseCriterion2B\n");
        !           447:     fppp(fp,"ReduceLowerTerms, CheckHomogenization, Homogenize, Sugar, Homogenize_vec\n");
        !           448:     fppp(fp,"Statistics, StackPointer, StandardOperandStack\n");
        !           449:     fppp(fp,"ErrorStack, ErrorMessageMode, WarningMessageMode\n");
        !           450:     fppp(fp,"CatchCtrlC, Strict, CurrentContextp, NullContextp, Strict2\n");
        !           451:     fppp(fp,"SigIgn, KSPushEnvMode, PrimitiveContextp, KanGBmessage\n");
        !           452:     fppp(fp,"orderMatrix, gbListTower, Schreyer, \n");
        !           453:     fppp(fp,"outputOrder, multSymbol, variableNames, Version\n");
        !           454:     fppp(fp,"AvoidTheSameRing, RingStack\n");
        !           455:     fppp(fp,"Example: [(N)] system_variable\n");
        !           456:     fppp(fp,"                             (maximum number of variables)/2.\n");
        !           457:     fppp(fp,"         [(x) (var) 3] system_variable\n");
        !           458:     fppp(fp,"                              The 3rd variable.\n");
        !           459:     fppp(fp,"         [(D) (var) 4] system_variable\n");
        !           460:     fppp(fp,"                              The 4th differential operator.\n");
        !           461:     fppp(fp,"         [(PrintDollar) 0] system_variable\n");
        !           462:     fppp(fp,"                          Set the global variable PrintDollar to 0\n");
        !           463:   }else if (strcmp(s,"to_records")==0) {
        !           464:     fppp(fp,"<< ({arg1,arg2,...,argn})  to_records (arg1) ... (argn) n >>\n");
        !           465:     fppp(fp,"Example: ({x,y2}) to_records ===> (x) (y2) 2\n");
        !           466:     fppp(fp,"Example: (x,y2)   to_records ===> (x) (y2) 2\n");
        !           467:     fppp(fp,"Example: [(x,y2) to_records pop] ===> [(x) (y2)]\n");
        !           468:   }else if (strcmp(s,"writestring") == 0) {
        !           469:     fppp(fp,"<< fd s writestring >>\n"); /*:*/
        !           470:     fppp(fp,"file fd; string s;\n");
        !           471:     fppp(fp,"Write the string s to the file fd.\n");
        !           472:     fppp(fp,"cf. [(PrintDollar)] system_variable, file, closefile\n");
        !           473: /******* macros ************/
        !           474:   }else if (strcmp(s,"timer")==0) {
        !           475:     fppp(fp,"<< { executable array } timer >>\n"); /*:*/
        !           476:   }else{
        !           477:     fppp(fp,"The keyword <<%s>> cannot be found.\n",s);
        !           478:     fppp(fp,"Type in ? in order to see system dictionary.\n");
        !           479:   }
        !           480: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>