Getting Started

This page gives an introduction into JTransformer and presents the first steps.

Prerequisites

First of all, you need to download and install JTransformer. After a successful installation including a restart of Eclipse, the Eclipse menu will contain a JTransformer entry.

Open JT User Perspective

As a first step after installing JTransformer we recommended to use the JT User perspective. You can open it from the menu JTransformerJT User Perspective. This perspective contains the most important view of JTransformer, the Control Center, and also the Package Explorer and the Outline. The perspective should look like this.

Load Example Projects

JTransformer offers several small examples, so called Example Projects. These projects can be loaded into your workspace by selecting FileNewExample…JTransformer Example Projects. You should then see the depicted dialog offering the example projects.

Select the following two projects:

  • JTransformer Tutorial - Java Files containing Java code and
  • JTransformer Tutorial - Prolog Files containing small example analyses and transformations.

The analyses from the second project will find several results in the first project.

Activate JTransformer

After loading the example projects you need to activate JTransformer for the JT_Tutorial project. For this select the project in the package explorer, open the context menu and choose ConfigureAssign JTransformer Factbase. A new dialog will be opened. For the purpose of this introduction you can use the default values in the dialog and click OK.

The activation of JTransformer for the project will trigger the initial generation of the factbase. After the generation is finished the project icon will have a green JT overlay . From then on JTransformer will automatically update the factbase each time any Java source code is modified in the project.

Select Factbase in Control Center

Once the initial generation of the factbase is finished select the newly created factbase named JT_Tutorial in the Control Center. After the selection of the factbase the Control Center will show an empty table below the factbase selector, the analysis table. It lists all available analyses of the selected factbase, i.e. all analyses loaded in the factbase.

Load Example Analyses

After selecting the factbase in the Control Center you can load the analyses and transformations from the JT_Tutorial_Prolog project. To do this you need to expand the project in the package explorer and select the file load.pl in the pl folder. Open the context menu and choose Prolog Development Tools(Re)consult. This will load the Prolog file into the selected factbase.

After loading the file the Control Center should list the loaded analyses.

Run Analyses

Go to the Control Center and enable the analyses you want to run. You can do this by using the checkbox shown for each analysis in the analysis table of the Control Center. By default new analyses are disabled.

After enabling some analyses you can run them by using the green button in the top right corner of the Control Center. This will run all enabled analyses. You can also run analyses by using the context menu of the analysis table.

After running the enabled analyses the analysis table will show the number of results for each analysis.

Inspect Analysis Results

The right table of the Control Center shows the analysis results for the analyses which are selected in the analysis table. From the analysis result table you can jump to source code corresponding to a result by double-clicking on a result. You can find further information about working with results in JTransformer here.

Last modified: 2016/04/17 20:49
*