product:configure
Interactive SPL feature configurator with constraint propagation and formal validation.
Table of contents
- Usage
- Description
- Constraint propagation
- Example output
- Version resolution
- Validation
- Requirements
- UVL alignment
- 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
- Loads the UVL model via Flamapy from
splent_catalog/<spl_name>/<spl_name>.uvl - Computes mandatory features from the root down
- Walks the feature tree recursively, prompting for selections per group type
- Propagates constraints in real-time (implications, exclusions, parent-chain activation)
- Shows auto-selected and blocked features as propagation resolves them
- Validates the final configuration against the UVL model (SAT check via Flamapy)
- Clears existing feature entries and symlinks
- Resolves versions from cache or PyPI
- Writes the new feature list to
[tool.splent.features]inpyproject.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:
- Cache first – looks in
.splent_cache/features/<org>/for the highest versioned directory - PyPI fallback – queries
pip index versions <package>if not cached - 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_APPmust be set (a product must be selected)[tool.splent].splmust be set in the product’spyproject.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
product:validate– validate an existing configuration against UVLproduct:missing– show missing mandatory featuresproduct:auto-require– auto-complete a partial configurationproduct:resolve– download and link features after configurationproduct:derive– full derivation pipeline (validate + build + up)