[<<][rtl][>>][..]
Sat Aug 18 22:27:06 EDT 2018

Unification

I'm running into a unification problem, and it seems to be slightly
different from HM.  What I want to know is how my problem is different.

My problem:

concat:     c = a + b
other 2op:  c = a, c = b

Forget about the other cases for now.

During execution, I can go from leaves up to result nodes, but some
information travels the other way: from delay / connect nodes down to
the leaves.

Is it enough to just propagate that information in one way?  That's a
lot simpler than full unification.

Yes there are only two "entry points" where type information is
present: typed constants and register reads at the leaves, and typed
register/connect at the root.

It should be enough to split the nodes in typed and untyped, iterate
over all the roots, go down the full trees, and fill in information as
it becomes available.  Keep going until stable or done.

Descending trees might not even be necessary.  As long as there is
reduction, it's ok to continue.  If nothing changes in one pass it's
time to give up.

Is it a problem if this is quadratic?  I guess not for any pracical
problem.  So just scan all the nodes every time some new information
is available.  To optimize, use a map from nodes to nodes that depend
on it.

Actually, just a map is useful for other things, so maybe just build it?




[Reply][About]
[<<][rtl][>>][..]