Projet

Général

Profil

SpeADL Reference » Historique » Version 5

Anonyme, 08/10/2014 16:09

1 1 Anonyme
h1. SpeADL Full Reference
2
3 5 Anonyme
h1. DRAFT Document
4 4 Anonyme
5 1 Anonyme
In SpeADL, a set of abstractions are provided to describe typical component-oriented architectures.
6
On top of these, SpeADL introduced two additional abstractions that complete the typical component-oriented ones in order to describe dynamic architectures and in particular Multi-Agent Systems.
7
The motivations behind these abstractions are fully explained in the Ph.D. thesis that led to the creation of MAY, see "that page":http://www.irit.fr/~Victor.Noel/PhD/Dissertation for more information.
8
9
The main idea with these abstraction is to permit to define software components, called ecosystems, that are able to create other software components, called species, dynamically, and link such components to some of their sub-components in a safe and controlled manner.
10
For example, one can define a Bank component containing a Database and that creates Account component which themselves requires access to the database.
11
Or one can define a MAS environment component that creates Agent components (internally architectured as desired) like an agent-oriented framework would do.
12
13
But more interestingly, one can actually implement its own connection between the dynamically created components and the creating component.
14
This enables for example to cleanly and easily implement any needed interaction mechanism in a MAS when there exists no agent-oriented framework proposing it, or to develop domain-specific relations between the agents and their environment.
15
16
h2. SpeADL⁻
17
18
It is needed to understand the content of the [[SpeADL Minus Reference|SpeADL⁻ Reference Guide]] before reading the current document.
19
20
h2. Ecosystem and Species Class Definition
21
22
From an external point of view, an ecosystem is exactly similar to a component: it has provided that can be accessed and provided ports that must be connected.
23
It has a name, can have type parameters and be a specialisation of another component.
24
It has an implementation in Java, it can be used as a part of another component (or ecosystem) or instantiated directly if it has no required ports.
25
26
On top of that, it can contain what is called species, a special type of component that can only be defined in an ecosystem.
27
28
Actually, we can say that a component is an ecosystem without any species.
29
30
h3. Keywords
31
32
An ecosystem class definition is declared with the keyword *ecosystem* followed by a name, optional type parameters and optional specialization.
33
Inside an ecosystem, provided and required ports can be declared as with normal components with the keywords *provides* and *requires*.
34
Inside an ecosystem, parts can be declared as with normal components with the keyword *part*.
35
36
A species is declared inside an ecosystem with the keyword *species* followed by a name starting with a capital.
37
It has no type parameters but follows those of its ecosystem, and cannot specialise a component.
38
39
Inside a species, parts can be declared as with normal components with the keyword *part*.
40
41 2 Anonyme
Finally, inside a species, a special type of part can be declared using the keyword *use* followed by a name without capital letter.
42
It follows the syntax _use name: partName.SpeciesName_ where:
43
* _partName_ is the name of a part in the ecosystem containing the current species and whose type is an ecosystem.
44
* _SpeciesName_ is the name of a species declared in the ecosystem of _partName_.
45 3 Anonyme
46
h3. Details
47
48
Declaring an ecosystem only enables to declare species in them: if there is no species in it, it is exactly similar to a component.
49
50
Declaring a species means that the ecosystem instance that contains it will be able to create new instances of the species at runtime, and these species will be considered strongly linked to the containing ecosystem instance that created them.
51
This is a thus 1..N relation.
52
Such a relation can be exploited either in the implementation of the ecosystem and the species (sharing references to Java objects, calling a port of the ecosystem from the species, etc), or at a higher-level using the uses that represents advanced interconnection mechanisms between ecosystem and their species using the *use* abstraction (using a message passing mechanism between the dynamically created instances of a species).
53
54
The important point about the *use* abstraction is that it relies on the definition of ecosystem and species: it is a way to recursively exploit an ecosystem and its species in another ecosystem and its species.
55
The contained ecosystem and its parts are instantiated with the containing ecosystem, and its species instantiated with the species that use them.