Function doFiniteDifferencingOne

Function doFiniteDifferencingOne#

Function Documentation#

void doFiniteDifferencingOne(SgExpression *e, SgBasicBlock *root, RewriteRule *rules)#

Do finite differencing on one expression within one context. The expression must be defined and valid within the entire body of root. The rewrite rules are used to simplify expressions. When a variable var is updated from old_value to new_value, an expression of the form (var, (old_value, new_value)) is created and rewritten. The rewrite rules may either produce an arbitrary expression (which will be used as-is) or one of the form (var, (something, value)) (which will be changed to (var = value)).