Currently, Checker::simplifyType() is a very naive algorithm that just constructs new types each time that it is called. In an industrial setting, this can become very expensive. Therefore, we need to search for alternative algorithms that make use of the fact that the same input always gives the same output.
Solutions
Use again a union-find data structure that makes every type point to the rewritten type. Using the ordinary techniques, this can give roughly O(1).
Find a way to actually rewrite the type. This can either be done by redirecting handles from the type to the new type or by modifying the type in-memory.
This has been solved by elminating simplifyType entirely. We now use field constraints to support tuples. These constraints remove the need for a type rewriting step.
Problem
Currently,
Checker::simplifyType()
is a very naive algorithm that just constructs new types each time that it is called. In an industrial setting, this can become very expensive. Therefore, we need to search for alternative algorithms that make use of the fact that the same input always gives the same output.Solutions