|
Boost-Build : |
From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-05-14 10:47:56
Vladimir Prus <ghost_at_[hidden]> writes:
> David Abrahams wrote:
>
>> The search proceeds as follows in my proposal.
>>
>> Step 1:
>>
>> ---%.whl ; %.whl<----%_parser.cpp ; %.cpp<--%.exe
>> / --%.dlp
>> %.wd<--< /
>> \ /
>> ---%.dlp ; %.dlp<-
>>
>> We have found one way to create a .cpp from our sources...
>>
>> Step 2, we must examine the other way to create a .cpp, to decide
>> which one is better:
>>
>> ---%.dlp ; %.dlp <--- %.cpp ; %.cpp<--%.exe
>> / --%.whl
>> %.wd<--< /
>> \ /
>> ---%.whl ; %.whl<-
>>
>> The two transformation paths are equivalent according to my criterion,
>> but IIUC you're saying that they are not; the 2nd one will fail to
>> satisfy the requirements for building a .exe file.
>>
>> Your point is taken. True path equivalence requires that the products
>> of the transformation sequences are also identical. It's clear that
>> you have to defer pruning either one until you get all the way back to
>> the invoking generator.
>
> Can you clarify what's 'produces of the transformation sequences'? Do they
> include results of converting extra targets?
Yes.
> If not, then I don't understand how will you detect that there's no
> ambiguity in WD case. One generator will give you %_parser.cpp and
> another %_lexer.cpp and they are not equal.
Right.
> I have another interesting use case:
>
> wd -> whl, dlp
> whl -> sg
> dlp -> sg
> dlp -> cpp
> cpp -> o
> o -> exe
>
> Here, the dlp files can be converted into o in two ways.
Hmm? 'o' is only produced by 'cpp' and 'cpp' is only produced in one
way from 'dlp'. I don't see it.
> Will your new algorithm report ambiguity?
I guess not ;-)
>> What if you have a generator that requires exactly two .cpp files and
>> one file of some other kind?
>
> Oh... that's a very contrived case which I'm willing to declare
> unsupported. Does your algorithm does better?
I don't know if I have an algorithm yet, but yes I think my ambiguity
detector would sort this out.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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