Conversation
|
At least on sv-benchmarks this has no measurable impact OLS regression on CPU time gives Still, we need to do this to be sound, there's no way around it. If this turns out to negatively impact some realistic benchmarks, we might want to optimize something, but that's a separate matter. |
michael-schwarz
left a comment
There was a problem hiding this comment.
Thank you for submitting this PR, it's quite a surprise that this stayed hidden for such a long time!
Here's some remarks:
- There are some library functions that explicitly do not evaluate their arguments (or at least not with the usual semantics (such as the sizeof operator which iirc we map to a library function). Do we need to account for those?
- This adds such evaluation to the base analysis. Do other analyses also need it?
- Is
eval_rvalways the right thing to do? Do arguments to library functions not sometimes act aslvals? - We may want to add a comment where we call
eval_rvpurely for its side-effects. - In #1758, you have more examples. Why not add them as tests?
I would also be interested to see the effect of this on a larger set of benchmarks, say the concrat suite...
|
To comment on a few of these:
Only if they produce warnings from domains during expression evaluation, but I don't know if that is the case anywhere else.
To act as an lval, the argument needs to be |
|
I can add more tests if you'd like, but we can put whatever we want in the |
Using the setup now at goblint/bench#69, the total number of evals changes 2300528 → 2305052, which is an increase of 4524, i.e. 0.2%. |
CHANGES: * Add division by zero analysis (goblint/analyzer#1764). * Add bitfield domain (goblint/analyzer#1623). * Add weakly-relational C-2PO pointer analysis (goblint/analyzer#1485). * Add widening delay (goblint/analyzer#1358, goblint/analyzer#1442, goblint/analyzer#1483). * Add narrowing of globals to top-down solver (goblint/analyzer#1636). * Add weak dependencies to top-down solver (goblint/analyzer#1746, goblint/analyzer#1747). * Add YAML ghost witness generation (goblint/analyzer#1394). * Remove GraphML witness generation (goblint/analyzer#1732, goblint/analyzer#1733, goblint/analyzer#1738). * Use C standard option for preprocessing (goblint/analyzer#1807). * Add bash completion for array options (goblint/analyzer#1670, goblint/analyzer#1705, goblint/analyzer#1750). * Make `malloc(0)` semantics configurable (goblint/analyzer#1418, goblint/analyzer#1777). * Update path-sensitive analyses (goblint/analyzer#1785, goblint/analyzer#1791, goblint/analyzer#1792). * Fix evaluation of library function arguments (goblint/analyzer#1758, goblint/analyzer#1761). * Optimize affine equalities analysis using sparse matrices (goblint/analyzer#1459, goblint/analyzer#1625). * Prepare for parallelism (goblint/analyzer#1708, goblint/analyzer#1744, goblint/analyzer#1748, goblint/analyzer#1781, goblint/analyzer#1790).
This fixes issue #1758. It might need some benchmarks, but it works and passes all the tests.