Skip to content

Commit 4c44997

Browse files
committed
more reasonable path_length for MergedEdge
1 parent 9f54013 commit 4c44997

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
@@ -542,7 +542,7 @@ def path_length(_path: Iterable[KCFG.Successor]) -> int:
542542
elif type(_path[0]) is KCFG.Edge:
543543
return _path[0].depth + KCFG.path_length(_path[1:])
544544
elif type(_path[0]) is KCFG.MergedEdge:
545-
return sum(edge.depth for edge in _path[0].edges) + KCFG.path_length(_path[1:]) # todo: check this
545+
return min(edge.depth for edge in _path[0].edges) + KCFG.path_length(_path[1:]) # todo: check this
546546
raise ValueError(f'Cannot handle Successor type: {type(_path[0])}')
547547

548548
def extend(

0 commit comments

Comments
 (0)