Skip to content

Commit

Permalink
moving type conversion to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
PetarMax committed Oct 3, 2024
1 parent 08a32de commit 29c3afa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pyk/src/pyk/proof/reachability.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(
admitted: bool = False,
_exec_time: float = 0,
error_info: Exception | None = None,
prior_loops_cache: dict[int, tuple[int, ...]] | None = None,
prior_loops_cache: dict[int, Iterable[int]] | None = None,
):
Proof.__init__(self, id, proof_dir=proof_dir, subproof_ids=subproof_ids, admitted=admitted)
KCFGExploration.__init__(self, kcfg, terminal)
Expand All @@ -148,7 +148,9 @@ def __init__(
self.logs = logs
self.circularity = circularity
self.node_refutations = {}
self.prior_loops_cache = prior_loops_cache if prior_loops_cache is not None else {}
self.prior_loops_cache = (
{int(k): tuple(v) for k, v in prior_loops_cache.items()} if prior_loops_cache is not None else {}
)
self.kcfg._kcfg_store = KCFGStore(self.proof_subdir / 'kcfg') if self.proof_subdir else None
self._exec_time = _exec_time
self.error_info = error_info
Expand Down Expand Up @@ -584,9 +586,7 @@ def read_proof_data(proof_dir: Path, id: str) -> APRProof:
kcfg._resolve(int(node_id)): proof_id for node_id, proof_id in proof_dict['node_refutations'].items()
}

prior_loops_cache: dict[int, tuple[int, ...]] = {
int(k): tuple(v) for k, v in proof_dict.get('loops_cache', {}).items()
}
prior_loops_cache = {int(k): v for k, v in proof_dict.get('loops_cache', {}).items()}

return APRProof(
id=id,
Expand Down

0 comments on commit 29c3afa

Please sign in to comment.