Package {variplex}


Type: Package
Title: Analysis of Strong Dependency and Conflict Graphs of Variability Models
Version: 0.1.0
Description: Computes and analyses the strong binary relationships of a variability model (a feature model, or the configuration space of a system such as the 'Linux' kernel): which features require others, which exclude each other and of which pairs at least one must be selected, in every valid configuration. Models are read in the Universal Variability Language (UVL) or as Boolean formulas in DIMACS format, such as those that 'KMax', 'KConfigReader', 'KconfigSampler' or 'TraVarT' produce from other notations. A satisfiability solver ('Glucose') finds the relationships; the resulting graphs are written as Pajek files and analysed with more than one hundred functions that return tibbles: atomic sets, hierarchy, conflicts, configuration and team planning, combinatorial testing, network patterns and the evolution of a model through its versions. Rules that involve three or more features at once are not represented in the graphs. UVL models are translated into Boolean logic as in Heradio et al. (2027) <doi:10.1016/j.scico.2026.103549>, the graphs are computed as in Heradio et al. (2026) <doi:10.1016/j.softx.2026.102663> and analysed as networks as in Sánchez-Ruiz et al. (2026) <doi:10.1007/978-3-032-40763-4_18>. A companion data set of graphs for 5,709 models is described in Heradio et al. (2026) <doi:10.5281/zenodo.17277788>.
License: LGPL-3
URL: https://rheradio.github.io/variplex/, https://github.com/rheradio/variplex, https://github.com/rheradio/strong4vm
BugReports: https://github.com/rheradio/variplex/issues
Depends: R (≥ 4.1.0)
Imports: dplyr, igraph, jsonlite, Matrix, methods, Rcpp, stats, tibble, tools, utils
Suggests: DiagrammeR, DiagrammeRsvg, ggplot2, knitr, rmarkdown, rsvg, spelling, testthat (≥ 3.0.0), withr
LinkingTo: Rcpp
SystemRequirements: C++17, GANAK (optional, for vp_generate(representativeness = TRUE))
VignetteBuilder: knitr
Config/Needs/website: pkgdown
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-GB
Config/roxygen2/version: 8.1.1
NeedsCompilation: yes
Packaged: 2026-11-12 15:37:30 UTC; rheradio
Author: Rubén Heradio ORCID iD [aut, cre, cph] (first author of Strong4VM and BoneDigger), Luis Cambelo [ctb, cph] (Strong4VM and BoneDigger), Miguel A. Olivero [ctb, cph] (Strong4VM), José Manuel Sánchez Ruíz [ctb, cph] (Strong4VM), Alberto Pérez García-Plaza [ctb, cph] (Strong4VM), David Fernández Amorós [ctb, cph] (Strong4VM), Gilles Audemard [ctb, cph] (Glucose SAT solver), Laurent Simon [ctb, cph] (Glucose SAT solver), Niklas Eén [ctb, cph] (MiniSat, on which Glucose is based), Niklas Sörensson [ctb, cph] (MiniSat, on which Glucose is based), Dictino Chaos [ctb, cph] (BoneDigger backbone solver), Terence Parr [ctb, cph] (ANTLR 4 C++ runtime), Sam Harwell [ctb, cph] (ANTLR 4 C++ runtime), The ANTLR Project [cph] (ANTLR 4 C++ runtime), The UVL parser contributors [cph] (UVL grammar from which the parser in src/s4/uvl2dimacs/parser was generated)
Maintainer: Rubén Heradio <rheradio@issi.uned.es>
Repository: CRAN
Date/Publication: 2026-12-04 17:40:02 UTC

variplex: analysis of strong dependency and conflict graphs of variability models

Description

variplex logo variplex computes, for a variability model, every relationship between two features that holds in all its valid configurations, and analyses the resulting graphs.

Details

Start with vignette("variplex"). The graphs hold relationships between two features only: a rule that ties three or more features at once is in no graph, unless it implies a relationship between two of them (vignette("limits-theory", package = "variplex")).

The engine is Strong4VM (https://github.com/rheradio/strong4vm), whose C++ code, with the SAT solver Glucose 3.0, the backbone solver BoneDigger and the ANTLR 4 parser runtime, is compiled into the package.

Author(s)

Maintainer: Rubén Heradio rheradio@issi.uned.es (ORCID) (first author of Strong4VM and BoneDigger) [copyright holder]

Authors:

Other contributors:

See Also

Useful links:


Print a model

Description

A short description of a model: its features, links and atomic sets.

Usage

## S3 method for class 'vp_model'
print(x, ...)

Arguments

x

A model.

...

Not used.

Value

x, invisibly.

Examples

vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)

Groups of any features that all exclude each other (at most one per product)

Description

Groups of features that all exclude one another (cliques of the excludes graph): at most one of each group can be in a product. They are groups of alternatives, whether or not the model declares them as such.

Usage

vp_alternative_groups(model, min_size = 3)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

min_size

The smallest group to report (3 by default; every conflict is a group of 2).

Value

A tibble with group, size and feature, the largest groups first.

See Also

Other conflicts: vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_alternative_groups(band)

What leaving a feature out forces

Description

The features joined to a given feature in the at-least-one graph: leaving it out forces all of them in.

Usage

vp_atleastone_of(model, feature)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

feature

The name of a variable feature of the model.

Value

A tibble with the column feature.

See Also

Other features: vp_conflicts_of(), vp_feature_table(), vp_genuine_hubs(), vp_required_by(), vp_requirements(), vp_warning_zone()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_atleastone_of(band, "BT40")

Features always selected together

Description

The atomic sets: groups of features that require each other, so that a product has all of them or none.

Usage

