Betty 1.1
|
Public Member Functions | |
void | resetGenerator (Characteristics c) throws BettyException |
void | setHookClass (AbstractFMGeneratorDecorator gen) |
void | addRoot (FAMAFeatureModel fm, Feature root) |
Relation | addAlternative (Feature parent, List< Feature > children) |
void | addMandatory (Feature parent, Feature child) |
void | addOptional (Feature parent, Feature child) |
Relation | addOr (Feature parent, List< Feature > children) |
void | addExcludes (FAMAFeatureModel fm, Feature origin, Feature destination) |
void | addRequires (FAMAFeatureModel fm, Feature origin, Feature destination) |
boolean | areDirectFamily (Feature f, Feature g) |
boolean | existsRelation (FAMAFeatureModel fm, Feature f, Feature g) |
void | createCardinality (Feature parent, Feature child, int i, int j) |
Protected Member Functions | |
String | getFeatureId () |
String | getRelationId () |
Protected Attributes | |
AbstractFMGeneratorDecorator | hookClass = null |
GeneratorCharacteristics | characteristics |
FMStatistics | statistics |
Random | random |
int | numberOfFeatures |
int | numberOfConstraints |
float | probMandatory |
float | probOptional |
float | probOrChildren |
float | probAltChildren |
int | featureId |
int | relationId |
This class implements the basic methods of a basic random FM generator.
Relation es.us.isa.generator.FM.AbstractFMGenerator.addAlternative | ( | Feature | parent, |
List< Feature > | children | ||
) |
Update the statistics of the feature model being generated when we add an alternative relationship.
parent | The parent feature of the alternative relationship. |
children | The child features of the alternative relationship. |
void es.us.isa.generator.FM.AbstractFMGenerator.addExcludes | ( | FAMAFeatureModel | fm, |
Feature | origin, | ||
Feature | destination | ||
) |
Update the statistics of the feature model being generated when an excludes constraint is added.
origin | The origin feature. |
destination | The destination feature. |
void es.us.isa.generator.FM.AbstractFMGenerator.addMandatory | ( | Feature | parent, |
Feature | child | ||
) |
Update the statistics of the feature model being generated when we add an mandatory relationship
parent | The parent feature of the mandatory relationship. |
child | The mandatory feature added. |
void es.us.isa.generator.FM.AbstractFMGenerator.addOptional | ( | Feature | parent, |
Feature | child | ||
) |
Update the statistics of the feature model being generated when we add an optional relationship
parent | The parent feature of the optional relationship. |
child | The optional feature added. |
Relation es.us.isa.generator.FM.AbstractFMGenerator.addOr | ( | Feature | parent, |
List< Feature > | children | ||
) |
Update the statistics of the feature model being generated when we add an or relationship.
parent | The parent feature of the or-relation. |
children | The child features of the or-relation added. |
void es.us.isa.generator.FM.AbstractFMGenerator.addRequires | ( | FAMAFeatureModel | fm, |
Feature | origin, | ||
Feature | destination | ||
) |
Update the statistics of the feature model being generated when a requires constraint is added.
origin | The origin feature. |
destination | The destination feature. |
void es.us.isa.generator.FM.AbstractFMGenerator.addRoot | ( | FAMAFeatureModel | fm, |
Feature | root | ||
) |
Update the statistics of the feature model being generated when we add a root feature.
root | The root feature added. |
boolean es.us.isa.generator.FM.AbstractFMGenerator.areDirectFamily | ( | Feature | f, |
Feature | g | ||
) |
This method is used to find out if two features are direct family (i.e. they are directly related in the tree) For instance, in the following scheme, f->h->i->g, we could say that f and g are direct family.
f | This first feature whose parental relation we want to check. |
g | This second feature whose parental relation we want to check. |
void es.us.isa.generator.FM.AbstractFMGenerator.createCardinality | ( | Feature | parent, |
Feature | child, | ||
int | i, | ||
int | j | ||
) |
This method create a relation with complex cardinality between two features
parent | The parent feature. |
child | The child feature. |
i | The minimum value for the cardinality. |
j | The maximum value for the cardinality. |
boolean es.us.isa.generator.FM.AbstractFMGenerator.existsRelation | ( | FAMAFeatureModel | fm, |
Feature | f, | ||
Feature | g | ||
) |
This method will look for any existing dependency in the generated model between the input features
fm | The feature model where we will look for the dependency |
f | Input feature. |
g | Input feature. |
String es.us.isa.generator.FM.AbstractFMGenerator.getFeatureId | ( | ) | [protected] |
String es.us.isa.generator.FM.AbstractFMGenerator.getRelationId | ( | ) | [protected] |
void es.us.isa.generator.FM.AbstractFMGenerator.resetGenerator | ( | Characteristics | c | ) | throws BettyException |
This method resets the generation, setting the user's preferences for the generation
c | The characteristics (user's generation preferences) to be used in the generator. |
BettyException |
Implements es.us.isa.generator.IGenerator.
void es.us.isa.generator.FM.AbstractFMGenerator.setHookClass | ( | AbstractFMGeneratorDecorator | gen | ) |
Set a decorator object implementing the hook methods
Input constraints used for the generation.
int es.us.isa.generator.FM.AbstractFMGenerator.featureId [protected] |
Util for naming
AbstractFMGeneratorDecorator es.us.isa.generator.FM.AbstractFMGenerator.hookClass = null [protected] |
This variable is used to add functionality to the internal methods of the class by using hook methods implemented in an external decorator class. By default is null.
int es.us.isa.generator.FM.AbstractFMGenerator.numberOfConstraints [protected] |
Number of cross-tree constraints to be generated
int es.us.isa.generator.FM.AbstractFMGenerator.numberOfFeatures [protected] |
Number of features of the feature models to be generated
float es.us.isa.generator.FM.AbstractFMGenerator.probAltChildren [protected] |
Probability of a feature being in an alternative relation
float es.us.isa.generator.FM.AbstractFMGenerator.probMandatory [protected] |
Probability of a feature being mandatory
float es.us.isa.generator.FM.AbstractFMGenerator.probOptional [protected] |
Probability of a feature being optional.
float es.us.isa.generator.FM.AbstractFMGenerator.probOrChildren [protected] |
Probability of a feature being in an or-relation
Random es.us.isa.generator.FM.AbstractFMGenerator.random [protected] |
The random class used during the generation.
int es.us.isa.generator.FM.AbstractFMGenerator.relationId [protected] |
Util for naming
This variable stores the statistics of the model being generated (e.g. number of features generated)