0

Neither Reset <sectionname>. nor Reset <globalconstant>. nor Reset Initial. works in my CoqIDE interactive sessions. The message is

Error: Use CoqIDE navigation instead

The only Resets I've seen to work are Reset Extraction Blacklist. and Reset Extraction Inline.. Below's a copy of some info from Help > About. Thanks in advance for any ideas

**Version information**

The Coq Proof Assistant, version 8.4pl3 (January 2014)  
Architecture Linux running Unix operating system
Gtk version is 2.24.23  
This is coqide.opt (opt is the best one for this architecture and OS)
jaam
  • 900
  • 4
  • 23

2 Answers2

1

If you are willing to upgrade to Coq 8.5, CoqIDE now supports Reset, Undo, Abort, Restart... It will just print a warning advising you to use navigation commands instead when you use them.

Zimm i48
  • 2,901
  • 17
  • 26
  • Thanks, I'll look into it when I get some time ([8.5](https://coq.inria.fr/coq-85) has no Linux installer, so I should install O'Caml, compile the sources, etc.) – jaam Apr 21 '16 at 14:04
  • 1
    Coq developers recommend installing via Opam (although it will indeed mean building from sources and you need to make sure you have package `liblablgtk2-ocaml-dev` installed first). Another non-standard but quicker solution would be to install with some alternative package manager such as [Nix](http://nixos.org/nix/). In a nutshell: `curl https://nixos.org/nix/install | sh` then `nix-env -i coq-8.5pl1` – Zimm i48 Apr 22 '16 at 10:14
0

From what I remember, the Reset action is just the "go to the top of the file and forget everything" arrow, the one that backtracks the whole file. This message is here to prevent weird behavior by mixing such commands with IDE bindings of CoqIde

Edit after comments: There is no real concept of "global" variables in Coq: it's a functional programming language. You have access to anything that is defined prior to you. It can be in the same module or in an imported module.

If you want to get rid of a top level declaration in the same module, the only way I know is to move the definition down up to the point you really need it. If it is in an external module you imported, the only solution is not to import the module.

I might be wrong, please do not hesitate to correct me. My understanding is that removing such a definition forces you to remove anything that depends on this definition, which is not a simple task to perform.

Vinz
  • 5,997
  • 1
  • 31
  • 52
  • OK, how can I dismiss global variables in my code then? I thought that's what `Reset Initial.` and `Reset .` were for – jaam Mar 29 '16 at 21:32
  • what do you mean by "dismiss" ? – Vinz Mar 30 '16 at 06:57
  • I edited my previous answer with more infos, to be take with care, I'm no longer up to Coq's IDE commands – Vinz Mar 31 '16 at 07:50
  • From the Coq'Art book (2004:19): "We frequently use the name[s] /.../ _global variable_ for a globally defined identifier." By "identifier" they mean a term (name), e.g. `x` in `x : A`. _Ibid_.: "`Reset _id_` removes from the environment every declaration or definition done after the identifier `_id_` included." As `Reset`s work in `coqtop`, one would expect something equivalent in CoqIDE as well. You may be right, though, that CoqIDE lacks such functionality. It would be great if someone could confirm this – jaam Mar 31 '16 at 13:07
  • Try to ask on the Coq-Club mailing list, devs are there, mostly not on SO ;) – Vinz Mar 31 '16 at 14:46