File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -535,13 +535,23 @@ goal_eval unints =
535
535
withFirstGoal $ \ goal ->
536
536
do sc <- getSharedContext
537
537
unintSet <- resolveNames unints
538
- t0 <- liftIO $ propToPredicate sc (goalProp goal)
538
+ -- replace all pi-bound quantified variables with new free variables
539
+ let (args, body) = asPiList (unProp (goalProp goal))
540
+ body' <-
541
+ case asEqTrue body of
542
+ Just t -> pure t
543
+ Nothing -> fail " goal_eval: expected EqTrue"
544
+ ecs <- liftIO $ traverse (uncurry (scFreshEC sc)) args
545
+ vars <- liftIO $ traverse (scExtCns sc) ecs
546
+ t0 <- liftIO $ instantiateVarList sc 0 (reverse vars) body'
539
547
let gen = globalNonceGenerator
540
548
sym <- liftIO $ Crucible. newSAWCoreBackend FloatRealRepr sc gen
541
549
(_names, (_mlabels, p)) <- liftIO $ W4Sim. w4Eval sym sc Map. empty unintSet t0
542
550
t1 <- liftIO $ Crucible. toSC sym p
543
551
t2 <- liftIO $ scEqTrue sc t1
544
- return (() , mempty , Just (goal { goalProp = Prop t2 }))
552
+ -- turn the free variables we generated back into pi-bound variables
553
+ t3 <- liftIO $ scGeneralizeExts sc ecs t2
554
+ return (() , mempty , Just (goal { goalProp = Prop t3 }))
545
555
546
556
beta_reduce_goal :: ProofScript ()
547
557
beta_reduce_goal =
You can’t perform that action at this time.
0 commit comments