Claims
- 1. A method of operating a computer system for evaluating a programming language statement that includes a first and a second sub-statement, the method comprising the steps of:
evaluating the first sub-statement and determining an evaluation success result if the evaluation succeeds or a distinguished value if evaluation fails; said distinguished value being a value not included in the range of possible evaluation success results of the first sub-statement; determining whether the second sub-statement is to be evaluated, and if so, evaluating the second sub-statement and determining an evaluation success result if evaluation succeeds or said distinguished value if evaluation fails; a range of possible evaluation success results of the second sub-statement not including said distinguished value; and determining an evaluation result of the statement depending on at least whether evaluation of the first sub-statement succeeds or fails.
- 2. The method of claim 1, wherein the second sub-statement is evaluated if evaluation of the first sub-statement did not fail, and the evaluation result of the statement is determined to be the evaluation success result of the second sub-statement if evaluation of the first and the second sub-statements succeeds, and wherein the evaluation result of the statement is said distinguished value if evaluation of at least one of the first and second sub-statements fails.
- 3. The method of claim 1, wherein the second sub-statement is evaluated if evaluation of the first sub-statement fails, and wherein the evaluation result of the statement is the evaluation success result of the first sub-statement if evaluation of the first sub-statement succeeds; the evaluation result of the statement is the evaluation success result of the second sub-statement if evaluation of the first sub-statement fails but evaluation of the second sub-statement succeeds; and the evaluation result of the statement is said distinguished value if evaluation of both the first and the second sub-statements fails.
- 4. The method of claim 1, wherein the second sub-statement is evaluated concurrently with the evaluation of the first sub-statement, and the evaluation result of the statement is said distinguished value if evaluation of at least one of the first and second sub-statements fails.
- 5. The method of claim 1, wherein the second sub-statement is evaluated concurrently with the evaluation of the first sub-statement, and the evaluation result of the statement is said distinguished value only if evaluation of both the first and the second sub-statements fails.
- 6. The method of claim 1, wherein the second sub-statement is evaluated independently on whether evaluation of the first sub-statement succeeds, and the evaluation result of the statement is said distinguished value if evaluation of at least one of the first and second sub-statements fails.
- 7. The method of claim 1, wherein the second sub-statement is evaluated independently on whether evaluation of the first sub-statement succeeds, and the evaluation result of the statement is said distinguished value if evaluation of both the first and second sub-statements fails.
- 8. The method of claim 1, wherein at least one of the first and second sub-statements includes a closure loop statement having an operand indicating that evaluation of the respective sub-statement does not stop before said operand evaluates to said distinguished value.
- 9. The method of claim 1, wherein at least one of the first or second sub-statements includes a rule statement having a first argument and a second argument, the evaluation of the first argument triggering the evaluation of the second argument.
- 10. The method of claim 1, wherein at least one of the first or second sub-statements includes an ordered action system.
- 11. The method of claim 1, wherein at least one of the first or second sub-statements includes an unordered action system.
- 12. The method of claim 1, wherein one of the first and second sub-statements is a declarative statement and the other one of the first and second sub-statements is an imperative statement.
- 13. The method of claim 1, wherein the first and second sub-statements are typed according to a hierarchy of types.
- 14. The method of claim 13, wherein said hierarchy of types includes at least one minimal type.
- 15. An article of manufacture for use in a computer system comprising:
a memory; instructions stored in the memory for operating a method for evaluating a programming language statement that includes a first and a second sub-statement, the method comprising the steps of:
evaluating the first sub-statement and determining an evaluation success result if the evaluation succeeds or a distinguished value if evaluation fails; said distinguished value being a value not included in the range of possible evaluation success results of the first sub-statement; determining whether the second sub-statement is to be evaluated, and if so, evaluating the second sub-statement and determining an evaluation success result if evaluation succeeds or said distinguished value if evaluation fails; a range of possible evaluation success results of the second sub-statement not including said distinguished value; and determining an evaluation result of the statement depending on at least whether evaluation of the first sub-statement succeeds or fails.
- 16. A system for evaluating a programming language statement and determining an evaluation result of said statement; comprising:
a memory for storing the statement that includes a first and a second sub-statement, a processor for determining the evaluation result of the statement; the evaluation result of the statement depending on whether evaluation of the first and second sub-statements succeeds or fails; the processor being capable of evaluating the first sub-statement and determining an evaluation success result if evaluation succeeds, or a distinguished value if evaluation fails; the processor being capable of evaluating the second sub-statement and determining an evaluation success result if evaluation succeeds, or said distinguished value if evaluation fails; said distinguished value being a value not included in the range of possible evaluation success results.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] Cross-reference is made to U.S. patent applications Ser. No. 09/AAA,AAA, entitled “Symmetrical Structural Pattern Matching” (Attorney Docket No. D/A0858), which is assigned to the same assignee as the present invention and incorporated herein by reference.