Ing. Ettore Iacomussi - ([email protected]) – 29th May 2012
Offline Synthesis Engine
in Practice:
Usage Instructions
Ing. Mario Caruso
Ing. Claudio Di Ciccio
Ing. Ettore Iacomussi
Prof. Massimo Mecella
D
IPARTIMENTO
I
NGEGNERIA
I
NFORMATICA,
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 2 / 21
Installation of VMware
Instructions for Linux Ubuntu 9.04 or later version
1.
Install required packages build-essential and linux-headers
sudo apt-get install build-essential linux-headers-$(uname -r)
2.
Download the latest VMware player (e.g.
VMware-Player-4.0.3-703057.x86_64.txt
) from
https://my.vmware.com/web/vmware/evalcenter?
p=player
3.
Change the file extension from .txt to .bundle e.g.
VMware-Player-4.0.3-703057.x86_64.bundle
4.
Run the installer
gksudo bash ./Downloads/VMware-Player-4.0.3-703057.x86_64.bundle
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 3 / 21
Installation of VMware
Instructions for Microsoft Windows
1.
Download the latest VMware player (e.g.
VMware Player 4.0.3 for
Windows)
from
https://my.vmware.com/web/vmware/evalcenter?p=player
2.
Run the installer
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 4 / 21
Startup of the Virtual Machine
Startup instructions
1.
Start the the Virtual Machine with OffSEn
2.
The machine is installed with a Linux Ubuntu 12.04 LTS 32bit OS
3.
Use “romance” as password for the login of the RomanCE user and
for the root user
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 5 / 21
OffSEn Server Startup Instructions
1.
Open a terminal from Application->Accessories->Terminal
2.
Startup Apache Tomcat:
– sudo /opt/apache-tomcat-6.0.26/bin/startup.sh
use 'romance' as password for the 'root' user
3.
Startup the OffSEn server:
cd $SM4ALL_HOME
./scripts/offsensvr
4.
Open the browser Application->Internet->Firefox and browse the
page
http://localhost:8080/offsen-web/
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 6 / 21
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 7 / 21
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 8 / 21
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 9 / 21
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 10 / 21
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 11 / 21
WakeUp Lite Example
1.
Definition of the Community of Available Services;
2.
Definition of the Databox;
3.
Definition of the Target;
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 12 / 21
WakeUp Lite Example
Community of Available Services
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 13 / 21
WakeUp Lite Example
SAR and VAR files
•
Service Instances are defined by
SAR
files;
•
Service Archives are ZIP compressed packages that contain:
– services.sdd.xml with the definitions of the instances;
– SBL files with the definitions of Service models behaviour;
•
Variable Instances are defined by
VAR
files;
•
Variable Archives are ZIP compressed packages that contain:
– variables.vdd.xml with the definitions of the instances;
– VML files with the definitions of Variable models;
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 14 / 21
WakeUp Lite Example
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 15 / 21
WakeUp Lite Example
Target Service WakeUpLite definition
<?xml version="1.0" encoding="UTF8"?> <service xmlns=" http://www.sm4allproject.eu/composition/sbl" … class="target"> <ts> <state name="start" type="initial"> <transition action="doRingAlarm"> <target state="alarmRung" /> </transition> </state> <state name="alarmRung" type="transient"> <transition action="doSwitchOnLight"> <target state="lightSwitchedOn" /> </transition> </state> <state name="lightSwitchedOn" type="transient"> <transition action="doBedUp"> <target state="bedRaisedUp" /> </transition> </state> <state name="bedRaisedUp" type="final" /> </ts> </service>
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 16 / 21
WakeUp Lite Example
Synthesis
•
Start the Synthesis from the Target panel;
•
Notes:
–
the first composition of the system is charged by parser class loading time;
– The TLV input (SMV language) is stored in
$SM4ALL_HOME/tmp/temporary.smv
– In each SMV file it appears a dummy service named no_op, used to fix
automatically the problem of states without outgoing transitions.
– The TLV output is stored in $SM4ALL_HOME/tmp/temporary.out
•
OffSEn performs the composition in 782ms;
•
TLV produces:
– 41 states
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 17 / 21
WakeUp Lite 2 Example
Target Service WakeUpLite2 definition
<?xml version="1.0" encoding="UTF8"?> <service xmlns=" http://www.sm4allproject.eu/composition/sbl" … class="target"> <ts> <state name="start" type="initial"> <transition action="doSwitchOnLight"> <target state="lightSwitchedOn" /> </transition> </state> <state name="lightSwitchedOn" type="transient"> <transition action="doBedUp"> <target state="bedRaisedUp" /> </transition> </state> <state name="bedRaisedUp" type="final" /> </ts> </service>
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 18 / 21
WakeUp Lite 2 Example
Synthesis
•
Start the Synthesis from the Target panel;
•
OffSEn performs the composition in 541ms;
•
TLV produces:
– 25 states
– 85 transitions
•
Notes:
– We removed one transition (
doRingAlarm
);
– OffSEn filters Available Services and does not take the
BedRoomAlarm
service for this run;
Ing. Ettore Iacomussi
OffLine Syntehsis Engine in Practice
P. 19 / 21
WakeUp Lite 3 Example
Target Service WakeUpLite3 definition
<?xml version="1.0" encoding="UTF8"?> <service xmlns=" http://www.sm4allproject.eu/composition/sbl" … class="target"> <ts> <state name="start" type="initial"> <transition action="doSwitchOnLight"> <target state="lightSwitchedOn" /> </transition> </state> <state name="lightSwitchedOn" type="transient"> <transition action="doBedUp"> <target state="bedRaisedUp" /> </transition> </state> <state name="bedRaisedUp" type="transient"> <transition action="doCallNurse"> <target state="nurse" /> </transition> </state> <state name="nurse" type="final" /> </ts> </service>