File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ import qualified Verifier.SAW.SCTypeCheck as TC (TypedTerm(..))
80
80
import Verifier.SAW.Recognizer
81
81
import Verifier.SAW.Prelude (scEq )
82
82
import Verifier.SAW.SharedTerm
83
+ import Verifier.SAW.Term.Pretty (MemoStyle (.. ))
83
84
import Verifier.SAW.TypedTerm
84
85
import qualified Verifier.SAW.Simulator.Concrete as Concrete
85
86
import Verifier.SAW.Prim (rethrowEvalError )
@@ -478,11 +479,22 @@ print_goal_inline noInline =
478
479
execTactic $ tacticId $ \ goal ->
479
480
do
480
481
opts <- getTopLevelPPOpts
481
- let opts' = opts { ppNoInlineMemoFresh = sort noInline }
482
+ opts' <-
483
+ case ppMemoStyle opts of
484
+ Incremental -> pure opts { ppNoInlineMemoFresh = sort noInline }
485
+ HashIncremental _ -> pure opts { ppNoInlineMemoFresh = sort noInline }
486
+ Hash _ -> warnIncremental >> pure opts
482
487
sc <- getSharedContext
483
488
nenv <- io (scGetNamingEnv sc)
484
489
let output = prettySequent opts' nenv (goalSequent goal)
485
490
printOutLnTop Info (unlines [goalSummary goal, output])
491
+ where
492
+ warnIncremental =
493
+ printOutLnTop Warn $
494
+ unlines
495
+ [ " `print_goal_inline` is incompatible with non-incremental"
496
+ , " memoization strategies. Printing goal without inlining..."
497
+ ]
486
498
487
499
print_goal_summary :: ProofScript ()
488
500
print_goal_summary =
Original file line number Diff line number Diff line change @@ -2230,6 +2230,9 @@ primitives = Map.fromList
2230
2230
, " `x@9`, and `x@3`. These indices are assigned deterministically with"
2231
2231
, " regard to a particular goal, but are not persistent across goals. As"
2232
2232
, " such, this should be used primarily when debugging a proof."
2233
+ , " "
2234
+ , " Note: incompatible with non-incremental memoization strategies - see"
2235
+ , " `set_memoization_incremental` and `set_memoization_hash_incremental`."
2233
2236
]
2234
2237
, prim " write_goal" " String -> ProofScript ()"
2235
2238
(pureVal write_goal)
You can’t perform that action at this time.
0 commit comments