User Tools

Site Tools


start

This is an old revision of the document!


This page shows a guideline for using the MoRe application suite.

Download and extract the MoRe application suite. Note that the “conf” folder contains all pre-defined MoRe models that are essential to all the following tools. The “models.xml” file inside the “conf” folder specifies the path to all MoRe models that are to be included in the tool suite. When launching the following tools, enter the directory that contains all the Jars and make sure the “conf” folder is located parallel to the tools. This allows the tools to find all the MoRe models.

A running example is also provided to test the tools suite. The example is based on the TAB2PS system.

  • FINDER converter – This tool requires an XML file that specifies the system name of the software system, the output location of converted results, and all design patterns with corresponding raw result file name. A sample of the configuration file, is shown below.

<FinderConf xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>

<systemName>TAB2PS</systemName>
 <moreInstanceDestination>FINDERInstance/</moreInstanceDestination>
 <pattern patternName="Composite" inputFile="TAB2PS-finder/TAB2PS.composite.out"/>
 <pattern patternName="Decorator" inputFile="TAB2PS-finder/TAB2PS.decorator_degenerate.out"/>
 <pattern patternName="Template Method" inputFile="TAB2PS-finder/TAB2PS.templatemethod.out"/>
 </FinderConf>
Usage: java -jar finderConverter.jar finder_tab2ps.xml

An example can be downloaded to test the converter. The example contains FINDER raw results of the TAB2PS system with corresponding “finder_tab2ps.xml” configuration file. You may need to edit “finder_tab2ps.xml” to specify the relative path from working directory to raw result files.

  • PINOT Converter – Unlike FINDER that reports results for every pattern in a separate file, PINOT outputs all pattern detection results in a single file. Therefore, we do not use a configuration file for the usage of the converter. Instead, the converter accepts three parameters at the terminal. The first one gives the software system name, the second one is the input file name which contains PINOT raw results, and the last one specifies the location for the output of the converter which can be omitted for the current path. More specifically, usage of the PINOT raw result converter is:
Usage:
java -jar pinotConverter.jar TAB2PS rawResult.txt outputPath

An example of PINOT raw result can be downloaded to test the converter.

  • SSA Converter – The usage of SSA raw result converter is similar to that of PINOT raw result converter. It accepts three parameters at the terminal, which are the software system name, the input file name of raw results, and the location for the output of the converter which can be omitted. Usage of the SSA raw result converter is:
Usage:
java -jar ssaConverter.jar TAB2PS rawResult.txt outputPath

An example of SSA raw result can be downloaded to test the converter.

  • Presenter
Usage: java -jar presenter.jar

Also, we can provide a MoRe instance as a parameter for the presenter at terminal. This loads the presenter with the corresponding MoRe instance together.

Usage: java -jar presenter.jar aMoReInstance.xml

You may wish to test the presenter with any MoReInstance file generated by the above three converters.

  • The Comparator

The comparator is able to compute all proposed metrics as well as raw precision and recall between two MoRe instance files. Calculation can be performed based on either roles in the Benchmark or the intersection of Automatic and Benchmark roles. Usage is shown in the following:

Usage: java -jar comparator.jar Automatic Benchmark [option]
options:
-gap-b     Gross anchor precision based on Benchmark roles.
-gar-b      Gross anchor recall based on Benchmark roles.
-dap-b     Detailed anchor precision based on Benchmark roles.
-dar-b      Detailed anchor recall based on Benchmark roles.
-dapd-b   DAP diagram based on Benchmark roles.
-dard-b    DAR diagram based on Benchmark roles.
-gap-i       Gross anchor precision based on intersection of roles.
-gar-i        Gross anchor recall based on intersection of roles.
-dap-i       Detailed anchor precision based on intersection of roles.
-dar-i        Detailed anchor recall based on intersection of roles.
-dapd-i     DAP diagram based on intersection of roles.
-dard-i      DAR diagram based on intersection of roles.
-precision Regular precision
-recall       Regular recall

Combination of two MoRe instances can also be obtained by the comparator in the following way:

Usage: java -jar comparator.jar result1 result2 combinedFile -c

You may wish to test the comparator with two correspondence MoReInstance files generated by the above converters.

  • Comparing All

The comparator can also compare detection results for all metrics of multiple patterns produced by two tools at one time. In order to do this, a configuration file is needed to specify the software system name, tool name of the automatic result set, tool name of the benchmark result set, comparison type (based on benchmark roles or intersection of roles), and a list of pairs of MoRe instances to be compared. A sample configuration file is shown below. In order to run this example, you may need to edit the paths from working directory to all pairs of MoRe Instances.

<CompareAll xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<systemName>TAB2PS</systemName>
<automaticTool>SSA</automaticTool>
<benchmarkTool>FINDER</benchmarkTool>
<baseType>intersection</baseType>
<listOfComparison>
<comparison patternName="Decorator" benchFile="FINDERInstance/TAB2PS_Decorator.xml"
 autoFile="SSAInstance/TAB2PS_Decorator.xml"/>
<comparison patternName="State" benchFile="FINDERInstance/TAB2PS_State.xml" 
 autoFile="SSAInstance/TAB2PS_State.xml"/>
<comparison patternName="Strategy" benchFile="FINDERInstance/TAB2PS_Strategy.xml" 
 autoFile="SSAInstance/TAB2PS_Strategy.xml"/>
<comparison patternName="TemplateMethod" benchFile="FINDERInstance/TAB2PS_TemplateMethod.xml" 
 autoFile="SSAInstance/TAB2PS_TemplateMethod.xml"/>
</listOfComparison>
</CompareAll>

To perform the comparison, we use a separate jar in the following way:

Usage: java -jar compareAll.jar compareAll.xml
start.1348678335.txt.gz · Last modified: 2012/09/26 16:52 by bil