ALFred Documentation

The ALFred development environment

The ALFred development environment

We are going now to detail the different steps to perform in ALFred in order to obtain an execution environment from the Esterel specification of a distributed application.

Let us call SimpleEntity a simple example of an Esterel module that specify a very simple application entity. This entity only needs one type of transmission which is partial-reliable/in-sequence/non-real-time/unicast. We focus here on the transmission specification aspect. Suppose for example this application just send a request/wait for a request and wait for a response/send a response.

The development of this application in ALFred involves the following steps:

  1. First describe your application entity in an Esterel module. Here you have the possibility to enter QoS parameters associated to ADU types using the alfred mode of Emacs.
  2. Then you have to call the ALFred parser on this specification that will generate numbers of files:
    
                ------------------------------
               | esterel + QoS specifications |
                ------------------------------
    	              /       \
    	             /         \
    	            /           \
                AlfAppli.strl    QoSsetting.java
                AlfAuto0.strl       AlfAppliRun.java
                AlfAuto1.strl         AlfAppliInterface.java
    		:		        <ADU_type_0>.java,<ADU_type_1>.java,...
    		:		        <data_type_0>.java,<data_type_1>.java,...
                    :                 AlfAuto0Interface.java
                    :                 AlfAuto1Interface.java        
                                              :
                                              :
    

    The new module in the file "AlfAppli.strl" just contains the application specification in Esterel where we have added some removal of ADUs when they have been consumed by input signals (remember the ADUs are stored in an asynchronous queue). We have also added an input signal that allows a top level abortion from the environment. Here is the AlfAppli.strl file generated from the SimpleEntity example.

    The Esterel specifications of the protocols to manage transmission of ADUs stands in the files "AlfAuto<no>.strl" where no is an integer smaller than the number of ADU types present in the specification.

    The data interface to protocols automata is given in the Java library of ALFred and inherited in the files "AlfAuto<no>Interface.java".

  3. Next step consists in writing the interface between the application automaton written in Esterel and its environment (the data interfaces for the protocols are already present in the java library of ALFred). ALFred parser provides you with the file "AlfAppliInterface.java" wich contains the skeleton of the interface (output signals, sensors, functions and procedures are implemented by Java methods). You have to fill all of these except for ADUs emission to the network which are automatically generated. You have also to fill the data interface in each java file generated per declared type and each java file per ADU type (Esterel types are implemented by Java classes). You can have a look at the Java files generated for the SimpleEntity example: AlfAppliInterface.java and COMMAND.java.

    The execution program has now to be completed by the user with the application call of the automaton. The parser has generated a skeleton AlfAppliRun.java that has to be filled by the user. Some initializations appear in this file and the place where to put the part of application code is indicated under comments. Here you have to respect the Esterel syntax choices, except for the call of the automaton itself. The automaton (let us call it auto) is wrapped into the application handler from ALFred in order to take into account the reception events from the network. Here is a short description of the syntax for interaction between the automaton and its environment:

  4. In a last step you have to compile the Esterel files of application/protocols in Java. Finally you just have to run the Java compiler on all your java files.
  5. Finally you can execute your application.

Delphine Kaplan
Last modified: Fri Aug 7 15:43:46 MET DST 1998