Repository navigation
Conversation
- `Proof.up_to_date` hashed the builtin `id` function instead of `self.id`, so the on-disk freshness check never matched its file and proofs were always rewritten; subproof re-reads could never short-circuit either. - `APRProof.from_dict` guarded node refutations on the singular key `node_refutation` while serialization writes `node_refutations`, silently dropping refutation data on read. - `KCFGStore.read_cfg_data` unconditionally deleted `vacuous`/`stuck`, crashing on `kcfg.json` files that do not carry them (older or hand-edited records). Add regression tests covering all three. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Author
|
Tagging @tothtamas28 for review, per CONTRIBUTING.md. Local checks on this branch: |
This branch has not been deployed
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.
Three small, independent correctness bugs in the pyk persistence layer. Each has a regression test that fails on
developand passes with the fix.Fixes
Proof.up_to_datehashed the builtinid(pyk/src/pyk/proof/proof.py): the on-disk freshness check comparedself.digestagainsthash_str(id)(a constant path string) instead ofhash_str(self.id), so the check never looked at the proof's own file. Proofs were always considered out of date, and subproof re-reads could never short-circuit.pyk/src/pyk/proof/reachability.py):from_dictguarded on the singular keynode_refutation, while serialization writesnode_refutations, silently dropping refutation data on every round trip (affecting e.g. resumed proofs and refutation handling).read_cfg_datacrashed on records withoutvacuous/stuck(pyk/src/pyk/kcfg/kcfg.py): the reader unconditionallydel-ed both keys, raisingKeyErrorfor older or hand-editedkcfg.jsonfiles. The keys are now popped with defaults.Tests
test_write_proof_up_to_date(src/tests/unit/test_proof.py)test_apr_proof_from_dict_node_refutations(src/tests/unit/test_proof.py)test_read_cfg_data_missing_vacuous_stuck(src/tests/unit/test_kcfg.py)All three fail before the fix and pass after. Full
test_proof.py+test_kcfg.py: 54 passed.Test plan