Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel Class Reference

List of all members.

Public Member Functions

 AxlMetrics_StructureCounts_ApplicationModel (AbstractArchitectureModel model)
void execute () throws SolverException
Collection
< AxlMetricsData_AtomicSet
getAtomicSetsClv ()
Collection
< AxlMetricsData_AtomicSet
getAtomicSetsClvSubsumedPlv ()
Collection
< AxlMetricsData_AtomicSet
getAtomicSetsPlv ()
AbstractArchitectureModel getAxlElement ()
 Return the model to be assessed. Only application models are allowed.
Collection< AxlElementPathgetClvSubsumedPlvValues ()
Collection< AxlElementPathgetClvValues ()
LinkedHashMap< Component,
AxlMetricsData_Component
getComponentTypesData ()
double getCpvAverage ()
int getCpvMax ()
int getCpvMin ()
 min, max, average of components per variable (wrt. CLV atomic sets)
double getCpvSpAverage ()
int getCpvSpMax ()
int getCpvSpMin ()
 min, max, average of components per variable (wrt. CLVsp atomic sets)
AxlMetricsData_AtomicSetsMap getDependencyMapIndirectNI ()
AxlMetricsData_AtomicSetsMap getDependencyMapIndirectPI ()
AxlMetricsData_AtomicSetsMap getDependencyMapIndirectPNI ()
AxlMetricsData_AtomicSetsMap getDependencyMapIndirectPreI ()
AxlMetricsData_AtomicSetsMap getDependencyMapNI ()
AxlMetricsData_AtomicSetsMap getDependencyMapPI ()
 Getter Dependencies between Atomic Sets.
AxlMetricsData_AtomicSetsMap getDependencyMapPNI ()
AxlMetricsData_AtomicSetsMap getDependencyMapPreI ()
int getNumberClv ()
int getNumberClvSp ()
int getNumberOfComponentTypes ()
int getNumberOfSubComponents ()
int getNumberOfSubComponentsMandatory ()
int getNumberOfSubComponentsOptional ()
int getNumberOfSubComponentsOr ()
int getNumberOfSubComponentsXor ()
int getNumberOfVariabilityPoints ()
int getNumberPlv ()
Collection< AxlElementPathgetPlvValues ()
double getPpvAverage ()
int getPpvMax ()
int getPpvMin ()
 min, max, average of components per variable (wrt. PLV atomic sets) Usually we should get always ONE here as result!
LinkedHashMap< AxlElementPath,
AxlMetricsData_Component
getSubComponentsData ()
void metricResultsToCsv ()
void setAxlElement (IAXLangElement model)
void setAxlModel (AbstractArchitectureModel model)

Protected Member Functions

void computeIndirectDependencySets ()
 Compute all indirect dependencies of the application model's atomic sets.
void computeIntermediateAtomicSets_InterpretPort (AxlElementPath portPath)
 First step to compute the atomic sets for the application model; i.e. build the intermediate data structure by interpreting ports.
void computeIntermediateAtomicSets_InterpretStructure (AxlElementPath subComponentPath)
 First step to compute the atomic sets for the application model; i.e. build the intermediate data structure by interpreting subcomponents.
void computeIntermediateDependencySets_InterpretStructure (AxlElementPath elementPath)
 First step to compute the application model's atomic sets dependencies; see EBASO livdoc: Build the intermediate structure of dependencies by interpreting the model's structure (hierarchy).
void computeTheResult_AtomicSets ()
 Second step to compute the atomic sets for the application model; i.e. convert the intermediate data structure to the final one.
void computeTheResult_DependencySets ()
 Build the final data structure for the dependency sets:

  • convert the data structure to the final one,
  • then compute the indirect dependencies finally.

void convertDependencySets ()
 Convert the intermediate data structures for the direct dependencies to the final ones.
void countVariabilityPort (AxlElementPath portPath)
void countVariabilityPortDataElements (AxlElementPath portPath)
void countVariabilitySubcomponent (AxlElementPath subComponentPath)
void evaluateConnector (AxlElementPath connectorPath)
 Evaluate a connector wrt. its variability influence.
void evaluatePort (AxlElementPath portPath)
 Evaluate a port wrt. its structural specification.
void evaluateSubComponent (AxlElementPath subComponentPath)
 Evaluate a (sub)component wrt. its structural specification.
void iterateSubComponentHierarchy (AxlIteratorSubComponent axlIteratorParent)
 Evaluate the inner structure of a (sub)component, i.e. ports, connectors, subcomponents.
void resetMetricsResult ()
 Initialize or reset the internal attributes which store the results of a metric execution It is used in the constructor and within the executes() method.

Protected Attributes

