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