File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
core/src/main/scala/stainless/termination Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,18 @@ trait MeasureInference
59
59
}
60
60
}
61
61
62
+ def mutuallyRecursiveWithoutMeasure (id : Identifier ): Option [Identifier ] = {
63
+ symbols.dependencies(id).find(id2 =>
64
+ symbols.lookupFunction(id2).exists(fd2 =>
65
+ symbols.dependencies(id2).contains(id) &&
66
+ ! fd2.measure(symbols).isEmpty
67
+ )
68
+ )
69
+ }
70
+
62
71
def needsMeasure (fd : FunDef ): Boolean = {
63
72
if (symbols.isRecursive(fd.id) && fd.measure(symbols).isEmpty) {
64
- symbols.dependencies(fd.id).find(id =>
65
- symbols.lookupFunction(id).exists(fd2 =>
66
- symbols.dependencies(fd2.id).contains(fd.id) &&
67
- ! fd2.measure(symbols).isEmpty
68
- )
69
- ) match {
73
+ mutuallyRecursiveWithoutMeasure(fd.id) match {
70
74
case None =>
71
75
true
72
76
case Some (id) =>
You can’t perform that action at this time.
0 commit comments