LinkedHashMap< AxlElementPath,
AxlElementPath
theAtomicSetClv
LinkedHashMap< AxlElementPath,
AxlElementPath
theAtomicSetClvSubsumedPlv
LinkedHashMap< AxlElementPath,
AxlElementPath
theAtomicSetPlm
LinkedHashMap< AxlElementPath,
AxlElementPath
theAtomicSetPlv
LinkedHashMap< Component,
AxlMetricsData_Component
theComponentTypesData
AxlElementPathMap theIntermediateDependencySet4NI
AxlElementPathMap theIntermediateDependencySet4PI
AxlElementPathMap theIntermediateDependencySet4PNI
AxlElementPathMap theIntermediateDependencySet4PreI
int theNumberOfMandatorySubComponents
int theNumberOfOptionalSubComponents
int theNumberOfSubComponentsOr
int theNumberOfVariabilityPoints
int theNumberOfXorSubComponents
AxlMetricsData_AtomicSetsMap theResult_DependencyMapIndirectNI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapIndirectPI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapIndirectPNI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapIndirectPreI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapNI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapPI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapPNI
AxlMetricsData_AtomicSetsMap theResult_DependencyMapPreI
LinkedHashMap< AxlElementPath,
AxlMetricsData_AtomicSet
theResult_theAtomicSetClv
LinkedHashMap< AxlElementPath,
AxlMetricsData_AtomicSet
theResult_theAtomicSetClvSubsumedPlv
LinkedHashMap< AxlElementPath,
AxlMetricsData_AtomicSet
theResult_theAtomicSetPlm
LinkedHashMap< AxlElementPath,
AxlMetricsData_AtomicSet
theResult_theAtomicSetPlv
LinkedHashMap< AxlElementPath,
AxlMetricsData_Component
theSubComponentsData

Private Member Functions

Collection
< AxlMetricsData_AtomicSet
computeIndirectDependenciesRecursivelyNI (AxlMetricsData_AtomicSet as, Collection< AxlMetricsData_AtomicSet > doneCollection)
 Helper method: Recursively compute the indirect dependencies for the negative influence metric The indirect negative influences needs to be computed in a slightly different way than the other dependencies, because this dependency relationship is not transitive! E.g.: IF a excludes b AND b excludes c DOES NOT MEAN THAT ALSO a excludes c.
AxlMetricsData_AtomicSetsMap computeIndirectDependencySetsNI ()
 Compute the indirect dependencies for the negative influence metric The indirect negative influences needs to be computed in a slightly different way than the other dependencies, because this dependency relationship is not transitive! E.g.: IF a excludes b AND b excludes c DOES NOT MEAN THAT ALSO a excludes c.
AxlMetricsData_AtomicSetsMap convertDependencyMap (AxlElementPathMap intermediateDependencyMap)
 Helper method: Convert the intermediate data structure to the final one.

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.AxlMetrics_StructureCounts_ApplicationModel ( AbstractArchitectureModel  model  ) 

Member Function Documentation

Collection<AxlMetricsData_AtomicSet> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeIndirectDependenciesRecursivelyNI ( AxlMetricsData_AtomicSet  as,
Collection< AxlMetricsData_AtomicSet doneCollection 
) [private]

Helper method: Recursively compute the indirect dependencies for the negative influence metric The indirect negative influences needs to be computed in a slightly different way than the other dependencies, because this dependency relationship is not transitive! E.g.: IF a excludes b AND b excludes c DOES NOT MEAN THAT ALSO a excludes c.

Todo:
evtl. noch in die abstrakte Superklasse schieben; entsprechend (um maps) parametrisiert.
Parameters:
atomic set which the indirect dependencies are searched for
collection of already considered atomic sets which needs not to be looked at again
Returns:
collection of indirect dependent atomic sets

