User Tools

Site Tools


start

This is an old revision of the document!


This page shows a guideline for installing FINDER.

Prerequisites:
You need to have Javex, Grok, and QL installed before running FINDER. These tools are developed by the Software Architecture Group (SWAG) at the University of Waterloo, and they can be found at SWAG site.

samples?

Make sure you have set up certain environment variables for using all these tools, so that FINDER knows where they are.

samples?

Installation:
Download and extract FINDER.

In order to detect patterns by FINDER, you will need to edit the following files in the conf directory:

  • software.xml
    • directory – path to the software java class files
    • name – software system name
    • source_directory – path to the software source code.

(Note: FINDER relies on both class files and source code of the target system.)

  • scripts.xml
    • scriptsDirectory – path to FINDER scripts, which refer to FINDER/scripts
    • candidateInstancesDirectory – path to detection results output directory
  • designpatterns.xml
    • designpattern – By commenting in/out each “designpattern” tag, you can choose certain design patterns to be included during the detection stage.
    • ql_script – path to the specific FINDER script for the related design pattern. They are located at FINDER/scripts/ql/ .
  • run.properties
    • input.design.patterns.xml.file – path to the above designpatterns.xml file
    • input.software.xml.file – path to the above software.xml file
    • input.scripts.xml.file – path to the above scripts.xml file
    • output.exception.txt.file – path to exception output file

To run FINDER, go to FINDER/bin and run the following commands:
java -Xms1024M -Xmx1024M -Xss5000K ca.yorku.cse.FINDER.Engine “path to run.properties file”

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

First, download the MoRe application suite.

  • Detection raw results converters
    • FINDER converter – It requires an XML file that specify 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, called finderConf.xml, is shown below.
<FinderConf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<systemName>JHotDraw</systemName>
 <moreInstanceDestination>Instance/FINDERInstance</moreInstanceDestination>
 <pattern patternName="Composite" inputFile="RawResults/FINDER/JHotDraw/JHotDraw.composite.out"/>
 <pattern patternName="Decorator" inputFile="RawResults/FINDER/JHotDraw/JHotDraw.decorator.out"/>
 <pattern patternName="FactoryMethod" inputFile="RawResults/FINDER/JHotDraw/JHotDraw.factoryMethod.out"/>
 </FinderConf>
  • 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 JHotDraw rawResult.txt outputPath
  • 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 JHotDraw rawResult.txt outputPath
  • Presenter

To launch the presenter, we simply run the presenter.jar.

Usage: java -jar presenter.jar

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

Usage: java -jar presenter.jar aMoReInstance.xml
  • The Comparator

The comparator is able to compute all new 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] option: -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 roles. -dard-i DAR diagram based on intersection roles. 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

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 roles), and a list of pairs of MoRe instances to be compared. A sample configuration file is shown in Figure A.3. <CompareAll xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”> <systemName>JHotDraw</systemName> <automaticTool>PINOT</automaticTool> <benchmarkTool>FINDER</benchmarkTool> <baseType>benchmark</baseType> <listOfComparison> <comparison patternName=“Composite” benchFile=“Instance/FINDERInstance/JHotDraw_Composite.xml” autoFile=“/Instance/PINOTInstance/JHotDraw_Composite.xml”/> <comparison patternName=“Decorator” benchFile=“Instance/FINDERInstance/JHotDraw_Decorator.xml” autoFile=“/Instance/PINOTInstance/JHotDraw_Decorator.xml”/> </listOfComparison> </CompareAll>

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

Usage: java -jar compareAll.jar compareAll.xml
start.1348560560.txt.gz · Last modified: 2012/09/25 08:09 by shouzheng