Predicate noSideEffects
Holds if evaluating e
has no side effects (except potentially allocating
and initializing a new object).
For calls, we do not check whether their arguments have any side effects: even if they do, the call itself is useless and should be flagged by this query.
Import path
import Expressions.ExprHasNoEffect
predicate noSideEffects(Expr e)