leon
leon copied to clipboard
Improving the code for declaring ADTs.
The code in the file ADTManager is somewhat hard to follow with too many nested recursion. It has also been a source of other bugs. In principle, we can separate the algorithm into 3 parts: (a) constructing a dependency graph between ADTs, (b) computing SCC DAG, and (c) traversing them in the bottom up order and declaring the ADTs.