With
set_option showInferredTerminationBy true
this prints a message like
Inferred termination argument:
termination_by
ackermann n m => (sizeOf n, sizeOf m)
it tries hard to use names that
* match the names that the user used, if present
* have no daggers (so that it can be copied)
* do not shadow each other
* do not shadow anything from the environment (just to be nice)
it does so by appending sufficient `'` to the name.
Some of the emitted `sizeOf` calls are unnecessary, but they are needed
sometimes with dependent parameters. A follow-up PR will not emit them
for non-dependent arguments, so that in most cases the output is pretty.
Somewhen down the road we also want a code action, maybe triggered by
`termination_by?`. This should come after #2921, as that simplifies that
feature (no need to merge termination arguments from different cliques
for example.)
50 lines
1.4 KiB
Text
50 lines
1.4 KiB
Text
Inferred termination argument:
|
|
termination_by
|
|
ackermann n m => (sizeOf n, sizeOf m)
|
|
Inferred termination argument:
|
|
termination_by
|
|
ackermann2 n m => (sizeOf m, sizeOf n)
|
|
Inferred termination argument:
|
|
termination_by
|
|
ackermannList n m => (sizeOf n, sizeOf m)
|
|
Inferred termination argument:
|
|
termination_by
|
|
foo2 x1 x2 => (sizeOf x2, sizeOf x1)
|
|
Inferred termination argument:
|
|
termination_by
|
|
even x1 => sizeOf x1
|
|
odd x1 => sizeOf x1
|
|
Inferred termination argument:
|
|
termination_by
|
|
evenWithFixed x1 => sizeOf x1
|
|
oddWithFixed x1 => sizeOf x1
|
|
Inferred termination argument:
|
|
termination_by
|
|
ping.pong x1 => (sizeOf x1, 0)
|
|
ping n => (sizeOf n, 1)
|
|
Inferred termination argument:
|
|
termination_by
|
|
hasForbiddenArg n _h m => (sizeOf m, sizeOf n)
|
|
Inferred termination argument:
|
|
termination_by
|
|
blowup x1 x2 x3 x4 x5 x6 x7 x8 =>
|
|
(sizeOf x8, sizeOf x7, sizeOf x6, sizeOf x5, sizeOf x4, sizeOf x3, sizeOf x2, sizeOf x1)
|
|
Inferred termination argument:
|
|
termination_by
|
|
dependent x1 x2 => (sizeOf x1, sizeOf x2)
|
|
Inferred termination argument:
|
|
termination_by
|
|
eval a => (sizeOf a, 1)
|
|
eval_add a => (sizeOf a, 0)
|
|
Inferred termination argument:
|
|
termination_by
|
|
shadow1 x2 x2' => sizeOf x2'
|
|
Inferred termination argument:
|
|
termination_by
|
|
shadow2 some_n' x2 => sizeOf x2
|
|
Inferred termination argument:
|
|
termination_by
|
|
shadow3 sizeOf' x2 => sizeOf x2
|
|
Inferred termination argument:
|
|
termination_by
|
|
qualifiedSizeOf m x2 => SizeOf.sizeOf x2
|