Skip to contents

The feature tree of a UVL model: each feature with its parent, how it hangs from it, and whether it is abstract. Strong4VM's graphs have no tree; the tree is needed to compare them with the model (vp_false_optional(), vp_tree_agreement()). Reads the "features" section of the file (indentation by tabs or by four spaces).

Usage

vp_read_uvl_tree(path)

Arguments

path

The path of a .uvl file.

Value

A tibble with feature, parent (NA for the root), relation ("mandatory", "optional", "alternative", "or", or a cardinality such as "[1..2]") and abstract.

Examples

vp_read_uvl_tree(vp_example("miband3.uvl"))
#> # A tibble: 24 × 4
#>    feature         parent          relation  abstract
#>    <chr>           <chr>           <chr>     <lgl>   
#>  1 SmartWatch      NA              NA        TRUE    
#>  2 Screen          SmartWatch      optional  FALSE   
#>  3 TouchScreen     Screen          optional  FALSE   
#>  4 OLED            Screen          mandatory FALSE   
#>  5 CapacityButton  OLED            mandatory FALSE   
#>  6 Functionalities SmartWatch      mandatory TRUE    
#>  7 FitnessMonitor  Functionalities mandatory FALSE   
#>  8 SleepTracker    Functionalities mandatory FALSE   
#>  9 VibrateAlert    Functionalities mandatory FALSE   
#> 10 Call            VibrateAlert    mandatory FALSE   
#> # ℹ 14 more rows