I want to make a tactic like
let x := fresh in
epose (x := _);
forward_call x.
forward_call
is tactic to process function call in VST.
I find if I do epose _; forward_call x
(if x is the name by epose), it goes into finite loop, too. But it works if I do epose _. forward_call x.
then it works. The same will also happen if I use eset
instead of epose
. I don't understand why using semicolon to connect two tactics is different from using two commands separated by dot, when the first tactic only generate exactly one goal. Do you know any difference between these two?
One thing I find is epose (_); show_hyps.
gives y := ?y : ?T
, while epose (_). show_hyps.
gives y := ?Goal0 : ?Goal
. Maybe that suggests some difference.
I didn't find a simple example for this problem. I tried simple cases as below and there is no difference between using dot and semicolon.
Require Import Coq.omega.Omega.
Require Import Coq.Program.Tactics.
Open Scope Z_scope.
Goal exists x, x = 2.
epose (y := _). refine (ex_intro _ y _); subst y.
reflexivity.