Free cookie consent management tool by TermsFeed Policy Generator

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

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

#2665 Added Interpreter, Parser, 16 Examples, Expressions needed for the examples

File size: 37.8 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 instruction 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        /// Duplicates 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        BooleanDup,
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        BooleanYankDup,
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 instruction 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 instruction 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 instruction 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 instruction).
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. Construct 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 instruction 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 instruction 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        /// Duplicates 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        CodeDup,
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/instruction 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.INSERT:
268        /// 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.
269        /// </summary>
270        CodeInsert,
271
272        /// <summary>
273        /// CODE.INSTRUCTIONS:
274        /// Pushes a list of all active instructions in the interpreter's current configuration.
275        /// </summary>
276        CodeInstructions,
277
278        /// <summary>
279        /// CODE.LENGTH:
280        /// 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.
281        /// </summary>
282        CodeLength,
283
284        /// <summary>
285        /// CODE.LIST: Pushes a list of the top two items of the CODE stack onto the CODE stack.
286        /// </summary>
287        CodeList,
288
289        /// <summary>
290        /// CODE.MEMBER:
291        /// 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.
292        /// </summary>
293        CodeMember,
294
295        /// <summary>
296        /// CODE.NOOP: Does nothing.
297        /// </summary>
298        CodeNoop,
299
300        /// <summary>
301        /// CODE:NTH:
302        /// 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.
303        /// </summary>
304        CodeNth,
305
306        /// <summary>
307        /// CODE.NTHCDR:
308        /// 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.
309        /// </summary>
310        CodeNthCdr,
311
312        /// <summary>
313        /// CODE.QUOTE:
314        /// 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.
315        /// </summary>
316        CodeQuote,
317
318        /// <summary>
319        /// 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.
320        /// </summary>
321        CodeRand,
322
323        /// <summary>
324        /// CODE.ROT:
325        /// 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".
326        /// </summary>
327        CodeRot,
328
329        /// <summary>
330        /// CODE.SHOVE:
331        /// Inserts the top piece of CODE "deep" in the stack, at the position indexed by the top INTEGER.
332        /// </summary>
333        CodeShove,
334
335        /// <summary>
336        /// CODE.SIZE: Pushes the number of "points" in the top piece of CODE onto the INTEGER stack. Each instruction, literal, and pair of parentheses counts as a point.
337        /// </summary>
338        CodeSize,
339
340        /// <summary>
341        /// CODE.STACKDEPTH: Pushes the stack depth onto the INTEGER stack.
342        /// </summary>
343        CodeStackDepth,
344
345        /// <summary>
346        /// 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.
347        /// </summary>
348        CodeSubst,
349
350        /// <summary>
351        /// CODE.SWAP:
352        /// Swaps the top two pieces of CODE.
353        /// </summary>
354        CodeSwap,
355
356        /// <summary>
357        /// CODE.YANK:
358        /// 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.
359        /// </summary>
360        CodeYank,
361
362        /// <summary>
363        /// CODE.YANKDUP:
364        /// 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.
365        /// </summary>
366        CodeYankDup,
367        #endregion Code
368
369        #region Exec
370        ExecExpand,
371
372        ExecPush,
373
374        /// <summary>
375        /// EXEC.=:
376        /// Pushes TRUE if the top two items on the EXEC stack are equal, or FALSE otherwise.
377        /// </summary>
378        ExecEquals,
379
380        /// <summary>
381        /// EXEC.DEFINE:
382        /// Defines the name on top of the NAME stack as an instruction that will push the top item of the EXEC stack back onto the EXEC stack.
383        /// </summary>
384        ExecDefine,
385
386        /// <summary>
387        /// EXEC.DO*COUNT:
388        /// An iteration instruction 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:
389        /// ( 0 <1 - IntegerArg> EXEC.DO*RANGE <ExecArg> )
390        /// </summary>
391        ExecDoXCount,
392
393        /// <summary>
394        /// EXEC.DO*RANGE:
395        /// An iteration instruction 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.
396        /// </summary>
397        ExecDoXRange,
398
399        /// <summary>
400        /// EXEC.DO*TIMES:
401        /// 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.
402        /// </summary>
403        ExecDoXTimes,
404
405        /// <summary>
406        /// EXEC.DUP:
407        /// Duplicates 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" instruction.
408        /// </summary>
409        ExecDup,
410
411        /// <summary>
412        /// EXEC.FLUSH:
413        /// Empties the EXEC stack. This may be thought of as a "HALT" instruction.
414        /// </summary>
415        ExecFlush,
416
417        /// <summary>
418        /// EXEC.IF:
419        /// 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.
420        /// </summary>
421        ExecIf,
422
423        /// <summary>
424        /// EXEC.K:
425        /// The Push implementation of the "K combinator". Removes the second item on the EXEC stack.
426        /// </summary>
427        ExecK,
428
429        /// <summary>
430        /// EXEC.POP: Pops the EXEC stack. This may be thought of as a "DONT" instruction.
431        /// </summary>
432        ExecPop,
433
434        /// <summary>
435        /// EXEC.ROT:
436        /// 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".
437        /// </summary>
438        ExecRot,
439
440        /// <summary>
441        /// EXEC.SHOVE:
442        /// 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" instruction.
443        /// </summary>
444        ExecShove,
445
446        /// <summary>
447        /// EXEC.STACKDEPTH:
448        /// Pushes the stack depth onto the INTEGER stack.
449        /// </summary>
450        ExecStackDepth,
451
452        /// <summary>
453        /// EXEC.SWAP:
454        /// Swaps the top two items on the EXEC stack.
455        /// </summary>
456        ExecSwap,
457
458        /// <summary>
459        /// EXEC.Y:
460        /// 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> )".
461        /// </summary>
462        ExecY,
463
464        /// <summary>
465        /// EXEC.YANK:
466        /// 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" instruction.
467        /// </summary>
468        ExecYank,
469
470        /// <summary>
471        /// EXEC.YANKDUP:
472        /// 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.
473        /// </summary>
474        ExecYankDup,
475        #endregion Exec
476
477        #region Float
478        /// <summary>
479        /// FLOAT.%:
480        /// 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
481        /// <see cref="http://www.lispworks.com/reference/HyperSpec/Body/f_mod_r.htm">HyperSpec</see>.)
482        /// </summary>
483        FloatModulo,
484
485        /// <summary>
486        /// FLOAT.*:
487        /// Pushes the product of the top two items.
488        /// </summary>
489        FloatMultiply,
490
491        /// <summary>
492        /// FLOAT.+:
493        /// Pushes the sum of the top two items.
494        /// </summary>
495        FloatAdd,
496
497        /// <summary>
498        /// FLOAT.-:
499        /// Pushes the difference of the top two items; that is, the second item minus the top item.
500        /// </summary>
501        FloatSubtract,
502
503        /// <summary>
504        /// FLOAT./:
505        /// 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.
506        /// </summary>
507        FloatDivide,
508
509        /// <summary>
510        /// FLOAT.&lt;:
511        /// Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise.
512        /// </summary>
513        FloatSmallerThan,
514
515        /// <summary>
516        /// FLOAT.=:
517        /// Pushes TRUE onto the BOOLEAN stack if the top two items are equal, or FALSE otherwise.
518        /// </summary>
519        FloatEquals,
520
521        /// <summary>
522        /// FLOAT.&gt;:
523        /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.
524        /// </summary>
525        FloatGreaterThan,
526
527        /// <summary>
528        /// FLOAT.COS:
529        /// Pushes the cosine of the top item.
530        /// </summary>
531        FloatCos,
532
533        /// <summary>
534        /// FLOAT.DEFINE:
535        /// Defines the name on top of the NAME stack as an instruction that will push the top item of the FLOAT stack onto the EXEC stack.
536        /// </summary>
537        FloatDefine,
538
539        /// <summary>
540        /// FLOAT.DUP:
541        /// Duplicates the top item on the FLOAT stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
542        /// </summary>
543        FloatDup,
544
545        /// <summary>
546        /// FLOAT.FLUSH:
547        /// Empties the FLOAT stack.
548        /// </summary>
549        FloatFlush,
550
551        /// <summary>
552        /// FLOAT.FROMBOOLEAN:
553        /// Pushes 1.0 if the top BOOLEAN is TRUE, or 0.0 if the top BOOLEAN is FALSE.
554        /// </summary>
555        FloatFromBoolean,
556
557        /// <summary>
558        /// FLOAT.FROMINTEGER:
559        /// Pushes a floating point version of the top INTEGER.
560        /// </summary>
561        FloatFromInteger,
562
563        /// <summary>
564        /// FLOAT.MAX:
565        /// Pushes the maximum of the top two items.
566        /// </summary>
567        FloatMax,
568
569        /// <summary>
570        /// FLOAT.MIN:
571        /// Pushes the minimum of the top two items.
572        /// </summary>
573        FloatMin,
574
575        /// <summary>
576        /// FLOAT.POP:
577        /// Pops the FLOAT stack.
578        /// </summary>
579        FloatPop,
580
581        /// <summary>
582        /// Pushes a floating point value to the FLOAT stack.
583        /// </summary>
584        FloatPush,
585
586        /// <summary>
587        /// FLOAT.RAND:
588        /// 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.
589        /// </summary>
590        FloatRand,
591
592        /// <summary>
593        /// FLOAT.ROT:
594        /// 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".
595        /// </summary>
596        FloatRot,
597
598        /// <summary>
599        /// FLOAT.SHOVE:
600        /// Inserts the top FLOAT "deep" in the stack, at the position indexed by the top INTEGER.
601        /// </summary>
602        FloatShove,
603
604        /// <summary>
605        /// FLOAT.SIN:
606        /// Pushes the sine of the top item.
607        /// </summary>
608        FloatSin,
609
610        /// <summary>
611        /// FLOAT.STACKDEPTH:
612        /// Pushes the stack depth onto the INTEGER stack.
613        /// </summary>
614        FloatStackDepth,
615
616        /// <summary>
617        /// FLOAT.SWAP:
618        /// Swaps the top two BOOLEANs.
619        /// </summary>
620        FloatSwap,
621
622        /// <summary>
623        /// FLOAT.TAN:
624        /// Pushes the tangent of the top item.
625        /// </summary>
626        FloatTan,
627
628        /// <summary>
629        /// FLOAT.YANK:
630        /// 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.
631        /// </summary>
632        FloatYank,
633
634        /// <summary>
635        /// FLOAT.YANKDUP:
636        /// 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.
637        /// </summary>
638        FloatYankDup,
639
640        #endregion Float
641
642        #region Integer
643
644        /// <summary>
645        /// FLOAT.%:
646        /// 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
647        /// <see cref="http://www.lispworks.com/reference/HyperSpec/Body/f_mod_r.htm">HyperSpec</see>.)
648        /// </summary>
649        IntegerModulo,
650
651        /// <summary>
652        /// INTEGER.*:
653        /// Pushes the product of the top two items.
654        /// </summary>
655        IntegerMultiply,
656
657        /// <summary>
658        /// INTEGER.+:
659        /// Pushes the sum of the top two items.
660        /// </summary>
661        IntegerAdd,
662
663        /// <summary>
664        /// INTEGER.-:
665        /// Pushes the difference of the top two items; that is, the second item minus the top item.
666        /// </summary>
667        IntegerSubtract,
668
669        /// <summary>
670        /// INTEGER./:
671        /// 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.
672        /// </summary>
673        IntegerDivide,
674
675        /// <summary>
676        /// INTEGER.&lt;:
677        /// Pushes TRUE onto the BOOLEAN stack if the second item is less than the top item, or FALSE otherwise.
678        /// </summary>
679        IntegerSmallerThan,
680
681        /// <summary>
682        /// INTEGER.=:
683        /// Pushes TRUE onto the BOOLEAN stack if the top two items are equal, or FALSE otherwise.
684        /// </summary>
685        IntegerEquals,
686
687        /// <summary>
688        /// INTEGER.&gt;:
689        /// Pushes TRUE onto the BOOLEAN stack if the second item is greater than the top item, or FALSE otherwise.
690        /// </summary>
691        IntegerGreaterThan,
692
693        /// <summary>
694        /// INTEGER.COS:
695        /// Pushes the cosine of the top item.
696        /// </summary>
697        IntegerCos,
698
699        /// <summary>
700        /// INTEGER.DEFINE:
701        /// Defines the name on top of the NAME stack as an instruction that will push the top item of the INTEGER stack onto the EXEC stack.
702        /// </summary>
703        IntegerDefine,
704
705        /// <summary>
706        /// INTEGER.DUP:
707        /// Duplicates the top item on the INTEGER stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
708        /// </summary>
709        IntegerDup,
710
711        /// <summary>
712        /// INTEGER.FLUSH:
713        /// Empties the INTEGER stack.
714        /// </summary>
715        IntegerFlush,
716
717        /// <summary>
718        /// INTEGER.FROMBOOLEAN:
719        /// Pushes 1.0 if the top BOOLEAN is TRUE, or 0.0 if the top BOOLEAN is FALSE.
720        /// </summary>
721        IntegerFromBoolean,
722
723        /// <summary>
724        /// INTEGER.FROMFLOAT:
725        /// Pushes the result of truncating the top FLOAT.
726        /// </summary>
727        IntegerFromFloat,
728
729        /// <summary>
730        /// INTEGER.MAX:
731        /// Pushes the maximum of the top two items.
732        /// </summary>
733        IntegerMax,
734
735        /// <summary>
736        /// INTEGER.MIN:
737        /// Pushes the minimum of the top two items.
738        /// </summary>
739        IntegerMin,
740
741        /// <summary>
742        /// INTEGER.POP:
743        /// Pops the INTEGER stack.
744        /// </summary>
745        IntegerPop,
746
747        /// <summary>
748        /// Pushes a integer literal to the INTEGER stack
749        /// </summary>
750        IntegerPush,
751
752        /// <summary>
753        /// INTEGER.RAND:
754        /// 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.
755        /// </summary>
756        IntegerRand,
757
758        /// <summary>
759        /// INTEGER.ROT:
760        /// 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".
761        /// </summary>
762        IntegerRot,
763
764        /// <summary>
765        /// INTEGER.SHOVE:
766        /// Inserts the top INTEGER "deep" in the stack, at the position indexed by the top INTEGER.
767        /// </summary>
768        IntegerShove,
769
770        /// <summary>
771        /// INTEGER.SIN:
772        /// Pushes the sine of the top item.
773        /// </summary>
774        IntegerSin,
775
776        /// <summary>
777        /// INTEGER.STACKDEPTH:
778        /// Pushes the stack depth onto the INTEGER stack.
779        /// </summary>
780        IntegerStackDepth,
781
782        /// <summary>
783        /// INTEGER.SWAP:
784        /// Swaps the top two BOOLEANs.
785        /// </summary>
786        IntegerSwap,
787
788        /// <summary>
789        /// INTEGER.TAN:
790        /// Pushes the tangent of the top item.
791        /// </summary>
792        IntegerTan,
793
794        /// <summary>
795        /// INTEGER.YANK:
796        /// 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.
797        /// </summary>
798        IntegerYank,
799
800        /// <summary>
801        /// INTEGER.YANKDUP:
802        /// 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.
803        /// </summary>
804        IntegerYankDup,
805
806        #endregion Integer
807
808        #region Name
809
810        NamePush,
811
812        /// <summary>
813        /// Pushes a floating point value to the FLOAT stack.
814        /// </summary>
815        NameDefineXExec,
816
817        /// <summary>
818        /// NAME.=:
819        /// Pushes TRUE if the top two NAMEs are equal, or FALSE otherwise.
820        /// </summary>
821        NameEquals,
822
823        /// <summary>
824        /// NAME.DUP:
825        /// Duplicates the top item on the NAME stack. Does not pop its argument (which, if it did, would negate the effect of the duplication!).
826        /// </summary>
827        NameDup,
828
829        /// <summary>
830        /// NAME.FLUSH:
831        /// Empties the NAME stack.
832        /// </summary>
833        NameFlush,
834
835        /// <summary>
836        /// NAME.POP: Pops the NAME stack.
837        /// </summary>
838        NamePop,
839
840        /// <summary>
841        /// NAME.QUOTE:
842        /// 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).
843        /// </summary>
844        NameQuote,
845
846        /// <summary>
847        /// NAME.RAND:
848        /// Pushes a newly generated random NAME.
849        /// </summary>
850        NameRand,
851
852        /// <summary>
853        /// NAME.RANDBOUNDNAME:
854        /// Pushes a randomly selected NAME that already has a definition.
855        /// </summary>
856        NameRandBoundName,
857
858        /// <summary>
859        /// NAME.ROT:
860        /// 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".
861        /// </summary>
862        NameRot,
863
864        /// <summary>
865        /// NAME.SHOVE:
866        /// Inserts the top NAME "deep" in the stack, at the position indexed by the top INTEGER.
867        /// </summary>
868        NameShove,
869
870        /// <summary>
871        /// NAME.STACKDEPTH:
872        /// Pushes the stack depth onto the INTEGER stack.
873        /// </summary>
874        NameStackDepth,
875
876        /// <summary>
877        /// NAME.SWAP:
878        /// Swaps the top two NAMEs.
879        /// </summary>
880        NameSwap,
881
882        /// <summary>
883        /// NAME.YANK:
884        /// 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.
885        /// </summary>
886        NameYank,
887
888        /// <summary>
889        /// NAME.YANKDUP:
890        /// 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.
891        /// </summary>
892        NameYankDup,
893        #endregion Name
894    }
895}
Note: See TracBrowser for help on using the repository browser.