Skip to content

Commit 63ff927

Browse files
committed
more reasonable path_length for MergedEdge
1 parent fa847df commit 63ff927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyk/src/pyk/kcfg/kcfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def path_length(_path: Iterable[KCFG.Successor]) -> int:
541541
elif type(_path[0]) is KCFG.Edge:
542542
return _path[0].depth + KCFG.path_length(_path[1:])
543543
elif type(_path[0]) is KCFG.MergedEdge:
544-
return sum(edge.depth for edge in _path[0].edges) + KCFG.path_length(_path[1:]) # todo: check this
544+
return min(edge.depth for edge in _path[0].edges) + KCFG.path_length(_path[1:]) # todo: check this
545545
raise ValueError(f'Cannot handle Successor type: {type(_path[0])}')
546546

547547
def extend(

0 commit comments

Comments
 (0)