@@ -375,7 +375,7 @@ def prove_it(id_and_cfg: Tuple[str, Tuple[KCFG, Path]]) -> bool:
375
375
iterations += 1
376
376
curr_node = cfg .frontier [0 ]
377
377
cfg .add_expanded (curr_node .id )
378
- _LOGGER .info (f'Advancing proof from node: { shorten_hashes (curr_node .id )} ' )
378
+ _LOGGER .info (f'Advancing proof from node { cfgid } : { shorten_hashes (curr_node .id )} ' )
379
379
edge = KCFG .Edge (curr_node , target_node , mlTop (), - 1 )
380
380
claim = edge .to_claim ()
381
381
claim_id = f'gen-{ curr_node .id } -to-{ target_node .id } '
@@ -386,35 +386,35 @@ def prove_it(id_and_cfg: Tuple[str, Tuple[KCFG, Path]]) -> bool:
386
386
if result == mlTop ():
387
387
cfg .create_edge (curr_node .id , target_node .id , mlTop (), depth )
388
388
_LOGGER .info (
389
- f'Target state reached at depth { depth } , inserted edge from { shorten_hashes ((curr_node .id )) } to { shorten_hashes (( target_node .id ))} .'
389
+ f'Target state reached at depth { depth } for { cfgid } : { shorten_hashes ((curr_node .id , target_node .id ))} .'
390
390
)
391
391
392
392
else :
393
393
next_state = CTerm (sanitize_config (foundry .definition , result ))
394
394
next_node = cfg .get_or_create_node (next_state )
395
395
if next_node != curr_node :
396
- _LOGGER .info (f'Found basic block at depth { depth } : { shorten_hashes ((curr_node .id , next_node .id ))} .' )
396
+ _LOGGER .info (f'Found basic block at depth { depth } for { cfgid } : { shorten_hashes ((curr_node .id , next_node .id ))} .' )
397
397
cfg .create_edge (curr_node .id , next_node .id , mlTop (), depth )
398
398
399
399
if KEVM .is_terminal (next_node .cterm ):
400
400
cfg .add_expanded (next_node .id )
401
- _LOGGER .info (f'Terminal node: { shorten_hashes ((curr_node .id ))} .' )
401
+ _LOGGER .info (f'Terminal node { cfgid } : { shorten_hashes ((curr_node .id ))} .' )
402
402
403
403
elif branching :
404
404
branches = KEVM .extract_branches (next_state )
405
405
if not branches :
406
406
raise ValueError (
407
- f'Could not extract branch condition:\n { foundry .pretty_print (minimize_term (result ))} '
407
+ f'Could not extract branch condition { cfgid } :\n { foundry .pretty_print (minimize_term (result ))} '
408
408
)
409
409
cfg .add_expanded (next_node .id )
410
410
_LOGGER .info (
411
- f'Found { len (list (branches ))} branches at depth { depth } : { [foundry .pretty_print (b ) for b in branches ]} '
411
+ f'Found { len (list (branches ))} branches at depth { depth } for { cfgid } : { [foundry .pretty_print (b ) for b in branches ]} '
412
412
)
413
413
for branch in branches :
414
414
branch_cterm = next_state .add_constraint (branch )
415
415
branch_node = cfg .get_or_create_node (branch_cterm )
416
416
cfg .create_edge (next_node .id , branch_node .id , branch , 0 )
417
- _LOGGER .info (f'Made split: { shorten_hashes ((next_node .id , branch_node .id ))} ' )
417
+ _LOGGER .info (f'Made split for { cfgid } : { shorten_hashes ((next_node .id , branch_node .id ))} ' )
418
418
# TODO: have to store case splits as rewrites because of how frontier is handled for covers
419
419
# cfg.create_cover(branch_node.id, next_node.id)
420
420
# _LOGGER.info(f'Made cover: {shorten_hashes((branch_node.id, next_node.id))}')
0 commit comments