summaryrefslogtreecommitdiff
path: root/src/util.mli
diff options
context:
space:
mode:
authorThomas Bauereiss2018-01-17 14:46:46 +0000
committerThomas Bauereiss2018-01-17 16:18:05 +0000
commit01a7c0eb317610acee9a79b24a5fa36ee78b6e07 (patch)
tree38f7e05531411639f5350f1ad8c482303f6264fb /src/util.mli
parent659151f8c5000885764a7a4153affe84a450ab1d (diff)
Rewrite topological sorting
Use Tarjan's algorithm for finding strongly connected components (and finding a topological sorting of components at the same time), in order to properly take into account mutually recursive functions. The sorting is stable, i.e., definitions are only moved when necessary. Exceptions to this are statements that do not have any dependencies: default bitvector order declarations, operator fixity declarations, and top-level comments. These are moved to the beginning (like with the previous sorting implementation). Any dependency cycles that are found are additionally printed to the console in dot-format, for easy visualisation with graphviz.
Diffstat (limited to 'src/util.mli')
0 files changed, 0 insertions, 0 deletions