Plug-in structure.

The next figure (figure1) shows the package structure of the plug-in. The main package of the plug-in is es.upv.dsic.issi.moment.maudaemon.maude. It contains the plug-in class, and the methods to create a new Maude process. The package es.upv.dsic.issi.moment.maudaemon.maude provides the interfaces that are public, and can be used by the programmers (see figure 2). The package es.upv.dsic.issi.moment.maudedaemon.maude.internal contains the classes tha implement the interfaces specified in the "maude" package. You can see the relationships beetween both packages in the figure 3.

The package es.upv.dsic.issi.moment.maudedaemon.parser provides a set of classes to preprocess commands written in Full Maude and finally, the "ui.*" packages provide the user interface components (console, preferences and pop-ups).

Packages of the MaudeDaemon plugin.

As we explained before, these are the interfaces that we provide to the programmer. The classes that implement these interfaces are hidden to the user. The MaudeDaemon API provides two different APIs to control a Maude process. The first one is by means of the IMaudeProcessInteract interface. This interface (and implemented class) is intended to be used by interactive processes. The methods are at a very low level of abstraction, and the programmer has to worry about the size of the buffer of the Maude process (if theuser executes one command in Maude, and the response fills the output buffer, the Maude process will be suspended and it will hang up).

This API is designed to be used by user interfaces that simulate a console, for example.

The second one, the MaudeProcessBatch interface, is designed to be used to programatically execute Maude commands. The user has to create a MaudeJob, which contains all the information about the tasks that he wants to perform, and later he has to execute it in the MaudeProcessBatch.

Open in new window.
Interfaces of the API provided to the programmer.

The next figure shows the main classes that are involved in the control of Maude. It shows the relationships between the public interfaces and the classes that implement the mechanism to run Maude and execute commands.

Open in new window.
Classes that conform the core of the MaudeDaemon.

As the figure shows, there is a base class, MaudeProcessBase, that implements all the basics mechanism to create a Maude process. The specialized classes (MaudeProcessInteract and MaudeProcessBatch) define the proper methods to execute the command in an interactive way or as a batch process.