Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-06-05 11:08:13


David Abrahams wrote:
> Vladimir Prus <ghost_at_[hidden]> writes:
> >> It seems to me that your case is one which cannot be automatically
> >> solved without ambiguity.
> >
> > I realize it's not the easiest case to deal with. However, it must be
> > dealt with something.
>
> The way you deal with cases like this one is by explicitly specifying
> intermediate targets, which cuts down the search space.

The question is where/how you describe them. If the author of toolset module
can specify those target to resolve the ambiguity, that's fine. However, it's
probably not that good to specify intermediate target when declaring the main
rule.

Imagine that use case I've presented must be usable by end users. They can be
told to specify asm sources, cpp sources and ecpp sources. But they really
have no idea about all those intermediate targets, and it would be hard to
explain the need to specify things they don't know about.

> The
> complexity of the search space in your problem is quite astounding,
> and solutions are possible... but they *are* ambiguous, as shown by
> the output of my algorithm, which shows three solutions with cost 9:
>
> ===========================================================================
>===== 1.EST_EXE(7107_at_9)[OBJ* -> EST_EXE]
> 4.OBJ(2805_at_8)[CPP -> OBJ]
> 4.CPP(63_at_7)[None]
> 3.CPP(20_at_4)[None]
> 2.CPP(8_at_2)[ECPP -> CPP,CPP]
> 1.ECPP(2_at_1)[None]
>
> 1.CPP(0_at_1)[None]
>
> 1.CPP(5_at_2)[NM_ASM -> CPP,STATIC_DATA] siblings
> [1.STATIC_DATA(6_at_2)] 1.NM_ASM(1_at_1)[None]
>
> ===========================================================================
>=====
> ===========================================================================
>===== 1.EST_EXE(5940_at_9)[OBJ* -> EST_EXE]
> 4.OBJ(2592_at_8)[CPP -> OBJ]
> 4.CPP(60_at_7)[None]
> 2.CPP(14_at_4)[None]
> 1.CPP(5_at_2)[NM_ASM -> CPP,STATIC_DATA] siblings
> [1.STATIC_DATA(6_at_2)] 1.NM_ASM(1_at_1)[None]
>
> 1.CPP(0_at_1)[None]
>
> 2.CPP(8_at_2)[ECPP -> CPP,CPP]
> 1.ECPP(2_at_1)[None]
>
> ===========================================================================

Hmm... I've afraid it's a problem with your algorithm. Both variants, if I
understand correctly, at some stage produce 4 cpp targets. 1 of them comes
directicly from sources. 1 of them is created from NM_ASM. 2 of them are
created from ECPP. I don't see any ambiguity, so far.

Can you draw dependency graphs that would be created in both of the cases, and
who why they are different?

> [ snip third alternative ]

Seems like the third alternative is the same as two above.

- 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