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

Add Semi-Continuous mode for larger and slower files #689

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tlsomers
Copy link
Contributor

This PR adds a 'SemiContinuous' mode as a compromise between continually checking in the background, but skipping proofs in the foreground.

Using this mode, the proof state at the cursor can be determined more quickly, as prior proofs are skipped. However, the continuous checker is still run in the background to continually check all proofs in the file.

Additionally, a new NonOpaqueProof task is added for proofs which are not opaque and cannot be delegated, but can still be skipped using the Skip option or in SemiContinuous mode.

Even using SemiContinuous mode, changing the cursor position may be slow as LSP commands are currently run at 1 byte per loop (hence 1 byte per background Coq command). The following SEL pull request allows LSP commands to be read in one iteration:
gares/sel#10

@gares
Copy link
Collaborator

gares commented Nov 19, 2023

I like the idea, but:

Additionally, a new NonOpaqueProof task is added for proofs which are not opaque and cannot be delegated, but can still be skipped using the Skip option or in SemiContinuous mode.

This seems wrong to me. A piece of Coq code like

Definition foo : nat.
Proof. exact 3. Defined.

Cannot be skipped or processed in the background without potentially generating spurious failures.
Even if its syntax is akin a proof block, it really means Definition n : nat := 3. and the definition just after it can fail to typecheck if the value of n is not 3, eg Definition v : Vector.t bool n := vcons .. vcons .. vcons .. vnil. So I'm afraid that part of the PR needs to be changed.

@rtetley
Copy link
Collaborator

rtetley commented Dec 11, 2023

Hey @tlsomers ! What is the status on this ? Would you willing to make the change so we can merge ?

@tlsomers tlsomers marked this pull request as draft February 21, 2024 16:17
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

Successfully merging this pull request may close these issues.

3 participants