@@ -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 :
0 commit comments