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

Explicit Projection nodes in concrete syntax #14598

Merged
merged 4 commits into from Aug 5, 2021

Conversation

herbelin
Copy link
Member

@herbelin herbelin commented Jul 4, 2021

Kind: infrastructure.

This PR changes the isproj-based encoding of CApp/CAppExpl to explicit CProj/GProj/NProj constructors.

There is also support for universes in the r.(f) syntax.

It is similar to #6651 but purely restricted to the change of representation. In particular, in this PR, NProj behaves like NApp and GProj like GApp (for instance, reversibility of parsing as in #6764 works). Compared to #6651, it includes parameters in the CProj/GProj/NProj so as to cover the case of non-primitive projections too. Also, it implements appropriate code for these extra constructors (up to one exception in funind which I suspect should not occur).

Note: The PR originally included an improvement about using implicit arguments with the r.(f) syntax though. It moved to #14606 on which it depended. #14606 itself evolved to also fix #4167.

@herbelin herbelin added kind: cleanup Code removal, deprecation, refactorings, etc. part: parser labels Jul 4, 2021
@herbelin herbelin added this to the 8.15+rc1 milestone Jul 4, 2021
@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch 5 times, most recently from 9a4de81 to d46ec0b Compare July 4, 2021 23:10
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jul 5, 2021

Hey, I have detected that there were CI failures at commit d46ec0b without any failure in the test-suite.
I checked that the corresponding jobs for the base commit d91d22d succeeded. You can ask me to try to extract a minimal test case from this so that it can be added to the test-suite.
If you tag me saying @coqbot ci minimize, I will minimize the following targets: ci-argosy, ci-compcert.

1 similar comment
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jul 5, 2021

Hey, I have detected that there were CI failures at commit d46ec0b without any failure in the test-suite.
I checked that the corresponding jobs for the base commit d91d22d succeeded. You can ask me to try to extract a minimal test case from this so that it can be added to the test-suite.
If you tag me saying @coqbot ci minimize, I will minimize the following targets: ci-argosy, ci-compcert.

@JasonGross
Copy link
Member

@coqbot CI minimize

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jul 5, 2021

I have initiated minimization at commit d46ec0b for the suggested targets ci-argosy, ci-compcert as requested.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jul 5, 2021

Minimized File /github/workspace/builds/coq/coq-failing/_build_ci/argosy/src/Spec/Proc.v (from ci-argosy) (full log on GitHub Actions)

Minimized Coq File (consider adding this file to the test-suite)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-w" "-deprecated-native-compiler-option" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/src" "RecoveryRefinement" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/classes/src" "Classes" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/array/src" "Array" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/tactical/src" "Tactical" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-top" "Proc" "-native-compiler" "ondemand") -*- *)
(* File reduced by coq-bug-finder from original input, then from 140 lines to 37 lines, then from 60 lines to 1007 lines, then from 1010 lines to 51 lines, then from 55 lines to 50 lines *)
(* coqc version 8.15+alpha compiled with OCaml 4.05.0
   coqtop version 8.15+alpha *)
Set Implicit Arguments.

  Definition relation A B T := A -> B -> T -> Prop.

  Definition and_then {A B C} {T1 T2}
             (r1: relation A B T1)
             (r2: T1 -> relation B C T2) :
    relation A C T2 :=
    fun x z o2 => exists o1 y, r1 x y o1 /\ (r2 o1) y z o2.

  Definition pure A T (o0:T) : relation A A T :=
    fun x y o => x = y /\ o = o0.

  Delimit Scope relation_scope with rel.
  Open Scope relation_scope.

  Notation "x <- p1 ; p2" := (and_then p1 (fun x => p2))
                              (at level 54, right associativity,
                               format "'[' x  <-  '[v    ' p1 ']' ; ']'  '/' p2")
                             : relation_scope.
Global Generalizable Variables T R Op State.

Inductive proc (Op: Type -> Type) (T : Type) : Type :=
| Call (op : Op T)
| Ret (v : T)
| Bind (T1 : Type) (p1 : proc Op T1) (p2 : T1 -> proc Op T).
Arguments Call {Op T}.
Arguments Ret {Op T} v.

Definition OpSemantics Op State := forall T, Op T -> relation State State T.
Definition CrashSemantics State := relation State State unit.

