Eclipse CD5405 Manuale Utente

Navigare online o scaricare Manuale Utente per Computer di bordo auto Eclipse CD5405. Getting Started with Little-JIL Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 23
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 0
Getting Started with Little-JIL
Case Study: Measuring Stream Discharge
Barbara Lerner
Mount Holyoke College
May 2010
1. What is Little-JIL?
Little-JIL is a coordination language. It is used to define processes that coordinate the
activities of multiple people and software tools, operating in a distributed environment and
sharing data and resources. It differs from a programming language in that it is not used to
express actual computations. For that, we use Java. Instead, we describe how people and
tools should interact, who/what is responsible for which tasks, the order in which the tasks
should be performed, the data that should be passed between tasks, the resources to be
shared and the actions to take when things go wrong.
This certainly all sounds vague at this point, but will become clear as we move through this
tutorial. A Little-JIL process is defined in several pieces:
A coordination diagram. This is a graphical depiction of the steps making up the process,
their decomposition into substeps, and the control flow among these steps. The
coordination diagram also serves as the skeleton to which we attach various annotations
about other aspects of the process.
An artifact model. This is the collection of datatypes that are used by the objects passed
around during the process’s execution. We will be using Java to define the datatypes.
A resource model. This describes the resources shared by the agents during execution of
the process. At least initially, we will only be using the resource model to identify the
agents.
The agents. These will be written as Java programs.
The environment in which we execute Little-JIL processes is called Juliette. It consists of a
number of tools:
Visual-JIL. This is the editor that allows us to create Little-JIL processes. It is an Eclipse
plug-in.
JSim. This is a simulator for Little-JIL. It allows us to simulate the processes before they
are complete and is useful to debug as we create the process.
Little-JIL Checker. This does some syntactic and semantic checking of the Little-JIL
processes and is another plug-in to Eclipse.
jul. This is the interpreter that is used to execute a complete process.
2. Stream Discharge Process
The following description of the Stream Discharge process is excerpted from A Software
Engineering Approach to Scientific Data Management, written by Cori Teshera-Sterne as the
final report of her independent study project in May 2010.
The current research was most closely focused on using data processing from the
stream-flow sensors as an initial example process. The data is derived from weirs
installed on Big and Little Nelson Brooks, the parallel outlet streams of the Black
Gum Swamp wetland (a second set of gages in the form of pipes (culverts) are
installed on another stream, Bigelow Brook, above and below a beaver swamp. The
Vedere la pagina 0
1 2 3 4 5 6 ... 22 23

Sommario

Pagina 1 - May 2010

Getting Started with Little-JILCase Study: Measuring Stream DischargeBarbara LernerMount Holyoke CollegeMay 20101. What is Little-JIL?Little-JIL is a

Pagina 2

On the Calc Q step, add an in parameter named s whose type is streamDischarge. SensorData. Add an out parameter named q whose type is streamDischarge

Pagina 3

•Define a handler where control should go when the exception occurs and attach the handler to the correct place in the process•Determine where control

Pagina 4

range, indicating that either the sensor failed or the data got corrupted in some way between the sensor and when it was read by the process.To define

Pagina 5

will not be possible for us to calculate a Q value. As a result, we will want to skip the steps Adjust S, Calc Q and Output Q. Therefore, we will at

Pagina 6 - 5. Defining Resources

streamDischargeAgent requested that Read S (3) start at 4streamDischargeAgent started performing Read S (3) at 4streamDischargeAgent requested that Re

Pagina 7

Read S (10) was terminated at 19 because OutOfRangeExceptionstreamDischargeAgent requested that Get Q (9) terminate at 19 because OutOfRangeExceptionG

Pagina 8

/Users/barbaralerner/Documents/LJilJarFiles/juld/bin/jul/Users/barbaralerner/Documents/LJilJarFiles/juld/binProcess COMPLETED sucessfully.12.Defining

Pagina 9 - 7. Data flow

! ! ! System.out.println("File " + file.toString() + " found");! ! ! try {! ! ! ! // Open the file! ! ! ! final BufferedReader in

Pagina 10 - 9. Exception Handling

package streamDischarge;import java.io.BufferedReader;import java.io.Serializable;import java.util.HashSet;import java.util.Set;import laser.juliette.

Pagina 11

! ! ! e.printStackTrace();! ! } catch (IllegalTransition e) {! ! ! e.printStackTrace();!!}!!!}! /**! * Reads the next value from the input file and s

Pagina 12

pipes and weirs operate on the same principles, but installation decisions depend on the hydrological and physical characteristics of the stream banks

Pagina 13

This agent code also requires a new SensorData constructor that takes a String parameter and parses the String to create a SensorData object. Here is

Pagina 14

-> jul install StreamDischarge.jul/Users/barbaralerner/Documents/LJilJarFiles/juld/bin/jul/Users/barbaralerner/Documents/LJilJarFiles/juld/bin->

Pagina 15 - 11.Running the Interpreter

Step: Output QStep: Build QStep: Get QStep: Read S(ReadSHandler) Assigning SensorData object: (Parser) Current line:2007-12-21T05:00,355.2083,4.77Step

Pagina 16

Step: Read S(ReadSHandler) Assigning SensorData object: Process COMPLETED successfully.Now, you should try extending this process by providing the age

Pagina 17

The Eclipse window above shows the Java perspective. It consists of a package explorer panel on the left, a panel where error messages (and other inf

Pagina 18

Format. The source menu contains a command called “Format”. Please be sure to use this command on your Java code. It will ensure that your program

Pagina 19

Next, open the “Name shadowing and conflicts” in the right panel. Make sure that “Local variable declaration hides another field or variable” is set

Pagina 20

The right side of the window shows a palette that you will use to create your coordination diagram. Select and Marquee allow you to select pieces of

Pagina 21

We will attach an agent to the root step. This agent will then be responsible for executing all steps within the process. To do that select the root

Pagina 22

</simulation>To run a process in the simulator, we must first create a jul file. Please follow the instructions at the URL below to create a ju

Pagina 23 - 13.For More Information

This output shows each step being assigned to an agent and the agent starting that step. If the step is a leaf, we see the agent completing the step.

Commenti su questo manuale

Nessun commento