Replies: 2 comments 3 replies
-
That's a really tricky one, since |
Beta Was this translation helpful? Give feedback.
-
What I have done myself to support types is to embed them into e-classes, types are encoded in the e-graph and I consider that I would be delighted if there were other alternatives. I also have issues with bottom-up information, not just top-down information (actually type information may flow in both ways). For example, sometimes approximating the set of free variables with a union-based e-class analysis prevents valuable rewrites from being found. I wonder if there could be hybrid approaches here to allow reasoning at different information levels, for example:
Although I have no idea on how to make this work reasonably efficiently in practice. |
Beta Was this translation helpful? Give feedback.
-
How would I go about propagating data "down" through the egraph, giving data from parents to their children?
As an example, I know the types of function parameters, but I need to get the type of each reference to the parameter, e.g.
I know that the function has the parameter
x
which is anInt
, but I need to propagate the variables in scope and their associated types downwards to the function body so that when looking at thex
in the function body I know its correct typeBeta Was this translation helpful? Give feedback.
All reactions