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

Unexpected error when debugging Unicoq #335

Closed
Tragicus opened this issue Jan 12, 2024 · 2 comments
Closed

Unexpected error when debugging Unicoq #335

Tragicus opened this issue Jan 12, 2024 · 2 comments

Comments

@Tragicus
Copy link

Printing Unicoq's debug trace causes an "unexpected error", whenever there is something to print. It happens (at least) with coq 8.18.0 and coq-unicoq 1.6+8.18. The anomaly can be reproduced with
From Unicoq Require Import Unicoq. Set Unicoq Debug. Check 0 : id nat.

@whonore
Copy link
Owner

whonore commented Jan 14, 2024

The issue is Check 0 : id nat is causing a warning to be printed to stderr. Coqtail tries to distinguish between warnings and errors, but the only way to do that is with heuristics about what shape the warning has, and Unicoq isn't following the expected pattern (there's no [warning type] at the end), so Coqtail treats it like an error.

I think what I'll do is to add an option that lets you try to progress even if there's an error on stderr, and maybe also adjust/relax the warning regex.

The warning from Unicoq is:

Warning: no LaTex file set with [Set Unicoq LaTex File 'file']. No LaTex output will be generated.
?A =<= Set (Meta-Inst) OK
_Type =<= Type (Reduce-Same)

@Tragicus
Copy link
Author

I see, thanks. This is weird, because Unicoq only uses Printf.printf and never mentions stderr. However, I changed all the printf by coq's feedback functions and the issue disappeared.
I close this since the issue is resolved, though the improvements you mentioned would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants