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

Experiment the addition of sealed/unsealed attributes #19029

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

herbelin
Copy link
Member

@herbelin herbelin commented May 15, 2024

The PR experiments an implementation of the proposition made in CEP #42 of attributes sealed and unsealed that allows to indicate the opacity of a definition defined non-interactively, and that provides the current role of Qed/Defined without having to break the intuitive matching of keywords Theorem/Qed and Definition/Defined.

The main changes are:

  • the "opaque" value is now part of the Declare.Info.t while it was before passed as a standalone argument or stored in the program obligation state -> a better idea would be to have them in the CInfo.t actually, since they can be different for different components of a block of definitions
  • at Qed/Defined time, a check is done to determine if there is an attribute which takes precedence over the Qed/Defined keyword`;
  • for non-interactive declaration, either the default value associated to the kind of the declaration is used, or, in some cases, a specific opacity is decided upfront.

At the current time, there is a warning in case of a sealed/Defined or unsealed/Qed mismatch, as well as when the attribute is defined and there is mismatch Theorem/Defined or Definition/Qed. But the warning is deactivated because it is too much work to adapt the stdlib to the warning.

  • Added / updated test-suite.
  • Added changelog.
  • Added / updated documentation.

@herbelin herbelin added kind: feature New user-facing feature request or implementation. part: attributes #[attributes] modify the behaviour of vernac sentences. part: gallina The gallina commands labels May 15, 2024
@herbelin herbelin added this to the 8.20+rc1 milestone May 15, 2024
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label May 15, 2024
@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 May 16, 2024
The main changes are:
- "opaque" is now part of the Declare.Info.t;
- at Qed/Defined time, a check is done to determine if there is an
  attribute which takes precedence over the Qed/Defined keyword;
- for non-interactive declaration, either the default value associated
  to the kind of the declaration is used, or, in some cases, a
  specific opacity is decided upfront.
@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 May 17, 2024
@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 May 24, 2024
@proux01
Copy link
Contributor

proux01 commented May 31, 2024

Draft PR, removing the milestone.

@proux01 proux01 removed this from the 8.20+rc1 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New user-facing feature request or implementation. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. part: attributes #[attributes] modify the behaviour of vernac sentences. part: gallina The gallina commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants