My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
GettingStarted  
How to start using PLURAL.
Featured, Phase-Support
Updated Feb 4, 2010 by kevin.bi...@gmail.com

Installation

First, you need to install PLURAL. The installation instructions are described on the Installation page. You will also need the PLURAL annotations jar or project in whichever workspace you will be using PLURAL. Those instructions are on the Annotations page.

Examples

Currently, documentation on PLURAL is lacking. This is a known issue. So the best way to get started is to check out the PLURAL test project, run PLURAL on the tests to see if your installation worked, and examine the test files to see how the annotations are used in practice.

PLURAL Test Project

The PLURAL test project is also located inside the source repository. It's at the top level of the trunk (here). You should check this project out into the workspace where you plan to use PLURAL.

Run PLURAL on the Test Files

The PLURAL tests work like all Crystal tests. This procedure is described here. Unfortunately, the automated testing procedure only works if you have checked PLURAL and Crystal out from source. If not, you can still run PLURAL by hand:

  1. Select the analyses that you intend to run. In the "Crystal" drop-down menu, you should see a list of every registered plug-in. Only check off the ones that you want to run. This means either "FractionalAnalysis" (if you want standard PLURAL) or "NIMBY" (if you want to run the multi-threaded analysis). You probably don't want to run them both. You probably do want to run "PluralAnnotationAnalysis" which does a sanity check on the annotations that you wrote, and "EffectAnalysis" which checks that your effect annotations are correct.
  2. Run the analyses on file(s). Now you can select any Java classes from the package explorer, right-click your selection, and run the analyses from the "Crystal" context menu.
  3. Examine the output. In the Eclipse problems view you should get a series of problems, assuming that your test case contained errors. Each test in the official PLURAL test suite will contain a test annotation, stating whether or not the analysis should pass or fail, and how many errors it should report (e.g., @PassingTest and @FailingTest(4)). For any given test, check to make sure that the number of errors is consistent with the number given in the annotation. If not, this indicates a problem.

Examining the Test Files

There are a number of simple and complex examples of the use of PLURAL contained in the test project. A good starting point is the Conslist example, which defines a very simple protocol, and is defined to be immutable.

Powered by Google Project Hosting