Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
Improve error messages for failed uninterpreted functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Huffman committed Oct 20, 2020
1 parent a489c57 commit 7049e5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ flattenSValue v = do
VNat n -> return ([], "_" ++ show n)
TValue (suffixTValue -> Just s)
-> return ([], s)
_ -> fail $ "Could not create sbv argument for " ++ show v
VFun _ -> fail "Cannot create uninterpreted higher-order function"
_ -> fail $ "Cannot create uninterpreted function with argument " ++ show v

vWord :: SWord -> SValue
vWord lv = VWord lv
Expand Down
3 changes: 2 additions & 1 deletion saw-core-what4/src/Verifier/SAW/Simulator/What4.hs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,8 @@ applyUnintApp app0 v =
VNat n -> return (suffixUnintApp ("_" ++ show n) app0)
TValue (suffixTValue -> Just s)
-> return (suffixUnintApp s app0)
_ -> fail $ "Could not create argument for " ++ show v
VFun _ -> fail "Cannot create uninterpreted higher-order function"
_ -> fail $ "Cannot create uninterpreted function with argument " ++ show v


------------------------------------------------------------
Expand Down

0 comments on commit 7049e5c

Please sign in to comment.