vp_atomic_sets(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with one row per feature of a set of two or more: set (a number), feature, and representative (the first feature of the set, which stands for it in the skeleton).

See Also

Other hierarchy: vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_atomic_sets(band)

Where new features attach

Description

Where new features attach: for each step and each kept feature, how many direct dependants it had (in the skeleton) and how many of the new features require it directly in the new version.

Usage

vp_attachment(history)

Arguments

history

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

Value

A tibble with step, version (the new one), feature, direct_dependants and new_dependants.

See Also

Other evolution: vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_attachment(history)

How good a ranking is (area under the curve)

Description

The area under the ROC curve of a score: the chance that a case with the outcome gets a higher score than a case without it. 0.5 is a coin toss, 1 a perfect ranking.

Usage

vp_auc(score, outcome)

Arguments

score

A numeric score of each case (higher: the outcome is predicted more strongly).

outcome

A logical vector: whether each case had the outcome.

Value

A number between 0 and 1, or NA when outcome has only one value.

See Also

Other evolution: vp_attachment(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

vp_auc(c(0.9, 0.8, 0.3, 0.1), c(TRUE, TRUE, FALSE, FALSE))
vp_auc(c(0.1, 0.8, 0.3, 0.9), c(TRUE, TRUE, FALSE, FALSE))

What a random model of the same shape would give

Description

A baseline: shuffle the skeleton many times, keeping how many direct requirements and dependants each feature has (and the order of the features, so that no cycle appears), and count the arrows that the shuffled hierarchy implies. Compare the real number with the spread of the shuffled ones to see whether the model is unusual or just what any hierarchy of that shape would give.

Usage

vp_baseline(model, runs = 200, seed = 1)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

runs

How many randomised models to build.

seed

The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.

Details

Only the requires graph: conflicts and at-least-one lines play no part, neither in the shuffle nor in the numbers. (vp_triangle_significance() also shuffles the primitive conflicts, for triangles; nothing here shuffles the at-least-one lines.)

Value

A tibble with one row per shuffle: run, arrows (of the complete graph it implies) and implicit_share; its attribute "observed" holds the real values.

See Also

Other patterns: vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
b <- vp_baseline(band, runs = 20)
summary(b$arrows)
attr(b, "observed")

Can these features be in one product? (a wish list)

Description

Can these features be selected together in one product? (A wish list, or partial configuration that only selects.)

Usage

vp_can_go_together(model, wishes)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

wishes

A character vector of features, or a list of such vectors to check several wish lists at once.

Value

A tibble with one row per wish list: wish, possible (FALSE: certainly not; TRUE: no two features stand in each other's way, which a rule over three or more features can still contradict) and reasons (the root conflicts that forbid it, separated by ";").

See Also

Other configuration: vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_can_go_together(band, c("TouchScreen", "HeartRateSensor"))
vp_can_go_together(band, list(c("Screen", "BT40"), c("Screen", "NFC")))

Mutually exclusive children of one parent: the alternative groups a feature model would declare

Description

Candidate alternative groups: for each feature, its direct dependants (in the skeleton) that exclude one another. In a feature model this is the shape of an alternative group under a common parent, so the result suggests groups that a model rebuilt from the graphs could declare, whether or not the original model declares them.

Usage

vp_candidate_groups(model, min_size = 2)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

min_size

The smallest group (2 by default).

Value

A tibble with parent, group, size and feature.

See Also

Other conflicts: vp_alternative_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_candidate_groups(band)

The fewest chains that cover all features

Description

The smallest set of chains that covers all the features (Dilworth's theorem): each chain goes from a feature to one it requires, and so on. There are as many chains as the width.

Usage

vp_chains(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns chain, position and feature.

See Also

Other hierarchy: vp_atomic_sets(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_chains(band)

Description

The links that changed between two versions, among the kept features.

Usage

vp_changed_links(old, new, graph = c("requires", "excludes", "atleastone"))

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

Value

A tibble with from, to and change ("gained" or "lost").

See Also

Other evolution: vp_attachment(), vp_auc(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_changed_links(old, new, "requires")

Are the files consistent?

Description

Check that the files are consistent: the properties that the graphs of any model must have. A FALSE means that the files are incomplete or were damaged (for example, filtered by hand in one graph and not in the other).

Usage

vp_check(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with one row per property: property, holds (TRUE/FALSE) and violations (how many cases break it).

See Also

Other whole model: vp_degree_distribution(), vp_gini(), vp_summary()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_check(band)

Classify the variables of a formula without computing any graph

Description

Decides, for every variable of the formula, whether it is a real option (a node of the graphs), a helper variable of the translation, or a value of a non-Boolean option, with the rule that decided it. Nothing is solved, so it is fast even for the Linux kernel: use it to check the options of vp_generate() (translator, tristate, nonbool, ...) before a long run.

Usage

vp_classify(input, output_dir = NULL, ...)

Arguments

input

The path of a .uvl file (a feature model in the Universal Variability Language), or of a .dimacs or .cnf file (a Boolean formula in DIMACS format, whose comments ⁠c <number> <name>⁠ name the variables).

output_dir

The folder for the files of the run. By default (NULL) a new temporary folder, which R deletes at the end of the session; give a folder to keep the files.

...

Further arguments of vp_generate() that change the classification, such as translator, tristate, nonbool or keep_pattern.

Value

A tibble with one row per variable of the formula: the contents of the file ⁠__variables.csv⁠ (its columns are described in the vignette vignette("graphs", package = "variplex")).

See Also

Other reading: vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

vp_classify(vp_example("eleven_options.dimacs"), translator = "kmax")

Features whose links change in the same steps

Description

Features that change together: pairs of features whose links change in the same steps, as version histories of code reveal files that are always edited together. Two features that change together without a link between them may be tied by something the graphs do not hold (a rule over three features, shared code, the same developer).

Usage

vp_co_change(
  history,
  graphs = c("requires", "excludes", "atleastone"),
  min_together = 2
)

Arguments

history

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

graphs

Which graphs: any of "requires", "excludes" and "atleastone".

min_together

Keep the pairs that changed together in at least this many steps.

Value

A tibble with feature_1, feature_2, together (steps in which both changed), steps_1, steps_2, jaccard (together over the steps in which either changed), through_their_link (steps in which a link between the two themselves changed) and linked (a link joins them in the last version that has both; NA if none has).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_co_change(history, min_together = 1)

The features split into groups without conflicts

Description

The features split into groups (colours) so that no two features of a group exclude each other. Each product fits in one colour, so testing every feature at least once needs at least as many products as colours. The colouring is quick, not always the smallest possible.

Usage

vp_colouring(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with feature and colour (a number).

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_colouring(band)

How many combinations a t-wise sample must cover

Description

How many combinations of values a t-wise sample must cover.

Usage

vp_combinations_to_cover(model, t = 2)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

t

1 (every feature selected and left out) or 2 (every valid combination of two features).

Value

One row: t, combinations and exact (FALSE for t = 2 without the at-least-one graph: then the count is an upper limit, because some "neither" combinations may be impossible).

See Also

Other testing: vp_coverage(), vp_min_sample_size(), vp_pick_sample(), vp_sample_violations(), vp_uncovered()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_combinations_to_cover(band, t = 1)
vp_combinations_to_cover(band, t = 2)

What needs both of two features

Description

The features that require both of two features (where two parts of the model are tied together).

Usage

vp_common_dependants(model, a, b)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

a

The name of a variable feature of the model.

b

The name of another variable feature of the model.

Value

A tibble with the column feature.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_common_dependants(band, "Screen", "HeartRateSensor")

What two features both need

Description

The features that two features both require (shared infrastructure).

Usage

vp_common_requirements(model, a, b)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

a

The name of a variable feature of the model.

b

The name of another variable feature of the model.

Value

A tibble with the column feature.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_common_requirements(band, "TouchScreen", "MovementFilter")

Groups of closely linked features

Description

Communities: groups of features with more links inside than a random graph of the same degrees would give, found on the minimal form (the complete graph links every feature to everything above it, which hides the groups). By default only the skeleton counts; graphs adds the primitive conflicts and the primitive at-least-one lines (which need or_graph = TRUE). The algorithm (Louvain) has a random element: fix seed to get the same groups again, and compare several seeds before trusting them.

Usage

vp_communities(model, seed = 1, graphs = "requires")

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

seed

The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.

graphs

Which graphs of the minimal form link features: any of "requires", "excludes", "atleastone".

Value

A tibble with feature and community (a number); its attribute "modularity" says how good the split is (NA when the skeleton has no arrow: each feature is then a community of its own).

See Also

Other patterns: vp_baseline(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_communities(band)

Do communities stay the same?

Description

Do communities stay the same? For each step: how alike the communities of two consecutive versions are (on the features they share), and, as a yardstick, how alike two runs of the algorithm on the same version are. If the second number is not clearly higher than the first, the change cannot be told apart from the randomness.

Usage

vp_community_history(history, seed = 1)

Arguments

history

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

seed

The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.

Value

A tibble with step, from, to, between_versions and same_version_two_runs.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_community_history(history)

What changed between two versions

Description

What changed between two versions: one row per graph, as the command ⁠strong4vm diff⁠ reports it.

Usage

vp_compare(old, new)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

Value

A tibble with graph, kept, added, removed (variable features), old_links and new_links (among the kept features), gained, lost, jaccard (links in both / links in either; 1 when nothing changed) and spearman (for requires: how alike the order of the kept features by in-degree is; NA for the others).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_compare(old, new)

How alike two groupings are

Description

How alike two groupings of the same features are: 1 when they are the same, near 0 when they are unrelated (normalised mutual information). Each grouping is a tibble with a column feature and one column of group labels.

Usage

vp_compare_groupings(a, b, method = "nmi")

Arguments

a

A grouping: a tibble with a column feature and one column of group labels, such as the result of vp_communities().

b

Another grouping of the same features.

method

The measure of similarity, as in igraph::compare(): "nmi" (normalised mutual information), "vi", "split.join", "rand" or "adjusted.rand".

Value

A number: 1 for the same grouping, near 0 for unrelated ones.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_compare_groupings(
  vp_communities(band, seed = 1),
  vp_communities(band, seed = 2)
)

The fewest 'at most one of' groups that state every conflict

Description

The primitive conflicts written as few "at most one of these" groups: a greedy cover of the primitive conflicts by groups of features that all exclude one another. Each group could be one declaration of the model ("at most one of"), and together they state every primitive conflict, so every conflict of the model follows from them and the requirements. The number of groups says how many such declarations a modeller would need.

Usage

vp_conflict_cover(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with group, size, feature and primitive_conflicts (how many of them the group states).

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_conflict_cover(band)

What a feature excludes

Description

The features that a given feature excludes: selecting it rules all of them out.

Usage

vp_conflicts_of(model, feature)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

feature

The name of a variable feature of the model.

Value

A tibble with the column feature.

See Also

Other features: vp_atleastone_of(), vp_feature_table(), vp_genuine_hubs(), vp_required_by(), vp_requirements(), vp_warning_zone()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_conflicts_of(band, "BT40")

What some decisions force

Description

What some decisions force. Selecting a feature selects what it requires and leaves out what it excludes; leaving a feature out leaves out what requires it and selects what it is joined to in the at-least-one graph.

Usage

vp_consequences(model, selected = character(0), deselected = character(0))

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

selected

Features that the product must have.

deselected

Features that the product must not have.

Value

A tibble with feature, value ("selected" or "left out") and forced_by (the decision that forces it, written as "A" for "A selected" and "not A" for "A left out"; a decision you gave is forced by itself).

See Also

Other configuration: vp_can_go_together(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_consequences(band, selected = "TouchScreen")

How deep in the conflicts each feature sits

Description

Coreness in the excludes graph: how deep in a dense region of conflicts each feature sits (0: no conflict).

Usage

vp_coreness(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with feature and coreness.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_coreness(band)

How many products the graphs allow (small models)

Description

How many products the graphs allow, by trying every selection of the variable features. Only for small models (max_features, 20 by default). It shows how much of the model the graphs capture: compare the last number with the number of valid configurations of the model, when it is known.

Usage

vp_count_graph_products(model, max_features = 20, products = NULL)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

max_features

The largest number of variable features to try (2^n selections).

products

The number of valid products of the model, if you know it (from a model counter): then two more columns say how much of the model the graphs explain, on a scale of yes/no choices (bits).

Value

One row: selections (2^n), respect_requires, and_excludes, and_atleastone (NA without or_graph = TRUE); with products, also bits_model (how many of the n yes/no choices the model takes away: n - log2(products)) and explained (the share of them that the graphs take away).

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_count_graph_products(band)

How much of them a sample covers

Description

How much of the combinations to cover a sample covers.

Usage

vp_coverage(model, sample)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

sample

One row per configuration, one 0/1 or logical column per variable feature.

Value

One row per t (1 and 2): t, covered, to_cover and coverage (the share). Combinations that the sample has but that are impossible are not counted (see vp_sample_violations()).

See Also

Other testing: vp_combinations_to_cover(), vp_min_sample_size(), vp_pick_sample(), vp_sample_violations(), vp_uncovered()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
nodes <- with(vp_features(band), feature[status == "variable"])
sample <- as.data.frame(matrix(
  c(1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1),
  nrow = 2,
  dimnames = list(NULL, nodes)
))
vp_coverage(band, sample)

Single features that hold two parts together

Description

Cut features: single features that hold two parts of the model together. Removing one splits its part into several pieces. Computed on the minimal form (skeleton, primitive conflicts and, with or_graph = TRUE, primitive at-least-one lines), which is what was written, roughly; on the complete graphs almost nothing is a cut.

Usage

vp_cut_features(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with feature, pieces (how many pieces its part falls into without it) and largest_piece.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_cut_features(band)

How many features have each degree

Description

How many features have each degree in one graph: the data of a degree-distribution plot.

Usage

vp_degree_distribution(
  model,
  graph = c("requires", "excludes", "atleastone", "skeleton"),
  direction = c("in", "out")
)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

graph

"requires", "excludes", "atleastone" or "skeleton".

direction

For requires and skeleton: "in" (how many require the feature) or "out" (how many it requires).

Value

A tibble with degree and features (how many features have that degree).

See Also

Other whole model: vp_check(), vp_gini(), vp_summary()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_degree_distribution(band, "requires", "in")

The length of the longest chain of requirements

Description

The depth of the model: the number of features in its longest chain of requirements (one more than the highest level).

Usage

vp_depth(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

An integer.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_depth(band)

Steps that changed far more than usual

Description

Disruptions: the steps that changed a graph far more than usual. The change of a step is 1 - jaccard; a step is flagged when its change is more than threshold robust standard deviations above the median of all steps. (The robust standard deviation is the MAD; when more than half of the steps change nothing, the MAD is 0 and the ordinary standard deviation is used instead.)

Usage

vp_disruptions(history, threshold = 3.5)

Arguments

history

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

threshold

How many robust standard deviations above the median a change must be to count as a disruption.

Value

The rows of vp_history_changes() with two more columns: score and disruption (TRUE/FALSE).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_disruptions(history)

The Graphviz (DOT) source of a drawing

Description

The source of a drawing in the DOT language of Graphviz. vp_plot() renders it; use it directly to edit the source by hand, or to render it with any Graphviz tool. It needs no other package.

Usage

vp_dot(
  x,
  graphs = c("requires", "excludes", "atleastone"),
  features = NULL,
  highlight = character(0),
  highlight_links = NULL,
  fill = NULL,
  merge_atomic = TRUE,
  rankdir = NULL,
  layout = "dot",
  max_nodes = 400
)

Arguments

x

What to draw: a model (from vp_read(), complete or minimal: the drawing shows the links it has, so a minimal form, vp_minimal(model), is much easier to read); or a tibble of links with from and to (the answer of vp_skeleton(), vp_primitive_conflicts(), vp_kernel_links(), vp_changed_links()...), with an optional column graph ("requires", "excludes" or "atleastone", or a column link as in vp_kernel_links(); without either, every link is a requirement); or a feature tree, from vp_feature_tree() or vp_read_uvl_tree() (whose abstract features get a dashed border); or a modal implication graph, from vp_mig(): its nodes are decisions, "A" and "not A" (white), and every arrow is an implication, in the colour and line of the link it comes from (graphs selects which; features and highlight take decisions).

graphs

Which graphs of a model to draw.

features

Draw only these features and the links among them (NULL: all).

highlight

Features to fill in yellow.

highlight_links

A tibble with from and to: links to draw thick.

fill

A named vector: feature -> fill colour (for example, one colour per community).

merge_atomic

Draw each atomic set of a model as one box, with the names of its features one under the other.

rankdir

For the layout dot: "BT" puts the features that are required at the top, "TB" at the bottom, "LR" and "RL" left to right and right to left. NULL: "BT" for graphs, "TB" for a tree (parents at the top).

layout

The Graphviz program that places the nodes: "dot" (layers: best for requirements), "neato" and "fdp" (springs: best for conflicts), "sfdp" (springs, for large graphs), "circo" (a circle), "twopi" (rings around a centre).

max_nodes

Refuse to draw more nodes than this (the layout gets slow, and the drawing unreadable): draw a part instead.

Value

A character string: the DOT source.

See Also

Other drawing: vp_dot_compare(), vp_plot(), vp_plot_compare()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
cat(vp_dot(vp_minimal(band)))
cat(vp_dot(vp_skeleton(band), highlight = "Screen"))

The Graphviz (DOT) source of a drawing of what changed

Description

The source, in the DOT language of Graphviz, of the drawing of vp_plot_compare().

Usage

vp_dot_compare(
  old,
  new,
  graph = c("requires", "excludes", "atleastone"),
  minimal = TRUE,
  context = TRUE,
  rankdir = "BT",
  max_nodes = 400
)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

graph

The graph to compare: "requires", "excludes" or "atleastone".

minimal

Compare the minimal forms (TRUE) or the complete graphs (FALSE: every consequence, often a tangle).

context

TRUE: only the features with a gained or lost link, and those added or removed; FALSE: all.

rankdir

The direction of the layers: "BT" puts the features that are required at the top, "TB" at the bottom, "LR" and "RL" left to right and right to left.

max_nodes

Refuse to draw more nodes than this: compare a part instead, with vp_subset() on both versions.

Value

A character string: the DOT source.

See Also

Other drawing: vp_dot(), vp_plot(), vp_plot_compare()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"))
new <- vp_generate(vp_example("miband3_realized.uvl"))
cat(vp_dot_compare(old, new))

What depends on some features

Description

What depends on some features: the features themselves and every feature that requires one of them (their "down-set", or impact set).

Usage

vp_downset(model, features)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

features

The names of one or more variable features of the model.

Value

A tibble with the columns feature and depends_on (the first given feature that it depends on; a given feature depends on itself).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_downset(band, "Screen")

Did a step restrict the model, relax it, or both?

Description

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).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

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)

The history split into runs of alike versions

Description

The eras of a history: the split of its versions into k runs of consecutive versions that are as alike as possible inside each run. Exact (dynamic programming) for the criterion of k-means: the sum, over the eras, of the distances between every two versions of the era (vp_version_distance()) divided by the number of its versions. A boundary between two eras is where the model changed course.

Usage

vp_eras(history, k = 3, graph = c("requires", "excludes", "atleastone"))

Arguments

history

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

k

The number of eras.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

Value

A tibble with version, era (1 to k) and spread (the mean distance between the versions of its era).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_eras(history, k = 2)

The example models that come with the package

Description

The package includes the variability models and data used in the examples and vignettes:

Usage

vp_example(file = NULL)

Arguments

file

The names of one or more example files. NULL lists them all.

Details

Value

The full paths of the files, or, with file = NULL, the names of all the example files.

See Also

Other reading: vp_classify(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

vp_example()
vp_example("miband3.uvl")

The complete graphs rebuilt from the minimal form

Description

The complete graphs rebuilt from a minimal form (as the command ⁠strong4vm expand⁠ does): every arrow that follows from a chain, every conflict inherited downwards, every at-least-one line inherited upwards, and the atomic sets unfolded. A complete model is returned as it is.

Usage

vp_expand(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A model in its complete form.

See Also

Other reading: vp_classify(), vp_example(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
mini <- vp_minimal(band)
identical(vp_expand(mini)$requires$from, band$requires$from)

Why two features exclude each other

Description

Why do two features exclude each other? The answer is a chain: the first feature requires some feature x, the second requires some feature y, and x and y have a primitive conflict. When several primitive conflicts can explain it, each one is an origin of its own (all of them must be removed for the conflict to disappear).

Usage

vp_explain_conflict(model, a, b)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

a

The name of a variable feature of the model.

b

The name of another variable feature of the model.

Value

A tibble with one row per link: origin, step, from, link ("requires" or "excludes") and to. No rows if the two features do not exclude each other.

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_explain_conflict(band, "TouchScreen", "BT40")

Why one feature requires another

Description

Why does a feature require another? The first route is a chain of arrows of the skeleton. When the run has the at-least-one graph, further routes may appear: a excludes g, and every product has g or b, so a product with a has b.

Usage

vp_explain_requires(model, a, b, max_routes = 3)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

a

The name of a variable feature of the model.

b

The name of another variable feature of the model.

max_routes

How many routes of the second kind to show at most.

Value

A tibble like that of vp_explain_conflict(), with route instead of origin; the link "atleastone" means "every product has from or to".

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_explain_requires(band, "TouchScreen", "OLED")

Optional features that are not really optional

Description

False-optional features: optional features that are not really optional. Two definitions are in use: the feature is in every product (Benavides et al.; it is then core), or it is selected whenever its parent is (Nieke et al.; the parent then requires it). The graphs decide both exactly.

Usage

vp_false_optional(model, tree)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

tree

The feature tree, from vp_read_uvl_tree().

Value

A tibble with one row per optional feature that is false-optional by either definition: feature, parent, in_every_product (first definition) and whenever_parent (second; NA when the parent is not in the graphs, for example because it is abstract).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
tree <- vp_read_uvl_tree(vp_example("miband3.uvl"))
vp_false_optional(band, tree)

The features that changed most over a history (hotspots)

Description

How much each feature changed over a history: the links of the chosen graphs it gained or lost, step by step (among the features that can vary on both sides of each step, as in vp_compare()). The features that change most are the hotspots of the history; a hotspot that many features require is a risky foundation.

Usage

vp_feature_churn(history, graphs = c("requires", "excludes", "atleastone"))

Arguments

history

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

graphs

The graphs whose links count.

Value

A tibble with feature, versions (in how many it can vary), steps_changed, gained, lost, churn (gained + lost) and required_by (in the last version where it can vary), the most changed first.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_feature_churn(history)

Features grouped by their measures

Description

Features grouped by their measures (the columns of vp_feature_table()): features in the same group play a similar role. Hierarchical clustering on the scaled measures.

Usage

vp_feature_groups(
  model,
  groups = 4,
  measures = c("required_by", "requires", "excludes", "level", "betweenness")
)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

groups

How many groups.

measures

The columns of vp_feature_table() to group by.

Value

A tibble with feature and group.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_feature_groups(band, groups = 3)

The state of every feature in every version

Description

The state of every feature in every version, in long format (one row per feature and version).

Usage

vp_feature_states(history)

Arguments

history

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

Value

A tibble with version, feature and state ("variable", "core", "dead" or "absent").

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_feature_states(history)

Every measure of every feature, one row each

Description

A table of measures, one row per variable feature.

Usage

vp_feature_table(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Details

The counts (required_by, requires, excludes, atleastone, isolated) read the graphs of the model as they are: on the minimal form (vp_minimal()) they count direct links only. Decision power and the positions in the hierarchy are inferences and always use the complete graphs.

Value

A tibble with the columns:

See Also

Other features: vp_atleastone_of(), vp_conflicts_of(), vp_genuine_hubs(), vp_required_by(), vp_requirements(), vp_warning_zone()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_feature_table(band)

A feature tree rebuilt from the skeleton

Description

A feature tree rebuilt from the skeleton: each feature gets as parent one of the features it requires directly. When there are several candidates, the least required one is chosen, and the others become cross-tree arrows.

Usage

vp_feature_tree(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns feature, parent (NA for a feature that needs nothing), candidates (how many features it requires directly) and cross_tree (the candidates that were not chosen, separated by commas).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_feature_tree(band)

The features and their status (variable, core, dead)

Description

The features of a model and their status: "variable" (a real choice), "core" (in every product) or "dead" (in none). Only the variable features are nodes of the graphs.

Usage

vp_features(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns feature and status.

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_features(band)

Features that change state back and forth

Description

Features that flip: they change state (variable, core, dead, absent) back and forth, at least min_moves times. Something in their conditions is edited again and again; they are worth a closer look.

Usage

vp_flip_flops(history, min_moves = 2)

Arguments

history

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

min_moves

The smallest number of changes of state to report.

Value

A tibble with feature, moves and path (the states in order, without repetitions).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_flip_flops(history, min_moves = 1)

Forecast the size of later versions

Description

Forecast the number of links of later versions from their number of features. The growth law is fitted on the first train versions; a cruder rule ("links per feature stay as in the last known version") is given beside it.

Usage

vp_forecast_size(history, train)

Arguments

history

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

train

How many of the first versions to fit the growth law on (at least 3, and fewer than the versions of the history).

Value

A tibble with version, links, observed, growth_law, same_ratio and the errors of both, as shares.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_forecast_size(history, train = 3)

Features that need nothing

Description

Features that need nothing (the foundations, level 0).

Usage

vp_foundations(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the column feature (representatives of atomic sets).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_foundations(band)

Every function of the package, by topic

Description

A table of the functions of variplex: the topic, the name, the parameters as one would type them (a parameter with a default shows it) and the question each function answers. The topics follow the vignettes.

Usage

vp_functions(topic = NULL)

Arguments

topic

A part of the name of a topic, such as "conflicts" or "evol"; NULL lists every function.

Value

A tibble with the columns topic (a factor, in the order of the vignettes), name, parameters and answers.

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

vp_functions()
vp_functions("conflicts")

Compute the strong dependency and conflict graphs of a variability model

Description

Reads a variability model written in UVL, or the Boolean formula of a model written in any other notation (a DIMACS file, such as those that KMax, KConfigReader, KconfigSampler or TraVarT produce from Kconfig and other languages), and computes every strong binary relationship between its features, that is, every relationship that holds in all the valid configurations:

Usage

vp_generate(
  input,
  output_dir = NULL,
  threads = 1,
  or_graph = FALSE,
  kernel = FALSE,
  atomic = TRUE,
  minimal = TRUE,
  check = TRUE,
  fail_on_check = TRUE,
  mig = TRUE,
  keep_dimacs = FALSE,
  tseitin = FALSE,
  strict_uvl = FALSE,
  translator = c("auto", "kmax", "kconfigreader", "kconfigsampler", "travart", "uvl",
    "generic"),
  tristate = c("merge", "builtin", "both"),
  nonbool = c("merge", "drop", "keep"),
  visibility = c("drop", "keep"),
  abstract_groups = c("merge", "keep"),
  synthetic_root = c("drop", "keep"),
  abstract = c("drop", "keep", "merge"),
  fixed_nodes = c("drop", "keep"),
  unnamed = c("drop", "keep"),
  unknown_names = NULL,
  decls = NULL,
  decls_unconstrained = c("ignore", "add"),
  keep_type_prefix = FALSE,
  strip_config_prefix = FALSE,
  keep_pattern = character(0),
  drop_pattern = character(0),
  drop_names = NULL,
  filter_at = c("input", "output"),
  max_matrix_memory = 2,
  representativeness = FALSE,
  ganak = "ganak",
  legacy = FALSE,
  quiet = TRUE,
  read = TRUE
)

Arguments

input

The path of a .uvl file (a feature model in the Universal Variability Language), or of a .dimacs or .cnf file (a Boolean formula in DIMACS format, whose comments ⁠c <number> <name>⁠ name the variables).

output_dir

The folder for the files of the run. By default (NULL) a new temporary folder, which R deletes at the end of the session; give a folder to keep the files.

threads

Number of threads for the solver. More than the number of cores is reduced to the cores.

or_graph

Also compute the at-least-one graph. It roughly doubles the work of the solver, and it is needed for everything that concerns leaving features out.

kernel

Also compute the kernel (see vp_kernel()).

atomic, minimal, check

Write the atomic sets, the minimal form, and run the consistency checks on the output.

fail_on_check

If a consistency check fails, stop with an error (the default) or only warn.

mig

Use a modal implication graph to skip solver calls (same graphs, usually faster).

keep_dimacs

For UVL input: also keep the DIMACS translation in output_dir.

tseitin

For UVL input: translate with the Tseitin encoding (auxiliary variables) instead of the straightforward one.

strict_uvl

For UVL input: a constraint that cannot be translated (not Boolean, or naming a feature that the model does not declare) is an error instead of a warning.

translator

The tool that made a DIMACS file, which decides which of its variables are real options: "auto" detects it from the comments of the file.

tristate

Tristate options X / X_MODULE of Kconfig: one node "X built in or as a module" ("merge"), X only ("builtin"), or both.

nonbool

Value variables of non-Boolean options: one node "P is set" ("merge"), none ("drop") or one node per value ("keep").

visibility

KMax visibility variables: "drop" or "keep".

abstract_groups

TraVarT abstract group features (⁠_xor⁠, ⁠_or⁠, ⁠_alt⁠): "merge" into their parent, or "keep".

synthetic_root

The synthetic root ⁠__Root__⁠ added by some translations: "drop" or "keep".

abstract

UVL features marked {abstract} (the root included): "drop", "keep", or "merge" into an equivalent feature that is not abstract, if there is one.

fixed_nodes

Core and dead options as nodes of the graphs ("keep"), or only in their lists ("drop").

unnamed

Variables without a name comment: "drop", or "keep" (named ⁠v<n>⁠).

unknown_names

Names that match no rule of the translator profile: "keep", "drop" or "error". NULL: "drop" for KMax, KConfigReader and KconfigSampler, "keep" otherwise.

decls

A file of declared option names, one per line: other variables are dropped.

decls_unconstrained

Declared names absent from the formula: "ignore", or "add" as isolated nodes.

keep_type_prefix

Keep the prefixes boolean_ and tristate_ (KconfigSampler).

strip_config_prefix

Strip the prefix CONFIG_.

keep_pattern, drop_pattern

Regular expressions: names to keep whatever the other rules say, or to drop.

drop_names

A file of names to drop, one per line.

filter_at

"input": dropped variables are never queried; "output": query all, filter when writing (for testing).

max_matrix_memory

Above this estimate, in GB, the minimal form and the checks use sparse algorithms.

representativeness

Count, with the model counter GANAK, the valid configurations and those that the graphs allow (turns on or_graph). Needs GANAK; see vp_representativeness().

ganak

The GANAK program: a path, or a name found on the PATH.

legacy

Reproduce the output of Strong4VM 1.x.

quiet

Print nothing but warnings and errors. FALSE prints the progress of the run.

read

Read the results and return the model (TRUE), or only return the prefix of the files.

Details

It also finds the core features (in every product), the dead features (in none), the atomic sets (features that are always selected together), the minimal form of the graphs (vp_minimal()), and, with kernel = TRUE, the kernel (vp_kernel()). The results are written as files (Pajek graphs, lists, a CSV report and a JSON summary) into output_dir, and read back as a model, the object that every other function of the package takes.

This is the command ⁠strong4vm generate⁠ of the Strong4VM program; every option of the command line is an argument. Its other sub-commands are functions of the package: check is vp_check(), expand is vp_expand(), explain is vp_explain_conflict() and vp_explain_requires(), and diff is vp_compare() and vp_changed_links().

Value

With read = TRUE, a model (an object of class vp_model, see vp_read()). With read = FALSE, the prefix of the files written (invisibly): the path of the output files without their ending.

What the graphs cannot show

The graphs hold relationships between two features. A rule that involves three or more features at once (such as "A requires B or C", or "A, B and C cannot all be selected") is not in any graph, unless it implies a relationship between two features. Everything the graphs say is true; what they do not say may still be ruled out by such a rule. representativeness = TRUE measures how much of the model the graphs leave out (see vp_representativeness()).

See Also

vp_read() to read the files of an earlier run; vp_example() for the models that come with the package.

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
band
vp_features(band)
vp_links(band, "excludes")

# A Boolean formula in DIMACS format
f <- vp_generate(vp_example("eleven_options.dimacs"), translator = "kmax")
vp_links(f, "requires")

The most required features, and whether that is their own merit

Description

Genuine hubs: the features that many others require in their own right, not only because they sit below another feature that gathers their dependants. A feature p dominates a feature q (Abate et al.'s strong dominance) when p requires q and nearly all the other features that require q also require p: then almost every dependant of q reaches q through p, and the importance of q is borrowed from p. A hub that no feature dominates is genuine.

Usage

vp_genuine_hubs(model, top = 10, share = 0.9)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

top

How many of the most required features to look at.

share

What "nearly all" means: the share of the other dependants of q that must also require p (0.9 by default).

Value

A tibble with feature, required_by, dominated_by (NA for a genuine hub), share_through (the share of the other dependants of the feature that also require its dominator; NA for a genuine hub) and genuine.

See Also

Other features: vp_atleastone_of(), vp_conflicts_of(), vp_feature_table(), vp_required_by(), vp_requirements(), vp_warning_zone()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_genuine_hubs(band, top = 5)

How unevenly a quantity is spread

Description

The Gini coefficient of a vector of numbers: 0 when all are equal, close to 1 when one holds almost everything.

Usage

vp_gini(x)

Arguments

x

A numeric vector.

Value

A number between 0 and 1.

See Also

Other whole model: vp_check(), vp_degree_distribution(), vp_summary()

Examples

vp_gini(c(1, 1, 1, 1))
vp_gini(c(0, 0, 0, 10))

How fast links grow with features

Description

Growth laws: how fast each kind of link grows with the number of features. A straight line is fitted to log(links) against log(features); its slope is 1 when links grow in step with features, above 1 when faster. Versions with no features, or with none of the links of a kind, are left out of that kind (log(0) does not exist).

Usage

vp_growth(history)

Arguments

history

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

Value

A tibble with links (the kind), slope and r_squared (how well a straight line fits; 1 is perfect); both NA for a kind with fewer than three versions left.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_growth(history)

Compute the graphs of every version of a model

Description

Runs vp_generate() on each version of a model and gathers the results into a history, the object that the functions of evolution take (as vp_read_history() does for runs made earlier).

Usage

vp_history(inputs, versions = NULL, ...)

Arguments

inputs

The model files of the versions (UVL or DIMACS), oldest first.

versions

Names for the versions; by default the names of the files without their ending.

...

Further arguments of vp_generate(), the same for every version (such as or_graph = TRUE).

Value

A tibble with one row per version: version (a factor that keeps the order) and model (a list column of models).

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

gens <- c("miband1", "miband2", "miband3")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens
)
history
vp_history_sizes(history)

Any measure, version by version

Description

Applies a function to every version of a history and binds the answers, one block per version. The function takes a model and returns a number (one column value), a named vector (one column per name) or a tibble (its rows).

Usage

vp_history_apply(history, f, ...)

Arguments

history

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

f

A function of a model, such as vp_depth, or function(m) vp_gini(vp_feature_table(m)$required_by).

...

More arguments for f.

Value

A tibble with version and the columns of the answers.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_history_apply(history, vp_depth)
vp_history_apply(
  history,
  function(m) vp_gini(vp_feature_table(m)$required_by)
)

What changed at every step

Description

What changed at every step of a history (each version against the one before).

Usage

vp_history_changes(history)

Arguments

history

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

Value

The rows of vp_compare() for every step, with the columns from and to (the two versions) in front.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_history_changes(history)

The size of every version

Description

The size of every version of a history.

Usage

vp_history_sizes(history)

Arguments

history

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

Value

A tibble with version, features, core, dead, requires, excludes, atleastone, skeleton, primitive_conflicts, depth, implicit_requires and implicit_excludes.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_history_sizes(history)

Are the hubs the same from version to version?

Description

Are the hubs the same from one version to the next? For each step: the rank correlation of how many features require each kept feature, and how many of the top most required stay among the top most required.

Usage

vp_hub_stability(history, top = 50)

Arguments

history

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

top

How many of the most required features count as hubs.

Value

A tibble with step, from, to, spearman and top_kept.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_hub_stability(history, top = 5)

The igraph object of one graph

Description

The igraph object of one graph, for those who want to use igraph directly. The vertices are the variable features, in the same order in the three graphs, and each has the attribute name.

Usage

vp_igraph(model, graph = c("requires", "excludes", "atleastone"))

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

Value

An igraph object: directed for requires, undirected for the other graphs.

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
g <- vp_igraph(band, "excludes")
igraph::degree(g)

The arrows that follow from others, and through what

Description

The arrows of the requires graph that follow from others, with one feature through which each one passes.

Usage

vp_implied_requires(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns from, to and via: from requires via, and via requires to.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_implied_requires(band)

Parts of the model that no relationship ties together

Description

Independent parts: groups of features that no relationship ties to the rest (connected pieces of the three graphs taken together). As far as relationships between two features go, each part can be configured, and tested, on its own: a choice in one part never forces or forbids anything in another.

Usage

vp_independent_parts(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with part, size and feature, the largest parts first (a feature in no graph is a part alone).

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_independent_parts(band)

Combinations of two features a step made possible or impossible (and the tests they touch)

Description

The combinations of two features that a step made possible or impossible. Among the features that can vary in both versions, a combination of two features is possible exactly when no link forbids it (property P3), so a gained link forbids one combination and a lost link allows one: a lost "a requires b" allows "a without b", a lost conflict allows "a and b", a lost at-least-one line allows "neither". With a sample of configurations (the tests of the old version), in_sample counts the configurations that have the combination: a test with a combination now impossible is no longer valid; a combination now possible with in_sample 0 is a new interaction that no test exercises.

Usage

vp_interaction_changes(old, new, sample = NULL)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

sample

Optional: a data frame with one 0/1 (or FALSE/TRUE) column per feature, one row per configuration.

Value

A tibble with feature_1, value_1, feature_2, value_2 (TRUE = selected), change ("now possible" or "now impossible"), graph (the link that changed) and, with a sample, in_sample.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_interaction_changes(old, new)

The kernel: a small map for 'can these go together?'

Description

The kernel: the features grouped into classes that behave alike for the question "can these be together?". The class of the trouble-free features (they exclude nothing, by themselves or through what they bring) is marked. The same as the file __kernel_classes.txt of Strong4VM (vp_generate(kernel = TRUE)).

Usage

vp_kernel(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with class (a number), label (the first feature of the class), feature and trouble_free.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"))
vp_kernel(band)

Description

The links of the kernel between its classes: "requires" (a class brings another along) and "excludes" (a root conflict). The same as __kernel_requires.net and __kernel_excludes.net.

Usage

vp_kernel_links(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with from, link and to (class labels).

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"))
vp_kernel_links(band)

The most features without a conflict among them

Description

The largest set of features with no conflict among them. No product can have more variable features selected than this. Exact for small models; for large ones (more than exact_limit features) a quick greedy search gives a set that is as large as it could find, so the true largest set may be larger.

Usage

vp_largest_compatible_set(model, exact_limit = 60)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

exact_limit

Up to this number of variable features the search is exact; above it, a greedy search is used.

Value

A tibble with the column feature.

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_largest_compatible_set(band)

The most features that are pairwise free (all three graphs)

Description

The largest set of features that are pairwise free: for every two of them, the four combinations (both, only one, only the other, neither) all occur in valid products. The width counts features none of which requires another; this set also excludes conflicts and at-least-one lines, so it is the number of truly independent decisions, as far as pairs go.

Usage

vp_largest_free_set(model, exact_limit = 60)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

exact_limit

Up to this number of variable features the search is exact; above it, a greedy search gives a large free set, and the largest one may be larger.

Value

A tibble with the column feature.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_largest_free_set(band)

One such set

Description

One largest set of features none of which requires another.

Usage

vp_largest_unrelated_set(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the column feature (representatives of atomic sets).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_largest_unrelated_set(band)

Features that nothing needs

Description

Features that nothing needs (the leaves). They can be removed without breaking any other feature.

Usage

vp_leaves(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the column feature (representatives of atomic sets).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_leaves(band)

The layer of each feature

Description

The level of each feature: the length of the longest chain of requirements that starts from it. Level 0: it needs nothing; level 1: it needs only features of level 0; and so on.

Usage

vp_levels(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns feature and level, for every variable feature (the members of an atomic set share the level of their set).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_levels(band)

How features move between variable, core, dead, absent

Description

The life cycle of features: how often a feature in one state is in each state one version later, over the whole history.

Usage

vp_life_cycle(history)

Arguments

history

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

Value

A tibble with before, after, n (moves) and share (of the features that were in state before).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_life_cycle(history)

Description

How long new links last. A link is followed from the version in which it appears between two features that both existed before; the share still present is measured 1, 2, ... horizon versions later.

Usage

vp_link_lifetime(
  history,
  graph = c("excludes", "requires", "atleastone"),
  horizon = 5
)

Arguments

history

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

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

horizon

How many versions to follow each link.

Value

A tibble with age (versions after it appeared), followed (links that can be followed that far), still_present and share.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_link_lifetime(history, "requires", horizon = 2)

Description

The links of one graph as a tibble with the columns from and to.

Usage

vp_links(model, graph = c("requires", "excludes", "atleastone"))

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

graph

"requires" (from needs to), "excludes" (from and to never go together) or "atleastone" (every product has from or to). For the last two the order of the columns means nothing.

Value

A tibble with the columns from and to.

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_links(band, "requires")
vp_links(band, "excludes")

One longest chain

Description

One longest chain of requirements: each feature requires the next one.

Usage

vp_longest_chain(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns step and feature.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_longest_chain(band)

The longest chain of forced decisions (all three graphs)

Description

The longest chain of decisions: each decision forces the next, by a requirement, a conflict or an at-least-one line (the modal implication graph of vp_mig()). Decisions that force each other count as one step (for example "Screen left out" and "BT40 selected", which are opposites). It is the counterpart of the depth with the three graphs: how long the longest explanation of a forced decision can get, conflicts included.

Usage

vp_longest_decision_chain(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with step and decisions (the decisions of the step, written "A" for "A selected" and "not A" for "A left out", joined by " = " when they force each other). Its number of rows is the length of the chain; like the depth, it counts decisions, so a model whose features are all free has a chain of one.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_longest_decision_chain(band)

The modal implication graph: every implication between two decisions

Description

The modal implication graph (MIG): every implication between two decisions ("f selected" or "f left out") that the graphs give. It is the form of the graphs best suited to reasoning (the implication graph of the SAT literature; the modal implication graph of Krieter et al., restricted to what always holds): following its arrows from some decisions gives everything they force, which is what vp_consequences() does.

Usage

vp_mig(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Details

It reads the graphs it is given. On the complete graphs every implication is one arrow; on the minimal form (vp_mig(vp_minimal(model))) it is the compact MIG: far fewer arrows, and following them still reaches every implication (a conflict is inherited through the contrapositive of a requirement, an at-least-one line through requirements), with one node per atomic set. The compact one is the one to draw: vp_plot() draws a MIG directly, with nodes "A" and "not A" and each arrow in the colour of the link it comes from.

Value

A tibble with from, from_selected, to, to_selected and because ("requires", "excludes" or "atleastone"): deciding from as from_selected forces to to be to_selected.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_mig(vp_minimal(band))

A lower bound on the size of any covering sample

Description

A lower bound on the size of any t-wise sample: no sample that covers every combination can have fewer configurations. The bound is the size of the largest set of things to cover that are incompatible two by two (no configuration can contain two of them).

Usage

vp_min_sample_size(model, t = 1, max_features = 40, exact = NULL)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

t

1 or 2. For t = 2 the model must be small (the graph of pairs has about 2 n^2 nodes); max_features.

max_features

For t = 2, the largest number of variable features accepted.

exact

TRUE searches the largest such set exactly; FALSE uses a quick greedy search, whose bound is still valid but may be lower. By default (NULL): exact for t = 1, which is fast on the sparse graphs of real models, and for t = 2 only when the graph of pairs has at most 250 nodes (about 11 features), because there the exact search can take hours.

Value

A list-free tibble: one row per member of the incompatible set, with t, bound (the size) and item (a decision such as "A" or "not A" for t = 1; a pair of decisions for t = 2).

See Also

Other testing: vp_combinations_to_cover(), vp_coverage(), vp_pick_sample(), vp_sample_violations(), vp_uncovered()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_min_sample_size(band, t = 1)

The minimal form: what was written, roughly

Description

The minimal form of a model: the skeleton (arrows that do not follow from others), the primitive conflicts and, with or_graph = TRUE, the primitive at-least-one lines, with each atomic set as one node. It holds the same information as the complete graphs (vp_expand() gives them back), with far fewer links: close to what was written, while the complete graphs hold everything that follows.

Usage

vp_minimal(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Details

Measures (counts, degrees, densities, centralities, similarity, communities, comparisons between versions) read the graphs they are given, so on the minimal form they measure the written structure: vp_feature_table(vp_minimal(m)) counts direct requirements, and vp_compare() of two minimal forms compares what was written. Inferences (can these go together, coverage, explanations, the kernel...) always need the complete graphs: given a minimal form, they expand it first, so their answers do not change.

Value

A model with form "minimal"; its atomic sets are in sets (the members of each node).

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
mini <- vp_minimal(band)
mini
vp_links(mini, "requires")

The features whose selection decides the most

Description

The features whose selection decides the most (decision power). They describe the model; they are not necessarily the best questions to ask first, because the answer can be "no": the order that needs the fewest questions follows the entropy of each question (Heradio et al., Entropy 2014), which needs the probabilities of the features, beyond what the graphs give.

Usage

vp_most_decisive(model, n = 10)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

n

How many rows to return.

Value

The columns feature, decision_power, requires and excludes of vp_feature_table(), the n largest first.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_most_decisive(band, n = 5)

Alike in conflicts, different in requirements

Description

The odd ones out: pairs of features that are very alike in their conflicts but differ in what they require. Such a difference may be intended, or a sign of a missing rule: a question for whoever maintains the model.

Usage

vp_odd_ones(model, threshold = 0.6)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

threshold

How alike the conflicts must be (Jaccard, 0.6 by default).

Value

A tibble with feature_1, feature_2, conflict_similarity, requires_similarity and differs_in.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_odd_ones(band, threshold = 0.5)

Pairs of which every product has exactly one

Description

Opposites: pairs of features of which every product has exactly one. They exclude each other and every product has one of them, so one is selected exactly when the other is not. Atomic sets are features that are always equal; opposites are always different. Needs the at-least-one graph.

Usage

vp_opposites(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with feature_1 and feature_2.

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_opposites(band)

The four combinations of two features: which are possible

Description

Everything the graphs say about two features: which of the four combinations (both, only the first, only the second, neither) can occur in a valid product. For two features the answer is exact.

Usage

vp_pair(model, a, b)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

a

The name of a variable feature of the model.

b

The name of another variable feature of the model.

Value

A tibble with four rows: combination, a, b (TRUE = selected), possible and ruled_out_by. Without the at-least-one graph, the row "neither" has possible NA.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_pair(band, "BLEv40", "BT40")

Is this mix of selected and left-out features possible?

Description

Is a mix of decisions possible: some features selected and others left out? The graphs say what each decision forces; the mix is impossible when it forces a feature both in and out.

Usage

vp_partial_configuration(
  model,
  selected = character(0),
  deselected = character(0)
)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

selected

Features that the product must have.

deselected

Features that the product must not have.

Value

A list with possible (TRUE or FALSE) and explanation: a tibble with one row per feature that the decisions force both in and out, with feature, in_because and out_because (the decision that forces it in, and out: "your choice" when it is one of the decisions given, else the decision that forces it, "A" for "A selected" and "not A" for "A left out") and reason (the same, as a sentence). No rows when the mix is possible.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_partial_configuration(
  band,
  selected = "TouchScreen",
  deselected = "HeartRateSensor"
)

A small covering sample chosen from given configurations

Description

A small sample that covers every combination, chosen from configurations that you already have (for example, all the valid configurations of a small model, or the output of a sampling tool). It picks, again and again, the configuration that covers most of what is still uncovered. The result is small but not always the smallest.

Usage

vp_pick_sample(model, pool, t = 2)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

pool

Candidate configurations, in the format of a sample. They should be valid.

t

1 or 2.

Value

The rows of pool that were picked, in the order they were picked, with a column newly_covered.

See Also

Other testing: vp_combinations_to_cover(), vp_coverage(), vp_min_sample_size(), vp_sample_violations(), vp_uncovered()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
nodes <- with(vp_features(band), feature[status == "variable"])
# every selection of the variable features that breaks no link of the graphs
pool <- expand.grid(rep(list(0:1), length(nodes)))
names(pool) <- nodes
bad <- unique(vp_sample_violations(band, pool)$configuration)
pool <- pool[-bad, ]
vp_pick_sample(band, pool, t = 2)

Draw a model, some links or a feature tree

Description

Draws what vp_dot() describes: requirements as blue arrows (from the feature that requires to the one required), conflicts as dashed red lines and at-least-one lines as dotted green lines. A minimal form (vp_minimal()) is much easier to read than the complete graphs, which have an arrow for every consequence.

Usage

vp_plot(
  x,
  file = NULL,
  layout = c("dot", "neato", "fdp", "sfdp", "circo", "twopi"),
  engine = c("diagrammer", "graphviz"),
  width = NULL,
  height = NULL,
  ...
)

Arguments

x

What to draw; see vp_dot().

file

Where to save the drawing: a file ending in .svg, .pdf or .png. NULL: no file (with engine = "graphviz", a temporary PDF file).

layout

How the nodes are placed: "dot" (layers: best for requirements), "neato" and "fdp" (springs: best for conflicts), "sfdp" (springs, for large graphs; drawn as "fdp" by DiagrammeR), "circo" (a circle) or "twopi" (rings around a centre).

engine

"diagrammer" (the R packages DiagrammeR, DiagrammeRsvg and rsvg) or "graphviz" (the programs of Graphviz).

width, height

The size of the htmlwidget (any CSS size, or a number of pixels); NULL lets it fill the space.

...

More arguments of vp_dot(), such as graphs, features, highlight, fill or rankdir.

Details

By default the drawing is made by the package DiagrammeR, which includes its own copy of Graphviz: nothing needs to be installed outside R. Without file the result is an htmlwidget, which RStudio shows in its viewer and R Markdown puts in the document. With file the drawing is saved; SVG needs the package DiagrammeRsvg, and PDF or PNG also need rsvg. With engine = "graphviz" the drawing is made by the programs of Graphviz, if it is installed (they are looked for in getOption("variplex.graphviz"), the variable GRAPHVIZ, the PATH and the usual folders), and always saved to a file.

Value

Without file and with DiagrammeR, an htmlwidget. With file, the path of the file, invisibly.

See Also

vp_dot() for the source of the drawing and the meaning of its arguments.

Other drawing: vp_dot(), vp_dot_compare(), vp_plot_compare()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
if (requireNamespace("DiagrammeR", quietly = TRUE)) {
  vp_plot(vp_minimal(band))
  vp_plot(vp_minimal(band), graphs = "excludes", layout = "neato")
  vp_plot(vp_feature_tree(band))
}

if (requireNamespace("DiagrammeRsvg", quietly = TRUE)) {
  file <- vp_plot(vp_minimal(band), file = tempfile(fileext = ".svg"))
  file.exists(file)
}


Draw what changed between two versions

Description

Draws what changed between two versions in one graph: links kept (grey), gained (thick, in the colour of their graph) and lost (dashed orange); features added (yellow) and removed (white, dashed border). By default only the features touched by a change are drawn, and the minimal forms are compared, so that the drawing shows what was written (an atomic set is drawn as requirements both ways between its features, so that a feature joining or leaving a set shows). The drawing is made as in vp_plot().

Usage

vp_plot_compare(
  old,
  new,
  file = NULL,
  graph = c("requires", "excludes", "atleastone"),
  minimal = TRUE,
  context = TRUE,
  layout = c("dot", "neato", "fdp", "sfdp", "circo", "twopi"),
  engine = c("diagrammer", "graphviz"),
  rankdir = "BT",
  max_nodes = 400,
  width = NULL,
  height = NULL
)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

file

Where to save the drawing: a file ending in .svg, .pdf or .png. NULL: no file (with engine = "graphviz", a temporary PDF file).

graph

The graph to compare: "requires", "excludes" or "atleastone".

minimal

Compare the minimal forms (TRUE) or the complete graphs (FALSE: every consequence, often a tangle).

context

TRUE: only the features with a gained or lost link, and those added or removed; FALSE: all.

layout

How the nodes are placed: "dot" (layers: best for requirements), "neato" and "fdp" (springs: best for conflicts), "sfdp" (springs, for large graphs; drawn as "fdp" by DiagrammeR), "circo" (a circle) or "twopi" (rings around a centre).

engine

"diagrammer" (the R packages DiagrammeR, DiagrammeRsvg and rsvg) or "graphviz" (the programs of Graphviz).

rankdir

The direction of the layers: "BT" puts the features that are required at the top, "TB" at the bottom, "LR" and "RL" left to right and right to left.

max_nodes

Refuse to draw more nodes than this: compare a part instead, with vp_subset() on both versions.

width, height

The size of the htmlwidget (any CSS size, or a number of pixels); NULL lets it fill the space.

Value

Without file and with DiagrammeR, an htmlwidget. With file, the path of the file, invisibly.

See Also

Other drawing: vp_dot(), vp_dot_compare(), vp_plot()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"))
new <- vp_generate(vp_example("miband3_realized.uvl"))
if (requireNamespace("DiagrammeR", quietly = TRUE)) {
  vp_plot_compare(old, new)
}

Does a degree distribution follow a power law?

Description

A formal test of whether a degree distribution follows a power law (Clauset et al.). A small p-value (below 0.1) rejects the power law. Test the skeleton: in the complete graph, any deep hierarchy gives a long tail by itself.

Usage

vp_power_law(model, graph = c("skeleton", "requires", "excludes"), seed = 1)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

seed

The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.

Value

One row: graph, features (with a degree above 0), alpha, xmin, p_value and verdict. The p-value comes from a simulation; seed makes it repeatable.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_robustness(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples


bb <- vp_generate(vp_example("busybox_01.uvl"))
vp_power_law(bb)


One row per feature and version, for predictions

Description

One row per feature and version, with measures taken in that version (the predictors) and what happened to the feature afterwards (the outcomes): the table that a prediction model learns from.

Usage

vp_prediction_table(history, horizon = 3)

Arguments

history

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

horizon

How many versions ahead gone_later looks.

Value

A tibble with version, feature, age (versions since it could first vary), the measures required_by, requires, excludes, level, direct_dependants, betweenness, and the outcomes gone_next (absent in the next version), gone_later (absent horizon versions later; NA near the end) and new_dependants (new features that require it directly in the next version).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_prediction_table(history, horizon = 2)

The at-least-one lines from which all others follow

Description

The primitive at-least-one lines: those that do not follow from another one. "Every product has f or g" and "g requires h" give "every product has f or h": at-least-one lines are inherited upwards, the mirror image of conflicts. The same as the file __atleastone_primitive.net of Strong4VM (vp_generate(or_graph = TRUE)).

Usage

vp_primitive_atleastone(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with from and to (atomic sets as their representative).

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_conflicts(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_primitive_atleastone(band)

The conflicts from which all others follow

Description

The primitive conflicts: the conflicts that are not inherited through a requirement. Every other conflict follows from one of them. The same as the file __excludes_primitive.net of Strong4VM.

Usage

vp_primitive_conflicts(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with from, to and reach: how many conflicts of the excludes graph (atomic sets counted as one feature) this primitive conflict produces, itself included.

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_requires_from_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_primitive_conflicts(band)

Read the files of one run of Strong4VM

Description

Read the results of one run of Strong4VM.

Usage

vp_read(
  prefix,
  name = NULL,
  artificial = c("keep", "drop"),
  translator = c("kmax", "kconfigreader"),
  form = c("complete", "minimal")
)

Arguments

prefix

The path of the files without their ending, e.g. "out/miband3_realized" (the part before "__").

name

A short name for the model, used in tables; by default the last part of the prefix.

artificial

What to do with nodes whose names look like helper variables of a translation ("k!12", "__VISIBILITY__X", "<unsupported>"): "keep" (default) or "drop". Strong4VM 2.0 already drops them; "drop" is for the graphs of version 1, such as those of the Zenodo dataset.

translator

With artificial = "drop": "kmax" (default) or "kconfigreader", whose formulas have two more kinds of helper variable: CHOICE_n (one per choice group) and X_MODULE ("X is built as a module", dropped only when X exists).

form

"complete" (default) reads the complete graphs; "minimal" reads the minimal form that Strong4VM writes beside them (__requires_skeleton.net, __excludes_primitive.net, __atleastone_primitive.net): see vp_minimal().

Value

A model: a list with the tibbles features, requires, excludes, atleastone (NULL when the run had no or_graph = TRUE) and atomic, plus variables and summary when the run wrote them.

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

prefix <- vp_generate(vp_example("miband3.uvl"), read = FALSE)
band <- vp_read(prefix)
band
vp_read(prefix, form = "minimal")

Read several runs: the versions of a model

Description

Read a whole history: one run of Strong4VM per version of a model.

Usage

vp_read_history(prefixes, versions = NULL, ...)

Arguments

prefixes

The prefixes of the runs, oldest first.

versions

Names for the versions (by default, the names of the runs). Keep them in order: the functions of evolution.R compare each version with the one before it.

...

Passed to vp_read(), e.g. artificial = "drop".

Value

A tibble with one row per version: version (a factor that keeps the order) and model (a list column).

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_uvl_tree(), vp_representativeness(), vp_subset()

Examples

gens <- c("miband1", "miband2", "miband3")
prefixes <- vapply(
  vp_example(paste0(gens, "_realized.uvl")),
  vp_generate,
  "",
  read = FALSE
)
vp_read_history(prefixes, versions = gens)

The feature tree of a UVL model

Description

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.

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_representativeness(), vp_subset()

Examples

vp_read_uvl_tree(vp_example("miband3.uvl"))

Written requirements that follow from others

Description

Candidate redundant constraints: written requirements ("a requires b") that follow from a chain of other requirements. Give the constraints of the model that you want to examine; each one that is not in the skeleton is implied by others, and a solver can confirm that removing it changes nothing.

Usage

vp_redundant_candidates(model, written)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

written

A tibble with from and to: written requirements of the model.

Value

The rows of written with in_graphs (the arrow holds), redundant (it follows from others) and via.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_skeleton(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
written <- data.frame(
  from = c("TouchScreen", "TouchScreen"),
  to = c("Screen", "OLED")
)
vp_redundant_candidates(band, written)

Rename features of a model

Description

Features are matched by name when two versions are compared, so a feature that changed its name looks like one removed and one added, and its links drop out of the comparison. vp_rename() gives the features of a version the names they have in the other one, before comparing (it does what the option --rename of the command ⁠strong4vm diff⁠ does). vp_rename_candidates() suggests the renames.

Usage

vp_rename(model, renames)

Arguments

model

A model, from vp_generate() or vp_read().

renames

The renames: a named character vector (c(old = "new")), a data frame with the columns old and new (such as the answer of vp_rename_candidates()), or the path of a file with one rename per line (the old name, a space, the new name; a tab instead of the space when a name has spaces; lines that start with ⁠#⁠ and empty lines are ignored), such as the file that vp_rename_candidates() writes.

Value

The model with the features renamed in its features, graphs and atomic sets. A rename whose old name is not a feature of the model changes nothing, with a warning.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned_old.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_compare(old, new) # BLEv40Old and BLEv40 look different
vp_compare(vp_rename(old, c(BLEv40Old = "BLEv40")), new)

Features that were probably renamed

Description

Features that may have been renamed between two versions. Features are matched by name, so a renamed feature looks like one removed and one added. This function pairs each removed feature with the added feature whose links to the kept features are most alike (Jaccard index of their typed neighbours), one to one (a maximum matching). With file, the pairs whose names are alike too (name_similarity >= name_threshold) are written to it, one ⁠old<tab>new⁠ per line, ready for vp_rename() (and for the command ⁠strong4vm diff --rename⁠).

Usage

vp_rename_candidates(
  old,
  new,
  threshold = 0.5,
  file = NULL,
  name_threshold = 0.7
)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

threshold

The smallest similarity (of the links) to report.

file

A file to write the accepted renames to; NULL (the default) writes nothing.

name_threshold

The smallest name_similarity of a pair written to file.

Value

A tibble with old, new, similarity (of their links, 1 = the same) and name_similarity (of the names, 1 = equal), the most similar first.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_ripple(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_rename_candidates(old, new, threshold = 0.3)

The share of the configurations the graphs allow that are valid (GANAK)

Description

How much of the model the graphs leave out, as Strong4VM measured it with the model counter GANAK (run with vp_generate(representativeness = TRUE)). The graphs allow some configurations of the features that are not valid, because they hold no rule over three or more features: vm_configurations is the number of valid configurations of the variability model, graph_configurations the number of configurations of the same features that break no link of the graphs, and share = vm_configurations / graph_configurations (1: the graphs say everything that the model says about its features).

Usage

vp_representativeness(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

One row: vm_configurations, graph_configurations (numbers; very large ones are approximate, since R keeps about 15 digits; the exact values are in __summary.json), share, left_out (1 - share) and note (empty, or why the values are NA).

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_subset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_representativeness(band) # NA: the run did not count with GANAK

if (nzchar(Sys.which("ganak"))) {
  counted <- vp_generate(
    vp_example("miband3.uvl"),
    representativeness = TRUE
  )
  vp_representativeness(counted)
}


What requires a feature (its impact set)

Description

The features that require a given feature: its impact set. Changing or removing the feature affects all of them.

Usage

vp_required_by(model, feature)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

feature

The name of a variable feature of the model.

Value

A tibble with the column feature.

See Also

Other features: vp_atleastone_of(), vp_conflicts_of(), vp_feature_table(), vp_genuine_hubs(), vp_requirements(), vp_warning_zone()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_required_by(band, "Screen")

What a feature requires

Description

The features that a given feature requires: selecting it selects all of them.

Usage

vp_requirements(model, feature)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

feature

The name of a variable feature of the model.

Value

A tibble with the column feature.

See Also

Other features: vp_atleastone_of(), vp_conflicts_of(), vp_feature_table(), vp_genuine_hubs(), vp_required_by(), vp_warning_zone()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_requirements(band, "TouchScreen")

Requirements explained by a conflict and an at-least-one line

Description

Requirements that follow from a conflict and an at-least-one line: if f excludes g, and every product has g or h, then f requires h. The skeleton keeps such an arrow when no chain of arrows explains it; with the three graphs it is explained after all. Needs the at-least-one graph.

Usage

vp_requires_from_conflicts(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with one row per arrow between different atomic sets that has such an explanation: from, to, via (one g) and in_skeleton (TRUE when no chain of arrows explains it: only this route does).

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_twins()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_requires_from_conflicts(band)

How many consequences each written change had

Description

The ripple of each step: how many links of the complete graphs changed for each link of the minimal form (what was written, roughly) that changed. A ripple of 10 means that each written change had, on average, ten consequences: features far from the edit gained or lost dependencies or conflicts. Count the graphs together (the default): a written requirement also makes conflicts, which are inherited downwards (property P2).

Usage

vp_ripple(history, by_graph = FALSE)

Arguments

history

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

by_graph

FALSE: one row per step, the graphs added up; TRUE: one row per step and graph.

Value

A tibble with step, from, to, (graph,) written_gained, written_lost (in the minimal forms), gained, lost (in the complete graphs) and ripple (complete changes over written changes; NA when nothing written changed).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_state_moves(), vp_top_movers(), vp_version_distance()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_ripple(history)

How the skeleton falls apart when hubs are removed

Description

Robustness: remove the most required features one at a time and see how much of the skeleton survives. With strategy = "random" the features are removed at random instead, which gives the baseline.

Usage

vp_robustness(model, steps = 5, strategy = c("hubs", "random"), seed = 1)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

steps

How many features to remove.

strategy

"hubs" removes the most required features first; "random" removes them at random (the baseline).

seed

The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.

Value

A tibble with removed (how many), feature (the one removed at that step), links_left (arrows of the skeleton among the remaining features) and largest_piece (features in the largest connected piece).

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_similar_features(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_robustness(band, steps = 3)

A safe order for asking about features, in rounds

Description

A safe order for asking about the features, in rounds: round 1 asks about the features that need nothing, round 2 about those that need only features of round 1, and so on. Nobody is asked about a feature before everything it requires has been decided, and no order of this kind has fewer rounds (Mirsky's theorem).

Usage

vp_rounds(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with round and feature.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_rounds(band)

Configurations of a sample that break a link

Description

Configurations of a sample that break a link of the graphs. Such a configuration is not valid (or the graphs are wrong). A configuration that breaks no link can still be invalid, because of a rule over three or more features.

Usage

vp_sample_violations(model, sample)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

sample

A sample of configurations: a data frame with one row per configuration and one column per variable feature, holding 0/1 or FALSE/TRUE (other columns are ignored).

Value

A tibble with configuration (the row number), rule and features.

See Also

Other testing: vp_combinations_to_cover(), vp_coverage(), vp_min_sample_size(), vp_pick_sample(), vp_uncovered()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
nodes <- with(vp_features(band), feature[status == "variable"])
sample <- as.data.frame(matrix(
  c(1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1),
  nrow = 2,
  dimnames = list(NULL, nodes)
))
vp_sample_violations(band, sample)

Features most alike in one graph

Description

The features most alike a given one in one graph (Jaccard similarity of their neighbours: 1 for the same neighbours, 0 for none in common).

Usage

vp_similar_features(
  model,
  feature,
  graph = c("excludes", "requires", "atleastone")
)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

feature

The name of a variable feature of the model.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

Value

A tibble with feature and similarity, the most similar first.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_triangle_significance(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_similar_features(band, "BLEv40")

The arrows that do not follow from others

Description

The skeleton of the requires graph: the arrows that do not follow from a chain of other arrows (its transitive reduction). Each atomic set appears once, under its representative. It is the same as the file __requires_skeleton.net of Strong4VM.

Usage

vp_skeleton(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with the columns from and to.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_tree_agreement(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_skeleton(band)

The independent parts of what is left after some decisions

Description

What is left to decide after some decisions, and how it splits: the independent parts of the features that the decisions do not settle. A few decisions taken first, together, can cut a model that is one piece into parts that teams can then decide apart.

Usage

vp_split_after(model, selected = character(0), deselected = character(0))

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

selected, deselected

The decisions taken first (as in vp_consequences()).

Value

A tibble with part, size and feature (as vp_independent_parts()) over the undecided features; its attribute "decided" lists the features the decisions settle.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_split_after(band, selected = "BT40")

Single decisions that split the model most, taken before the teams start

Description

Single decisions that split the model most: for each candidate feature, selected and left out, how many features the decision settles and the size of the largest part left (vp_split_after()). The best decisions to take first, together, before the teams start. Every variable feature can be selected and can be left out, so each decision is possible.

Usage

vp_splitting_decisions(model, candidates = NULL)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

candidates

The features to try; by default all of them up to 200 features, else the 50 with most links.

Value

A tibble with feature, decision ("selected" or "left out"), decided, parts and largest_part; the smallest largest part first. Its attribute "largest_before" is the largest independent part with no decision.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_team_links(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_splitting_decisions(band)

Features that appeared, disappeared or changed status

Description

Features that appeared, disappeared or changed status between two versions.

Usage

vp_state_moves(old, new)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

Value

A tibble with feature, before and after, each "variable", "core", "dead" or "absent".

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_top_movers(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_state_moves(old, new)

Focus on part of a model (exact: no solver needed)

Description

Focus on part of a model: keep only some features, with the links among them. Whether two features are related does not depend on the other features, so the result is exactly the graphs of the model restricted to that part (property P3 of the future-work report): no solver has to run again.

Usage

vp_subset(model, features, name = paste0(model$name, " (part)"))

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

features

The variable features to keep (for example those of one subsystem, chosen by name with grepl()).

name

A name for the part.

Value

A model, like that of vp_read(), with only those features (core and dead features are kept in its list).

See Also

Other reading: vp_classify(), vp_example(), vp_expand(), vp_features(), vp_functions(), vp_generate(), vp_history(), vp_igraph(), vp_links(), vp_minimal(), vp_read(), vp_read_history(), vp_read_uvl_tree(), vp_representativeness()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
part <- vp_subset(band, c("Screen", "TouchScreen", "BT40", "BLEv40"))
vp_links(part, "excludes")

One row of numbers per model

Description

One row of numbers that describe a model. Give one model, or several (they are stacked, one row each).

Usage

vp_summary(...)

Arguments

...

One or more models (from vp_read). Named arguments give the column model its values.

Details

The counts, densities, concentrations, isolated and coupling read the graphs as they are given (on the minimal form, vp_minimal(), they describe the written structure); the other numbers are inferences and use the complete graphs.

Value

A tibble with one row per model and the columns model, features (variable), core, dead, atomic_sets, requires, excludes, atleastone (NA without or_graph = TRUE), skeleton (arrows), primitive_conflicts, implicit_requires (share of arrows that follow from others), implicit_excludes (share of conflicts that are inherited), density_requires, density_excludes, depth, width, cross_tree_share, hierarchy_share, gini_required_by, gini_excludes, mean_decision_power, isolated (features in no graph), coupling (share of features with at least one strong relationship), skeleton_per_feature (links of the skeleton per node: density by meaning), largest_atomic_set (the size of the largest group of mutually dependent features, Baldwin et al.'s "core"), largest_alternative_group, representativeness (the share of vp_representativeness(), NA when the run did not measure it).

See Also

Other whole model: vp_check(), vp_degree_distribution(), vp_gini()

Examples

band <- vp_generate(vp_example("miband3.uvl"))
axtls <- vp_generate(vp_example("axTLS.uvl"))
vp_summary(band = band, axTLS = axtls)

Description

The links between teams: every link of the graphs whose two features belong to different teams. Each one is a place where a decision of one team forces, forbids or needs a decision of another. A measure: on the complete graphs it lists every pair of features of two teams that constrain each other; on the minimal form, roughly what was written between them.

Usage

vp_team_links(model, teams)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

teams

A tibble with feature and team, or a named character vector (feature = team).

Value

A tibble with from, from_team, link ("requires": from requires to; "excludes"; "atleastone") , to and to_team.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_moves(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
teams <- c(
  Screen = "display",
  TouchScreen = "display",
  OLED = "display",
  CapacityButton = "display",
  ContactlessPayment = "payments",
  NFC = "payments",
  MovementFilter = "sensors",
  HeartRateSensor = "sensors",
  BLEv40 = "radio",
  BLEv42 = "radio",
  BT40 = "radio"
)
vp_team_links(band, teams)

Features with more links to another team than to their own

Description

Features that sit better in another team: those with more links to some other team than to their own. Moving one removes links between teams (its links to the other team become inside links, those to its own team become outside links). A candidate for a person to judge: who knows the feature matters more than where its links go.

Usage

vp_team_moves(model, teams)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

teams

The team of each feature: a tibble with the columns feature and team, or a named character vector (feature = team).

Value

A tibble with feature, team, links_own (links to features of its own team), better_team and links_better; the largest gains first.

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_order(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
teams <- c(
  Screen = "display",
  TouchScreen = "display",
  OLED = "display",
  CapacityButton = "display",
  ContactlessPayment = "payments",
  NFC = "payments",
  MovementFilter = "sensors",
  HeartRateSensor = "sensors",
  BLEv40 = "radio",
  BLEv42 = "radio",
  BT40 = "radio"
)
vp_team_moves(band, teams)

In which order teams decide, which decide together, which must agree

Description

In which order the teams should decide. A team waits for another when one of its features requires a feature of the other: the requirement is decided first, as in vp_rounds(). Teams that wait for each other (directly or through others) must decide together. Conflicts and at-least-one lines between teams have no right order: whoever decides first narrows what the other can choose, so those teams must agree.

Usage

vp_team_order(model, teams)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

teams

The team of each feature: a tibble with the columns feature and team, or a named character vector (feature = team).

Value

A tibble with team, round (round 1 waits for nobody), waits_for, decide_together_with and must_agree_with (team names separated by commas; "" for none).

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_teams()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
teams <- c(
  Screen = "display",
  TouchScreen = "display",
  OLED = "display",
  CapacityButton = "display",
  ContactlessPayment = "payments",
  NFC = "payments",
  MovementFilter = "sensors",
  HeartRateSensor = "sensors",
  BLEv40 = "radio",
  BLEv42 = "radio",
  BT40 = "radio"
)
vp_team_order(band, teams)

How independent each team is: links inside and outside, features it decides alone

Description

How much each team depends on the others: its features, the links inside it and towards other teams, how many teams it is linked to, and how many of its features are free (no link to another team: the team decides them alone). A measure, like vp_team_links().

Usage

vp_teams(model, teams)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

teams

The team of each feature: a tibble with the columns feature and team, or a named character vector (feature = team).

Value

A tibble with team, features, links_inside, links_outside, teams_linked, free_features and free_share (free features / features).

See Also

Other configuration: vp_can_go_together(), vp_consequences(), vp_count_graph_products(), vp_kernel(), vp_kernel_links(), vp_mig(), vp_most_decisive(), vp_pair(), vp_partial_configuration(), vp_rounds(), vp_split_after(), vp_splitting_decisions(), vp_team_links(), vp_team_moves(), vp_team_order()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
teams <- c(
  Screen = "display",
  TouchScreen = "display",
  OLED = "display",
  CapacityButton = "display",
  ContactlessPayment = "payments",
  NFC = "payments",
  MovementFilter = "sensors",
  HeartRateSensor = "sensors",
  BLEv40 = "radio",
  BLEv42 = "radio",
  BT40 = "radio"
)
vp_teams(band, teams)

The features whose links changed most

Description

The features whose links changed most between two versions: where to start explaining a big change.

Usage

vp_top_movers(
  old,
  new,
  graph = c("requires", "excludes", "atleastone"),
  n = 10
)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

n

How many rows to return.

Value

A tibble with feature, gained, lost and total, the largest changes first.

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_version_distance()

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_top_movers(old, new, "excludes", n = 5)

Does the declared tree hide layers of requirements?

Description

How far the declared tree is from the meaning. For each feature whose declared parent is in the graphs: does the feature require its parent directly (the parent is one of its direct requirements in the skeleton), or do other features stand in between (it requires something that requires the parent)? Features in between mean that the tree hides a layer of the hierarchy: a "hierarchy violation" by meaning (Berger and Guo).

Usage

vp_tree_agreement(model, tree)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

tree

The feature tree of the model, from vp_read_uvl_tree().

Value

A tibble with feature, parent, direct (TRUE/FALSE) and in_between (the features between them).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_upset(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
tree <- vp_read_uvl_tree(vp_example("miband3.uvl"))
vp_tree_agreement(band, tree)

Which kinds of triangle occur more, or less, often than by chance

Description

Which kinds of triangle occur more, or less, often than by chance? The triangles are counted on the minimal form (the skeleton and the primitive conflicts), where each link is close to one decision of whoever wrote the model. Chance is a model of the same shape: the skeleton is shuffled keeping how many direct requirements and dependants each feature has, and the order of its features (so that no cycle appears), and the primitive conflicts are shuffled keeping how many conflicts each feature has, independently of the requirements. A kind that is far more frequent in the real model than in the shuffled ones is a modelling idiom (a "network motif"); far less frequent, an anti-motif.

Usage

vp_triangle_significance(model, runs = 100, seed = 1)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

runs

How many shuffled models to build.

seed

The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.

Value

A tibble with kind, observed, random_mean, random_sd, z ((observed - mean) / sd; NA when the shuffled models never vary), p_more (the share of shuffled models with at least as many) and p_fewer (at most as many). The attribute "runs" says how many shuffles were kept (a shuffle of the conflicts that repeats a line is thrown away).

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangles()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_triangle_significance(band, runs = 20)

The four kinds of triangle

Description

The four kinds of triangle: three features all related to one another, by requirement (in either direction) or by conflict. Each kind is a modelling idiom. A fifth pattern must never occur: a feature that requires two features that exclude each other (it would be dead).

Usage

vp_triangles(model, minimal = FALSE)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

minimal

TRUE to count on the skeleton and the primitive conflicts, which drops the triangles that are mere consequences of others.

Value

A tibble with kind, meaning and count.

See Also

Other patterns: vp_baseline(), vp_communities(), vp_compare_groupings(), vp_coreness(), vp_cut_features(), vp_feature_groups(), vp_independent_parts(), vp_odd_ones(), vp_power_law(), vp_robustness(), vp_similar_features(), vp_triangle_significance()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_triangles(band)

Features that behave identically

Description

Twins: features with exactly the same requirements, dependants and conflicts (and at-least-one links). For the graphs they are interchangeable. "alternatives" exclude each other; "extras" do not.

Usage

vp_twins(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

A tibble with group, kind and feature.

See Also

Other conflicts: vp_alternative_groups(), vp_candidate_groups(), vp_colouring(), vp_conflict_cover(), vp_explain_conflict(), vp_explain_requires(), vp_largest_compatible_set(), vp_opposites(), vp_primitive_atleastone(), vp_primitive_conflicts(), vp_requires_from_conflicts()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_twins(band)

Which combinations a sample misses

Description

The combinations of two features that are possible but that the sample does not have.

Usage

vp_uncovered(model, sample)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

sample

A sample of configurations: a data frame with one row per configuration and one column per variable feature, holding 0/1 or FALSE/TRUE (other columns are ignored).

Value

A tibble with feature_1, value_1, feature_2, value_2 (TRUE = selected).

See Also

Other testing: vp_combinations_to_cover(), vp_coverage(), vp_min_sample_size(), vp_pick_sample(), vp_sample_violations()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
nodes <- with(vp_features(band), feature[status == "variable"])
sample <- as.data.frame(matrix(
  c(1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1),
  nrow = 2,
  dimnames = list(NULL, nodes)
))
head(vp_uncovered(band, sample))

What some features bring along

Description

What some features need: the features themselves and every feature they require (their "up-set").

Usage

vp_upset(model, features)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

features

One feature or several.

Value

A tibble with the columns feature and brought_by (the first given feature that brings it; a given feature is brought by itself).

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_width()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_upset(band, "TouchScreen")

How far apart every two versions are

Description

How far apart every two versions are: the Jaccard similarity of one graph among the features that can vary in both (the measure of vp_compare()), for every pair of versions, not only consecutive ones. A version much closer to an older one than to the one just before it reverted a change.

Usage

vp_version_distance(history, graph = c("requires", "excludes", "atleastone"))

Arguments

history

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

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

Value

A tibble with from, to (every pair, the older first), kept, jaccard and distance (1 - jaccard).

See Also

Other evolution: vp_attachment(), vp_auc(), vp_changed_links(), vp_co_change(), vp_community_history(), vp_compare(), vp_disruptions(), vp_edit_type(), vp_eras(), vp_feature_churn(), vp_feature_states(), vp_flip_flops(), vp_forecast_size(), vp_growth(), vp_history_apply(), vp_history_changes(), vp_history_sizes(), vp_hub_stability(), vp_interaction_changes(), vp_life_cycle(), vp_link_lifetime(), vp_prediction_table(), vp_rename(), vp_rename_candidates(), vp_ripple(), vp_state_moves(), vp_top_movers()

Examples

gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
  vp_example(paste0(gens, "_realized.uvl")),
  versions = gens,
  or_graph = TRUE
)
vp_version_distance(history)

Features both highly required and highly dependent

Description

The warning zone: features that are among the most required and, at the same time, among those that require most. Many things break when they change, and many things can break them.

Usage

vp_warning_zone(model, top = 0.1)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

top

The share of features that counts as "among the most" (0.1: the top tenth).

Value

The rows of vp_feature_table() of the features in the zone.

See Also

Other features: vp_atleastone_of(), vp_conflicts_of(), vp_feature_table(), vp_genuine_hubs(), vp_required_by(), vp_requirements()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_warning_zone(band, top = 0.3)

The largest number of features none of which requires another

Description

The width of the model: the largest number of features none of which requires another (atomic sets count as one). By Dilworth's theorem it is also the smallest number of chains that cover all the features.

Usage

vp_width(model)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

Value

An integer.

See Also

Other hierarchy: vp_atomic_sets(), vp_chains(), vp_common_dependants(), vp_common_requirements(), vp_depth(), vp_downset(), vp_false_optional(), vp_feature_tree(), vp_foundations(), vp_implied_requires(), vp_largest_free_set(), vp_largest_unrelated_set(), vp_leaves(), vp_levels(), vp_longest_chain(), vp_longest_decision_chain(), vp_redundant_candidates(), vp_skeleton(), vp_tree_agreement(), vp_upset()

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_width(band)