This module provides a get_tree function to obtain an ANTLR4 parse-tree from a AFM-defined feature model
Project description
AFM-parser
This is an antlr4 implementation of the old fama plain-text format built from scratch, developed for retrocompatibility purposes.
%Relationships
Home : ControlSystemLighting [AntiTheftAlarm] [MoviePlayer] [Internet] [Contents] [ADA] ;
ControlSystem:[1,2]CellPhone ControlPanel;
MoviePlayer:[1,3]{HDTV42in HDTV32in PCPlayer} ;
Internet:[1,4]{EthernetWiFi_n WiFi_bg Mobile3G } ;
Contents:[1,2]{VideoOnDemand DMS } ;
VideoOnDemand : [Cache] Providers ;
Providers : [1,2]ProviderA ProviderB ;
%Constraints
VideoOnDemand REQUIRES Internet ;
VideoOnDemand REQUIRES ADA ;
Cache REQUIRES DMS ;
PCPlayer REQUIRES CellPhone ;
AntiTheftAlarm REQUIRES ControlPanel ;
Model 1: Feature Model Example
Load Model 1 in FAMA console using the load command. In case you need help about the available commands, use help command or read the reference manual. The following table shows the results of executing the difeerent operations.
Operation Result
Valid Yes
#Products 4928
Commonality(CellPhone) 3696
Errors No error
If you want to see how FAMA behaves when an error is found, introduce at the end of Model 1 the constraint ControlPanel REQUIRES CellPhone;. The result is a model where CellPhone is a false-mandatory feature. It means that it is mandatory for any product despite of being modelled as optional. When we calculate Its commonality (the number of products where a feature appears in), it is equal to the total number of products. It is the sign of mandatory features:
Operation Result
Valid Yes
#Products 3696
Commonality(CellPhone) 3696
Errors False-mandatory: CellPhone
Explanations [CTC-6],[to-CellPhone-ControlPanel-rel]
%Relationships
Home : ControlSystemLighting [AntiTheftAlarm] [MoviePlayer] [Internet] [Contents] [ADA] ;
ControlSystem:[1,2]CellPhone ControlPanel;
MoviePlayer:[1,3]{HDTV42in HDTV32in PCPlayer} ;
Internet:[1,4]{EthernetWiFi_n WiFi_bg Mobile3G } ;
Contents:[1,2]{VideoOnDemand DMS } ;
VideoOnDemand : [Cache] Providers ;
Providers : [1,2]ProviderA ProviderB ;
%Attributes
HDTV42in.ppp : [720,1080],0,0 ;
%Constraints
VideoOnDemand REQUIRES Internet ;
VideoOnDemand REQUIRES ADA ;
Cache REQUIRES DMS ;
PCPlayer REQUIRES CellPhone ;
AntiTheftAlarm REQUIRES ControlPanel ;
HDTV42in.ppp == 1080 IMPLIES Ethernet ;
Model 2: Model 1 extended with quality attributes
All credits to the original design corresponds to Jesús García Galán.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file afmparser-0.2.0.dev1.tar.gz
.
File metadata
- Download URL: afmparser-0.2.0.dev1.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0986e1f3093a4d678f16d12619bf2727a09ab90ff51ce2b79036b33df99c572 |
|
MD5 | 9ae0dd5b4803c6d38355323b3205a92e |
|
BLAKE2b-256 | 6113bec5326879e8d1beae72335dca81f92f2444f20ff95a47a49c21053cc0c0 |
File details
Details for the file afmparser-0.2.0.dev1-py3-none-any.whl
.
File metadata
- Download URL: afmparser-0.2.0.dev1-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 883840e1a68ab8dac35e1b72227c2cbbfd40ffd8148550bcf7660b9dca6c4f9f |
|
MD5 | afe7b619c8bffd95c183df572fb9e15d |
|
BLAKE2b-256 | f2cb14b3aaf5d52ece814a5b4ce67cc87657a2ace9be2597f3fc3b056c351353 |