forked from leanprover/lean4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: resolve generalized field notation using all parents (leanprove…
…r#5770) * Now `getPathToBaseStructure?` can navigate to all parent structures, not just through subobjects. * Adds a "resolution order" for methods. This is the order that generalized field notation visits parent structures when trying to resolve names. The algorithm to compute a resolution order is the commonly used C3 (used for instance by Python). By default we use a relaxed version of the algorithm that tolerates inconsistencies. Using `set_option structure.strictResolutionOrder true` makes inconsistent parent orderings into warnings. * This makes generalized field notation be able to resolve names for all parent structures, not just those that are embedded as subobjects. Closes leanprover#3467. (And addresses side note in leanprover#1881.) * Modifies `getAllParentStructures` to return *all* parents. This improves dot completion in the editor.
- Loading branch information
Showing
6 changed files
with
347 additions
and
59 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.