Skip to content

Commit 31fa250

Browse files
committed
Better formatting for some location values
1 parent 4f15581 commit 31fa250

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/SAWScript/Crucible/LLVM/Builtins.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ verifyObligations cc mspec tactic assumes asserts =
641641
{ goalNum = n
642642
, goalType = "vc"
643643
, goalName = nm
644-
, goalLoc = show ploc
644+
, goalLoc = show (W4.plSourceLoc ploc) ++ " in " ++ show (W4.plFunction ploc)
645645
, goalDesc = msg
646646
, goalProp = goal'
647647
}
@@ -811,6 +811,7 @@ assumptionsContainContradiction cc methodSpec tactic assumptions =
811811
let sym = cc^.ccSym
812812
st <- io $ Common.sawCoreState sym
813813
let sc = saw_ctx st
814+
let ploc = methodSpec^.MS.csLoc
814815
pgl <- io $
815816
do
816817
-- conjunction of all assumptions
@@ -822,7 +823,7 @@ assumptionsContainContradiction cc methodSpec tactic assumptions =
822823
{ goalNum = 0
823824
, goalType = "vacuousness check"
824825
, goalName = show (methodSpec^.MS.csMethod)
825-
, goalLoc = show (methodSpec^.MS.csLoc)
826+
, goalLoc = show (W4.plSourceLoc ploc) ++ " in " ++ show (W4.plFunction ploc)
826827
, goalDesc = "vacuousness check"
827828
, goalProp = goal'
828829
}

src/SAWScript/Crucible/LLVM/Override.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1374,12 +1374,12 @@ matchTerm sc cc loc prepost real expect =
13741374
_ ->
13751375
do t <- liftIO $ scEq sc real expect
13761376
let msg = unlines $
1377-
[ "Literal equality " ++ stateCond prepost ++ " at " ++ show loc
1377+
[ "Literal equality " ++ stateCond prepost
13781378
-- , "Expected term: " ++ prettyTerm expect
13791379
-- , "Actual term: " ++ prettyTerm real
13801380
]
13811381
addTermEq t $ Crucible.SimError loc $ Crucible.AssertFailureSimError msg ""
1382-
where prettyTerm = show . ppTermDepth 20
1382+
-- where prettyTerm = show . ppTermDepth 20
13831383

13841384

13851385
------------------------------------------------------------------------

0 commit comments

Comments
 (0)