Direkt zum Inhalt
 
 
Eine algebraische Fläche vom Grad 6 (eine "Sextik"), die 65 Singularitäten besitzt.
 
  Startseite  
 
Sie sind hier:» Universität » Mathematik und Informatik » Arbeitsgruppen » Softwaretechnik » nassar » NasTool (Metric meta-tool)
  • Print this page
  • create PDF file

The NasTool

NasTool is an Eclipse-based tool for deriving and generating model metrics from any domain defined by Ecore. NasTool is easy to use, only few mouse clicks are needed to automatically derive, specify and generate domain metrics from any given domain modeled on EMF Ecore.

Description:

Currently, NasTool uses 20 metrics patterns to derive at least 42 kinds of metrics. The metrics patterns are designed by Henshin language and typed by Ecore meta model. The patterns are separated into 4 groups depending on the number of EReference nodes in each pattern. The 42 kinds of metrics are specified using OCL language.

Some designed patterns and kinds of metrics are illustrated in the following: 

Group 1

Pattern 1

pattern01





Kinds of Metrics: 

  • # Total number of all instances of type context in the model
 

Group 2

Pattern 5

pattern05
 







Kinds of Metrics: 

  •  Number of all instances of type ch in a selected instance of type context
  •  Total number of all instances of type cl in a selected instance of type context
 

Group 3

Pattern 10

pattern10
 







Kinds of Metrics: 

  • Number of all instances of type cl2 of all instances of type cl1 in a selected instance of type context
  • Average number of all instances of type cl2 of all instances of type cl1 in a selected instance of type context
  • Number of all instances of type cl1 which have more than or less than a specific number of instances of type cl2 in a selected instance of type context
 

Group 4

Pattern 18

pattern18
 







Kinds of Metrics: 

  •  Number of all instances of type cl1 + number of all instances of type cl2 in a selected instance of type context   or in the model. (total1)
  • (Ratio):  Number of all instances of type cl1 / (total1) in a selected instance of type context or in the model.
  • (Ratio):  Number of all instances of type cl2 / (total1) in a slected instance of type context or in the model.
  • avarage, percent …

 

 

Installation:

The installation steps are also found at: https://github.com/Nassarn/NasTool/blob/master/README.md

  1. Install the Eclipse Modeling Tool via: https://www.eclipse.org/downloads/packages/
  2. Install OCL in Eclipse: You can use the update manager in Eclipse to find and install it.
  3. Install the reporting tool BIRT: You can use the update manager in Eclipse to find and install it.
  4. Install Henshin (the current release): Please see the following link: https://www.eclipse.org/henshin/install.php
  5. Install EMF Refactor: NasTool uses EMF Refactor to calculate the generated metrics on model instances. Please use the following link to install the new version of EMF Refactor using the update manager in Eclipse: https://nassarn.github.io/home/projects/emfrefactor/release
  6. Install NasTool: Please use the following link to install the new version of NasTool using the update manager in Eclipse: https://nassarn.github.io/home/projects/nastool/release
  7. Make sure that your Eclipse uses JavaSE-1.8 or later.


Getting Started:

NasTool is easy to use. To run the NasTool, you need only one mouse-right click on a given model (Ecore file) and then choose: NasTool -> generate concrete metrics. Once you clicked on it, you will get a user-friendly wizard page for choosing the target plug-in project which will contain all the generated classes of the derived metrics.

The tool has a view component which provides statistical information about the number of the pattern matches and the derived metrics for each applied pattern as well as the total number of the matches. To display the view component in eclipse, please go to windows -> show view –> other -> Nas Tool Category-> Nas Tool View.

To calculate the generated metrics on instance models:

  1. Make sure that the target project, i.e., the project which holds the generated classes of derived metrics, is deployed in your Eclipse.
  2. Right click on an instance model in the tree-based editor and then choose EMF Quality Assurance (using existing techniques) -> Calculate metrics.

Note:

  • The target project, i.e., the project which holds the generated classes of derived metrics, has to be a plug-in project. Note, once you create a plug-in project, the options: “Generate an activator” and “This plug-in is a singleton” have be activated.
  • To configure the generated metrics on instance models: Right click on the project which holds the instance models and then choose properties->EMF Quality Assurance->Metrics configuration.

Comparison with SDMetrics

A tool dedicated to the calculation of UML metrics is SDMetrics. SDMetrics analyses the structural properties of UML models and uses object-oriented measures as well as design rule checking to automatically detect design problems. Furthermore, SDMetrics supports custom definitions of UML metrics and design rules using XML-based configuration files. Currently, SDMetrics provides 96 metrics which are related to the abstract syntax of a UML model. (This means, that we do not consider provided metrics which count the number of times an element appears in a diagram of the model.) Over 80% of them can be generated by the current version of the Nas tool or composed from generated ones. The rest of metrics could also be derived if the existence patterns were extended or new metrics patterns were added. Here, the pattern base mostly requires patterns which take also incoming references into account. However, SDMetrics also supports five more complex metrics which can not be derived from the meta model specification since several metrics like DIT (depth of the class in the inheritance hierarchy) consider paths along cyclic references. Since these cycles can be of arbitrary length, we can not specify a single concrete metrics pattern for these cases. The following lists show the results of this comparison. Green lines show metrics which can be already derived; yellow lines show metrics which can be combined by these basic metrics; gray lines show metrics which can be derived by extending or adding new metrics patterns; red lines show metrics which can not be derived from the meta model specification.
 
 
 
sdmetricsclass
sdmetricsactivity
 
  
sdmetricsstatemachine
sdmetricsusecase
    
 
sdmetricsinteraction
sdmetricscomponent
     
sdmetricsinterface

Zuletzt aktualisiert: 20.12.2017 · Nassarn

 
 
 
Fb. 12 - Mathematik und Informatik

Fb. 12 - Mathematik und Informatik, Hans-Meerwein-Straße 6, D-35032 Marburg
Tel. +49 6421/28-21514, Fax +49 6421/28-25466, E-Mail: dekanatfb12@mathematik.uni-marburg.de

URL dieser Seite: https://www.uni-marburg.de/fb12/arbeitsgruppen/swt/nassarn/nastool.html

Impressum | Datenschutz