Add DependGraph TypeOnly flag for type-only dependency collection #176
Draft
JasonGross wants to merge 4 commits into
Draft
Add DependGraph TypeOnly flag for type-only dependency collection #176JasonGross wants to merge 4 commits into
DependGraph TypeOnly flag for type-only dependency collection #176JasonGross wants to merge 4 commits into
Conversation
When a module is constrained by a module type using `:`, the constant bodies appear as Undef in the global environment but still exist in the module structure. This caused dpdgraph to incorrectly report body=no for such constants. Following the approach used by Print Assumptions in vernac/assumptions.ml, implement a ModLookup module that traverses the module structure to find the actual constant body when the environment lookup returns Undef. This ensures that module-type-locked constants like: Module Foo : FooT. Definition T := O. End Foo. correctly report body=yes instead of body=no. We need to add fallback behaviors for doing anything with names that might not be in the nametab. Add test cases to verify the behavior.
172a1f5 to
75a558c
Compare
When set, only the type of constants (never the body, even for transparent definitions) and only the arity of inductives (not constructor types) are used for dependency collection. This enables a three-way split: proofs.dpd (full), statements_body.dpd (no opaque bodies), and statements_type.dpd (types/arities only).
75a558c to
328f7d7
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When set, only the type of constants (never the body, even for transparent definitions) and only the arity of inductives (not
constructor types) are used for dependency collection.
On top of #173 to avoid merge conflicts