forked from leanprover/LNSym
-
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: efficient axiomatization of effects (leanprover#129)
### Description: We've built a new datastructure `AxEffects`, which stores a map from `StateField` to two `Expr`s: the current value of that field, and a proof that `r <field> <currentState> = <value>`, together with other assorted proofs related to axiomatic effects. We then incorporate this `AxEffects` into `sym_n`, replacing and superseding `intro_fetch_decode`. This has two benefits: `AxEffects` is more complete, and it is *much* faster. Fully simulating `gcm_gmult_v8_program` (assuming step theorems have been pre-generated) used to take around 3.5 seconds, with this PR it takes only 0.5 seconds: a 7x speedup! - In the process, we've proven that `Abs` correctly implements its spec - No longer is a `CheckSPAlignment` goal added by default. Instead, we only add `CheckSPAlignment` goals if the initial state was known to be aligned, and there is some write to the SP of which alignment could not be automatically proven. For now, this goal is added eagerly, without trying to determine if this fact is actually needed for further simulation. Trying to be smarter about this is left for future PRs. ### Testing: `make all` works locally ### License: By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Siddharth <siddu.druid@gmail.com> Co-authored-by: Shilpi Goel <shigoel@gmail.com>
- Loading branch information
1 parent
b0a10ee
commit a52baba
Showing
11 changed files
with
985 additions
and
37 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
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.