Boost logo

Boost-Build :

Subject: Re: [Boost-build] feature, properties, variants, and all the rest
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2017-07-28 17:25:40


Hi Steven,

I'm coming back to a discussion from a long time ago...

On 23.12.2016 16:39, Steven Watanabe wrote:
> Conditional properties are evaluated when
> processing target requirements. The actual
> algorithm evaluates all conditionals repeatedly,
> until it reaches a fixed point.
>
> Ex:
>
> rule c ( properties * )
> {
> if <variant>debug in $(properties)
> { return <define>DEBUG }
> }
>
> Requirements:
> <toolset>msvc:<link>shared <link>shared:<variant>debug <conditional>@c
>
> Initial properties:
> - <toolset>msvc
> Round 1:
> - <toolset>msvc <link>shared (Other conditionals are not satisfied)
> Round 2:
> - <toolset>msvc <link>shared <variant>debug
> Round 3:
> - <toolset>msvc <link>shared <variant>debug <define>DEBUG
> Round 4:
> - <toolset>msvc <link>shared <variant>debug <define>DEBUG
> (Identical to round 3, terminating the algorithm)

This describes a (domain-specific) constraint solver. Are there any
chances this could lead to undefined behaviour (for example if the order
in which the conditionals are evaluated influences the outcome) ? What
are the odds that it will result in an infinite loop ? Or does the
design necessarily lead to a stationary state ? What about invalid
(conflicting) constraints ?

Thanks,
        Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

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