ing adaptive behavior into object request brokers at
runtime. Zhang and Cheng (Zhang and Cheng, 2006)
introduced an approach to create formal models of
adaptive programs behavior for analysis and imple-
mentation synthesis. Their approach separates spec-
ifications of adaptive and non-adaptive behavior by
simplifying their use. Using models as formal spec-
ifications of self-adaptive software systems has been
also proposed.Genie (N. Bencomo and Blair, 2008)
uses architectural models to support generation and
execution of adaptive systems for component-based
middlewares.
Although these contributions are interesting, we
believe they are limited when real-time configuration
becomes a requirement for the adaptation of the sys-
tem to its environment. The current paper proposes an
original CHAMELEON-based solution for a required
flexibility of the software as well as the optimal man-
agement of the used memory.
3 CASE STUDY: FESTO MPS
We present in this section the Benchmark Produc-
tion System FESTO (J.F. Zhang and Mosbahi, 2012)
(Khalgui, 2010) developed at Martin Luther Univer-
sity in Germany . Festo MPS is a platform used
by different universities for research and education
goals. Its platform is composed of three units (Fig-
ure 1): (i) Distribution Unit: composed of Pneumatic
Feeder and Converter to forward Cylindrical Work-
pieces from Stack to Testing Unit. (ii) Testing Unit:
composed of Detector, Elevator and Shift-Out Cylin-
der. It performs the checking of Workpieces for their
Height, Material Type, and Color. (iii) Processing
Unit: Workpieces that pass Testing Unit successfully
are forwarded to Rotating Disk of this unit for drilling.
We assume in this research work two drilling ma-
chines Drill1 and Drill2. Drill1 performs a simple
piercing whereas Drill2 performs a tapped piercing
of workpieces. Depending on the workpieces type,
the rotation of the Wick is equal to 15 rotations/s
for aluminum one and 20 rotations/s for bronze and
steel one. The result of the drilling operation is next
checked by a checker and finally the finished product
is removed from the system by an evacuator. To im-
plement actions performed by the drilling machines
Drill1 and Drill2, we propose the following set of
action methods: (i) On: to activate Drill1 or Drill2,
(ii) DownDo: to pierce a simple hole using the Drill1
Wick, (iii) Downt: to pierce a tapped hole using the
Drill2 Wick, (iv) Up: to elevate the Drill1 Wick or
Drill2 Wick after piercing, (v) Trans: to translate the
workpiece in order to drill a second hole, (vi) Of:
Figure 1: Operation of system FESTO. (M. Khalgui, 2010).
to deactivate Drill1 or Drill2. We use the attributes:
(i) Nbtour to indicates the number of Wick tour per
second which depends on Type of the workpiece,(ii)
Depth to indicate the depth of the hole pierced.
In our case study, 27 production modes of FESTO
MPS are considered according to Color c, Height h
and Types t of pieces. We cite the following cases:
• Case1: If c= ”red”, 10 =< h <= 20 and t= ”steel”
then, the drilling machine Drill2 is used with a
rotation equal to 20 rotations/s to do a tapped hole
having a depth of 5 cm in a single pass,
• Case2: If c= ”blue”, h > 30 and t= ”aluminum”
then, Drill1 and Drill2 are used with a rotation
equal to 15 rotations/s to do the piercing. In the
first time, Drill1 does a simple hole having a depth
of 10 cm in two passes.
The trivial implementation of the 27 production
modes requires logically 27 software classes with a
valuable number of attributes and constants. Since we
are dealing with embedded systems with limited fre-
quency of processor and size of memory, the imple-
mentation of these 27 classes is not an easy solution to
deploy: this is the real-time problem that the current
paper deals with. All these problems lead us to pro-
pose an optimal solution that reduces the complexity
of the system by representing it with a one reconfig-
urable class that will cover all system configurations
and minimize the memory consumption besides the
number of context switching: It is the CHAMELEON
class that will be presented in the next section. Note
that the CHAMELEON class is an original concept
for reconfigurable software systems which is not pro-
posed in related works, and presents today a new
PECCS2015-5thInternationalConferenceonPervasiveandEmbeddedComputingandCommunicationSystems
298