-
Notifications
You must be signed in to change notification settings - Fork 73
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
wip: coq interruption #1046
base: main
Are you sure you want to change the base?
wip: coq interruption #1046
Conversation
CC @rtetley, when you have a minute, could you please add a stop button to the UI ? |
Along with a stop button could we have a key binding to interrupt as well |
After some thinking the plan could be:
This includes all Rocq calls, the queries, the parser, etc Some Rocq code may not need this, being pure, but it is not so clear how to know it and ensure it Rocq side. Eg |
Done
I created a command that you can call from the palette. What default keybinding should we use ? |
Without a state we can't kill the current execution
I know it has been previously suggested that if you have an in-progress proof and input the "Step Backward" key bind it should be interpreted as "Interrupt", so that is a possibility. I also think maybe given that we have commands bound to up, down, and right arrow keys, maybe left arrow key could be "Interrupt"? |
requires sel branch
There is a big issue, namely that Coq is not thread safe (nor purely functional). Scenario: the execution manager (thread) is running on a sentence: it installed a global state and is possibly even modifying it in place before snapshotting it back; at the same time the lsp manager gets a request, like hover or query or completion, that currently installs a Coq state and run some code. Things can go south in hard to debug ways.
So, if we follow the path of running "coq" in a thread and the "language server" in another one, all calls to (non purely functional) Coq APIs have to go through a single point in the execution manager and be queued, or interleaved, taking care of properly handling the global state.