Record Dynamics Op State :=
  { step: OpSemantics Op State;
    crash_step: CrashSemantics State; }.

Section Dynamics.

  Context `(sem: Dynamics Op State).
  Notation proc := (proc Op).
  Notation step := sem.(step).

  Fixpoint exec {T} (p: proc T) : relation State State T :=
    match p with
    | Ret v => pure v
    | Call op => step op
    | Bind p p' => v <- exec p; exec (p' v)
    end.
Intermediate Coq File (useful for debugging if minimization did not go as far as you wanted)
(* -*- mode: coq; coq-prog-args: ("-emacs" "-w" "-deprecated-native-compiler-option" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/src" "RecoveryRefinement" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/classes/src" "Classes" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/array/src" "Array" "-R" "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/tactical/src" "Tactical" "-Q" "/github/workspace/cwd" "Top" "-Q" "/github/workspace/builds/coq/coq-failing/_install_ci/lib/coq/user-contrib/Ltac2" "Ltac2" "-top" "Proc" "-native-compiler" "ondemand") -*- *)
(* File reduced by coq-bug-finder from original input, then from 140 lines to 37 lines, then from 60 lines to 1007 lines, then from 1010 lines to 51 lines, then from 55 lines to 49 lines *)
(* coqc version 8.15+alpha compiled with OCaml 4.05.0
   coqtop version 8.15+alpha *)

  Definition relation A B T := A -> B -> T -> Prop.

  Definition and_then {A B C} {T1 T2}
             (r1: relation A B T1)
             (r2: T1 -> relation B C T2) :
    relation A C T2 :=
    fun x z o2 => exists o1 y, r1 x y o1 /\ (r2 o1) y z o2.

  Definition pure A T (o0:T) : relation A A T :=
    fun x y o => x = y /\ o = o0.

  Delimit Scope relation_scope with rel.
  Open Scope relation_scope.

  Notation "x <- p1 ; p2" := (and_then p1 (fun x => p2))
                              (at level 54, right associativity,
                               format "'[' x  <-  '[v    ' p1 ']' ; ']'  '/' p2")
                             : relation_scope.
Global Generalizable Variables T R Op State.

Inductive proc (Op: Type -> Type) (T : Type) : Type :=
| Call (op : Op T)
| Ret (v : T)
| Bind (T1 : Type) (p1 : proc Op T1) (p2 : T1 -> proc Op T).
Arguments Call {Op T}.
Arguments Ret {Op T} v.

Definition OpSemantics Op State := forall T, Op T -> relation State State T.
Definition CrashSemantics State := relation State State unit.

Record Dynamics Op State :=
  { step: OpSemantics Op State;
    crash_step: CrashSemantics State; }.

Section Dynamics.

  Context `(sem: Dynamics Op State).
  Notation proc := (proc Op).
  Notation step := sem.(step).

  Fixpoint exec {T} (p: proc T) : relation State State T :=
    match p with
    | Ret v => pure v
    | Call op => step op
    | Bind p p' => v <- exec p; exec (p' v)
    end.
Build Log (contains the Coq error message) (truncated to last 8.0KiB; full 2.7MiB file on GitHub Actions Artifacts under build.log)
  3050240 Jul  3 11:13 csdpcert.orig
