Compiler for evaluating Boolean expressions
First Claim
1. In a process where the condition of a plurality of logic elements, including a first logic element and a last logic element, controls an action, a method for preparing a computer program for determining said action, said program being for execution in a digital computer having a processor and a memory, said method comprising the steps of:
- developing an expression for storage in said memory, said expression defining the effect said logic elements have on said action;
for each condition for each logic element, using said processor for examining said expression to determine another logic element within said expression which controls said action, thereby defining condition determining control paths;
generating code for execution by said computer for examining the conditions of only those logic elements necessary to determine the action in an order directed by said condition determining control paths.
6 Assignments
0 Petitions
Accused Products
Abstract
An intelligent compiler particularly useful for evaluating Boolean expressions such as those associated with ladder structures. True/false paths are defined through the expressions. In a first pass for the code generation, the start code for examining each element is set out. In a second pass the relative offsets for branching from one element to the next element along both the true and false paths are filled in. In practice, execution time for evaluating ladder structures is reduced by an order of magnitude over prior techniques which use source code and an interpreter.
-
Citations
25 Claims
-
1. In a process where the condition of a plurality of logic elements, including a first logic element and a last logic element, controls an action, a method for preparing a computer program for determining said action, said program being for execution in a digital computer having a processor and a memory, said method comprising the steps of:
-
developing an expression for storage in said memory, said expression defining the effect said logic elements have on said action; for each condition for each logic element, using said processor for examining said expression to determine another logic element within said expression which controls said action, thereby defining condition determining control paths; generating code for execution by said computer for examining the conditions of only those logic elements necessary to determine the action in an order directed by said condition determining control paths. - View Dependent Claims (2, 3, 4, 5)
-
-
6. In a process where the condition of a plurality of logic elements determines the action taken by an action element, wherein said plurality of logic elements includes a last logic element, a method for preparing a computer program for determining said action to be taken by said action element, said program being for execution in a digital computer having a processor and a memory, said method comprising the steps of:
-
preparing an expression for storage in said memory defining the interaction between said logic elements; for each condition of each logic element, using said processor for identifying each logic element within said expression that controls said action, thereby identifying condition determining paths within said expression; generating code for execution by said computer for evaluating the conditions of only those logic elements necessary to determine the action, said code including instructions for branching from one of said logic elements to another along said condition determining paths. - View Dependent Claims (7, 8, 9, 10)
-
-
11. In a process where the condition of a plurality of logic elements including a last logic element, controls a result, a method for preparing a computer program for determining said result, said program being for execution in a digital computer having a processor and a memory, said method comprising the steps of:
-
preparing a Boolean expression for storage in said memory defining the action of said elements on said result; using said processor for preparing truth tables for each condition of each of said elements which identify each element within said expression controlling said result, thereby defining true and false paths; generating code which upon being executed by said computer examines the condition of each of said elements and branches from one element to a next element along said true and false paths. - View Dependent Claims (12, 13, 14)
-
-
15. In a process where the condition of a plurality of logic elements controls an action, a method for preparing a computer program for determining said action, said program being for execution in a digital computer having a processor and a memory, said method comprising the steps of:
-
preparing for storage in said memory a Boolean expression for said logic elements; identifying a true path from said expression for each logic element by ignoring disjunctive elements using said processor; identifying a false path from said expression for each logic element by ignoring conjunctive elements; generating code which includes code which upon being executed by said computer examines the condition of each of said logic elements and branching instructions which directs branching along either said true path or false path as a function of the condition of each of of said logic elements. - View Dependent Claims (16, 17, 19, 20, 21)
-
-
18. In a ladder structure comprising a plurality of rungs where each rung comprises a plurality of interconnected logic elements, the condition of said elements determining an action for said rung, a method for preparing a computer program for determining said action for each of said rungs, said program being for execution on a digital computer having a processor and memory, said method comprising the steps of:
-
for each of said rungs, preparing for storage in said memory a Boolean expression defining the coupling of said elements in said rung; for each condition of each element within each expression, using said processor for determining a next element within said expression that effects said action thereby identifying true and false paths for said expression; generating code which upon being executed by said computer is for evaluating the condition of each element in said expressions such that the order of said evaluation is dictated by said true and false paths.
-
-
22. In a ladder structure comprising a plurality of rungs where each rung includes a plurality of logic elements the conditions of which determine the rungs'"'"' output, a method for preparing a computer program for determining said outputs, said program being for execution on a digital computer having a processor and memory, said method comprising the steps of:
-
preparing for storage in said memory Boolean expressions for each rung which define the coupling between said elements of said rung; using said processor for determining a true path from each of said elements in each of said expressions by ignoring disjunctive elements in said expressions; using said processor for determining a false path from each of said elements in each of said expressions by ignoring conjunctive elements in said expressions; generating code which upon being executed by said computer results in the evaluation of the condition of each element and which includes branching instructions which follow said true paths and false paths based on the condition of said element. - View Dependent Claims (23, 24, 25)
-
Specification