Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 10359d6

Browse files
committed
Merge master into branch
2 parents c70e967 + d7b42ff commit 10359d6

6 files changed

Lines changed: 17 additions & 7 deletions

File tree

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
project = 'pyk'
1010
author = 'Runtime Verification, Inc'
1111
copyright = '2024, Runtime Verification, Inc'
12-
version = '0.1.621'
13-
release = '0.1.621'
12+
version = '0.1.623'
13+
release = '0.1.623'
1414

1515
# -- General configuration ---------------------------------------------------
1616
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.621
1+
0.1.623

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pyk"
7-
version = "0.1.621"
7+
version = "0.1.623"
88
description = ""
99
authors = [
1010
"Runtime Verification, Inc. <contact@runtimeverification.com>",

src/pyk/kast/outer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def sentence_by_unique_id(self) -> dict[str, KSentence]:
10881088
for module in self.all_modules:
10891089
for unique_id, sent in module.sentence_by_unique_id.items():
10901090
if unique_id in unique_id_map and sent != unique_id_map[unique_id]:
1091-
_LOGGER.warning(
1091+
_LOGGER.debug(
10921092
f'Same UNIQUE_ID found for two different sentences: {(sent, unique_id_map[unique_id])}'
10931093
)
10941094
else:

src/pyk/proof/reachability.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ def from_dict(cls: type[APRProof], dct: Mapping[str, Any], proof_dir: Path | Non
210210
node_refutations: dict[int, str] = {}
211211
checked_for_subsumption = set(dct['checked_for_subsumption'])
212212
if 'node_refutation' in dct:
213-
node_refutations = {kcfg._resolve(node_id): proof_id for (node_id, proof_id) in dct['node_refutations']}
213+
node_refutations = {
214+
kcfg._resolve(int(node_id)): proof_id for node_id, proof_id in dct['node_refutations'].items()
215+
}
214216
if 'logs' in dct:
215217
logs = {int(k): tuple(LogEntry.from_dict(l) for l in ls) for k, ls in dct['logs'].items()}
216218
else:
@@ -419,7 +421,9 @@ def read_proof_data(proof_dir: Path, id: str) -> APRProof:
419421
logs = {int(k): tuple(LogEntry.from_dict(l) for l in ls) for k, ls in proof_dict['logs'].items()}
420422
subproof_ids = proof_dict['subproof_ids']
421423
checked_for_subsumption = proof_dict['checked_for_subsumption']
422-
node_refutations = {kcfg._resolve(node_id): proof_id for (node_id, proof_id) in proof_dict['node_refutations']}
424+
node_refutations = {
425+
kcfg._resolve(int(node_id)): proof_id for node_id, proof_id in proof_dict['node_refutations'].items()
426+
}
423427

424428
return APRProof(
425429
id=id,
@@ -491,6 +495,10 @@ def unrefute_node(self, node: KCFG.Node) -> None:
491495
_LOGGER.info(f'Disabled refutation of node {node.id}.')
492496

493497
def construct_node_refutation(self, node: KCFG.Node) -> RefutationProof | None: # TODO put into prover class
498+
if len(self.kcfg.successors(node.id)) > 0:
499+
_LOGGER.error(f'Cannot refute node {node.id} that already has successors')
500+
return None
501+
494502
path = single(self.kcfg.paths_between(source_id=self.init, target_id=node.id))
495503
branches_on_path = list(filter(lambda x: type(x) is KCFG.Split or type(x) is KCFG.NDBranch, reversed(path)))
496504
if len(branches_on_path) == 0:

src/pyk/proof/show.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def node_attrs(self, kcfg: KCFG, node: KCFG.Node) -> list[str]:
3636
attrs.append('target')
3737
if self.proof.is_pending(node.id):
3838
attrs.append('pending')
39+
if self.proof.is_refuted(node.id):
40+
attrs.append('refuted')
3941
if self.proof.is_terminal(node.id):
4042
attrs.append('terminal')
4143
if 'stuck' in attrs:

0 commit comments

Comments
 (0)