theResult_DependencyMapPI.get(as).contains(candidateAs) && theResult_DependencyMapIndirectPI.get(as).contains(candidateAs) ) {

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeIndirectDependencySets (  )  [protected, virtual]

Compute all indirect dependencies of the application model's atomic sets.

Implements de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeIndirectDependencySetsNI (  )  [private]

Compute the indirect dependencies for the negative influence metric The indirect negative influences needs to be computed in a slightly different way than the other dependencies, because this dependency relationship is not transitive! E.g.: IF a excludes b AND b excludes c DOES NOT MEAN THAT ALSO a excludes c.

Todo:
evtl. noch in die abstrakte Superklasse schieben; entsprechend (um maps) parametrisiert.
Returns:
the final map for the indirect dependencies of atomic sets wrt. negative influence
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeIntermediateAtomicSets_InterpretPort ( AxlElementPath  portPath  )  [protected]

First step to compute the atomic sets for the application model; i.e. build the intermediate data structure by interpreting ports.

subcomponent of port has been already interpreted, i.e. computeIntermediateAtomicSets_InterpretStructure(AxlElementPath subComponentPath)

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeIntermediateAtomicSets_InterpretStructure ( AxlElementPath  subComponentPath  )  [protected, virtual]

First step to compute the atomic sets for the application model; i.e. build the intermediate data structure by interpreting subcomponents.

Implements de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeIntermediateDependencySets_InterpretStructure ( AxlElementPath  elementPath  )  [protected, virtual]

First step to compute the application model's atomic sets dependencies; see EBASO livdoc: Build the intermediate structure of dependencies by interpreting the model's structure (hierarchy).

Algorithm for the direct positive influence set of a feature: 1. Add the parent's variable to the PI set if it's a different variable than of the element (is done by conversion) 2. If the element is an input port, then add all ports horizontally connected to it. 3. If the element is a delegation port, add all connected ports of the child components.

Algorithm for the preconditional influence set of a feature: 1. Add all optional subcomponents to the PreI set. 2. Add all of its (optional or dependent?) ports to the PreI set. 3. If the element is an input port, then add all ports horizontally connected to it. 4. If the element is a delegation port, add all connected ports of the child components. 5. If the considered element is XOR, then add all of its variants to the PreI set

Algorithm for the direct negative influence set of a feature: 1. If the considered element is a child of an XOR component, then add all other XOR's children to the NI set

The method builds an intermediate data structure only; another method will convert it to AxlMetricsData_AtomicSetsMap structure.

Parameters:
elementPath which is a component, subcomponent or port (maybe a connector etc.)

Implements de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeTheResult_AtomicSets (  )  [protected, virtual]

Second step to compute the atomic sets for the application model; i.e. convert the intermediate data structure to the final one.

computeIntermediateAtomicSets_InterpretStructure() has been executed already

Implements de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.computeTheResult_DependencySets (  )  [protected]

Build the final data structure for the dependency sets:

  • convert the data structure to the final one,
  • then compute the indirect dependencies finally.

computeIntermediateDependencySets_InterpretStructure(...) has been executed already

Reimplemented from de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.convertDependencyMap ( AxlElementPathMap  intermediateDependencyMap  )  [private]

Helper method: Convert the intermediate data structure to the final one.

Parameters:
intermediateDependencyMap 
Returns:
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.convertDependencySets (  )  [protected, virtual]

Convert the intermediate data structures for the direct dependencies to the final ones.

Implements de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.countVariabilityPort ( AxlElementPath  portPath  )  [protected]
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.countVariabilityPortDataElements ( AxlElementPath  portPath  )  [protected]
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.countVariabilitySubcomponent ( AxlElementPath  subComponentPath  )  [protected]
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.evaluateConnector ( AxlElementPath  connectorPath  )  [protected]

Evaluate a connector wrt. its variability influence.

Parameters:
elementPath 
Todo:
not implemented yet
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.evaluatePort ( AxlElementPath  portPath  )  [protected]

Evaluate a port wrt. its structural specification.

Parameters:
elementPath 
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.evaluateSubComponent ( AxlElementPath  subComponentPath  )  [protected]

Evaluate a (sub)component wrt. its structural specification.

Parameters:
subComponentPath 
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.execute (  )  throws SolverException
Collection<AxlMetricsData_AtomicSet> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getAtomicSetsClv (  ) 
Collection<AxlMetricsData_AtomicSet> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getAtomicSetsClvSubsumedPlv (  ) 
Collection<AxlMetricsData_AtomicSet> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getAtomicSetsPlv (  ) 
AbstractArchitectureModel de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getAxlElement (  )  [virtual]

Return the model to be assessed. Only application models are allowed.

Reimplemented from de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

Collection<AxlElementPath> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getClvSubsumedPlvValues (  ) 
Collection<AxlElementPath> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getClvValues (  ) 
LinkedHashMap<Component, AxlMetricsData_Component> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getComponentTypesData (  ) 
double de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getCpvAverage (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getCpvMax (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getCpvMin (  ) 

min, max, average of components per variable (wrt. CLV atomic sets)

double de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getCpvSpAverage (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getCpvSpMax (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getCpvSpMin (  ) 

min, max, average of components per variable (wrt. CLVsp atomic sets)

AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapIndirectNI (  ) 
AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapIndirectPI (  ) 
AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapIndirectPNI (  ) 
AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapIndirectPreI (  ) 
AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapNI (  ) 
AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapPI (  ) 

Getter Dependencies between Atomic Sets.

AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapPNI (  ) 
AxlMetricsData_AtomicSetsMap de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getDependencyMapPreI (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberClv (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberClvSp (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfComponentTypes (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfSubComponents (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfSubComponentsMandatory (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfSubComponentsOptional (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfSubComponentsOr (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfSubComponentsXor (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberOfVariabilityPoints (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getNumberPlv (  ) 
Collection<AxlElementPath> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getPlvValues (  ) 
double de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getPpvAverage (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getPpvMax (  ) 
int de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getPpvMin (  ) 

min, max, average of components per variable (wrt. PLV atomic sets) Usually we should get always ONE here as result!

LinkedHashMap<AxlElementPath, AxlMetricsData_Component> de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.getSubComponentsData (  ) 
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.iterateSubComponentHierarchy ( AxlIteratorSubComponent  axlIteratorParent  )  [protected]

Evaluate the inner structure of a (sub)component, i.e. ports, connectors, subcomponents.

Parameters:
axlIteratorParent 
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.metricResultsToCsv (  )  [virtual]
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.resetMetricsResult (  )  [protected]

Initialize or reset the internal attributes which store the results of a metric execution It is used in the constructor and within the executes() method.

Reimplemented from de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_Abstract.

void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.setAxlElement ( IAXLangElement  model  ) 
void de.fraunhofer.isst.axbench.operations.metrics.AxlMetrics_StructureCounts_ApplicationModel.setAxlModel ( AbstractArchitectureModel  model  ) 

Member Data Documentation