-rwxr-xr-x 1 root root     1422 Jul  5 07:51 fake_ide
-rwxr-xr-x 1 root root  4735520 Jul  3 11:13 fake_ide.orig
-rwxr-xr-x 1 root root     1425 Jul  5 07:51 ocamllibdep
-rwxr-xr-x 1 root root  1682568 Jul  3 11:13 ocamllibdep.orig
-rwxr-xr-x 1 root root     1420 Jul  5 07:51 votour
-rwxr-xr-x 1 root root  2157328 Jul  3 11:13 votour.orig
++ CI_BUILD_DIR=/builds/coq/coq/_build_ci
++ CI_INSTALL_DIR=/builds/coq/coq/_install_ci
++ ls -l /builds/coq/coq/_build_ci
total 4
drwxr-xr-x 9 root root 4096 Jul  3 11:17 argosy
++ declare -A overlays
++ set +x
+ FORCE_GIT=1
+ git_download argosy
+ local project=argosy
+ local dest=/builds/coq/coq/_build_ci/argosy
+ local giturl_var=argosy_CI_GITURL
+ local giturl=https://github.com/mit-pdos/argosy
+ local ref_var=argosy_CI_REF
+ local ref=master
+ local ov_url=
+ local ov_ref=
+ '[' -d /builds/coq/coq/_build_ci/argosy ']'
+ echo 'Warning: download and unpacking of argosy skipped because /builds/coq/coq/_build_ci/argosy already exists.'
Warning: download and unpacking of argosy skipped because /builds/coq/coq/_build_ci/argosy already exists.
+ cd /builds/coq/coq/_build_ci/argosy
+ git submodule update --init --recursive
+ make
+ '[' -z x ']'
+ command make
+ make
make[1]: Entering directory '/builds/coq/coq/_build_ci/argosy'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/builds/coq/coq/_build_ci/argosy'
Aggregating timing log...
No timing data
/github/workspace/builds/coq /github/workspace
::endgroup::
::group::make ci-argosy (failing)
/builds/coq/coq /github/workspace/builds/coq /github/workspace
./dev/ci/ci-wrapper.sh argosy
++ : 2
++ export NJOBS
++ export OCAMLPATH=/github/workspace/builds/coq/coq-failing/_install_ci/lib:
++ OCAMLPATH=/github/workspace/builds/coq/coq-failing/_install_ci/lib:
++ export PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.05.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.05.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ '[' -n 1 ']'
++ export COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin
++ COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin
++ export CI_BRANCH=
++ CI_BRANCH=
++ [[ '' =~ ^[0-9]*$ ]]
++ export CI_PULL_REQUEST=
++ CI_PULL_REQUEST=
++ export PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.05.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/github/workspace/builds/coq/coq-failing/_install_ci/bin:/github/workspace/builds/coq/coq-failing/_install_ci/bin:/root/.opamcache/4.05.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin/
++ COQBIN=/github/workspace/builds/coq/coq-failing/_install_ci/bin/
++ ls -l /github/workspace/builds/coq/coq-failing/_install_ci/bin/
total 336640
-rwxr-xr-x 1 root root     1421 Jul  5 07:51 coq-tex
-rwxr-xr-x 1 root root  1555240 Jul  4 23:28 coq-tex.orig
-rwxr-xr-x 1 root root  2707920 Jul  4 23:28 coq_makefile
-rwxr-xr-x 1 root root     1418 Jul  5 07:51 coqc
-rwxr-xr-x 1 root root     1423 Jul  5 07:51 coqc.byte
-rwxr-xr-x 1 root root 32652603 Jul  4 23:28 coqc.byte.orig
-rwxr-xr-x 1 root root 24948720 Jul  4 23:28 coqc.orig
-rwxr-xr-x 1 root root  9620256 Jul  4 23:28 coqchk
-rwxr-xr-x 1 root root  4627296 Jul  4 23:28 coqdep
-rwxr-xr-x 1 root root     1420 Jul  5 07:51 coqdoc
-rwxr-xr-x 1 root root  4470464 Jul  4 23:28 coqdoc.orig
-rwxr-xr-x 1 root root     1420 Jul  5 07:51 coqide
-rwxr-xr-x 1 root root 11618120 Jul  4 23:28 coqide.orig
-rwxr-xr-x 1 root root     1428 Jul  5 07:51 coqidetop.byte
-rwxr-xr-x 1 root root 33130461 Jul  4 23:28 coqidetop.byte.orig
-rwxr-xr-x 1 root root     1427 Jul  5 07:51 coqidetop.opt
-rwxr-xr-x 1 root root 25367072 Jul  4 23:28 coqidetop.opt.orig
-rwxr-xr-x 1 root root     1423 Jul  5 07:51 coqnative
-rwxr-xr-x 1 root root  9946560 Jul  4 23:28 coqnative.orig
-rwxr-xr-x 1 root root     1419 Jul  5 07:51 coqpp
-rwxr-xr-x 1 root root  1895720 Jul  4 23:28 coqpp.orig
-rwxr-xr-x 1 root root     1432 Jul  5 07:51 coqproofworker.opt
-rwxr-xr-x 1 root root 24949904 Jul  4 23:28 coqproofworker.opt.orig
-rwxr-xr-x 1 root root     1432 Jul  5 07:51 coqqueryworker.opt
-rwxr-xr-x 1 root root 24949904 Jul  4 23:28 coqqueryworker.opt.orig
-rwxr-xr-x 1 root root     1433 Jul  5 07:51 coqtacticworker.opt
-rwxr-xr-x 1 root root 24949912 Jul  4 23:28 coqtacticworker.opt.orig
-rwxr-xr-x 1 root root     1420 Jul  5 07:51 coqtop
-rwxr-xr-x 1 root root     1425 Jul  5 07:51 coqtop.byte
-rwxr-xr-x 1 root root 42305193 Jul  4 23:28 coqtop.byte.orig
-rwxr-xr-x 1 root root     1424 Jul  5 07:51 coqtop.opt
-rwxr-xr-x 1 root root 24948880 Jul  4 23:28 coqtop.opt.orig
-rwxr-xr-x 1 root root 24948880 Jul  4 23:28 coqtop.orig
-rwxr-xr-x 1 root root     1419 Jul  5 07:51 coqwc
-rwxr-xr-x 1 root root  1330928 Jul  4 23:28 coqwc.orig
-rwxr-xr-x 1 root root     1424 Jul  5 07:51 coqworkmgr
-rwxr-xr-x 1 root root  2032352 Jul  4 23:28 coqworkmgr.orig
-rwxr-xr-x 1 root root     1422 Jul  5 07:51 csdpcert
-rwxr-xr-x 1 root root  3050240 Jul  4 23:28 csdpcert.orig
-rwxr-xr-x 1 root root     1422 Jul  5 07:51 fake_ide
-rwxr-xr-x 1 root root  4735848 Jul  4 23:28 fake_ide.orig
-rwxr-xr-x 1 root root     1425 Jul  5 07:51 ocamllibdep
-rwxr-xr-x 1 root root  1682568 Jul  4 23:28 ocamllibdep.orig
-rwxr-xr-x 1 root root     1420 Jul  5 07:51 votour
-rwxr-xr-x 1 root root  2157328 Jul  4 23:28 votour.orig
++ CI_BUILD_DIR=/github/workspace/builds/coq/coq-failing/_build_ci
++ CI_INSTALL_DIR=/github/workspace/builds/coq/coq-failing/_install_ci
++ ls -l /github/workspace/builds/coq/coq-failing/_build_ci
total 4
drwxr-xr-x 9 root root 4096 Jul  4 23:32 argosy
++ declare -A overlays
++ set +x
+ FORCE_GIT=1
+ git_download argosy
+ local project=argosy
+ local dest=/github/workspace/builds/coq/coq-failing/_build_ci/argosy
+ local giturl_var=argosy_CI_GITURL
+ local giturl=https://github.com/mit-pdos/argosy
+ local ref_var=argosy_CI_REF
+ local ref=master
+ local ov_url=
+ local ov_ref=
+ '[' -d /github/workspace/builds/coq/coq-failing/_build_ci/argosy ']'
+ echo 'Warning: download and unpacking of argosy skipped because /github/workspace/builds/coq/coq-failing/_build_ci/argosy already exists.'
Warning: download and unpacking of argosy skipped because /github/workspace/builds/coq/coq-failing/_build_ci/argosy already exists.
+ cd /github/workspace/builds/coq/coq-failing/_build_ci/argosy
+ git submodule update --init --recursive
+ make
+ '[' -z x ']'
+ command make
+ make
make[1]: Entering directory '/github/workspace/builds/coq/coq-failing/_build_ci/argosy'
COQC src/Spec/Proc.v
MINIMIZER_DEBUG: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc: COQPATH=
MINIMIZER_DEBUG: exec: /github/workspace/builds/coq/coq-failing/_install_ci/bin/coqc.orig -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/src RecoveryRefinement -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/classes/src Classes -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/array/src Array -R /github/workspace/builds/coq/coq-failing/_build_ci/argosy/vendor/tactical/src Tactical /github/workspace/builds/coq/coq-failing/_build_ci/argosy/src/Spec/Proc.v -o /github/workspace/builds/coq/coq-failing/_build_ci/argosy/src/Spec/Proc.vo 
File "/github/workspace/builds/coq/coq-failing/_build_ci/argosy/src/Spec/Proc.v", line 52, characters 22-24:
Error:
In environment
Op : Type -> Type
State : Type
sem : Dynamics Op State
exec : forall T : Type, proc T -> relation State State T
T : Type
p : proc T
op : Op T
The term "op" has type "Op T" while it is expected to have type "Type".

