Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-14 09:11:32


I was thinking about reply to last Dave's email about generators. I'm still
going to write it, but in essense in will says that I don't understand
something, has some possible example where Dave's suggestion fail and that
I'm not sure his proposal will be really simpler/better.

But then I stopped to think if there could be any suggestion about generators
that I can like. The answer is that it's possible. But the current scheme is
the result of much experimentation and represent, IMO, an optimum over some
not-so-narrow search space, and one a big change can bring us to another
optimum.

The idea for a change is simple. We're actively discussing algorithms, arguing
if they can find 'optimal' tranformation in some contrived cases. Do we need
to? Consider the WD example. We're trying to detect that there's no real
ambiguity. But the person who implements support for this tool
knows that there's no real ambiguity. Probably, it's better to drop all the
disambiguation logic and allow users to decide?

Now, the choice between greedily consuming extra targets and passing them up
is determined by disambiguation. The greedy consumption immediately leads to
'multiple'. If we switch to passing-up extra targets, 'multiple' will be
unneded.

Of course, this is just an idea... I'm not sure if all the transformation
sequences tested now will work and for exact semantic of explicit
disambiguation. But probably worth exploring.

To make idea more concrete, the WD example can look

{declare all generators}
generators.equvivalent CPP : WD : whale.whale whale.dolphin ;

This would say that when we're making CPP target from WD source, we can choose
either whale.whale or whale.dolphin generators, and there's no difference
between them.

Thoughts?

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk