Complexity reduction when choosing the best inference leaf to be solved
B. Blaser
bsrbnd at gmail.com
Fri Oct 13 11:50:14 UTC 2017
Hi,
On 13 October 2017 at 11:08, Maurizio Cimadamore
<maurizio.cimadamore at oracle.com> wrote:
>
> But I think there's only _one_ minimal answer. So, the way I see the javac
> implementation, is that the BestLeafSolver is a big workaround to the fact
> that we need to be able to solve a 'subset' of the inference graph. But this
> can be achieved in many different ways - and the approach implemented right
> now (which predates the spec text) is probably more general than it needs
> to.
>
> I think a very simple BestLeafSolver would simply 'skip' all the inference
> graph nodes which cannot influence any of the nodes containing at least one
> variable in the target set, and will keep going until all variables in such
> set are solved. I don' think such an algorithm would require any tracking of
> cost, paths and such.
I think you're right, I wasn't sure enough to drastically simplify the
best leaf solver this way.
We only need to pick the trees related to the variables that need to
be solved (pt (3) I suggested) and solve them leaf after leaf... the
order in which leaves are solved being irrelevant.
What do you think?
Bernard
> Maurizio
>
>
>
> Cheers
> Maurizio
More information about the compiler-dev
mailing list