You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. I'm using Z3 for expression building in symbolic execution.
Expression simplifications are vital and effective for symbolic execution to avoid creating large expression trees. An example is a counter in a loop that is incremented in each iteration, where instead of having an expression x + 1 + 1 + 1 + ... you would like to keep x + C.
Therefore, I want to call simplify whenever an expression is built. However, I'm concerned about its cost. To my understanding it recurses over all subexpressions for rewriting which can be a concern when the expression is not simplifiable. In this specific context, rewriting only for the top most expression should be enough as the subexpressions would be previously simplified.
So:
Is my assumption true that repetitive calls to simplify cause redundant checks?
Is there a way to simplify only up to a level? I've tried max_steps but that doesn't seem to be meant for this purpose.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there. I'm using Z3 for expression building in symbolic execution.
Expression simplifications are vital and effective for symbolic execution to avoid creating large expression trees. An example is a counter in a loop that is incremented in each iteration, where instead of having an expression
x + 1 + 1 + 1 + ...
you would like to keepx + C
.Therefore, I want to call
simplify
whenever an expression is built. However, I'm concerned about its cost. To my understanding it recurses over all subexpressions for rewriting which can be a concern when the expression is not simplifiable. In this specific context, rewriting only for the top most expression should be enough as the subexpressions would be previously simplified.So:
simplify
cause redundant checks?max_steps
but that doesn't seem to be meant for this purpose.Beta Was this translation helpful? Give feedback.
All reactions