Skip to content

namespace limitation #4

Open
Open
@gzoumix

Description

@gzoumix

Following the UVL syntax, all features declared in a UVL file live in the same namespace, which forbid two features (declared in the same file) to have the same name. This is fine in many FMs, but is quite bothersome in the field of Fluid Dynamics, where physicists use the same name/symbol to refer to different concepts, depending on the context, leading to feature models like

features
    root
        or
            context_1
                mandatory
                    double phi
                    double gamma
            context_2
                mandatory
                    double gamma
                    double ev

In this FM, two features are named gamma, but both features can be distinguished by their path: cross tree constraints using these features can thus be elaborated, by allowing to refer to a feature using a partial path to it, e.g.,

constraints
    context_1/gamma > 0 => (context_2 /\ context_2/gamma < 0)

Extending the syntax to include this functionality is not difficult, but implementing the lookup mechanism is not entirely trivial: I implemented such a mechanism in pydop (twice)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions