Crucible/LLVM: Override matching branches on concrete bitvector equalities #544
Labels
performance
Issues that involve or include performance problems
subsystem: crucible-llvm
Issues related to LLVM bitcode verification with crucible-llvm
Milestone
Summary
When using multiple overrides for the same function, SAW/Crucible is branching on more of them than necessary/what I would expect. In particular, if you have two overrides for the same function that pass some literal integer as an argument, SAW will branch and follow both of them, instead of realizing that one is infeasible.
The two big disadvantages here are performance and error messages. When symbolic simulation fails on both paths, the user might have a hard time distinguishing which path was actually feasible.
Example
Here's an example C program and SAW spec, tarball attached below.
When run with a variant of #540 that shows the arguments for each override call, the log shows:
You can see that the Crucible value being passed to the override is definitely a concrete integer, and that SAW is branching on both overrides, instead of just the one that should match.
test.tar.gz
Possible code path
What's should be happening here is
partitionOWPsConcrete
should sort the erroneous override into the "concretely failing" bin. TheWhat4.Interface.Pred
that it's examining comes frommethodSpecHandler_prestate
, and more specifically, the assertion corresponding to the argument's value should come from the first case ofmatchArg
. So what might be happening is that somewhere along thevalueToSC
/matchTerm
/scEq
/resolveSAWPred
call chain, the concreteness is being lost/forgotten/left unused, and theWhat4.Interface.Pred
you get out at the end is not concrete.The text was updated successfully, but these errors were encountered: