macaw-symbolic
: newGlobalMemory
doesn't need to know about the architecture
#322
Labels
symbolic-execution
Issues relating to macaw-symbolic and symbolic execution
tech-debt
Technical debt that would be nice to clean up
The type of the
newGlobalMemory
function is:macaw/symbolic/src/Data/Macaw/Symbolic/Memory.hs
Lines 329 to 348 in df74837
Notably, this takes in a
proxy arch
argument, presumably for the purpose of fixing the type of the architecture being used. It turns out, however, that nothing in the implementation ofnewGlobalMemory
actually makes use of thisarch
! Sure, the type signature mentionsArchAddrWith arch
in various places, but those are the only uses ofarch
, and every occurrence ofArchAddrWidth arch
could just as well be replaced with an arbitrary widthw
. As a proof of concept, I wrote a quick patch that removes theproxy arch
arguments entirely:This isn't a huge issue in practice, since
newGlobalMemory
and friends are usually called in places that bind anarch
anyway. As a result, I'm not inclined to address this issue right now, especially considering that fixing it would require a breaking API change.The text was updated successfully, but these errors were encountered: