aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-23Pass some files to strict focusing mode.Gaëtan Gilbert
ie default goal selector ! How to do this: - change the default value of default goal selector in goal_select.ml - eval the emacs code in this commit message - compile Coq and in each erroring file repeatedly run [C-c f] (my/maybe-fix-buller-error) then [C-c C-b] (proof-process-buffer) until there are no errors (NB the first [C-c f] has no effect). You need to watch for 2 cases: - overly deep proofs where the bullets need to go beyond the list in my/bullet-stack (6 layers is enough the vast majority of the time though). The system will give you an error and you need to finish the lemma manually. - weird indentation when a bullet starts in the middle of a line and doesn't end in that line. Just reindent as you like then go to the next error and continue. ~~~emacs-lisp (defconst my/bullet-stack (list "-" "+" "*" "--" "++" "**") "Which bullets should be used, in order.") (defvar-local my/bullet-count nil "The value in the car indicates how many goals remain in the bullet at (length-1), and so on recursively. nil means we haven't started bulleting the current proof.") (defvar-local my/last-seen-qed nil) (defun my/get-maybe-bullet-error () "Extract the number of focused goals from the ! selector error message." (when-let* ((rbuf (get-buffer "*response*")) (str (with-current-buffer "*response*" (buffer-string))) (_ (string-match (rx "Error: Expected a single focused goal but " (group (+ digit))) str)) (ngoals (string-to-number (match-string 1 str)))) ngoals)) (defun my/bullet-fix-indent () "Auto indent until the next Qed/Defined, and update my/last-seen-qed." ;; (insert (format "(* %s -> %s *)\n" my/prev-count my/bullet-count)) (when-let ((qed (save-excursion (search-forward-regexp (rx (or "Defined." "Qed.")) nil t)))) (set-marker my/last-seen-qed qed) (indent-region (- (point) 1) qed))) (defun my/nth-bullet (n) "Get nth bullet, erroring if n >= length my/bullet-stack" (or (nth n my/bullet-stack) (error "Too many bullets."))) (defun my/maybe-fix-bullet-error (&optional arg) "Main function for porting a file to strict focusing. Repeatedly process your file in proof general until you get a focusing error, then run this function. Once there are no more errors you're done. Indentation commonly looks bad in the middle of fixing a proof, but will be fixed unless you start a bullet in the middle of a line and don't finish it in that line. ie in 'tac1. - tac2.\n tac3.' tac3 will get indented to align with tac2, but if tac2 finished the bullet the next action will reindent. This is a stateful process. The state is automatically reset when you get to the next proof, but if you get an error or take manual action which breaks the algorithm's expectation you can call with prefix argument to reset." (interactive "P") (unless my/last-seen-qed (setq my/last-seen-qed (set-marker (make-marker) 0))) (when (or arg (> (point) my/last-seen-qed)) (setq my/bullet-count nil) (set-marker my/last-seen-qed 0)) (when-let ((ngoals (my/get-maybe-bullet-error))) (setq my/prev-count (format "%s %s" ngoals my/bullet-count)) (if (= ngoals 0) (progn (while (and my/bullet-count (= (car my/bullet-count) 0)) (pop my/bullet-count)) (insert (concat (my/nth-bullet (- (length my/bullet-count) 1)) " ")) (setq my/bullet-count (cons (- (car my/bullet-count) 1) (cdr my/bullet-count))) (my/bullet-fix-indent)) (setq my/bullet-count (cons (- ngoals 1) my/bullet-count)) (insert (concat (my/nth-bullet (- (length my/bullet-count) 1)) " ")) (my/bullet-fix-indent)))) (bind-key "C-c f" #'my/maybe-fix-bullet-error coq-mode-map) ~~~
2019-01-22Merge PR #9225: Fix issue: Windows CI: cygwin install cache is not reused #9212Maxime Dénès
Reviewed-by: maximedenes
2019-01-22Merge PR #9308: Remove outdated gitignore coqprojectfile.mlEmilio Jesus Gallego Arias
Reviewed-by: ejgallego
2019-01-22Merge PR #9332: Add OSX job to azureEmilio Jesus Gallego Arias
Ack-by: SkySkimmer Reviewed-by: ejgallego
2019-01-21Merge PR #9027: Refactor checking of inductive typesMaxime Dénès
Ack-by: SkySkimmer Reviewed-by: mattam82 Ack-by: maximedenes Ack-by: ppedrot
2019-01-21Add OSX job to azureGaëtan Gilbert
2019-01-21Refactor typechecking of inductive typesGaëtan Gilbert
We split into smaller functions, use more specific types for universe manipulation, and try to limit how much of the big tuple gets passed to subroutines.
2019-01-21Move inductive typecheck to file independent from positivity check.Gaëtan Gilbert
This is strictly code movement.
2019-01-21Move inductive_error to Type_errorsGaëtan Gilbert
2019-01-21Merge PR #9304: Default disable auto template warning.Maxime Dénès
Reviewed-by: Zimmi48 Reviewed-by: mattam82 Reviewed-by: maximedenes
2019-01-21Merge PR #9340: Add badges linking to a selection of up-to-date Coq packages.Maxime Dénès
Reviewed-by: maximedenes
2019-01-20Merge PR #9353: Fix merge-pr.sh when multiple review commentsMaxime Dénès
Reviewed-by: maximedenes
2019-01-17Fix merge-pr.sh when multiple review commentsGaëtan Gilbert
It used to output duplicate trailers.
2019-01-17Merge PR #9326: [ci] compile with -quick & validate after vio2voGaëtan Gilbert
Reviewed-by: ejgallego Ack-by: SkySkimmer Ack-by: gares Ack-by: ppedrot
2019-01-17Merge PR #9345: [ci] Update fiat-crypto to the new pipelineGaëtan Gilbert
Reviewed-by: SkySkimmer
2019-01-17Merge PR #9192: Issue #9175, #9190, #9191 (various minor Windows build issues)Maxime Dénès
Reviewed-by: Zimmi48
2019-01-17Merge PR #9048: Fix vernac classification of `Fail Instance`Enrico Tassi
Reviewed-by: gares
2019-01-17Merge PR #9242: merge-pr: add reviewer info to commit messageMaxime Dénès
Reviewed-by: maximedenes Ack-by: ejgallego
2019-01-16Merge PR #9346: Add .nia.cache to .gitignoreGaëtan Gilbert
2019-01-16Add .nia.cache to .gitignoreJason Gross
2019-01-16[ci] Update fiat-crypto to the new pipelineJason Gross
We're recently reorganized fiat-crypto. This should fix the OOM CI issues. Fixes #9338
2019-01-14Merge PR #9307: Handle local definitions in implicit arguments of InstanceMaxime Dénès
2019-01-13Add badges linking to a selection of up-to-date Coq packages.Théo Zimmermann
The badges displaying the latest packaged version are provided by Repology. The goal is to put forward the packages that are well maintained (updated quickly after a new release) and thus recommended. The history of package updates can be found at: https://repology.org/metapackage/coq/history opam is missing because Repology is not currently tracking opam, but this could be fixed (Repology does not only track Linux-distributions-like package repositories, it also includes programming language package repositories such as CPAN, CRAN, Hackage, RubyGems, and Stackage, thus opam could be added as well).
2019-01-13Refactor badges in README.Théo Zimmermann
2019-01-11[STM] set the mtime of files generated via vio2vo (fix #9334)Enrico Tassi
2019-01-11Fix vernac classification of `Fail Instance`Maxime Dénès
AFAIK `Fail Instance` cannot open a goal.
2019-01-11Merge pull request #8778 from SkySkimmer/merge-plugin-tutoYves Bertot
Move plugin tutorial to Coq repo
2019-01-10Merge PR #9335: [STM] kill no_safe_id anomalyMaxime Dénès
2019-01-10[ci] compile with -quick & validate after vio2voEnrico Tassi
2019-01-10[vio] free resources (file descriptors) as soon as a worker endsEnrico Tassi
2019-01-10[make] support for QUICKEnrico Tassi
The variable QUICK enables the quick compilation chain: - all v files are compiled with -quick to vio files (also -native-compiler no, since it is quicker) - then all vio files are turned to vo files $NJOBS at a time All occurrences of .vo use now .$(VO) that can be either .vo or .vio depending of QUICK being defined. Targets that only make sense for .vo files have to use $(VAR:.$(VO)=.vo)
2019-01-10[STM] kill no_safe_id anomalyEnrico Tassi
2019-01-10Merge PR #9143: Documenting the internal role of to_string and print in NamesMaxime Dénès
2019-01-10Merge PR #9331: [STM] Fix semantics of `cur_id` w.r.t. error statesEnrico Tassi
2019-01-10[checker] avoid some printing in non verbose modeEnrico Tassi
2019-01-09[STM] Fix semantics of `cur_id` w.r.t. error statesMaxime Dénès
2019-01-09Merge PR #9318: Add Azure Pipelines build badgeThéo Zimmermann
2019-01-09Merge PR #9327: [Manual] Remove link to non-existing CSS fileClément Pit-Claudel
2019-01-09Merge PR #9088: Add CI job running test suite with `async-proofs on`Emilio Jesus Gallego Arias
2019-01-09[Manual] Remove link to non-existing CSS fileVincent Laporte
2019-01-09Merge PR #9322: [ci] Update fiat-crypto legacyGaëtan Gilbert
2019-01-09Make some tests more robust by adding missing proof terminatorsMaxime Dénès
2019-01-09Test ltacprof in sequential modeMaxime Dénès
Scripting these commands in async mode does not really make sense.
2019-01-09Add a CI job running test suite with `-async-proofs on`Maxime Dénès
2019-01-09Make it possible to pass flags to coq when running test suiteMaxime Dénès
2019-01-09Merge PR #9316: Fix #3934: coqc -time -quick gives unreadable outputEnrico Tassi
2019-01-09Merge PR #9273: Fix #9272: `Unset Nested Proofs Allowed` does not capture ↵Enrico Tassi
nested `Ins…
2019-01-08Move position and update GitLab alt textKayla Ngan
2019-01-08[ci] Update fiat-crypto legacyJason Gross
Once https://github.com/mit-plv/fiat-crypto/pull/477 is merged, the master branch will no longer contain the files nor the targets for fiat-crypto legacy. (We should perhaps consider moving fiat-crypto legacy to coq-community as a source of vm and printing tests.)
2019-01-08Fix #3934: coqc -time -quick gives unreadable outputMaxime Dénès