[WIP] Maintain a graph of casting rules for automatic propagation of new rules