Projet

Général

Profil

SpeADL Reference » Historique » Version 8

Anonyme, 09/10/2014 10:04

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 7 Anonyme
The main idea with these abstraction is to permit to define software components, called ecosystems, that are able to dynamically create other software components, called species, and link such components to some of their sub-components in a safe and controlled manner.
10 1 Anonyme
For example, one can define a Bank component containing a Database and that creates Account component which themselves requires access to the database.
11 7 Anonyme
Or one can define a MAS environment component that creates Agent components (internally architectured as desired)connected through localised interaction mechanisms like an agent-oriented framework would do.
12 1 Anonyme
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 6 Anonyme
h2. Ecosystem Class Definition
21 1 Anonyme
22 6 Anonyme
From an external point of view, an ecosystem is exactly similar to a component: it has provided ports that can be accessed and required ports that must be connected.
23 1 Anonyme
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 7 Anonyme
Its only specificity is that it can contain what is called species, a special type of component that can only be defined in an ecosystem.
27 1 Anonyme
Actually, we can say that a component is an ecosystem without any species.
28
29
h3. Keywords
30
31
An ecosystem class definition is declared with the keyword *ecosystem* followed by a name, optional type parameters and optional specialization.
32
Inside an ecosystem, provided and required ports can be declared as with normal components with the keywords *provides* and *requires*.
33
Inside an ecosystem, parts can be declared as with normal components with the keyword *part*.
34
35 6 Anonyme
Finally, inside an ecosystem, species can be declared, as detailed below.
36
37
h3. Details
38
39 1 Anonyme
Declaring an ecosystem only enables to declare species in them: if there is no species in it, it is exactly similar to a component.
40
41
h2. Species Definition
42
43 7 Anonyme
Species are components class that can only be instantiated from within an ecosystem instance.
44
Species are to ecosystem what non-static inner classes are to classes.
45
46
Because of this particular relation to ecosystem, species can be connected to elements inside the ecosystem in two different ways:
47
* Directly to the parts and ports of the ecosystem.
48
* Indirectly through a special construct called Uses that enables to take into account the dynamic creation aspects of the species to:
49
** Build tailored ecosystem-species relations.
50
** Build tailored inter-species relations meditated by the ecosystem.
51
52 6 Anonyme
h3. Keywords
53
54 1 Anonyme
A species is declared inside an ecosystem with the keyword *species* followed by a name starting with a capital.
55
It has no type parameters but follows those of its ecosystem, and cannot specialise a component.
56
57 6 Anonyme
Inside a species, provided and required ports can be declared as with normal components with the keywords *provides* and *requires*.
58 2 Anonyme
Inside a species, parts can be declared as with normal components with the keyword *part*.
59
60 1 Anonyme
Finally, inside a species, a special type of part can be declared using the keyword *use* followed by a name without capital letter.
61
It follows the syntax _use name: partName.SpeciesName_ where:
62
* _partName_ is the name of a part in the ecosystem containing the current species and whose type is an ecosystem.
63 2 Anonyme
* _SpeciesName_ is the name of a species declared in the ecosystem of _partName_.
64 7 Anonyme
65
The bindings (of the uses and of the parts) can point to ports inside the species, as with a normal component, but also to ports inside the ecosystem containing the species.
66
They can NOT point to other species of the ecosystem.
67 3 Anonyme
68
h3. Details
69
70
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.
71
This is a thus 1..N relation.
72
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).
73
74
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.
75
The contained ecosystem and its parts are instantiated with the containing ecosystem, and its species instantiated with the species that use them.