Makefile:35: recipe for target 'src/Spec/Proc.vo' failed
make[1]: *** [src/Spec/Proc.vo] Error 1
make[1]: Leaving directory '/github/workspace/builds/coq/coq-failing/_build_ci/argosy'
Makefile.ci:108: recipe for target 'ci-argosy' failed
make: *** [ci-argosy] Error 2
/github/workspace/builds/coq /github/workspace
::endgroup::
Minimization Log (truncated to last 8.0KiB; full 37KiB file on GitHub Actions Artifacts under bug.log)
ove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Variable removal successful.

I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to replace Obligation with Admit Obligations

Admitting Obligations successful.
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas

Admitting lemmas successful.
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions

Admitting definitions successful.
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation unsuccessful.

I will now attempt to split imports and exports
Import/Export splitting unsuccessful.

I will now attempt to split := definitions
One-line definition splitting unsuccessful.

I will now attempt to remove all lines, one at a time
Line removal unsuccessful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Variable removal successful.

I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to remove empty sections

No empty sections to remove.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...

Succeeded in stripping newlines and spaces.
/github/workspace/builds/coq/coq-failing/_install_ci/bin/coq_makefile COQC = /github/workspace/builds/coq/coq-passing/_install_ci/bin/coqc.orig -o Makefiled1c9fexc.coq -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/src RecoveryRefinement -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/vendor/classes/src Classes -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/vendor/array/src Array -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/vendor/tactical/src Tactical -Q /github/workspace/cwd Top -Q /github/workspace/builds/coq/coq-passing/_install_ci/lib/coq/user-contrib/Ltac2 Ltac2 -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/src RecoveryRefinement -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/vendor/classes/src Classes -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/vendor/array/src Array -R /github/workspace/builds/coq/coq-passing/_build_ci/argosy/vendor/tactical/src Tactical -Q /github/workspace/cwd Top -Q /github/workspace/builds/coq/coq-passing/_install_ci/lib/coq/user-contrib/Ltac2 Ltac2 -arg -w -arg -deprecated-native-compiler-option -arg -top -arg Proc -arg -native-compiler -arg ondemand bug_01.v
make -k -f Makefiled1c9fexc.coq bug_01.glob
getting bug_01.glob (/github/workspace/cwd/bug_01.glob)
getting bug_01.v (/github/workspace/cwd/bug_01.v)
NOTE: The file bug_01.v is very new (1625471841, 0 seconds old), delaying until it's a bit older
getting bug_01.glob (/github/workspace/cwd/bug_01.glob)
getting bug_01.glob (/github/workspace/cwd/bug_01.glob)

