Skip to content

Commit ce19feb

Browse files
committed
TODO: investigate termination
1 parent 0a51414 commit ce19feb

File tree

1 file changed

+22
-37
lines changed

1 file changed

+22
-37
lines changed

tests/analysis_tests/tests-reanalyze/termination/expected/termination.txt

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,16 @@
7070
Termination Analysis for butSecondArgumentIsAlwaysEvaluated
7171

7272
Function Table
73-
1 parseExpression: [_ || _]; [+Parser.next; parseExpression; parseExpression; _ || _]
74-
2 parseList<f>: parseList$loop<f:f>
75-
3 parseList$loop<f>: [_ || f; parseList$loop<f:f>; _]
76-
4 parseListExpression: _
77-
5 parseListExpression2: parseExpression; parseList<f:parseExpression>
78-
6 parseListInt: _
79-
7 parseListIntTailRecursive: parseListIntTailRecursive$loop
80-
8 parseListIntTailRecursive$loop: [_ || parseListIntTailRecursive$loop]
81-
9 parseListListInt: parseList<f:parseListInt>
73+
1 parseExpression: [_ || _]; [+Parser.next; parseExpression; parseExpression; _ || parseInt]
74+
2 parseInt: [_ || _]; +Parser.next; _
75+
3 parseList<f>: parseList$loop<f:f>
76+
4 parseList$loop<f>: [_ || f; parseList$loop<f:f>; _]
77+
5 parseListExpression: _
78+
6 parseListExpression2: parseExpression; parseList<f:parseExpression>
79+
7 parseListInt: parseList<f:parseInt>
80+
8 parseListIntTailRecursive: parseListIntTailRecursive$loop
81+
9 parseListIntTailRecursive$loop: [_ || parseInt; parseListIntTailRecursive$loop]
82+
10 parseListListInt: parseList<f:parseListInt>
8283

8384
Termination Analysis for parseListInt
8485

@@ -111,10 +112,13 @@
111112

112113
Function Table
113114
1 alwaysReturnNone: [+Parser.next; alwaysReturnNone || None]
114-
2 parseIntOWrapper: _
115-
3 parseListIntO: _
116-
4 testAlwaysReturnNone: alwaysReturnNone
117-
5 thisMakesNoProgress: None; [_ || +Parser.next; Some]
115+
2 parseIntO: [+Parser.next; Some || None]
116+
3 parseIntOWrapper: parseIntO
117+
4 parseListIntO: parseListO<f:parseIntO>
118+
5 parseListO<f>: parseListO$loop<f:f>
119+
6 parseListO$loop<f>: [+Parser.next; _ || switch f {some: parseListO$loop<f:f>, none: _}]
120+
7 testAlwaysReturnNone: alwaysReturnNone
121+
8 thisMakesNoProgress: None; [_ || +Parser.next; Some]
118122

119123
Termination Analysis for parseListIntO
120124

@@ -149,10 +153,10 @@
149153
Termination Analysis Stats
150154
Files:1
151155
Recursive Blocks:21
152-
Functions:45
153-
Infinite Loops:12
154-
Hygiene Errors:3
155-
Cache Hits:4/21
156+
Functions:49
157+
Infinite Loops:10
158+
Hygiene Errors:2
159+
Cache Hits:7/30
156160

157161

158162
Error Termination
@@ -207,10 +211,6 @@
207211
TestCyberTruck.res:217:32-73
208212
Call must have named argument f
209213

210-
Error Hygiene
211-
TestCyberTruck.res:198:29-53
212-
Named argument f must be passed a recursive function
213-
214214
Error Termination
215215
TestCyberTruck.res:180:15-21
216216
Possible infinite loop when calling parseList$loop<f:f> which is parseList$loop<f:parseListInt>
@@ -219,21 +219,6 @@
219219
2 parseList<f:parseListInt> (TestCyberTruck.res 201)
220220
1 parseListListInt (TestCyberTruck.res 201)
221221

222-
Error Termination
223-
TestCyberTruck.res:180:15-21
224-
Possible infinite loop when calling parseList$loop<f:f> which is parseList$loop<f:parseExpression>
225-
CallStack:
226-
3 parseList$loop<f:parseExpression> (TestCyberTruck.res 183)
227-
2 parseList<f:parseExpression> (TestCyberTruck.res 220)
228-
1 parseListExpression2 (TestCyberTruck.res 220)
229-
230-
Error Termination
231-
TestCyberTruck.res:228:7-38
232-
Possible infinite loop when calling parseListIntTailRecursive$loop
233-
CallStack:
234-
2 parseListIntTailRecursive$loop (TestCyberTruck.res 230)
235-
1 parseListIntTailRecursive (TestCyberTruck.res 223)
236-
237222
Error Termination
238223
TestCyberTruck.res:238:31-49
239224
Possible infinite loop when calling loopAfterProgress
@@ -246,4 +231,4 @@
246231
CallStack:
247232
1 countRendersCompiled (TestCyberTruck.res 283)
248233

249-
Analysis reported 15 issues (Error Hygiene:3, Error Termination:12)
234+
Analysis reported 12 issues (Error Hygiene:2, Error Termination:10)

0 commit comments

Comments
 (0)