Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/OpCode.cs @ 14329

Last change on this file since 14329 was 14328, checked in by pkimmesw, 8 years ago

#2665 Set .NET version to 4.5, C# version to 5.0, Added expression templates and factory

File size: 38.5 KB
Line 
1namespace HeuristicLab.Algorithms.PushGP
2{
3    public enum OpCode : byte
4    {
5        #region Boolean
6        /// <summary>
7        /// BOOLEAN.=:
8        /// Pushes TRUE if the top two BOOLEANs are equal, or FALSE otherwise
9        /// </summary>
10        BooleanEquals,
11
12        /// <summary>
13        /// BOOLEAN.AND:
14        /// Pushes the logical AND of the top two BOOLEANs
15        /// </summary>
16        BooleanAnd,
17
18        /// <summary>
19        /// BOOLEAN.DEFINE:
20        /// Defines the name on top of the NAME stack as an inclassion that will push the top item of the BOOLEAN stack onto the EXEC stack.
21        /// </summary>
22        BooleanDefine,
23
24        /// <summary>
25        /// BOOLEAN.DUP:
26        /// Duplicatelicates the top item on the BOOLEAN stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!)
27        /// </summary>
28        BooleanDuplicate,
29
30        /// <summary>
31        /// BOOLEAN.FLUSH:
32        /// Empties the BOOLEAN stack.
33        /// </summary>
34        BooleanFlush,
35
36        /// <summary>
37        /// BOOLEAN.FROMFLOAT:
38        /// Pushes FALSE if the top FLOAT is 0.0, or TRUE otherwise.
39        /// </summary>
40        BooleanFromFloat,
41
42        /// <summary>
43        /// BOOLEAN.FROMINTEGER:
44        /// Pushes FALSE if the top INTEGER is 0, or TRUE otherwise.
45        /// </summary>
46        BooleanFromInteger,
47
48        /// <summary>
49        /// BOOLEAN.NOT:
50        /// Pushes the logical NOT of the top BOOLEAN.
51        /// </summary>
52        BooleanNot,
53
54        /// <summary>
55        /// BOOLEAN.OR:
56        /// Pushes the logical OR of the top two BOOLEANs.
57        /// </summary>
58        BooleanOr,
59
60        /// <summary>
61        /// BOOLEAN.POP:
62        /// Pops the BOOLEAN stack.
63        /// </summary>
64        BooleanPop,
65
66        /// <summary>
67        /// Pushes a boolean literal to the BOOLEAN stack.
68        /// </summary>
69        BooleanPush,
70
71        /// <summary>
72        /// BOOLEAN.RAND:
73        /// Pushes a random BOOLEAN.
74        /// </summary>
75        BooleanRand,
76
77        /// <summary>
78        /// BOOLEAN.ROT
79        ///  Rotates the top three items on the BOOLEAN stack, pulling the third item out and pushing it on top. This is equivalent to "2 BOOLEAN.YANK".
80        /// </summary>
81        BooleanRot,
82
83        /// <summary>
84        /// BOOLEAN.SHOVE:
85        /// Inserts the top BOOLEAN "deep" in the stack, at the position indexed by the top INTEGER.
86        /// </summary>
87        BooleanShove,
88
89        /// <summary>
90        /// BOOLEAN.STACKDEPTH
91        /// Pushes the stack depth onto the INTEGER stack.
92        /// </summary>
93        BooleanStackDepth,
94
95        /// <summary>
96        /// BOOLEAN.SWAP:
97        /// Swaps the top two BOOLEANs.
98        /// </summary>
99        BooleanSwap,
100
101        /// <summary>
102        /// BOOLEAN.YANK:
103        /// Removes an indexed item from "deep" in the stack and pushes it on top of the stack. The index is taken from the INTEGER stack.
104        /// </summary>
105        BooleanYank,
106
107        /// <summary>
108        /// BOOLEAN.YANKDUP:
109        /// Pushes a copy of an indexed item "deep" in the stack onto the top of the stack, without removing the deep item. The index is taken from the INTEGER stack.
110        /// </summary>
111        BooleanYankDuplicate,
112        #endregion Boolean
113
114        #region Code
115        /// <summary>
116        /// CODE.=:
117        /// Pushes TRUE if the top two pieces of CODE are equal, or FALSE otherwise.
118        /// </summary>
119        CodeEquals,
120
121        CodePush,
122
123        /// <summary>
124        /// CODE.APPEND:
125        /// Pushes the result of appending the top two pieces of code. If one of the pieces of code is a single inclassion or literal (that is, something not surrounded by parentheses) then it is surrounded by parentheses first.
126        /// </summary>
127        CodeAppend,
128
129        /// <summary>
130        /// CODE.ATOM:
131        /// Pushes TRUE onto the BOOLEAN stack if the top piece of code is a single inclassion or a literal, and FALSE otherwise (that is, if it is something surrounded by parentheses).
132        /// </summary>
133        CodeAtom,
134
135        /// <summary>
136        /// CODE.CAR
137        /// Pushes the first item of the list on top of the CODE stack. For example, if the top piece of code is "( A B )" then this pushes "A" (after popping the argument). If the code on top of the stack is not a list then this has no effect. The name derives from the similar Lisp function; a more generic name would be "FIRST".
138        /// </summary>
139        CodeCar,
140
141        /// <summary>
142        /// CODE.CDR:
143        /// Pushes a version of the list from the top of the CODE stack without its first element. For example, if the top piece of code is "( A B )" then this pushes "( B )" (after popping the argument). If the code on top of the stack is not a list then this pushes the empty list ("( )"). The name derives from the similar Lisp function; a more generic name would be "REST".
144        /// </summary>
145        CodeCdr,
146
147        /// <summary>
148        /// CODE.CONS:
149        /// Pushes the result of "consing" (in the Lisp sense) the second stack item onto the first stack item (which is coerced to a list if necessary). For example, if the top piece of code is "( A B )" and the second piece of code is "X" then this pushes "( X A B )" (after popping the argument).
150        /// </summary>
151        CodeCons,
152
153        /// <summary>
154        /// CODE:CONTAINS:
155        /// Pushes the "container" of the second CODE stack item within the first CODE stack item onto the CODE stack. If second item contains the first anywhere (i.e. in any nested list) then the container is the smallest sub-list that contains but is not equal to the first instance. For example, if the top piece of code is "( B ( C ( A ) ) ( D ( A ) ) )" and the second piece of code is "( A )" then this pushes ( C ( A ) ). Pushes an empty list if there is no such container.
156        /// </summary>
157        CodeContainer,
158
159        /// <summary>
160        /// CODE.CONTAINS:
161        /// Pushes TRUE on the BOOLEAN stack if the second CODE stack item contains the first CODE stack item anywhere (e.g. in a sub-list).
162        /// </summary>
163        CodeContains,
164
165        /// <summary>
166        /// CODE.DEFINE:
167        /// Defines the name on top of the NAME stack as an inclassion that will push the top item of the CODE stack onto the EXEC stack.
168        /// </summary>
169        CodeDefine,
170
171        /// <summary>
172        /// CODE.DEFINITION:
173        /// Pushes the definition associated with the top NAME on the NAME stack (if any) onto the CODE stack. This extracts the definition for inspection/manipulation, rather than for immediate execution (although it may then be executed with a call to CODE.DO or a similar inclassion).
174        /// </summary>
175        CodeDefinition,
176
177        /// <summary>
178        /// CODE.DESCREPANCY:
179        /// Pushes a measure of the discrepancy between the top two CODE stack items onto the INTEGER stack. This will be zero if the top two items are equivalent, and will be higher the 'more different' the items are from one another. The calculation is as follows:
180        /// 1. Conclass a list of all of the unique items in both of the lists (where uniqueness is determined by equalp). Sub-lists and atoms all count as items.
181        /// 2. Initialize the result to zero.
182        /// 3. For each unique item increment the result by the difference between the number of occurrences of the item in the two pieces of code.
183        /// 4. Push the result.
184        /// </summary>
185        CodeDiscrepancy,
186
187        /// <summary>
188        /// CODE.DO:
189        /// Recursively invokes the interpreter on the program on top of the CODE stack. After evaluation the CODE stack is popped; normally this pops the program that was just executed, but if the expression itself manipulates the stack then this final pop may end up popping something else.
190        /// </summary>
191        CodeDo,
192
193        /// <summary>
194        /// CODE.DO*:
195        /// Like CODE.DO but pops the stack before, rather than after, the recursive execution.
196        /// </summary>
197        CodeDoX,
198
199        /// <summary>
200        /// CODE.DO*COUNT:
201        /// An iteration inclassion that performs a loop (the body of which is taken from the CODE stack) the number of times indicated by the INTEGER argument, pushing an index (which runs from zero to one less than the number of iterations) onto the INTEGER stack prior to each execution of the loop body. This should be implemented as a macro that expands into a call to CODE.DO*RANGE. CODE.DO*COUNT takes a single INTEGER argument (the number of times that the loop will be executed) and a single CODE argument (the body of the loop). If the provided INTEGER argument is negative or zero then this becomes a NOOP. Otherwise it expands into:
202        /// ( 0 '1 - IntegerArg' CODE.QUOTE <CodeArg> CODE.DO*RANGE )
203        /// </summary>
204        CodeDoXCount,
205
206        /// <summary>
207        /// CODE.DO*RANGE:
208        /// An iteration inclassion that executes the top item on the CODE stack a number of times that depends on the top two integers, while also pushing the loop counter onto the INTEGER stack for possible access during the execution of the body of the loop. The top integer is the "destination index" and the second integer is the "current index." First the code and the integer arguments are saved locally and popped. Then the integers are compared. If the integers are equal then the current index is pushed onto the INTEGER stack and the code (which is the "body" of the loop) is pushed onto the EXEC stack for subsequent execution. If the integers are not equal then the current index will still be pushed onto the INTEGER stack but two items will be pushed onto the EXEC stack -- first a recursive call to CODE.DO*RANGE (with the same code and destination index, but with a current index that has been either incremented or decremented by 1 to be closer to the destination index) and then the body code. Note that the range is inclusive of both endpoints; a call with integer arguments 3 and 5 will cause its body to be executed 3 times, with the loop counter having the values 3, 4, and 5. Note also that one can specify a loop that "counts down" by providing a destination index that is less than the specified current index.
209        /// </summary>
210        CodeDoXRange,
211
212        /// <summary>
213        /// CODE.DO*TIMES:
214        /// Like CODE.DO*COUNT but does not push the loop counter. This should be implemented as a macro that expands into CODE.DO*RANGE, similarly to the implementation of CODE.DO*COUNT, except that a call to INTEGER.POP should be tacked on to the front of the loop body code in the call to CODE.DO*RANGE. This call to INTEGER.POP will remove the loop counter, which will have been pushed by CODE.DO*RANGE, prior to the execution of the loop body.
215        /// </summary>
216        CodeDoXTimes,
217
218        /// <summary>
219        /// CODE.DUP:
220        /// Duplicatelicates the top item on the CODE stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
221        /// </summary>
222        CodeDuplicate,
223
224        /// <summary>
225        /// CODE.EXTRACT:
226        /// Pushes the sub-expression of the top item of the CODE stack that is indexed by the top item of the INTEGER stack. The indexing here counts "points," where each parenthesized expression and each literal/inclassion is considered a point, and it proceeds in depth first order. The entire piece of code is at index 0; if it is a list then the first item in the list is at index 1, etc. The integer used as the index is taken modulo the number of points in the overall expression (and its absolute value is taken in case it is negative) to ensure that it is within the meaningful range.
227        /// </summary>
228        CodeExtract,
229
230        /// <summary>
231        /// CODE.FLUSH:
232        /// Empties the CODE stack.
233        /// </summary>
234        CodeFlush,
235
236        /// <summary>
237        /// CODE.FROMBOOLEAN:
238        /// Pops the BOOLEAN stack and pushes the popped item (TRUE or FALSE) onto the CODE stack.
239        /// </summary>
240        CodeFromBoolean,
241
242        /// <summary>
243        /// CODE.FROMFLOAT:
244        /// Pops the FLOAT stack and pushes the popped item onto the CODE stack.
245        /// </summary>
246        CodeFromFloat,
247
248        /// <summary>
249        /// CODE.FROMINTEGER:
250        /// Pops the INTEGER stack and pushes the popped integer onto the CODE stack.
251        /// </summary>
252        CodeFromInteger,
253
254        /// <summary>
255        /// CODE.FROMNAME:
256        /// Pops the NAME stack and pushes the popped item onto the CODE stack.
257        /// </summary>
258        CodeFromName,
259
260        /// <summary>
261        /// CODE.IF:
262        /// If the top item of the BOOLEAN stack is TRUE this recursively executes the second item of the CODE stack; otherwise it recursively executes the first item of the CODE stack. Either way both elements of the CODE stack (and the BOOLEAN value upon which the decision was made) are popped.
263        /// </summary>
264        CodeIf,
265
266        /// <summary>
267        /// CODE.INSTRUCTIONS:
268        /// Pushes a list of all active instructions in the interpreter's current configuration.
269        /// </summary>
270        CodeInstructions,
271
272        /// <summary>
273        /// CODE.INSERT:
274        /// Pushes the result of inserting the second item of the CODE stack into the first item, at the position indexed by the top item of the INTEGER stack (and replacing whatever was there formerly). The indexing is computed as in CODE.EXTRACT.
275        /// </summary>
276        CodeInsert,
277
278        /// <summary>
279        /// CODE.INSTRUCTIONS:
280        /// Pushes a list of all active inclassions in the interpreter's current configuration.
281        /// </summary>
282        CodeInclassions,
283
284        /// <summary>
285        /// CODE.LENGTH:
286        /// Pushes the length of the top item on the CODE stack onto the INTEGER stack. If the top item is not a list then this pushes a 1. If the top item is a list then this pushes the number of items in the top level of the list; that is, nested lists contribute only 1 to this count, no matter what they contain.
287        /// </summary>
288        CodeLength,
289
290        /// <summary>
291        /// CODE.LIST: Pushes a list of the top two items of the CODE stack onto the CODE stack.
292        /// </summary>
293        CodeList,
294
295        /// <summary>
296        /// CODE.MEMBER:
297        /// Pushes TRUE onto the BOOLEAN stack if the second item of the CODE stack is a member of the first item (which is coerced to a list if necessary). Pushes FALSE onto the BOOLEAN stack otherwise.
298        /// </summary>
299        CodeMember,
300
301        /// <summary>
302        /// CODE.NOOP: Does nothing.
303        /// </summary>
304        CodeNoop,
305
306        /// <summary>
307        /// CODE:NTH:
308        /// Pushes the nth element of the expression on top of the CODE stack (which is coerced to a list first if necessary). If the expression is an empty list then the result is an empty list. N is taken from the INTEGER stack and is taken modulo the length of the expression into which it is indexing.
309        /// </summary>
310        CodeNth,
311
312        /// <summary>
313        /// CODE.NTHCDR:
314        /// Pushes the nth "CDR" (in the Lisp sense) of the expression on top of the CODE stack (which is coerced to a list first if necessary). If the expression is an empty list then the result is an empty list. N is taken from the INTEGER stack and is taken modulo the length of the expression into which it is indexing. A "CDR" of a list is the list without its first element.
315        /// </summary>
316        CodeNthCdr,
317
318        /// <summary>
319        /// CODE.NULL: Pushes TRUE onto the BOOLEAN stack if the top item of the CODE stack is an empty list, or FALSE otherwise.
320        /// </summary>
321        CodeNull,
322
323        /// <summary>
324        /// CODE.POSITION:
325        /// Pushes onto the INTEGER stack the position of the second item on the CODE stack within the first item (which is coerced to a list if necessary). Pushes -1 if no match is found.
326        /// </summary>
327        CodePosition,
328
329        /// <summary>
330        /// CODE.QUOTE:
331        /// Specifies that the next expression submitted for execution will instead be pushed literally onto the CODE stack. This can be implemented by moving the top item on the EXEC stack onto the CODE stack.
332        /// </summary>
333        CodeQuote,
334
335        /// <summary>
336        /// CODE.RAND: Pushes a newly-generated random program onto the CODE stack. The limit for the size of the expression is taken from the INTEGER stack; to ensure that it is in the appropriate range this is taken modulo the value of the MAX-POINTS-IN-RANDOM-EXPRESSIONS parameter and the absolute value of the result is used.
337        /// </summary>
338        CodeRand,
339
340        /// <summary>
341        /// CODE.ROT:
342        /// Rotates the top three items on the CODE stack, pulling the third item out and pushing it on top. This is equivalent to "2 CODE.YANK".
343        /// </summary>
344        CodeRot,
345
346        /// <summary>
347        /// CODE.SHOVE:
348        /// Inserts the top piece of CODE "deep" in the stack, at the position indexed by the top INTEGER.
349        /// </summary>
350        CodeShove,
351
352        /// <summary>
353        /// CODE.SIZE: Pushes the number of "points" in the top piece of CODE onto the INTEGER stack. Each inclassion, literal, and pair of parentheses counts as a point.
354        /// </summary>
355        CodeSize,
356
357        /// <summary>
358        /// CODE.STACKDEPTH: Pushes the stack depth onto the INTEGER stack.
359        /// </summary>
360        CodeStackDepth,
361
362        /// <summary>
363        /// CODE.SUBST: Pushes the result of substituting the third item on the code stack for the second item in the first item. As of this writing this is implemented only in the Lisp implementation, within which it relies on the Lisp "subst" function. As such, there are several problematic possibilities; for example "dotted-lists" can result in certain cases with empty-list arguments. If any of these problematic possibilities occurs the stack is left unchanged.
364        /// </summary>
365        CodeSubst,
366
367        /// <summary>
368        /// CODE.SWAP:
369        /// Swaps the top two pieces of CODE.
370        /// </summary>
371        CodeSwap,
372
373        /// <summary>
374        /// CODE.YANK:
375        /// Removes an indexed item from "deep" in the stack and pushes it on top of the stack. The index is taken from the INTEGER stack.
376        /// </summary>
377        CodeYank,
378
379        /// <summary>
380        /// CODE.YANKDUP:
381        /// Pushes a copy of an indexed item "deep" in the stack onto the top of the stack, without removing the deep item. The index is taken from the INTEGER stack.
382        /// </summary>
383        CodeYankDuplicate,
384        #endregion Code
385
386        #region Exec
387        ExecExpand,
388
389        ExecPush,
390
391        /// <summary>
392        /// EXEC.=:
393        /// Pushes TRUE if the top two items on the EXEC stack are equal, or FALSE otherwise.
394        /// </summary>
395        ExecEquals,
396
397        /// <summary>
398        /// EXEC.DEFINE:
399        /// Defines the name on top of the NAME stack as an inclassion that will push the top item of the EXEC stack back onto the EXEC stack.
400        /// </summary>
401        ExecDefine,
402
403        /// <summary>
404        /// EXEC.DO*COUNT:
405        /// An iteration inclassion that performs a loop (the body of which is taken from the EXEC stack) the number of times indicated by the INTEGER argument, pushing an index (which runs from zero to one less than the number of iterations) onto the INTEGER stack prior to each execution of the loop body. This is similar to CODE.DO*COUNT except that it takes its code argument from the EXEC stack. This should be implemented as a macro that expands into a call to EXEC.DO*RANGE. EXEC.DO*COUNT takes a single INTEGER argument (the number of times that the loop will be executed) and a single EXEC argument (the body of the loop). If the provided INTEGER argument is negative or zero then this becomes a NOOP. Otherwise it expands into:
406        /// ( 0 <1 - IntegerArg> EXEC.DO*RANGE <ExecArg> )
407        /// </summary>
408        ExecDoXCount,
409
410        /// <summary>
411        /// EXEC.DO*RANGE:
412        /// An iteration inclassion that executes the top item on the EXEC stack a number of times that depends on the top two integers, while also pushing the loop counter onto the INTEGER stack for possible access during the execution of the body of the loop. This is similar to CODE.DO*COUNT except that it takes its code argument from the EXEC stack. The top integer is the "destination index" and the second integer is the "current index." First the code and the integer arguments are saved locally and popped. Then the integers are compared. If the integers are equal then the current index is pushed onto the INTEGER stack and the code (which is the "body" of the loop) is pushed onto the EXEC stack for subsequent execution. If the integers are not equal then the current index will still be pushed onto the INTEGER stack but two items will be pushed onto the EXEC stack -- first a recursive call to EXEC.DO*RANGE (with the same code and destination index, but with a current index that has been either incremented or decremented by 1 to be closer to the destination index) and then the body code. Note that the range is inclusive of both endpoints; a call with integer arguments 3 and 5 will cause its body to be executed 3 times, with the loop counter having the values 3, 4, and 5. Note also that one can specify a loop that "counts down" by providing a destination index that is less than the specified current index.
413        /// </summary>
414        ExecDoXRange,
415
416        /// <summary>
417        /// EXEC.DO*TIMES:
418        /// Like EXEC.DO*COUNT but does not push the loop counter. This should be implemented as a macro that expands into EXEC.DO*RANGE, similarly to the implementation of EXEC.DO*COUNT, except that a call to INTEGER.POP should be tacked on to the front of the loop body code in the call to EXEC.DO*RANGE. This call to INTEGER.POP will remove the loop counter, which will have been pushed by EXEC.DO*RANGE, prior to the execution of the loop body.
419        /// </summary>
420        ExecDoXTimes,
421
422        /// <summary>
423        /// EXEC.DUP:
424        /// Duplicatelicates the top item on the EXEC stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!). This may be thought of as a "DO TWICE" inclassion.
425        /// </summary>
426        ExecDuplicate,
427
428        /// <summary>
429        /// EXEC.FLUSH:
430        /// Empties the EXEC stack. This may be thought of as a "HALT" inclassion.
431        /// </summary>
432        ExecFlush,
433
434        /// <summary>
435        /// EXEC.IF:
436        /// If the top item of the BOOLEAN stack is TRUE then this removes the second item on the EXEC stack, leaving the first item to be executed. If it is false then it removes the first item, leaving the second to be executed. This is similar to CODE.IF except that it operates on the EXEC stack. This acts as a NOOP unless there are at least two items on the EXEC stack and one item on the BOOLEAN stack.
437        /// </summary>
438        ExecIf,
439
440        /// <summary>
441        /// EXEC.K:
442        /// The Push implementation of the "K combinator". Removes the second item on the EXEC stack.
443        /// </summary>
444        ExecK,
445
446        /// <summary>
447        /// EXEC.POP: Pops the EXEC stack. This may be thought of as a "DONT" inclassion.
448        /// </summary>
449        ExecPop,
450
451        /// <summary>
452        /// EXEC.ROT:
453        /// Rotates the top three items on the EXEC stack, pulling the third item out and pushing it on top. This is equivalent to "2 EXEC.YANK".
454        /// </summary>
455        ExecRot,
456
457        /// <summary>
458        /// EXEC.S:
459        /// The Push implementation of the "S combinator". Pops 3 items from the EXEC stack, which we will call A, B, and C (with A being the first one popped). Then pushes a list containing B and C back onto the EXEC stack, followed by another instance of C, followed by another instance of A.
460        /// </summary>
461        ExecS,
462
463        /// <summary>
464        /// EXEC.SHOVE:
465        /// Inserts the top EXEC item "deep" in the stack, at the position indexed by the top INTEGER. This may be thought of as a "DO LATER" inclassion.
466        /// </summary>
467        ExecShove,
468
469        /// <summary>
470        /// EXEC.STACKDEPTH:
471        /// Pushes the stack depth onto the INTEGER stack.
472        /// </summary>
473        ExecStackDepth,
474
475        /// <summary>
476        /// EXEC.SWAP:
477        /// Swaps the top two items on the EXEC stack.
478        /// </summary>
479        ExecSwap,
480
481        /// <summary>
482        /// EXEC.Y:
483        /// The Push implementation of the "Y combinator". Inserts beneath the top item of the EXEC stack a new item of the form "( EXEC.Y <TopItem> )".
484        /// </summary>
485        ExecY,
486
487        /// <summary>
488        /// EXEC.YANK:
489        /// Removes an indexed item from "deep" in the stack and pushes it on top of the stack. The index is taken from the INTEGER stack. This may be thought of as a "DO SOONER" inclassion.
490        /// </summary>
491        ExecYank,
492
493        /// <summary>
494        /// EXEC.YANKDUP:
495        /// Pushes a copy of an indexed item "deep" in the stack onto the top of the stack, without removing the deep item. The index is taken from the INTEGER stack.
496        /// </summary>
497        ExecYankDuplicate,
498        #endregion Exec
499
500        #region Float
501        /// <summary>
502        /// FLOAT.%:
503        /// Pushes the second stack item modulo the top stack item. If the top item is zero this acts as a NOOP. The modulus is computed as the remainder of the quotient, where the quotient has first been truncated toward negative infinity. (This is taken from the definition for the generic MOD function in Common Lisp, which is described for example at
504        /// <see cref="http://www.lispworks.com/reference/HyperSpec/Body/f_mod_r.htm">HyperSpec</see>.)
505        /// </summary>
506        FloatModulo,
507
508        /// <summary>
509        /// FLOAT.*:
510        /// Pushes the product of the top two items.
511        /// </summary>
512        FloatMultiply,
513
514        /// <summary>
515        /// FLOAT.+:
516        /// Pushes the sum of the top two items.
517        /// </summary>
518        FloatAdd,
519
520        /// <summary>
521        /// FLOAT.-:
522        /// Pushes the difference of the top two items; that is, the second item minus the top item.
523        /// </summary>
524        FloatSubtract,
525
526        /// <summary>
527        /// FLOAT./:
528        /// Pushes the quotient of the top two items; that is, the second item divided by the top item. If the top item is zero this acts as a NOOP.
529        /// </summary>
530        FloatDivide,
531
532        /// <summary>
533        /// FLOAT.&lt;:
534        /// Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise.
535        /// </summary>
536        FloatSmallerThan,
537
538        /// <summary>
539        /// FLOAT.=:
540        /// Pushes TRUE onto the BOOLEAN stack if the top two items are equal, or FALSE otherwise.
541        /// </summary>
542        FloatEquals,
543
544        /// <summary>
545        /// FLOAT.&gt;:
546        /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.
547        /// </summary>
548        FloatGreaterThan,
549
550        /// <summary>
551        /// FLOAT.COS:
552        /// Pushes the cosine of the top item.
553        /// </summary>
554        FloatCos,
555
556        /// <summary>
557        /// FLOAT.DEFINE:
558        /// Defines the name on top of the NAME stack as an inclassion that will push the top item of the FLOAT stack onto the EXEC stack.
559        /// </summary>
560        FloatDefine,
561
562        /// <summary>
563        /// FLOAT.DUP:
564        /// Duplicatelicates the top item on the FLOAT stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
565        /// </summary>
566        FloatDuplicate,
567
568        /// <summary>
569        /// FLOAT.FLUSH:
570        /// Empties the FLOAT stack.
571        /// </summary>
572        FloatFlush,
573
574        /// <summary>
575        /// FLOAT.FROMBOOLEAN:
576        /// Pushes 1.0 if the top BOOLEAN is TRUE, or 0.0 if the top BOOLEAN is FALSE.
577        /// </summary>
578        FloatFromBoolean,
579
580        /// <summary>
581        /// FLOAT.FROMINTEGER:
582        /// Pushes a floating point version of the top INTEGER.
583        /// </summary>
584        FloatFromInteger,
585
586        /// <summary>
587        /// FLOAT.MAX:
588        /// Pushes the maximum of the top two items.
589        /// </summary>
590        FloatMax,
591
592        /// <summary>
593        /// FLOAT.MIN:
594        /// Pushes the minimum of the top two items.
595        /// </summary>
596        FloatMin,
597
598        /// <summary>
599        /// FLOAT.POP:
600        /// Pops the FLOAT stack.
601        /// </summary>
602        FloatPop,
603
604        /// <summary>
605        /// Pushes a floating point value to the FLOAT stack.
606        /// </summary>
607        FloatPush,
608
609        /// <summary>
610        /// FLOAT.RAND:
611        /// Pushes a newly generated random FLOAT that is greater than or equal to MIN-RANDOM-FLOAT and less than or equal to MAX-RANDOM-FLOAT.
612        /// </summary>
613        FloatRand,
614
615        /// <summary>
616        /// FLOAT.ROT:
617        /// Rotates the top three items on the FLOAT stack, pulling the third item out and pushing it on top. This is equivalent to "2 FLOAT.YANK".
618        /// </summary>
619        FloatRot,
620
621        /// <summary>
622        /// FLOAT.SHOVE:
623        /// Inserts the top FLOAT "deep" in the stack, at the position indexed by the top INTEGER.
624        /// </summary>
625        FloatShove,
626
627        /// <summary>
628        /// FLOAT.SIN:
629        /// Pushes the sine of the top item.
630        /// </summary>
631        FloatSin,
632
633        /// <summary>
634        /// FLOAT.STACKDEPTH:
635        /// Pushes the stack depth onto the INTEGER stack.
636        /// </summary>
637        FloatStackDepth,
638
639        /// <summary>
640        /// FLOAT.SWAP:
641        /// Swaps the top two BOOLEANs.
642        /// </summary>
643        FloatSwap,
644
645        /// <summary>
646        /// FLOAT.TAN:
647        /// Pushes the tangent of the top item.
648        /// </summary>
649        FloatTan,
650
651        /// <summary>
652        /// FLOAT.YANK:
653        /// Removes an indexed item from "deep" in the stack and pushes it on top of the stack. The index is taken from the INTEGER stack.
654        /// </summary>
655        FloatYank,
656
657        /// <summary>
658        /// FLOAT.YANKDUP:
659        /// Pushes a copy of an indexed item "deep" in the stack onto the top of the stack, without removing the deep item. The index is taken from the INTEGER stack.
660        /// </summary>
661        FloatYankDuplicate,
662
663        #endregion Float
664
665        #region Integer
666
667        /// <summary>
668        /// FLOAT.%:
669        /// Pushes the second stack item modulo the top stack item. If the top item is zero this acts as a NOOP. The modulus is computed as the remainder of the quotient, where the quotient has first been truncated toward negative infinity. (This is taken from the definition for the generic MOD function in Common Lisp, which is described for example at
670        /// <see cref="http://www.lispworks.com/reference/HyperSpec/Body/f_mod_r.htm">HyperSpec</see>.)
671        /// </summary>
672        IntegerModulo,
673
674        /// <summary>
675        /// INTEGER.*:
676        /// Pushes the product of the top two items.
677        /// </summary>
678        IntegerMultiply,
679
680        /// <summary>
681        /// INTEGER.+:
682        /// Pushes the sum of the top two items.
683        /// </summary>
684        IntegerAdd,
685
686        /// <summary>
687        /// INTEGER.-:
688        /// Pushes the difference of the top two items; that is, the second item minus the top item.
689        /// </summary>
690        IntegerSubtract,
691
692        /// <summary>
693        /// INTEGER./:
694        /// Pushes the quotient of the top two items; that is, the second item divided by the top item. If the top item is zero this acts as a NOOP.
695        /// </summary>
696        IntegerDivide,
697
698        /// <summary>
699        /// INTEGER.&lt;:
700        /// Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise.
701        /// </summary>
702        IntegerSmallerThan,
703
704        /// <summary>
705        /// INTEGER.=:
706        /// Pushes TRUE onto the BOOLEAN stack if the top two items are equal, or FALSE otherwise.
707        /// </summary>
708        IntegerEquals,
709
710        /// <summary>
711        /// INTEGER.&gt;:
712        /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.
713        /// </summary>
714        IntegerGreaterThan,
715
716        /// <summary>
717        /// INTEGER.DEFINE:
718        /// Defines the name on top of the NAME stack as an inclassion that will push the top item of the INTEGER stack onto the EXEC stack.
719        /// </summary>
720        IntegerDefine,
721
722        /// <summary>
723        /// INTEGER.DUP:
724        /// Duplicatelicates the top item on the INTEGER stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
725        /// </summary>
726        IntegerDuplicate,
727
728        /// <summary>
729        /// INTEGER.FLUSH:
730        /// Empties the INTEGER stack.
731        /// </summary>
732        IntegerFlush,
733
734        /// <summary>
735        /// INTEGER.FROMBOOLEAN:
736        /// Pushes 1.0 if the top BOOLEAN is TRUE, or 0.0 if the top BOOLEAN is FALSE.
737        /// </summary>
738        IntegerFromBoolean,
739
740        /// <summary>
741        /// INTEGER.FROMFLOAT:
742        /// Pushes the result of truncating the top FLOAT.
743        /// </summary>
744        IntegerFromFloat,
745
746        /// <summary>
747        /// INTEGER.MAX:
748        /// Pushes the maximum of the top two items.
749        /// </summary>
750        IntegerMax,
751
752        /// <summary>
753        /// INTEGER.MIN:
754        /// Pushes the minimum of the top two items.
755        /// </summary>
756        IntegerMin,
757
758        /// <summary>
759        /// INTEGER.POP:
760        /// Pops the INTEGER stack.
761        /// </summary>
762        IntegerPop,
763
764        /// <summary>
765        /// Pushes a integer literal to the INTEGER stack
766        /// </summary>
767        IntegerPush,
768
769        /// <summary>
770        /// INTEGER.RAND:
771        /// Pushes a newly generated random INTEGER that is greater than or equal to MIN-RANDOM-INTEGER and less than or equal to MAX-RANDOM-INTEGER.
772        /// </summary>
773        IntegerRand,
774
775        /// <summary>
776        /// INTEGER.ROT:
777        /// Rotates the top three items on the INTEGER stack, pulling the third item out and pushing it on top. This is equivalent to "2 INTEGER.YANK".
778        /// </summary>
779        IntegerRot,
780
781        /// <summary>
782        /// INTEGER.SHOVE:
783        /// Inserts the top INTEGER "deep" in the stack, at the position indexed by the top INTEGER.
784        /// </summary>
785        IntegerShove,
786
787        /// <summary>
788        /// INTEGER.STACKDEPTH:
789        /// Pushes the stack depth onto the INTEGER stack.
790        /// </summary>
791        IntegerStackDepth,
792
793        /// <summary>
794        /// INTEGER.SWAP:
795        /// Swaps the top two BOOLEANs.
796        /// </summary>
797        IntegerSwap,
798
799        /// <summary>
800        /// INTEGER.YANK:
801        /// Removes an indexed item from "deep" in the stack and pushes it on top of the stack. The index is taken from the INTEGER stack.
802        /// </summary>
803        IntegerYank,
804
805        /// <summary>
806        /// INTEGER.YANKDUP:
807        /// Pushes a copy of an indexed item "deep" in the stack onto the top of the stack, without removing the deep item. The index is taken from the INTEGER stack.
808        /// </summary>
809        IntegerYankDuplicate,
810
811        #endregion Integer
812
813        #region Name
814
815        NamePush,
816
817        /// <summary>
818        /// Pushes a floating point value to the FLOAT stack.
819        /// </summary>
820        NameDefineXExec,
821
822        /// <summary>
823        /// NAME.=:
824        /// Pushes TRUE if the top two NAMEs are equal, or FALSE otherwise.
825        /// </summary>
826        NameEquals,
827
828        /// <summary>
829        /// NAME.DUP:
830        /// Duplicatelicates the top item on the NAME stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
831        /// </summary>
832        NameDuplicate,
833
834        /// <summary>
835        /// NAME.FLUSH:
836        /// Empties the NAME stack.
837        /// </summary>
838        NameFlush,
839
840        /// <summary>
841        /// NAME.POP: Pops the NAME stack.
842        /// </summary>
843        NamePop,
844
845        /// <summary>
846        /// NAME.QUOTE:
847        /// Sets a flag indicating that the next name encountered will be pushed onto the NAME stack (and not have its associated value pushed onto the EXEC stack), regardless of whether or not it has a definition. Upon encountering such a name and pushing it onto the NAME stack the flag will be cleared (whether or not the pushed name had a definition).
848        /// </summary>
849        NameQuote,
850
851        /// <summary>
852        /// NAME.RAND:
853        /// Pushes a newly generated random NAME.
854        /// </summary>
855        NameRand,
856
857        /// <summary>
858        /// NAME.RANDBOUNDNAME:
859        /// Pushes a randomly selected NAME that already has a definition.
860        /// </summary>
861        NameRandBoundName,
862
863        /// <summary>
864        /// NAME.ROT:
865        /// Rotates the top three items on the NAME stack, pulling the third item out and pushing it on top. This is equivalent to "2 NAME.YANK".
866        /// </summary>
867        NameRot,
868
869        /// <summary>
870        /// NAME.SHOVE:
871        /// Inserts the top NAME "deep" in the stack, at the position indexed by the top INTEGER.
872        /// </summary>
873        NameShove,
874
875        /// <summary>
876        /// NAME.STACKDEPTH:
877        /// Pushes the stack depth onto the INTEGER stack.
878        /// </summary>
879        NameStackDepth,
880
881        /// <summary>
882        /// NAME.SWAP:
883        /// Swaps the top two NAMEs.
884        /// </summary>
885        NameSwap,
886
887        /// <summary>
888        /// NAME.YANK:
889        /// Removes an indexed item from "deep" in the stack and pushes it on top of the stack. The index is taken from the INTEGER stack.
890        /// </summary>
891        NameYank,
892
893        /// <summary>
894        /// NAME.YANKDUP:
895        /// Pushes a copy of an indexed item "deep" in the stack onto the top of the stack, without removing the deep item. The index is taken from the INTEGER stack.
896        /// </summary>
897        NameYankDuplicate,
898        #endregion Name
899    }
900}
Note: See TracBrowser for help on using the repository browser.