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
Extraction generates invalid code for primitive records in functors #16288
Labels
kind: bug
An error, flaw, fault or unintended behaviour.
part: extraction
The extraction mechanism.
part: primitive records
The primitive record and primitive projection mechanism.
Projects
Milestone
Comments
JasonGross
added
part: extraction
The extraction mechanism.
part: primitive records
The primitive record and primitive projection mechanism.
kind: bug
An error, flaw, fault or unintended behaviour.
labels
Jul 5, 2022
JasonGross
added a commit
to JasonGross/fiat-crypto
that referenced
this issue
Jul 5, 2022
COQBUG(coq/coq#16288) means we can't use extraction with primitive records inside functors
JasonGross
added a commit
to mit-plv/fiat-crypto
that referenced
this issue
Jul 5, 2022
COQBUG(coq/coq#16288) means we can't use extraction with primitive records inside functors
OwenConoly
pushed a commit
to mit-plv/fiat-crypto
that referenced
this issue
Nov 13, 2022
COQBUG(coq/coq#16288) means we can't use extraction with primitive records inside functors
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 1, 2023
- The code for extracting a primitive projection was referencing the constant form of the projection. - The code for compiling the constant form of the projection was doing a call to the global table of projections which is however not fed in functors. - The declaration of constants bound to a projection had a small size and were then inlined. Instead of relying on the table of projections, we use the "match"-expanded form of the projections which has the advantage of be valid in all target languages. In particular, in OCaml extraction, this is anyway reprinted as a field. Note: we need to move the fake_match_projection function a bit earlier.
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 1, 2023
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 1, 2023
- The code for extracting a primitive projection was referencing the constant form of the projection. - The code for compiling the constant form of the projection was doing a call to the global table of projections which is however not fed in functors. - The declaration of constants bound to a projection had a small size and were then inlined. Instead of relying on the table of projections, we use the "match"-expanded form of the projections which has the advantage of be valid in all target languages. In particular, in OCaml extraction, this is anyway reprinted as a field. Note: we need to move the fake_match_projection function a bit earlier.
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 1, 2023
2 tasks
Problem was a standard one: the code was relying on a imperative state which is unknown when inside a functor, leading to a self-referencing extraction. Fixed in #17321. |
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 6, 2023
- The code for extracting a primitive projection was referencing the constant form of the projection. - The code for compiling the constant form of the projection was doing a call to the global table of projections which is however not fed in functors. - The declaration of constants bound to a projection had a small size and were then inlined. Instead of relying on the table of projections, we use the "match"-expanded form of the projections which has the advantage of be valid in all target languages. In particular, in OCaml extraction, this is anyway reprinted as a field. Note: we need to move the fake_match_projection function a bit earlier.
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 6, 2023
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Mar 6, 2023
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Dec 8, 2023
- The code for extracting a primitive projection was referencing the constant form of the projection. - The code for compiling the constant form of the projection was doing a call to the global table of projections which is however not fed in functors. - The declaration of constants bound to a projection had a small size and were then inlined. Instead of relying on the table of projections, we use the "match"-expanded form of the projections which has the advantage of be valid in all target languages. In particular, in OCaml extraction, this is anyway reprinted as a field. Note: we need to move the fake_match_projection function a bit earlier.
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Dec 8, 2023
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Dec 10, 2023
- The code for extracting a primitive projection was referencing the constant form of the projection. - The code for compiling the constant form of the projection was doing a call to the global table of projections which is however not fed in functors. - The declaration of constants bound to a projection had a small size and were then inlined. Instead of relying on the table of projections, we use the "match"-expanded form of the projections which has the advantage of be valid in all target languages. In particular, in OCaml extraction, this is anyway reprinted as a field. Note: we need to move the fake_match_projection function a bit earlier.
herbelin
added a commit
to herbelin/github-coq
that referenced
this issue
Dec 10, 2023
louiseddp
pushed a commit
to louiseddp/coq
that referenced
this issue
Feb 27, 2024
- The code for extracting a primitive projection was referencing the constant form of the projection. - The code for compiling the constant form of the projection was doing a call to the global table of projections which is however not fed in functors. - The declaration of constants bound to a projection had a small size and were then inlined. Instead of relying on the table of projections, we use the "match"-expanded form of the projections which has the advantage of be valid in all target languages. In particular, in OCaml extraction, this is anyway reprinted as a field. Note: we need to move the fake_match_projection function a bit earlier.
louiseddp
pushed a commit
to louiseddp/coq
that referenced
this issue
Feb 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind: bug
An error, flaw, fault or unintended behaviour.
part: extraction
The extraction mechanism.
part: primitive records
The primitive record and primitive projection mechanism.
Description of the problem
Coq Version
8.14.0
The text was updated successfully, but these errors were encountered: