File: RootReplaced.md

package info (click to toggle)
curry-tools 1.0.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,492 kB
  • ctags: 121
  • sloc: makefile: 470; sh: 421
file content (19 lines) | stat: -rw-r--r-- 468 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Root replacement analysis
-------------------------

This analysis returns for each function `f` all functions into which `f` can
be replaced at the root. For instance, if there are the definitions:

    f x = g x
    
    g x = h x
    
    h x = k x : []

    k x = x

then the root replacements of `f` are `[g,h]` and the
root replacements of `g` are `[h]`.

This analysis could be useful to detect simple loops, e.g., if
a function is in its own root replacement.