Patent attributes
A method and a system for non-locally constraining a plurality of related but separated program entities (e.g., a loop operation and a related accumulation operation within the loop's scope) such that any broad program transformation affecting both will have the machinery to assure that the changes to both entities will preserve the invariant properties of and dependencies among them. For example, if a program transform alters one entity (e.g., re-expresses an accumulation operation as a vector operation incorporating some or all of the loop's iteration) the constraint will provide the machinery to assure a compensating alteration of the other entities (e.g., the loop operation is reduced to reflect the vectorization of the accumulation operation). One realization of this method comprises specialized instances of the related entities that while retaining their roles as program entities (i.e., operators), also contain data and machinery to define the non-local constraint relationship.