UpdatesTopReference ManualS-Expr Plug-in

S-Expr Plug-in

This plugin provides a first example of a tool extension of Pda.. The S-Expr Plug-in generates s-expressions from protocols in an Pda diagram and writes them to a file. In the current version, the individual programs of the protocol agents is captured in the generated s-expressions; it is assumed that the connections between the local states of an agents are complete; otherwise the s-expression is not generated correctly.

The S-Expression grammar

The current version of the s-expression grammar that describes the structure of the s-expressions generated by Pda can be found here.

Usage

Specifying the output file:
The output file that will be used for writing the s-expression is specified in the Preference page for the plugin. It is accessible from the main menu at Window -> Preferences -> Pda Preferences -> S-Expr Generation
Usage:
In a Pda diagram, select a protocol node and right-click to get its context menu. The s-expression representing the protocol will be generated into the specified file.

Inspecting the source code

In order to inspect the source code of this Pda tool extension, you have to import the S-Expression plugin as a binary project into your workspace. This allows you to browse the source code in order to get an idea how to write customized Pda tool interfaces.

In more detail, the following steps need to be performed:

  1. In the running Pda/Eclipse tool change to the Java perspective and deselect any working sets
  2. Run "Import" from the "File" menu
  3. Select "Existing Plug-ins and Fragment" and click "Next"
  4. Don't change anything on the following screen, click "Next"
  5. Select "edu.kestrel.pda.SExprPdaPlugin" on the next screen and click "Add", then "Finish"
  6. A project named "edu.kestrel.pda.SExprPdaPlugin" should have been created in your workspace; the source code can be found in the "src" folder of that project.

Last updated: July 17, 2006
Send comments and questions to ma@kestrel.edu, dusko@kestrel.edu. For more information, see also Dusko's homepage

UpdatesTopReference ManualS-Expr Plug-in