Skip to contents

The type of each step, after Thuem et al.: a step that removes products is a specialisation, one that adds products a generalisation, one that does both an arbitrary edit, and one that changes nothing a refactoring. The graphs give necessary conditions, on the kept features: links only gained is necessary for a specialisation, links only lost for a generalisation, and no change at all for a refactoring.

Usage

vp_edit_type(history)

Arguments

history

A history: the versions of a model, from vp_read_history() or vp_history(), oldest first.

Value

A tibble with step, from, to, gained, lost (all graphs together) and type: "refactoring?", "specialisation?", "generalisation?" (each one only possible, not proved) or "arbitrary edit" (certain).

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_edit_type(history)
#> # A tibble: 4 × 6
#>    step from    to      gained  lost type           
#>   <int> <fct>   <fct>    <int> <int> <chr>          
#> 1     1 miband1 miband2      0     0 refactoring?   
#> 2     2 miband2 miband3     20     0 specialisation?
#> 3     3 miband3 miband4     19    12 arbitrary edit 
#> 4     4 miband4 miband6     68     8 arbitrary edit