1460751386-b4e1092c-51e0-4373-a033-246a192c6763

1. A method for operating a compiler, the method comprising:
utilizing a computer to perform:
scanning program code to identify a first algebraic expression specified by the program code, wherein the first algebraic expression includes two or more mutually-compatible binary operations and three or more input operands, wherein the three or more input operands include two or more scalar operands and one or more array operands; and
operating on the first algebraic expression to obtain a final algebraic expression by:
(a) computing a rank vector for each of the three or more input operands, wherein the rank vector for any given one of the three or more input operands includes a first component that is based on an invariance rank of the input operand and a second component that is based on a dimension of the input operand, and
(b) performing transformations on selected subexpressions of the first algebraic expression, wherein the transformations include one or more commute transformations and one or more associate transformations, wherein each of the commute transformations exchanges input operands of a corresponding one of the two or more binary operations to order the input operands according to an ordering of possible states of the rank vector, wherein the ordering of possible states gives precedence to the first component over the second component;

wherein the final algebraic expression specifies an order of execution for the two or more binary operations such that the three or more input operands are combined in an order that agrees with the ordering of possible states of the rank vector.
2. The method of claim 1, wherein the two or more mutually-compatible binary operations are instances of a single operator.
3. The method of claim 1, wherein each of the two or more binary operations includes a first input and a second input and an output, wherein each of the first input and the second input is either one of the three or more input operands or the output of another one of the two or more binary operations, wherein said operating on the first algebraic expression includes:
after performing the commute transformation on a first one of the two or more binary operations, determining if the first binary operation satisfies a reassociate condition, wherein the reassociate condition is a logical combination of at least two subconditions, wherein the at least two subconditions includes a first subcondition that the first input of the first binary operation is the output of a second one of the two or more binary operations, and a second subcondition that the output of the second binary operation is not used an as input other than as the first input of the first binary operation; and
performing an associate transformation on the first and second binary operations in response to determining that the first binary operation satisfies the reassociate condition.
4. The method of claim 3, further comprising:
performing type propagation on the first and second binary operations after said performance of the associate transformation on the first and second binary operations.
5. The method of claim 1, wherein the rank vector for any given one of the three or more input operands also includes a third component that is based on a data size associated with a generic element of the given input operand, wherein the ordering of possible states of the rank vector gives precedence to the second component over the third component.
6. The method of claim 1, further comprising:
generating modified program code that includes the final algebraic expression;
generating executable code from the modified program code, wherein the executable code includes a portion that corresponds to the final algebraic expression, where said portion of the executable code respects the order of execution specified by the final algebraic expression.
7. A non-transitory computer-readable memory medium, wherein the memory medium stores program instructions, wherein the program instructions, when executed by a computer system, cause the computer system to:
scan program code to identify a first algebraic expression specified by the program code, wherein the first algebraic expression includes two or more mutually-compatible binary operations and three or more input operands, wherein the three or more input operands include two or more scalar operands and one or more array operands; and
operate on the first algebraic expression to obtain a final algebraic expression by:
(a) computing a rank vector for each of the three or more input operands, wherein the rank vector for any given one of the three or more input operands includes a first component that is based on an invariance rank of the input operand and a second component that is based on a dimension of the input operand, and
(b) performing transformations on selected subexpressions of the first algebraic expression, wherein the transformations include one or more commute transformations and one or more associate transformations, wherein each of the commute transformations exchanges input operands of a corresponding one of the two or more binary operations to order the input operands according to an ordering of possible states of the rank vector,
wherein the ordering of possible states gives precedence to the first component over the second component;
wherein the final algebraic expression specifies an order of execution for the two or more binary operations such that the three or more input operands are combined in an order that agrees with the ordering of possible states of the rank vector.
8. The memory medium of claim 7, wherein the two or more mutually-compatible binary operations are instances of a single operator.
9. The memory medium of claim 7, wherein the rank vector for any given one of the three or more input operands also includes a third component that is based on a data size associated with a generic element of the given input operand, wherein the ordering of possible states of the rank vector gives precedence to the second component over the third component.
10. The memory medium of claim 7, wherein the first algebraic expression specifies an initial order of execution of the two or more binary operations, wherein said operating on the first algebraic expression includes operating on the two or more binary operations in a recursive fashion starting with a particular one of the two or more binary operations that is last according to the initial order of execution.
11. The memory medium of claim 7, wherein the program code is a program representation that is intermediate between a user-specified program and machine executable code.
12. The memory medium of claim 7, wherein the program instructions, when executed by the computer system, further cause the computer system to:
generate modified program code that includes the final algebraic expression; and
display the modified program code via a display device.
13. A computer system comprising:
a processor; and
memory storing program instructions, wherein the program instructions, when executed by the processor, cause the processor to:
scan program code to identify a first algebraic expression specified by the program code, wherein the first algebraic expression includes two or more mutually-compatible binary operations and three or more input operands, wherein the three or more input operands include two or more scalar operands and one or more array operands; and
operate on the first algebraic expression to obtain a final algebraic expression by:
(a) computing a rank vector for each of the three or more input operands, wherein the rank vector for any given one of the three or more input operands includes a first component that is based on an invariance rank of the input operand and a second component that is based on a dimension of the input operand, and
(b) performing transformations on selected subexpressions of the first algebraic expression, wherein the transformations include one or more commute transformations and one or more associate transformations, wherein each of the commute transformations exchanges input operands of a corresponding one of the two or more binary operations to order the input operands according to an ordering of possible states of the rank vector, wherein the ordering of possible states gives precedence to the first component over the second component;
wherein the final algebraic expression specifies an order of execution for the two or more binary operations such that the three or more input operands are combined in an order that agrees with the ordering of possible states of the rank vector.
14. The computer system of claim 13, wherein the two or more mutually-compatible binary operations are instances of a single operator.
15. The computer system of claim 13, wherein the rank vector for any given one of the three or more input operands also includes a third component that is based on a data size associated with a generic element of the given input operand, wherein the ordering of possible states of the rank vector gives precedence to the second component over the third component.
16. The computer system of claim 13, wherein the first algebraic expression specifies an initial order of execution of the two or more binary operations, wherein said operating on the first algebraic expression includes operating on the two or more binary operations in a recursive fashion starting with a particular one of the two or more binary operations that is last according to the initial order of execution.
17. The computer system of claim 13, wherein the program code is a program representation that is intermediate between a user-specified program and machine executable code.
18. The computer system of claim 13, wherein the program instructions, when executed by the processor, further cause the processor to:
generate modified program code that includes the final algebraic expression; and
display the modified program code via a display device.
19. The computer system of claim 13, wherein the first component increases as depth of loop invariance of the input operand increases, wherein the second component decreases as dimension of the input operand increases.
20. The computer system of claim 19, wherein the rank vector also includes a third component that is based on data size associated with a generic element of the input operand, wherein the ordering of possible states of the rank vector gives precedence to the second component over the third component.

The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.

1. A method of retrofitting an injection molding machine to multishot operation, where the injection molding machine has a first stationary platen holding a stationary mold portion in communication with an injection cylinder and a second movable platen holding a movable mold portion joining with the stationary mold portion with movement of the movable platen, the injection cylinder, stationary platen and movable platen controlled by an injection molding controller, the method comprising the steps of:
(a) attaching a mounting directly to one of the movable and stationary platens; and
(b) adjustably attaching a second injection cylinder to the mounting;
(c) connecting interface electronics providing an interface between the second injection cylinder and the injection molding controller to the injection molding controller to coordinate the operation of the second injection molding cylinder with the movement of the stationary and movable platens;
wherein the second injection cylinder is attached to the movable platen to engage with the movable mold portion.
2. The method of claim 1 wherein the second injection cylinder includes at least one positioning actuator for moving the second injection cylinder along its axis and wherein the interface electronics allows the injection molding controller to control the positioning actuator in coordination with movement of the stationary and movable platens to engage by axial movement with the movable mold portion when the movable mold portion is joined with the stationary mold portion and to disengage by axial movement with the movable mold portion prior to separation of the movable mold portion and the stationary mold portion.
3. The method of claim 1 wherein the second injection molding cylinder is attached to the top of the movable platen.
4. The method of claim 1 wherein the second injection molding cylinder is attached a front surface of the movable platen holding the movable mold portion.
5. The method of claim 1 wherein the second injection molding cylinder is attached to the movable mold portion.