Allow GenArchVals
functions to indicate an error.
#412
Labels
symbolic-execution
Issues relating to macaw-symbolic and symbolic execution
Currently, the
lookupReg
andupdateReg
function stored inGenArchValues
are defined as pure functions, but it could legitimately return an error to the caller under certain conditions (e.g. being passed an invalid register value). This forces architecture-specific code to useerror
orpanic
(see the implementation for macaw-symbolic-riscv) and makes the code partial. While the API cannot enforce valid values on the client side, it should be able to throw the error back to the offending code rather than halting the program.macaw/symbolic/src/Data/Macaw/Symbolic.hs
Lines 290 to 296 in eb0a3c7
The text was updated successfully, but these errors were encountered: