Once an equation has been stored in the Boolean Equation data structures, it need to be manipulated. This can be done by examining the rules of Boolean algebra, and then casting these in the form of algorithmic operations.
Lee and Jea  discuss a method for manipulating the structure of a CSG tree by moving branches up and down the tree structure. They limit the operators to union and subtraction, and assume the operators are regularized. They argue that for feature recognition using CSG, it is necessary to move nodes up the CSG tree to be compared. Although they do not pose a feature recognition algorithm, they do suggest that various nodes may be moved up the CSG to partially overcome the global, and uniqueness problems of the CSG representation. Their algorithm is based on transformation tables for CSG branch forms. These tables are pictured in Figure 1.4 Transformation Tables for Moving Node A up CSG Trees. The reader should note that 16 basic input states have been given by Lee and Jea, and there are a number of possible output states associated by form. In the tables given, each of the 16 states are listed in each of the four tables. There are four tables to indicate the four possible states for parents of the subtree containing A, B, and C. The work is of particular interest to this thesis because of the use of equation forms to manipulate tree structures. Their work also supports the idea of manipulating the CSG structure to achieve various interpretations of a part.
When attempting to eliminate redundant primitives in a CSG tree, a Null Object Detection (NOD) algorithm may be used. (Please note that the assumption with this technique is that unused and redundant primitives are undesirable). The algorithm attempts to locate primitives that cancel each other out. Tilove  describes his use of Boolean algebra properties to design algorithms to detect null objects. This is done through a set of five algorithms he presents, which look for positive, and negative redundancy by direct examination of the tree. Tilove also describes previous algorithms that were not based on CSG methods and required greater access to computational resources. As an aside, he also states that the NOD algorithm can be used as the basis for Same Object Detection (SOD). This is useful when trying to ascertain if two objects are indeed similar.
As discussed before, we may store and manipulate the Boolean expressions. The data structures discussed in the previous section did not discuss the addition of Boolean algebra whereas this section will. A set of routines were written to apply the rules of Boolean algebra to manipulate the equations. The fundamental operations are given in Figure 1.5 Fundamental Boolean Operations. All but Identity and Duality have been implemented in the software.
These operations are set up so that they may be applied in a parametric manner (see Mendelson , for more information on Boolean algebra). In other words, there may be a term ‘(+ A B C)’. The law of Commutivity says that the expression may have up to six (3! = 3*2*1) forms; ‘(+ A B C)’, ‘(+ A C B)’, ‘(+ C B A)’, ‘(+ B A C)’, ‘(+ B C A)’, and ‘(+ C A B)’. Therefore the law of Commutivity can be applied to some term, a finite number of ways. By expressing the manipulation in this manner, the method of manipulating equations becomes similar to methods used in tree searches (i.e., the operator is a simple finite description). This becomes the first step to deriving an exhaustive method for equation manipulation. The list below shows all of the operations used, and gives examples of how they are applied.
• In this expression there are n=6 terms, and therefore there are (n-1)(n-2)...(1) possible combinations for application. Of this there are only 3 that can be successfully performed in the example equation. This is between the first three ‘A’s. The last ‘A’ is considered different because it has a ‘;e’ appended.
• There are n=4 possible candidates for this operation of which two are bracketed, and one of those two has the same sign. The ‘( & E F )’ term can be ‘popped’ because it has the same operation as the parent term.
The operators described in the last section were described using permutation parameters. To manipulate the equation the user must specify the i) operation of interest, ii) simplification or complication, and iii) the permutation of the operation desired. As these are specified, the equation may be changed. If they are applied blindly using an exhaustive search, the possible variations are enormous (actually infinite). A directed searches is one possible method for reducing the search space.
Exhaustive methods are the most dependable methods for finding any given term. But this reliability comes with a high cost on efficiency. In the case of simplifying the equation to a disjunctive normal form, the method is slow, but very effective. To reduce an equation to its simplest form, we need only to apply the operators discussed in the previous section, until all possible alternatives have been exhausted. It was found that to start with the most nested terms resulted in a more direct solution. The basic algorithm is described below.
2. Pick the last term on the list, and begin testing to see if any simplifying operators can be applied. If no operators are fired, then remove the last item from the list, and begin step 2 again. If the list is empty, the equation is simplified, so quit.
For the software written, this Exhaustive Simplify operation takes a few seconds for an example with between 10 and 20 terms. If the code were optimized, the simplification would take less than a second.
Exhaustive Simplification has a goal, therefore making the algorithm easy. Exhaustive complication has no goals, but it continually expands an infinite tree systematically. More importantly, when simplifying, there is only one term at all times. But, when complicating, each new term must now be kept. This is obviously not very practical, but useful to note.
The exhaustive equation manipulations focus on complicating, and simplifying expressions. But, if we merely want to generate alternatives, we may use a more interesting algorithm. A Random Walk through equation space may be of use for obtaining novel equation forms. In this case a term in the equation is chosen at random, and one operator is randomly selected, and the operators permutation is also randomly selected. This would allow the equation to be made simpler in some cases, more complex in others, and change the topology of the equation. While this is sort of a blind technique, it does lay the groundwork for a more complex heuristic search.
At present the simplification technique is the only one used, but the future potential for this method is excellent. The advanced use of equation manipulation will be discussed more later with reference to Meta-knowledge.