product:configure

Interactive SPL feature configurator with constraint propagation and formal validation.


Table of contents

  1. Usage
  2. Description
    1. What it does
  3. Constraint propagation
    1. Visual feedback
  4. Example output
  5. Version resolution
  6. Validation
  7. Requirements
  8. UVL alignment
  9. See also

Usage

splent product:configure

No options – the command is fully interactive.


Description

product:configure reads the UVL model from the SPL catalog, walks the entire feature tree interactively, and writes the resulting feature selection to the product’s pyproject.toml.

The configurator respects all UVL group semantics:

Group type Semantics Prompt style
mandatory Always selected Auto-selected, no prompt
optional User’s choice Yes/no confirmation
alternative Exactly one from N Numbered list, pick one
or One or more from N Yes/no per child, minimum enforced
cardinality [n..m] from N Yes/no per child, min/max enforced

What it does

  1. Loads the UVL model via Flamapy from splent_catalog/<spl_name>/<spl_name>.uvl
  2. Computes mandatory features from the root down
  3. Walks the feature tree recursively, prompting for selections per group type
  4. Propagates constraints in real-time (implications, exclusions, parent-chain activation)
  5. Shows auto-selected and blocked features as propagation resolves them
  6. Validates the final configuration against the UVL model (SAT check via Flamapy)
  7. Clears existing feature entries and symlinks
  8. Resolves versions from cache or PyPI
  9. Writes the new feature list to [tool.splent.features] in pyproject.toml

Constraint propagation

The configurator propagates constraints after every user selection:

Rule Direction Example
A selected and A => B Forward Selecting confirmemail auto-selects auth
Child selected => parent selected Forward Selecting a leaf activates its ancestor chain
Parent selected => mandatory children Forward Selecting a group parent adds mandatory children
A selected and A excludes B Exclusion Selecting filesystem_session blocks redis_session
B excluded and A => B Contrapositive If auth is blocked, anything that requires auth is also blocked

The propagation runs in a fixed-point loop until no more changes occur.

Visual feedback

During configuration, the command shows real-time feedback:

    Optional features:

    Include admin? (requires: + auth)  [y/N]: y
      ↳ auth  (auto-selected)

    Include session_filesystem?  [y/N]: n
    Include session_redis?  [y/N]: y
      ↳ redis  (auto-selected)

Blocked features are shown in red and cannot be selected:

    ✗ session_filesystem  (blocked by constraint)

Example output

  SPL Configurator -- sample_splent_spl
  ───────────────────────────────────────────────────────

  Mandatory (auto-selected):
    ✓ auth
    ✓ public

  WebFramework  (pick exactly one)
    1) flask
    2) django (blocked by constraint)
  Select [1-2]: 1
  → flask

  Optional features:

  Include admin? (requires: + auth)  [y/N]: y
  Include mail?  [y/N]: y
  Include confirmemail? (requires: auth ✓)  [y/N]: y
  Include profile? (requires: auth ✓)  [y/N]: y
  Include redis?  [y/N]: y
  Include session_redis? (requires: + redis)  [y/N]: y

  ─── Configuration ───

    ✓ auth  (mandatory)
    ✓ public  (mandatory)
    ✓ admin
    ✓ confirmemail
    ✓ mail
    ✓ profile
    ✓ redis
    ✓ session_redis
    · session_filesystem

  Validating configuration... satisfiable

  Apply this configuration? (attach features to product) [y/N]: y

    splent-io/splent_feature_auth@v1.5.3
    splent-io/splent_feature_public@v1.5.2
    splent-io/splent_feature_admin@v1.0.1
    splent-io/splent_feature_confirmemail@v1.2.10
    splent-io/splent_feature_mail@v1.3.2
    splent-io/splent_feature_profile@v1.5.2
    splent-io/splent_feature_redis@v1.5.2
    splent-io/splent_feature_session_redis@v1.0.1

  Configuration applied.

  Next: download and link features with:
     splent product:resolve

Version resolution

When applying the configuration, the command resolves a version for each selected feature:

  1. Cache first – looks in .splent_cache/features/<org>/ for the highest versioned directory
  2. PyPI fallback – queries pip index versions <package> if not cached
  3. Editable – if no version is found, the feature is written without a version (editable mode)

Validation

Before applying, the configuration is validated with Flamapy’s SAT solver against the full UVL model. If the configuration is unsatisfiable (e.g., conflicting constraints), the command reports the error and exits without writing.


Requirements

  • SPLENT_APP must be set (a product must be selected)
  • [tool.splent].spl must be set in the product’s pyproject.toml
  • The SPL must exist in splent_catalog/ with a valid UVL file
  • Flamapy must be installed (pip install flamapy)

UVL alignment

The configurator is aligned with the UVL specification (Benavides et al., JSS 2025):

UVL concept Implementation
Table 1: group semantics mandatory, optional, alternative, or, cardinality
Fig. 4-5: metamodel SPLModel, SPLFeature, SPLGroup
Fig. 7-9: cross-tree constraints implies, excludes, equivalence (A <=> B)
Section 5.2: feature cardinality Recognised and displayed; clone semantics not yet implemented

See also


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es