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

[coq] Enable backtraces on anomaly #161

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ejgallego
Copy link
Owner

This means we will re-execute the anomaly sentence, which may not be very safe.

Fixes #153

@ejgallego ejgallego marked this pull request as draft January 9, 2023 01:22
@ejgallego
Copy link
Owner Author

It seems this doesn't work, I don't know why.

Anyways this is more tricky than it looks, for example for parsing this won't work as parsing updates the input imperatively. So I guess we'd need to add a flag to eval to understand when it is safe to do so.

@ejgallego
Copy link
Owner Author

It seems this doesn't work, I don't know why.

I've discovered why this doesn't work, usually when we do Coq.Protect.eval ~f x , f will unfreeze the Coq state, which will set the state for anomalies back to disabled.

I guess that's hard to overcome without updating the Coq API in CDebug.

@SkySkimmer , what do you think about taking "backtraces" out of the debug flags (or even making the debug flags less synchronized)

@ejgallego ejgallego force-pushed the debug_on_anomaly branch 2 times, most recently from 53b6770 to 5bf9a6f Compare January 20, 2023 00:56
@SkySkimmer
Copy link
Collaborator

IDK

@ejgallego
Copy link
Owner Author

We need to take a decision on this, we either patch Coq so we can do it, or close this PR.

IMHO that seems very useful, so we could try a Coq patch.

This means we will re-execute the anomaly sentence, which may not be
very safe.

Fixes #153
@ejgallego ejgallego added this to the 0.3.0 milestone Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[diagnostics] Produce backtraces automatically when an error is an anomaly.
2 participants