-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preparatory refactoring for: * #4406 Extracts a class `ClaimIndex` that enables decoupling the two main steps of `KProve.get_claims`: - `KProve.get_claim_index`: create a data structure from a K spec file, expensive. We eventually want to save this part by caching the data structure. - `ClaimIndex.labels`: filter the data structure, cheap. `ClaimIndex` itself is a mapping from labels to `KClaim`-s. The invariant it enforces (`ClaimIndex._validate`): - For each item `(label, claim)` in the mapping, `claim.label == label`. - For each claim, its `depend` attribute values are in the mapping. In addition, when attribute `main_module_name` is set, it allows looking up claims from the main module without qualifying the label (i.e. to look up `MAIN_MODULE.foo` with key `foo`). As a next step, `APRProof.from_spec_modules` can be simplified.
- Loading branch information
1 parent
2af5d76
commit ec63f14
Showing
2 changed files
with
176 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