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

Commit 06219b2

Browse files
committed
support vacuous in ARPBMCProof and update Proof summaries
1 parent 4d51252 commit 06219b2

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/pyk/proof/reachability.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ def summary(self) -> CompositeSummary:
273273
len(self.kcfg.nodes),
274274
len(self.pending),
275275
len(self.failing),
276+
len(self.kcfg.vacuous),
276277
len(self.kcfg.stuck),
277278
len(self.terminal),
278279
len(self.node_refutations),
@@ -448,12 +449,17 @@ def is_bounded(self, node_id: NodeIdLike) -> bool:
448449

449450
def is_failing(self, node_id: NodeIdLike) -> bool:
450451
return self.kcfg.is_leaf(node_id) and not (
451-
self.is_pending(node_id) or self.is_target(node_id) or self.is_refuted(node_id) or self.is_bounded(node_id)
452+
self.is_pending(node_id)
453+
or self.is_target(node_id)
454+
or self.is_refuted(node_id)
455+
or self.is_bounded(node_id)
456+
or self.kcfg.is_vacuous(node_id)
452457
)
453458

454459
def is_pending(self, node_id: NodeIdLike) -> bool:
455460
return self.kcfg.is_leaf(node_id) and not (
456461
self.is_terminal(node_id)
462+
or self.kcfg.is_vacuous(node_id)
457463
or self.kcfg.is_stuck(node_id)
458464
or self.is_bounded(node_id)
459465
or self.is_target(node_id)
@@ -543,6 +549,7 @@ def summary(self) -> CompositeSummary:
543549
len(self.kcfg.nodes),
544550
len(self.pending),
545551
len(self.failing),
552+
len(self.kcfg.vacuous),
546553
len(self.kcfg.stuck),
547554
len(self.terminal),
548555
len(self.node_refutations),
@@ -759,6 +766,7 @@ class APRSummary(ProofSummary):
759766
nodes: int
760767
pending: int
761768
failing: int
769+
vacuous: int
762770
stuck: int
763771
terminal: int
764772
refuted: int
@@ -773,6 +781,7 @@ def lines(self) -> list[str]:
773781
f' nodes: {self.nodes}',
774782
f' pending: {self.pending}',
775783
f' failing: {self.failing}',
784+
f' vacuous: {self.vacuous}',
776785
f' stuck: {self.stuck}',
777786
f' terminal: {self.terminal}',
778787
f' refuted: {self.refuted}',
@@ -897,6 +906,7 @@ class APRBMCSummary(ProofSummary):
897906
nodes: int
898907
pending: int
899908
failing: int
909+
vacuous: int
900910
stuck: int
901911
terminal: int
902912
refuted: int
@@ -911,6 +921,7 @@ def lines(self) -> list[str]:
911921
f' nodes: {self.nodes}',
912922
f' pending: {self.pending}',
913923
f' failing: {self.failing}',
924+
f' vacuous: {self.vacuous}',
914925
f' stuck: {self.stuck}',
915926
f' terminal: {self.terminal}',
916927
f' refuted: {self.refuted}',

src/tests/unit/test_proof.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ def test_apr_proof_summary(proof_dir: Path) -> None:
321321
nodes=1,
322322
pending=0,
323323
failing=0,
324+
vacuous=0,
324325
stuck=0,
325326
terminal=0,
326327
refuted=0,
@@ -343,6 +344,7 @@ def test_aprbmc_proof_summary(proof_dir: Path) -> None:
343344
nodes=1,
344345
pending=0,
345346
failing=0,
347+
vacuous=0,
346348
stuck=0,
347349
terminal=0,
348350
refuted=0,
@@ -379,6 +381,7 @@ def test_apr_proof_summary_subproofs(proof_dir: Path) -> None:
379381
nodes=1,
380382
pending=0,
381383
failing=0,
384+
vacuous=0,
382385
stuck=0,
383386
terminal=0,
384387
refuted=0,
@@ -394,6 +397,7 @@ def test_apr_proof_summary_subproofs(proof_dir: Path) -> None:
394397
nodes=2,
395398
pending=1,
396399
failing=0,
400+
vacuous=0,
397401
stuck=0,
398402
terminal=0,
399403
refuted=0,

0 commit comments

Comments
 (0)