This is a convenience function used to assist in the updating
of HydeNetwork network objects. It makes it possible to add and
subtract individual parent relationships without deleting an entire node.
rewriteHydeFormula(old_form, new_form)The current formula in a HydeNetwork object.
The formula specifications to be added
To allow changes to be made on the node-parent level, the formulae
are broken down into a vector of component where each element identifies
a unique parent-child relationship. So if a node has representation
nodeA | nodeB*nodeC, it will be broken down to
nodeA | nodeB + nodeA | nodeC.
After decomposing the formulae, any instances of a component in
form1 that are subtracted in form2 are removed.
Next, all added components in form2 that do not already exist in
form1 are added.
Lastly, the parents of each node are combined and the specification of the network is written.