I'm currently working on an ocaml program, which will be using the coq api to extract information about proofs and their goals. For this, I want to extract the name given to a goal, when a "refine ?[name]" or some other tactic to name a goal, was used. As of now I am getting the current goals, using my current proof state to extract them like shown below
(*currstate is the current state of the proof*)
let pstate = match currentstate.proof with
| None ->
begin
failwith ""
end
| Some pst -> pst
in
let goals = (Proof.data pstate).goals in
...
with this method I am able to extract the IDs of the goals, but not the name they were given.
Is there any possibility to extract the names?