From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-06-06 14:49:00
At 05:07 PM 5/30/2001, Vesa Karvonen wrote:
>I like the idea of expressing feature models using a language that is
>suitable for textual representation. Unfortunately I find it difficult to
>express some feature models using the grammar described on the Boost site
>What is the recommended way to represent a node with both mandatory and
>optional features? For example:
> +---* mandatory_feature_a
> +---* mandatory_feature_b
> +---o optional_feature_a
> +---o optional_feature_b
>Assuming that I understand the grammar correctly, the closest that I can
>come to is:
> ( mandatory_feature_a
> , mandatory_feature_b
> , optional_features
> [ optional_feature_a
> + optional_feature_b
>As you can see, I had to introduce a dummy "optional_features" node. The
>above two feature models are no longer technically the same.
>Have I misunderstood the grammar or is this a weakness of the grammar?
Perhaps you misunderstood the grammar. In particular, note that "element"
is allowed to be "details" which in turn may be an optional "feature-list".
The example you give should thus already be valid:
Perhaps it is confusing that the following are equivalent:
concept [ feature_a, feature_b ]
concept ( [feature_a], [feature_b] )
concept ( [feature_a, feature_b] )
concept ( [feature_a] + [feature_b] )
concept ( [feature_a + feature_b] )
The first form would be eliminated if the second line of the grammar was
feature ::= feature-name [ "(" feature-list ")" ]
But I'm not sure it really matters. In theory it would be nice if there
was a single canonical form. Any ideas?
Thanks for the interest. Feature models are really useful, and having a
language that allows them to be expressed as text still seems worthwhile to
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk