-
Notifications
You must be signed in to change notification settings - Fork 89
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
omit-proofs: handle commands that may have global effects #694
Conversation
1399bc2
to
6581c2f
Compare
(if (proof-string-match coq-lowercase-command-regexp cmd) | ||
nil | ||
(not (coq-state-preserving-p cmd)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as suggested in issue #689 (comment)
I guess the lowercase test is unneeded; why not using something like this?
(if (proof-string-match coq-lowercase-command-regexp cmd) | |
nil | |
(not (coq-state-preserving-p cmd)))) | |
(or (proof-string-match coq-keywords-state-changing-commands cmd) | |
; (not (proof-string-match coq-keywords-local-state-changing-commands cmd)) ; TODO | |
)) |
For the TODO line, I'd rely on @hendriktews's suggestion to add another STATECH value and extend this:
Lines 1158 to 1168 in 8416875
(defvar coq-keywords-state-changing-commands | |
(append | |
coq-keywords-state-changing-misc-commands | |
coq-keywords-decl ; all state changing | |
coq-keywords-defn ; idem | |
coq-keywords-goal)) ; idem | |
;; | |
(defvar coq-keywords-state-preserving-commands | |
(coq-build-regexp-list-from-db coq-commands-db 'filter-state-preserving)) |
6581c2f
to
10b8c66
Compare
10b8c66
to
60cf493
Compare
Sorry I believe some improvement of you for the omit-proof feature (maybe this PR, I didn't re-checked) was stalled because of belated review from Pierre and I; sorry for that. So @hendriktews, do you think you'd need further test or discussion from us for this PR? Anyway I'd like to propose we pause our recurring PG maint telco this month (too many deadlines for me about grading or so in the upcoming two weeks), and resume in Feb… Kind regards |
There has been no progress on the preferred solutions that we discussed last year. Therefore I propose merging this PR as is (assuming all tests pass). Erik, note that your suggestion does not work as proposed, because |
60cf493
to
d3ebb32
Compare
Hi @erikmd , no problem! I am pretty confident about this PR and about #696 in the sense that they are not perfect, but good enough. So I don't need anything. I just want to give you the chance to comment, but if you are busy, I'll merge in a week or so. I commit to improve this fix when someone is motivated to add the |
Add the predicate `proof-script-cmd-prevents-proof-omission' to the omit-proofs framework, whose purpose is to check whether commands inside proofs might have global effects such that the proof must not be omitted. Fixes ProofGeneral#688
d3ebb32
to
a08ae93
Compare
Add the predicate `proof-script-cmd-prevents-proof-omission' to the omit-proofs framework, whose purpose is to check whether commands inside proofs might have global effects such that the proof must not be omitted.
Fixes #688