Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hammer tactic fails when dealing with .vos files #131

Open
yiyunliu opened this issue Mar 29, 2022 · 1 comment
Open

hammer tactic fails when dealing with .vos files #131

yiyunliu opened this issue Mar 29, 2022 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@yiyunliu
Copy link

yiyunliu commented Mar 29, 2022

Coq version: 8.15.0
Hammer version: 1.3.2+8.15

Here is a minimal example.

test.v:

Theorem wrong : 1 = 2.
(* placeholder *)
  idtac.
Qed.

test2.v:

Require Import test.
From Hammer Require Import Hammer.

Theorem worse : 2 = 3.
Proof.
  hammer.
  (* Error: Cannot access opaque delayed proof *)

To reproduce the error, run the following commands:

coqc -vos test.v
coqc -vok test2.v

Then there will be an error message saying "Cannot access opaque delayed proof". The message comes from Coq itself. Searching the text on coq's repo leads me to the following OCaml function: https://github.com/coq/coq/blob/b35628733a0131a9cc648793c1e33e222d7958c5/library/global.ml#L142

I don't know how those functions are used, but Print wrong. in test2.v triggers the same error. Turning Theorem wrong into an axiom and the error no longer triggers so I don't think having no actual proof object is the issue here. I'd like to provide more details, but unfortunately, I'm not familiar with coq internals enough to debug the issue myself.

@lukaszcz lukaszcz added enhancement New feature or request wontfix This will not be worked on labels Apr 24, 2022
@lukaszcz
Copy link
Owner

lukaszcz commented Apr 24, 2022

The proofs are very much the issue. hammer needs access to the proof objects to do premise selection. Now, one could try to treat theorems without proof objects like axioms, but that's a feature request which I'm not going to work on in the foreseeable future. You're welcome to try to implement it yourself if you really need it.

A quick solution might be to give a more understandable error message, which I might do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants