Invariant properties of algorithms