Changeset 15032 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CodeExpressions.cs
- Timestamp:
- 06/12/17 14:11:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/CodeExpressions.cs
r15017 r15032 1 /// <summary> 2 /// For explicit code manipulation and execution. May also be used as a general list data types. 3 /// This types must always be present, as the top level interpreter will push any code to be executed on the 4 /// CODE stack prior to execution. However, one may turn off all CODE instructions if code manipulation is not needed. 5 /// </summary> 1 // For explicit code manipulation and execution. May also be used as a general list data types. 2 // This types must always be present, as the top level interpreter will push any code to be executed on the 3 // CODE stack prior to execution. However, one may turn off all CODE instructions if code manipulation is not needed. 6 4 7 5 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions { … … 18 16 19 17 /// <summary> 20 /// Recursively invokes the interpreter on the program on top of the CODE stack. After evaluation the 21 /// CODE stack is popped; normally this pops the program that was just executed, but if the expression itself 22 /// manipulates the stack then this final pop may end up popping something else. 23 /// </summary> 24 [PushExpression(StackTypes.Code, "CODE.DO", StackTypes.Exec)] 18 /// Recursively invokes the interpreter on the program on top of the CODE stack. After evaluation the 19 /// CODE stack is popped; normally this pops the program that was just executed, but if the expression itself 20 /// manipulates the stack then this final pop may end up popping something else. 21 /// </summary> 22 [PushExpression( 23 StackTypes.Code, 24 "CODE.DO", 25 "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.", 26 StackTypes.Exec)] 25 27 [StorableClass] 26 28 public class CodeDoExpression : StatelessExpression { … … 40 42 41 43 /// <summary> 42 /// Like CODE.DO but pops the stack before, rather than after, the recursive execution 43 /// </summary> 44 [PushExpression(StackTypes.Code, "CODE.DO*", StackTypes.Exec)] 44 /// Like CODE.DO but pops the stack before, rather than after, the recursive execution. 45 /// </summary> 46 [PushExpression( 47 StackTypes.Code, 48 "CODE.DO*", 49 "Like CODE.DO but pops the stack before, rather than after, the recursive execution.", 50 StackTypes.Exec)] 45 51 [StorableClass] 46 52 public class CodeDoXExpression : StatelessExpression { … … 62 68 /// Does nothing. 63 69 /// </summary> 64 [PushExpression(StackTypes.Code, "CODE.NOOP")] 70 [PushExpression( 71 StackTypes.Code, 72 "CODE.NOOP", 73 "Does nothing.")] 65 74 [StorableClass] 66 75 public class CodeNoopExpression : StatelessExpression { … … 79 88 80 89 /// <summary> 81 /// Specifies that the next expression submitted for execution will instead be pushed literally onto the CODE stack. 82 /// This can be implemented by moving the top item on the EXEC stack onto the CODE stack. 83 /// </summary> 84 [PushExpression(StackTypes.Code, "CODE.QUOTE", StackTypes.Exec)] 90 /// Specifies that the next expression submitted for execution will instead be pushed literally onto the CODE stack. 91 /// </summary> 92 [PushExpression( 93 StackTypes.Code, 94 "CODE.QUOTE", 95 "Specifies that the next expression submitted for execution will instead be pushed literally onto the CODE stack.", 96 StackTypes.Exec)] 85 97 [StorableClass] 86 98 public class CodeQuoteExpression : StatelessExpression { … … 100 112 101 113 /// <summary> 102 /// If the top item of the BOOLEAN stack is TRUE this recursively executes the second item of the CODE stack; 103 /// otherwise it recursively executes the first item of the CODE stack. Either way both elements of the CODE stack 104 /// (and the BOOLEAN value upon which the decision was made) are popped. 105 /// </summary> 106 [PushExpression(StackTypes.Code, "CODE.IF", StackTypes.Exec | StackTypes.Boolean)] 114 /// If the top item of the BOOLEAN stack is TRUE this recursively executes the second item of the CODE stack; 115 /// otherwise it recursively executes the first item of the CODE stack. Either way both elements of the CODE stack 116 /// (and the BOOLEAN value upon which the decision was made) are popped. 117 /// </summary> 118 [PushExpression( 119 StackTypes.Code, 120 "CODE.IF", 121 "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", 122 StackTypes.Exec | StackTypes.Boolean)] 107 123 [StorableClass] 108 124 public class CodeIfExpression : StatelessExpression { … … 126 142 127 143 /// <summary> 128 /// Pushes the result of appending the top two pieces of code. If one of the pieces of code is a single instruction or 129 /// literal (that is, something not surrounded by parentheses) then it is surrounded by parentheses first. 130 /// </summary> 131 [PushExpression(StackTypes.Code, "CODE.APPEND")] 144 /// Pushes the result of appending the top two pieces of code. If one of the pieces of code is a single instruction or 145 /// literal (that is, something not surrounded by parentheses) then it is surrounded by parentheses first. 146 /// </summary> 147 [PushExpression( 148 StackTypes.Code, 149 "CODE.APPEND", 150 "Pushes the result of appending the top two pieces of code.")] 132 151 [StorableClass] 133 152 public class CodeAppendExpression : StatelessExpression { … … 191 210 192 211 /// <summary> 193 /// Pushes TRUE onto the BOOLEAN stack if the top piece of code is a single instruction or a literal, 194 /// and FALSE otherwise (that is, if it is something surrounded by parentheses). 195 /// </summary> 196 [PushExpression(StackTypes.Code, "CODE.ATOM", StackTypes.Boolean)] 212 /// Pushes TRUE onto the BOOLEAN stack if the top piece of code is a single instruction or a literal, 213 /// and FALSE otherwise (that is, if it is something surrounded by parentheses). 214 /// </summary> 215 [PushExpression( 216 StackTypes.Code, 217 "CODE.ATOM", 218 "Pushes TRUE onto the BOOLEAN stack if the top piece of code is a single instruction or a literal, and FALSE otherwise", 219 StackTypes.Boolean)] 197 220 [StorableClass] 198 221 public class CodeAtomExpression : StatelessExpression { … … 214 237 215 238 /// <summary> 216 /// Pushes the first item of the list on top of the CODE stack. For example, if the top piece of code is "( A B )" 217 /// then this pushes "A" (after popping the argument). If the code on top of the stack is not a list then this has no 218 /// effect. 219 /// The name derives from the similar Lisp function; a more generic name would be "FIRST". 220 /// </summary> 221 [PushExpression(StackTypes.Code, "CODE.CAR")] 239 /// Pushes the first item of the list on top of the CODE stack. For example, if the top piece of code is "( A B )" 240 /// then this pushes "A" (after popping the argument). If the code on top of the stack is not a list then this has no 241 /// effect. The name derives from the similar Lisp function; a more generic name would be "FIRST". 242 /// </summary> 243 [PushExpression(StackTypes.Code, "CODE.CAR", "Pushes the first item of the list on top of the CODE stack.")] 222 244 [StorableClass] 223 245 public class CodeCarExpression : StatelessExpression { … … 241 263 242 264 /// <summary> 243 /// Pushes a version of the list from the top of the CODE stack without its first element. 244 /// For example, if the top piece of code is "( A B )" then this pushes "( B )" (after popping the argument). 245 /// If the code on top of the stack is not a list then this pushes the empty list ("( )"). The name derives from 246 /// the similar Lisp function; a more generic name would be "REST". 247 /// </summary> 248 [PushExpression(StackTypes.Code, "CODE.CDR")] 265 /// Pushes a version of the list from the top of the CODE stack without its first element. 266 /// For example, if the top piece of code is "( A B )" then this pushes "( B )" (after popping the argument). 267 /// If the code on top of the stack is not a list then this pushes the empty list ("( )"). The name derives from 268 /// the similar Lisp function; a more generic name would be "REST". 269 /// </summary> 270 [PushExpression( 271 StackTypes.Code, 272 "CODE.CDR", 273 "Pushes a version of the list from the top of the CODE stack without its first element.")] 249 274 [StorableClass] 250 275 public class CodeCdrExpression : StatelessExpression { … … 276 301 277 302 /// <summary> 278 /// Pushes the result of "consing" (in the Lisp sense) the second stack item onto the first stack item 279 /// (which is coerced to a list if necessary). For example, if the top piece of code is "( A B )" and the 280 /// second piece of code is "X" then this pushes "( X A B )" (after popping the argument). 281 /// </summary> 282 [PushExpression(StackTypes.Code, "CODE.CONS")] 303 /// Pushes the result of "consing" (in the Lisp sense) the second stack item onto the first stack item 304 /// (which is coerced to a list if necessary). For example, if the top piece of code is "( A B )" and the 305 /// second piece of code is "X" then this pushes "( X A B )" (after popping the argument). 306 /// </summary> 307 [PushExpression( 308 StackTypes.Code, 309 "CODE.CONS", 310 "Pushes the result of \"consing\" (in the Lisp sense) the second stack item onto the first stack item.")] 283 311 [StorableClass] 284 312 public class CodeConsExpression : StatelessExpression { … … 310 338 311 339 /// <summary> 312 /// Pushes the "container" of the second CODE stack item within the first CODE stack item onto the CODE stack. 313 /// If second item contains the first anywhere (i.e. in any nested list) then the container is the smallest sub-list 314 /// that contains but is not equal to the first instance. For example, if the top piece of code is "( B ( C ( A ) ) ( D 315 /// ( A ) ) )" 316 /// and the second piece of code is "( A )" then this pushes ( C ( A ) ). Pushes an empty list if there is no such 317 /// container. 318 /// </summary> 319 [PushExpression(StackTypes.Code, "CODE.CONTAINER")] 340 /// Pushes the "container" of the second CODE stack item within the first CODE stack item onto the CODE stack. 341 /// If second item contains the first anywhere (i.e. in any nested list) then the container is the smallest sub-list 342 /// that contains but is not equal to the first instance. For example, if the top piece of code is "( B ( C ( A ) ) ( D 343 /// ( A ) ) )" and the second piece of code is "( A )" then this pushes ( C ( A ) ). Pushes an empty list if there is no such 344 /// container. 345 /// </summary> 346 [PushExpression( 347 StackTypes.Code, 348 "CODE.CONTAINER", 349 "Pushes the \"container\" of the second CODE stack item within the first CODE stack item onto the CODE stack")] 320 350 [StorableClass] 321 351 public class CodeContainerExpression : StatelessExpression { … … 358 388 359 389 /// <summary> 360 /// Pushes TRUE on the BOOLEAN stack if the second CODE stack item contains the first CODE stack 361 /// item anywhere (e.g. in a sub-list). 362 /// </summary> 363 [PushExpression(StackTypes.Code, "CODE.CONTAINS", StackTypes.Boolean)] 390 /// Pushes TRUE on the BOOLEAN stack if the second CODE stack item contains the first CODE stack 391 /// item anywhere (e.g. in a sub-list). 392 /// </summary> 393 [PushExpression( 394 StackTypes.Code, 395 "CODE.CONTAINS", 396 "Pushes TRUE on the BOOLEAN stack if the second CODE stack item contains the first CODE stack item anywhere.", 397 StackTypes.Boolean)] 364 398 [StorableClass] 365 399 public class CodeContainsExpression : StatelessExpression { … … 383 417 384 418 /// <summary> 385 /// Pushes the definition associated with the top NAME on the NAME stack (if any) onto the CODE stack. 386 /// This extracts the definition for inspection/manipulation, rather than for immediate execution (although it 387 /// may then be executed with a call to CODE.DO or a similar instruction). 388 /// </summary> 389 [PushExpression(StackTypes.Code, "CODE.DEFINITION", StackTypes.Name)] 419 /// Pushes the definition associated with the top NAME on the NAME stack (if any) onto the CODE stack. 420 /// This extracts the definition for inspection/manipulation, rather than for immediate execution (although it 421 /// may then be executed with a call to CODE.DO or a similar instruction). 422 /// </summary> 423 [PushExpression( 424 StackTypes.Code, 425 "CODE.DEFINITION", 426 "Pushes the definition associated with the top NAME on the NAME stack (if any) onto the CODE stack.", 427 StackTypes.Name)] 390 428 [StorableClass] 391 429 public class CodeDefinitionExpression : StatelessExpression { … … 432 470 /// </list> 433 471 /// </summary> 434 [PushExpression(StackTypes.Code, "CODE.DISCREPANCY", StackTypes.Integer)] 472 [PushExpression( 473 StackTypes.Code, 474 "CODE.DISCREPANCY", 475 "Pushes a measure of the discrepancy between the top two CODE stack items onto the INTEGER stack", 476 StackTypes.Integer)] 435 477 [StorableClass] 436 478 public class CodeDiscrepancyExpression : StatelessExpression { … … 488 530 489 531 /// <summary> 490 /// Pushes the sub-expression of the top item of the CODE stack that is indexed by the top item of the INTEGER stack. 491 /// The indexing here counts "points," where each parenthesized expression and each literal/instruction is considered a 492 /// point, 493 /// 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 494 /// in the list 495 /// is at index 1, etc. The integer used as the index is taken modulo the number of points in the overall expression 496 /// (and its 497 /// absolute value is taken in case it is negative) to ensure that it is within the meaningful range. 498 /// </summary> 499 [PushExpression(StackTypes.Code, "CODE.EXTRACT", StackTypes.Integer)] 532 /// Pushes the sub-expression of the top item of the CODE stack that is indexed by the top item of the INTEGER stack. 533 /// The indexing here counts "points," where each parenthesized expression and each literal/instruction is considered a 534 /// 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 535 /// 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 536 /// (and its absolute value is taken in case it is negative) to ensure that it is within the meaningful range. 537 /// </summary> 538 [PushExpression( 539 StackTypes.Code, 540 "CODE.EXTRACT", 541 "Pushes the sub-expression of the top item of the CODE stack that is indexed by the top item of the INTEGER stack.", 542 StackTypes.Integer)] 500 543 [StorableClass] 501 544 public class CodeExtractExpression : StatelessExpression { … … 520 563 521 564 /// <summary> 522 /// Pops the BOOLEAN stack and pushes the popped item (TRUE or FALSE) onto the CODE stack. 523 /// </summary> 524 [PushExpression(StackTypes.Code, "CODE.FROMBOOLEAN", StackTypes.Boolean)] 565 /// Pops the BOOLEAN stack and pushes the popped item (TRUE or FALSE) onto the CODE stack. 566 /// </summary> 567 [PushExpression( 568 StackTypes.Code, 569 "CODE.FROMBOOLEAN", 570 "Pops the BOOLEAN stack and pushes the popped item(TRUE or FALSE) onto the CODE stack.", 571 StackTypes.Boolean)] 525 572 [StorableClass] 526 573 public class CodeFromBooleanExpression : StatelessExpression { … … 543 590 544 591 /// <summary> 545 /// Pops the FLOAT stack and pushes the popped item onto the CODE stack. 546 /// </summary> 547 [PushExpression(StackTypes.Code, "CODE.FROMFLOAT", StackTypes.Float)] 592 /// Pops the FLOAT stack and pushes the popped item onto the CODE stack. 593 /// </summary> 594 [PushExpression( 595 StackTypes.Code, 596 "CODE.FROMFLOAT", 597 "Pops the FLOAT stack and pushes the popped item onto the CODE stack.", 598 StackTypes.Float)] 548 599 [StorableClass] 549 600 public class CodeFromFloatExpression : StatelessExpression { … … 566 617 567 618 /// <summary> 568 /// Pops the INTEGER stack and pushes the popped integer onto the CODE stack. 569 /// </summary> 570 [PushExpression(StackTypes.Code, "CODE.FROMINTEGER", StackTypes.Integer)] 619 /// Pops the INTEGER stack and pushes the popped integer onto the CODE stack. 620 /// </summary> 621 [PushExpression( 622 StackTypes.Code, 623 "CODE.FROMINTEGER", 624 "Pops the INTEGER stack and pushes the popped integer onto the CODE stack.", 625 StackTypes.Integer)] 571 626 [StorableClass] 572 627 public class CodeFromIntegerExpression : StatelessExpression { … … 589 644 590 645 /// <summary> 591 /// Pops the NAME stack and pushes the popped item onto the CODE stack. 592 /// </summary> 593 [PushExpression(StackTypes.Code, "CODE.FROMNAME", StackTypes.Name)] 646 /// Pops the NAME stack and pushes the popped item onto the CODE stack. 647 /// </summary> 648 [PushExpression( 649 StackTypes.Code, 650 "CODE.FROMNAME", 651 "Pops the NAME stack and pushes the popped item onto the CODE stack.", 652 StackTypes.Name)] 594 653 [StorableClass] 595 654 public class CodeFromNameExpression : StatelessExpression { … … 611 670 612 671 /// <summary> 613 /// Pushes the result of inserting the second item of the CODE stack into the first item, at the position indexed 614 /// by the top item of the INTEGER stack (and replacing whatever was there formerly). 615 /// </summary> 616 [PushExpression(StackTypes.Code, "CODE.CODEINSERT", StackTypes.Integer)] 672 /// Pushes the result of inserting the second item of the CODE stack into the first item, at the position indexed 673 /// by the top item of the INTEGER stack (and replacing whatever was there formerly). 674 /// </summary> 675 [PushExpression( 676 StackTypes.Code, 677 "CODE.CODEINSERT", 678 "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.", 679 StackTypes.Integer)] 617 680 [StorableClass] 618 681 public class CodeInsertExpression : StatelessExpression { … … 651 714 652 715 /// <summary> 653 /// Pushes the length of the top item on the CODE stack onto the INTEGER stack. 654 /// If the top item is not a list then this pushes a 1. If the top item is a list then this pushes the 655 /// number of items in the top level of the list; that is, nested lists contribute only 1 to this count, no 656 /// matter what they contain. 657 /// </summary> 658 [PushExpression(StackTypes.Code, "CODE.LENGTH", StackTypes.Integer)] 716 /// Pushes the length of the top item on the CODE stack onto the INTEGER stack. 717 /// If the top item is not a list then this pushes a 1. If the top item is a list then this pushes the 718 /// number of items in the top level of the list; that is, nested lists contribute only 1 to this count, no 719 /// matter what they contain. 720 /// </summary> 721 [PushExpression( 722 StackTypes.Code, 723 "CODE.LENGTH", 724 "Pushes the length of the top item on the CODE stack onto the INTEGER stack.", 725 StackTypes.Integer)] 659 726 [StorableClass] 660 727 public class CodeLengthExpression : StatelessExpression { … … 679 746 680 747 /// <summary> 681 /// Pushes a list of the top two items of the CODE stack onto the CODE stack. 682 /// </summary> 683 [PushExpression(StackTypes.Code, "CODE.LIST")] 748 /// Pushes a list of the top two items of the CODE stack onto the CODE stack. 749 /// </summary> 750 [PushExpression( 751 StackTypes.Code, 752 "CODE.LIST", 753 "Pushes a list of the top two items of the CODE stack onto the CODE stack.")] 684 754 [StorableClass] 685 755 public class CodeListExpression : StatelessExpression { … … 708 778 709 779 /// <summary> 710 /// Pushes TRUE onto the BOOLEAN stack if the second item of the CODE stack is a member of the first item 711 /// (which is coerced to a list if necessary). Pushes FALSE onto the BOOLEAN stack otherwise. 712 /// </summary> 713 [PushExpression(StackTypes.Code, "CODE.MEMBER", StackTypes.Boolean)] 780 /// Pushes TRUE onto the BOOLEAN stack if the second item of the CODE stack is a member of the first item 781 /// (which is coerced to a list if necessary). Pushes FALSE onto the BOOLEAN stack otherwise. 782 /// </summary> 783 [PushExpression( 784 StackTypes.Code, 785 "CODE.MEMBER", 786 "Pushes TRUE onto the BOOLEAN stack if the second item of the CODE stack is a member of the first item, FALSE otherwise.", 787 StackTypes.Boolean)] 714 788 [StorableClass] 715 789 public class CodeMemberExpression : StatelessExpression { … … 736 810 737 811 /// <summary> 738 /// Pushes the nth element of the expression on top of the CODE stack (which is coerced to a list first if necessary). 739 /// If the expression is an empty list then the result is an empty list. N is taken from the INTEGER stack and is taken 740 /// modulo the length of the expression into which it is indexing. 741 /// </summary> 742 [PushExpression(StackTypes.Code, "CODE.NTH", StackTypes.Integer)] 812 /// Pushes the nth element of the expression on top of the CODE stack (which is coerced to a list first if necessary). 813 /// If the expression is an empty list then the result is an empty list. N is taken from the INTEGER stack and is taken 814 /// modulo the length of the expression into which it is indexing. 815 /// </summary> 816 [PushExpression( 817 StackTypes.Code, 818 "CODE.NTH", 819 "Pushes the nth element, whereby n is taken from the INTEGER stack, of the expression on top of the CODE stack.", 820 StackTypes.Integer)] 743 821 [StorableClass] 744 822 public class CodeNthExpression : StatelessExpression { … … 776 854 777 855 /// <summary> 778 /// Pushes the nth "CDR" (in the Lisp sense) of the expression on top of the CODE stack (which is coerced to a list 779 /// first if necessary). If the expression is an empty list then the result is an empty list. N is taken from the 780 /// INTEGER 781 /// stack and is taken modulo the length of the expression into which it is indexing. A "CDR" of a list is the list 782 /// without 783 /// its first element. 784 /// </summary> 785 [PushExpression(StackTypes.Code, "CODE.NTHCDR", StackTypes.Integer)] 856 /// Pushes the nth "CDR" (in the Lisp sense) of the expression on top of the CODE stack (which is coerced to a list 857 /// first if necessary). If the expression is an empty list then the result is an empty list. N is taken from the 858 /// INTEGER stack and is taken modulo the length of the expression into which it is indexing. A "CDR" of a list is the list 859 /// without its first element. 860 /// </summary> 861 [PushExpression( 862 StackTypes.Code, 863 "CODE.NTHCDR", 864 "Pushes the nth \"CDR\" (in the Lisp sense) of the expression on top of the CODE stack, whereby n is taken from the INTEGER stack.", 865 StackTypes.Integer)] 786 866 [StorableClass] 787 867 public class CodeNthCdrExpression : StatelessExpression { … … 819 899 820 900 /// <summary> 821 /// Pushes TRUE onto the BOOLEAN stack if the top item of the CODE stack is an empty list, or FALSE otherwise. 822 /// </summary> 823 [PushExpression(StackTypes.Code, "CODE.NULL", StackTypes.Boolean)] 901 /// Pushes TRUE onto the BOOLEAN stack if the top item of the CODE stack is an empty list, or FALSE otherwise. 902 /// </summary> 903 [PushExpression( 904 StackTypes.Code, 905 "CODE.NULL", 906 "Pushes TRUE onto the BOOLEAN stack if the top item of the CODE stack is an empty list, or FALSE otherwise", 907 StackTypes.Boolean)] 824 908 [StorableClass] 825 909 public class CodeNullExpression : StatelessExpression { … … 840 924 841 925 /// <summary> 842 /// Pushes onto the INTEGER stack the position of the second item on the CODE stack within the first item 843 /// (which is coerced to a list if necessary). Pushes -1 if no match is found. 844 /// </summary> 845 [PushExpression(StackTypes.Code, "CODE.POSITION", StackTypes.Integer)] 926 /// Pushes onto the INTEGER stack the position of the second item on the CODE stack within the first item 927 /// (which is coerced to a list if necessary). Pushes -1 if no match is found. 928 /// </summary> 929 [PushExpression( 930 StackTypes.Code, 931 "CODE.POSITION", 932 "Pushes onto the INTEGER stack the position of the second item on the CODE stack within the first item. Pushes -1 if no match is found", 933 StackTypes.Integer)] 846 934 [StorableClass] 847 935 public class CodePositionExpression : StatelessExpression { … … 872 960 873 961 /// <summary> 874 /// Pushes the number of "points" in the top piece of CODE onto the INTEGER stack. Each instruction, literal, 875 /// and pair of parentheses counts as a point. 876 /// </summary> 877 [PushExpression(StackTypes.Code, "CODE.SIZE", StackTypes.Integer)] 962 /// Pushes the number of "points" in the top piece of CODE onto the INTEGER stack. Each instruction, literal, 963 /// and pair of parentheses counts as a point. 964 /// </summary> 965 [PushExpression( 966 StackTypes.Code, 967 "CODE.SIZE", 968 "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.", 969 StackTypes.Integer)] 878 970 [StorableClass] 879 971 public class CodeSizeExpression : StatelessExpression { … … 897 989 898 990 /// <summary> 899 /// Pushes the result of substituting the third item on the code stack for the second item in the first item. 900 /// As of this writing this is implemented only in the Lisp implementation, within which it relies on the Lisp "subst" 901 /// function. As such, there are several problematic possibilities; for example "dotted-lists" can result in certain 902 /// cases with empty-list arguments. If any of these problematic possibilities occurs the stack is left unchanged. 903 /// </summary> 904 [PushExpression(StackTypes.Code, "CODE.SUBST")] 991 /// Pushes the result of substituting the third item on the code stack for the second item in the first item. 992 /// As of this writing this is implemented only in the Lisp implementation, within which it relies on the Lisp "subst" 993 /// function. As such, there are several problematic possibilities; for example "dotted-lists" can result in certain 994 /// cases with empty-list arguments. If any of these problematic possibilities occurs the stack is left unchanged. 995 /// </summary> 996 [PushExpression( 997 StackTypes.Code, 998 "CODE.SUBST", 999 "Pushes the result of substituting the third item on the code stack for the second item in the first item.")] 905 1000 [StorableClass] 906 1001 public class CodeSubstitutionExpression : StatelessExpression {
Note: See TracChangeset
for help on using the changeset viewer.