SSEHUB / EASyProducer

EASy-Producer - A Product Line Engineering Toolset
Apache License 2.0
10 stars 2 forks source link

IVML Spec (Enhancement): isSubSet / constains( :Collection) #71

Closed Elscha closed 6 years ago

Elscha commented 8 years ago

It would be helpful to have a isSubSet or even better contains( collection) method for collections available in IVML. Currently such constraits can only be realized via a combination of intersection and equality checks, e.g.:

project IVML {

    version v0;
    setOf(String) set1;
    setOf(String) set2;

    set1.intersection(set2) == set1;
}

This becomes much more ugly if one or both variables are sequences... CC: @eichelbe

Elscha commented 8 years ago

"Intersections" are already defined, but only for sequences , cf. overlaps and isSubsequenceOf in IVML Language Specification, page 55

eichelbe commented 6 years ago

What about Container#includesAll, IVML LanguageSpec, page 57? No subset so far, even not after OCL alignment, but may be added if really needed.

eichelbe commented 6 years ago

Operations seems to be sufficient for now as long as we do not really have a strong case. Adding convenience operations to the IVML standard library would be another option without modifying the implementation itself. Closing for now.