TABLE DRIVEN PROGRAM
First Claim
1. A method of operating in a data processing system to select from an action stub predetermined problem program instructions corresponding to the one of a set of predetermined problem program rules matching a set of input conditions expressed as multi-bit inputs and a condition stub having a set of problem program instructions for organizing said inputs as a condition mask comparable in organization with said rules, comprising, first, isolating said problem program to prevent modification, executing the instructions of said condition stub to form a condition mask, comparing said condition mask and said rules to identify the matching rule, executing said corresponding actions, and returning to said problem program.
0 Assignments
0 Petitions
Accused Products
Abstract
A new decision table and method of using the decision table with data processing apparatus are disclosed. A general purpose driver is provided for executing various decision tables. When a problem program reaches the point where a decision table is to be executed, the problem program calls the driver and identifies the selected decision table. The condition stub of the decision table includes a series of instructions from which the driver forms a condition mask. The driver selects the appropriate action according to the condition mask and a set of rules and an action stub in the decision table. The action may comprise a single instruction or series of related instructions or several independent instruction or groups of instructions.
-
Citations
6 Claims
-
1. A method of operating in a data processing system to select from an action stub predetermined problem program instructions corresponding to the one of a set of predetermined problem program rules matching a set of input conditions expressed as multi-bit inputs and a condition stub having a set of problem program instructions for organizing said inputs as a condition mask comparable in organization with said rules, comprising, first, isolating said problem program to prevent modification, executing the instructions of said condition stub to form a condition mask, comparing said condition mask and said rules to identify the matching rule, executing said corresponding actions, and returning to said problem program.
-
2. The method defined in claim 1 wherein said method is initiated by the step in said problem program of calling a program operating according to said method, and identifying said decision table.
-
3. The method defined in claim 2 wherein said step of executing said instructions of said condition stub to form a condition mask comprises isolating a next instruction of said condition stub, executing said instruction to test the corresponding portion of said input, and forming a next bit of said condition mask in response to the results of said testing step.
-
4. The method defined in claim 3 wherein said step of executing said instruction to test a portion of said input comprises as part of said program, moving a next instruction from said condition stub to a save area, and executing said saved instruction.
-
5. The method of claim 4 wherein said rules comprise a care mask, a rule mask, and an action mask, and said step of comparing said condition mask and said rules includes combining a next entry of said care mask and said rule mask to form a logical AND function and comparing said AND function and said condition mask to detect a match.
-
6. The method of claim 5 wherein said condition stub contains a distinct last instruction and said step of executing said instructions of said condition stub to form a condition mask includes, shifting a register one bit position to the left and entering a right most binary 0, transferring the next instruction of the condition stub to a save area, testing the instruction for said distinct instruction, executing the instruction if it is not said distinct instruction, testing the results of the execution of the instruction, adding a binary 1 to said register iN response to a predetermined result of said test and not adding a binary 1 to said register in the absence of said predetermined result, transferring the next instruction to said save area for a next instruction, and beginning said step of comparing said condition mask and said rules when said distinct instruction is found.
Specification