-
Notifications
You must be signed in to change notification settings - Fork 388
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
feat: shorten auto-generated instance names #3089
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
label
Dec 18, 2023
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 18, 2023
leanprover-community-mathlib4-bot
added
the
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
label
Dec 18, 2023
|
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 18, 2023
kmill
force-pushed
the
anon-inst-name
branch
from
December 18, 2023 16:02
81dc5db
to
e8d2d8d
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Dec 20, 2023
1 task
semorrison
force-pushed
the
anon-inst-name
branch
from
January 31, 2024 23:54
4948bef
to
627b0d5
Compare
I've rebased this onto |
kmill
force-pushed
the
anon-inst-name
branch
2 times, most recently
from
March 30, 2024 23:55
9753d39
to
8db32f0
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Mar 31, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Mar 31, 2024
leanprover-community-mathlib4-bot
added
builds-mathlib
CI has verified that Mathlib builds against this PR
and removed
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
labels
Mar 31, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Mar 31, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Mar 31, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Mar 31, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Mar 31, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Apr 2, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 2, 2024
leanprover-community-mathlib4-bot
added
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
and removed
builds-mathlib
CI has verified that Mathlib builds against this PR
labels
Apr 2, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Apr 2, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 2, 2024
leanprover-community-mathlib4-bot
added
builds-mathlib
CI has verified that Mathlib builds against this PR
and removed
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
labels
Apr 2, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Apr 2, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 2, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Apr 3, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Apr 3, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Apr 12, 2024
Master seems to be broken, I think due to test changes from this PR |
Fascinating, it was triggered by the stage0 update. Fixing the tests... |
Kha
pushed a commit
that referenced
this pull request
Apr 17, 2024
#3089 caused the stage0 update to cause a number of tests to start failing because they were using the old instance names.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
builds-mathlib
CI has verified that Mathlib builds against this PR
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements a new method to generate instance names for anonymous instances that uses a heuristic that tends to produce shorter names. A design goal is to make them relatively unique within projects and definitely unique across projects, while also using accessible names so that they can be referred to as needed, both in Lean code and in discussions.
The new method also takes into account binders provided to the instance, and it adds project-based suffixes. Despite this, a median new name is 73% its original auto-generated length. (Compare: old generated names and new generated names.)
Some notes:
variable
. It does not make use ofvariable
s since, when names are generated, it is not yet known which variables are used in the body of the instance.set_option trace.Elab.instance.mkInstanceName true
can be used to see what name the auto-generator would give, even if the instance already has an explicit name.There were a number of instances that were referred to explicitly in meta code, and these have been given explicit names.
Removes the unused
Lean.Elab.mkFreshInstanceName
along with the Command state'snextInstIdx
.Fixes #2343