Sanity check passed.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...

No strippable newlines or spaces.

Now, I will attempt to strip the comments from this file...

Succeeded in stripping comments.

In order to efficiently manipulate the file, I have to break it into statements.  I will attempt to do this by matching on periods.

Splitting successful.

I will now attempt to remove any lines after the line which generates the error.

No lines to trim.

In order to efficiently manipulate the file, I have to break it into definitions.  I will now attempt to do this.
Sending statements to coqtop...
Done.  Splitting to definitions...

Splitting to definitions successful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Variable removal successful.

I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to replace Qed Obligation with Admit Obligations

Admitting Qed Obligations successful.
Failed to do everything at once; trying one at a time.
Admitting Qed Obligations unsuccessful.
No successful changes.

I will now attempt to replace Qeds with Admitteds

Admitting Qeds successful.
Failed to do everything at once; trying one at a time.
Admitting Qeds unsuccessful.
No successful changes.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Variable removal successful.

I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to admit [abstract ...]s

Admitting [abstract ...] successful.

Admitting [abstract ...] successful.
Admitting [abstract ...] unsuccessful.
Admitting [abstract ...] unsuccessful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Variable removal successful.

I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to replace Obligation with Admit Obligations

Admitting Obligations successful.
Failed to do everything at once; trying one at a time.
Admitting Obligations unsuccessful.
No successful changes.

I will now attempt to admit lemmas

Admitting lemmas successful.
Failed to do everything at once; trying one at a time.
Admitting lemmas unsuccessful.
No successful changes.

I will now attempt to admit definitions

Admitting definitions successful.
Failed to do everything at once; trying one at a time.
Admitting definitions unsuccessful.
No successful changes.

I will now attempt to export modules
Module exportation unsuccessful.

I will now attempt to split imports and exports
Import/Export splitting unsuccessful.

I will now attempt to split := definitions
One-line definition splitting unsuccessful.

I will now attempt to remove all lines, one at a time
Line removal unsuccessful.

I will now attempt to remove goals ending in [Abort.]

Aborted removal successful.

I will now attempt to remove unused Ltacs

Ltac removal successful.

I will now attempt to remove unused definitions

Definition removal successful.

I will now attempt to remove unused non-instance, non-canonical structure definitions

Non-instance definition removal successful.

I will now attempt to remove unused variables

Variable removal successful.

I will now attempt to remove unused contexts

Context removal successful.

I will now attempt to remove empty sections

No empty sections to remove.

Now, I will attempt to strip repeated newlines and trailing spaces from this file...

No strippable newlines or spaces.

If you have any comments on your experience of the minimizer, please share them in a reply (possibly tagging @JasonGross).
If you believe there's a bug in the bug minimizer, please report it on the bug minimizer issue tracker.

@ppedrot
Copy link
Member

ppedrot commented Jul 5, 2021

See also #6651. IIUC, this PR was reverted due to issues with backwards compatibility.

@coqbot-app

This comment has been minimized.

@herbelin
Copy link
Member Author

herbelin commented Jul 5, 2021

See also #6651. IIUC, this PR was reverted due to issues with backwards compatibility.

Yes, I know well #6651 and I started from it. The differences are:

  • The PR applies to the syntax of both primitive and non-primitive projections indifferently in constr_expr and glob_term; its purpose is to get rid of the isproj encoding in CApp/CAppExpl, independently of the question of whether p.(x) was used for primitive or non-primitive records
  • Because it applies to both primitive and non-primitive projections, and the latter supports syntax such as r.(@f params) or r.(f some-explicit-params), the new Proj nodes in constr_expr and glob_term have room for the parameters
  • I give code to (almost) all new Proj cases (rather than failing with unimplemented as in Use r.(p) syntax to print primitive projections. #6651)
  • Printing Notation regressed compared to 8.7 #6764 does not show up because t.(foo) and foo t remain disjoint expressions in the kernel (but anyway, Printing Notation regressed compared to 8.7 #6764 is misguiding: it is not Use r.(p) syntax to print primitive projections. #6651 per se which was a problem; instead we need to decide the quotient we want to put on terms when matching notations)

So shortly, the purpose of this PR is not per se to address a problem with primitive projections but to simply replace the existing encoding of projections in the App node with a specific Proj node. It contains #6651 but does not serve the same purpose. That is, the questions specific to the printing of projections or specific to primitive projections have to be treated in subsequent PRs.

Nevertheless, my main worry is not to overlap with what other developers are doing around projections. Had someone else the intention to resuscitate #6651? Was someone thinking that adding an explicit Proj node in constr_expr and glob_term was a bad idea?

JasonGross added a commit to coq-community/run-coq-bug-minimizer that referenced this pull request Jul 5, 2021
@JasonGross
Copy link
Member

@coqbot ci minimize ci-compcert

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jul 5, 2021

I am now running minimization at commit d46ec0b on requested target ci-compcert. I'll come back to you with the results once it's done.

@coqbot-app

This comment has been minimized.

@herbelin
Copy link
Member Author

herbelin commented Jul 5, 2021

@JasonGross: for the record, I could compile the minimized Compcert file with a few changes:

  • inlining of the Compcert modules Coqlib (and Errors and Maps) in Module Import Coqlib. ... End Coqlib. (etc.), so that it is stand-alone (but a tar with several files and a makefile would have been as useful probably).
  • an additional well-chosen Import List so that length is taken in List rather than in String

@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch from d46ec0b to db7b031 Compare July 5, 2021 19:53
@ppedrot
Copy link
Member

ppedrot commented Jul 5, 2021

Was someone thinking that adding an explicit Proj node in constr_expr and glob_term was a bad idea?

At least I believe it's a necessary change, but it must be performed as incrementally as possible. It's too easy to silently wreak havoc for users of primitive projections, so we must clearly delineate the potential effects on semantics that were not envisioned at the time of writing the patch.

@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch 4 times, most recently from e0beba2 to 5dbfc38 Compare July 5, 2021 20:49
@herbelin
Copy link
Member Author

herbelin commented Jul 5, 2021

but it must be performed as incrementally as possible

I moved the "feature" part in #14606. So, up to mistakes, this PR should now be restricted to only changing the isproj-based encoding of CApp/CAppExpl to explicit CProj/GProj/NProj constructors.

In particular, in this PR, NProj behaves like NApp and GProj like GApp (for instance, reversibility of parsing as in #6764 works).

Note that the notation x.(f) when f is not registered as a (prim or not prim) projection, as in Check O.(S). fails though. I don't know what to think about it. [Or we can also accept it for printing only?]

Added: There is also extra support for explicit universes in the r.(f) syntax (is that useful?).

@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch from 5dbfc38 to b5c563c Compare July 5, 2021 21:59
@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch 2 times, most recently from cd47482 to 5e3522e Compare July 21, 2021 17:54
@github-actions github-actions bot added needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. labels Jul 23, 2021
@gares
Copy link
Member

gares commented Jul 24, 2021

The overlay for coq-elpi is now OK IMO. (but you need to rebase this PR, since another PR with an overlay was merged meanwhile)

@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch from 5e3522e to bbebaac Compare July 26, 2021 15:35
@coqbot-app coqbot-app bot removed the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Jul 26, 2021
@ppedrot ppedrot self-assigned this Jul 29, 2021
@ppedrot
Copy link
Member

ppedrot commented Jul 29, 2021

@herbelin can we try to get a clean CI? I don't remember if this was ever green, but if so it'd allow to merge quickly.

@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch from bbebaac to 0f66f53 Compare July 29, 2021 16:53
@ppedrot
Copy link
Member

ppedrot commented Jul 30, 2021

CI green. I'll leave a few more days for potential input before merging, but don't wait for too long if you want to comment here.

@github-actions github-actions bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Jul 31, 2021
…b_term.

This is an alternative to the encoding of projections in the
CApp/CAppExpl nodes.
@herbelin herbelin force-pushed the master+proj-nodes-in-concrete-syntax branch from 0f66f53 to f35ab48 Compare July 31, 2021 18:36
@coqbot-app coqbot-app bot removed the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Jul 31, 2021
@@ -9,6 +9,14 @@

- Renaming `LSet` into `Level.Set` and `LMap` into `Level.Map`

### Concrete syntax
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog entry should be created with dev/tools/make-changelog.sh rather than added directly here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are about the OCaml API which don't go in the doc/changelog directory as far as I know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would fit into the "misc" category. If you don't want to put it there, maybe use the title "OCaml API" or "OCaml API (internals)" instead of "Concrete syntax".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is that users who are not plugin developers do not need to know about the changes in this PR as they are without visible effect on using Coq.

On the other side, the related #14640 is normally going to introduce changes of behavior and I agree that it will need a "user-level" change log.

dev/doc/changes.md Outdated Show resolved Hide resolved
dev/doc/changes.md Outdated Show resolved Hide resolved
herbelin and others added 2 commits August 1, 2021 11:49
Co-authored-by: Jan-Oliver Kaiser <mail@janno-kaiser.de>
Co-authored-by: Jan-Oliver Kaiser <mail@janno-kaiser.de>
@ppedrot ppedrot merged commit 3fd62a8 into coq:master Aug 5, 2021
proux01 added a commit to proux01/coq that referenced this pull request Sep 1, 2021
We should have rerun CI before merging coq#13664, this would have avoided
missing that coq#13664 forgot to take coq#14598 into account.
ppedrot added a commit that referenced this pull request Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: cleanup Code removal, deprecation, refactorings, etc. part: parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dot notation for class projections should be smarter about inferring instance
7 participants