Tutorial (Command Line Version)Using the GUI is not necessary, all steps of the analysis can also be performed from the command line. (This is especially useful if something does not work as expected.) Usually there are four steps: 1. AnalysisAnalysing JAVA projects requires analysej, C/C++ is analysed by analyse. In the tutorial the corresponding line for analysing the JHotDraw project would be: analysej /fzi/PROST/case-studies/Java/JHotDraw5.1/CH/ifa/draw "draw" is used as project name and the results are written to <current working directory>/draw_analysis. Project name and destination directory can be also specified. analysej -p JHotDraw -t ./JHotDraw_analysis /fzi/PROST/case-studies/Java/JHotDraw5.1/CH/ifa/draw uses JHotDraw as project name and writes to ./JHotDraw_analysis. The environment variable GOOSEDIR must be set to the path of Goose, otherwise analysej cannot find the files it needs to perform its task. (One of these files is a make-file which is used to specify the dependencies between the produced data. You can have a look into it, if you want to know what is going on in detail. It is lib/analyse.mak for C++ and lib/analysej.mak for Java.) Additionally, you must set CLASSPATH to the location of either classes.zip or rt.jar, otherwise the compost tool is not able to parse the source code. 2. VisualisationFor Visualisation just type "graphlet" if you have installed it. 3. AbstractionFor performing abstractions you have to use the reView tool. You must create a text file that contains each subsystem you want to collapse in one line. Example: collapse.txt CH.ifa.draw.samples CH.ifa.draw.framework The command for the abstraction: reView collapseSubsystemList collapse.txt < input.gml > output.gml Where input.gml is the graph whose nodes should be collapsed and output.gml will contain the results. Note that input.gml and output.gml MUST not be the same. Type "man reView" for information about reView. 4. Problem detectionProblem detection is done by another perl script called "problem-detect". Two prolog environments are currently supported, SWI prolog and Eclipse. There's a list of all available queries. To start the problem detection for example type: problem-detect -p swi draw.pl inheritsTwice uselessInheritance The switch -p specifies which prolog is going to be used. Draw.pl contains the program entities and relations and is usually produced during the analysis process. inheritsTwice and uselessInheritance are two of the available queries.
|
|
|
|