haais-dsl: dsl to develop home automation and ambient intelligence systems · 2009-05-03 ·...

39

Upload: others

Post on 03-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

HAAIS-DSL: DSL to develop Home Automationand Ambient Intelligence Systems

Pedro J. Clemente, Juan Hernández, José M. Conejero and LaraSánchez

Quercus Software Engineering Group. http://quercusseg.unex.esUniversity of Extremadura, Spain

This project has been �nanced by CICYT, project number TIN2008-02985

March 31th, 2009

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 2: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Outline

1 Introduction

2 MotivationExample: Service building (saving energy)Traditional development process

3 HAAIS-DSLModel Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

4 Conclusions

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 3: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Outline

1 Introduction

2 MotivationExample: Service building (saving energy)Traditional development process

3 HAAIS-DSLModel Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

4 Conclusions

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 4: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction

Future home and buildings

People and intelligent buildings interact with each other

Device coordination

The number of devices is increasing

A coordination among devices is required: comfort, securityand energy saving.

Home automation and Ambient Intelligence

Intuitive interfaces , which are usually embedded in any kind ofobjects

→Intelligence relations among users and devices

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 5: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction

Future home and buildings

People and intelligent buildings interact with each other

Device coordination

The number of devices is increasing

A coordination among devices is required: comfort, securityand energy saving.

Home automation and Ambient Intelligence

Intuitive interfaces , which are usually embedded in any kind ofobjects

→Intelligence relations among users and devices

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 6: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction

Future home and buildings

People and intelligent buildings interact with each other

Device coordination

The number of devices is increasing

A coordination among devices is required: comfort, securityand energy saving.

Home automation and Ambient Intelligence

Intuitive interfaces , which are usually embedded in any kind ofobjects

→Intelligence relations among users and devices

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 7: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction (II)

In order to be able to apply the elements of AmI and HA:

1 non-invasive hardware,

2 land/mobile communication infrastructures,

3 dynamic and distributed net devices,

4 managing all these technologies in a secure and reliable way

How do we develop software to these new kind of enviroments?

These factors implies a serious technology challenge, especiallyin the development of new software to control and monitor

all these systems.

However, current developments of these systems are carriedout by programming them at a very low level of abstraction.

The systems may be very tied to a speci�c technology.

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 8: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction (II)

In order to be able to apply the elements of AmI and HA:

1 non-invasive hardware,

2 land/mobile communication infrastructures,

3 dynamic and distributed net devices,

4 managing all these technologies in a secure and reliable way

How do we develop software to these new kind of enviroments?

These factors implies a serious technology challenge, especiallyin the development of new software to control and monitor

all these systems.

However, current developments of these systems are carriedout by programming them at a very low level of abstraction.

The systems may be very tied to a speci�c technology.

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 9: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction (III)

Model Driven Development for these systems

Increase the abstraction level to develop these systems →MDD

The models could be the key to develop these kind of systems

The process to develop software systems is based on model

transformations →.NET, Java/Jndi, OSGI, KNX/EIB, etc.

The objetive

To develop systems for Home automation and Ambientintelligence using Model Driven Development →Increasing theabstraction level required to develop this kind of systems

Characteristics: rapid system recon�guration, monitorization,system back-end and system front-end generation (PC, PDA,Phone Mobile)

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 10: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Introduction (III)

Model Driven Development for these systems

Increase the abstraction level to develop these systems →MDD

The models could be the key to develop these kind of systems

The process to develop software systems is based on model

transformations →.NET, Java/Jndi, OSGI, KNX/EIB, etc.

The objetive

To develop systems for Home automation and Ambientintelligence using Model Driven Development →Increasing theabstraction level required to develop this kind of systems

Characteristics: rapid system recon�guration, monitorization,system back-end and system front-end generation (PC, PDA,Phone Mobile)

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 11: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

Outline

1 Introduction

2 MotivationExample: Service building (saving energy)Traditional development process

3 HAAIS-DSLModel Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

4 Conclusions

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 12: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

Example characteristics

Several kinds of devices (lights, timers, sensors, etc.)

Con�gurations about each devices

Coordination among devices to obtain an speci�c behavior:comfort, security, to save energy, etc.

The system implementation

Back-End:

The code for embedded devices (sensors, actuators, etc.)The code for the con�guration system

Front-End: Web application to manage and monitor thesystems (PDA, PC, Phone mobile)

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 13: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

Example characteristics

Several kinds of devices (lights, timers, sensors, etc.)

Con�gurations about each devices

Coordination among devices to obtain an speci�c behavior:comfort, security, to save energy, etc.

The system implementation

Back-End:

The code for embedded devices (sensors, actuators, etc.)The code for the con�guration system

Front-End: Web application to manage and monitor thesystems (PDA, PC, Phone mobile)

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 14: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

Example: Service building (saving energy)

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 15: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

Traditional development process

The development process is based on speci�c technology (e.g.KNX/EIB, X10, etc.)

The con�gurations and deployments are implemented at verylow abstraction levels (e.g. instructions level) →Tedious tasksand error prone

Two kind of systems to develop

Physical installation control and con�gurations, databasecon�gurations (back-ends)User front-ends tools (for example, Web tools)

The system presented is quite simple but then imagine that we alsowant to control the temperature in the building, there are moredevices implied (heating, air conditioning, temperature sensor,blind. . . ) and the relations become much more complex.

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 16: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

Traditional development process

The development process is based on speci�c technology (e.g.KNX/EIB, X10, etc.)

The con�gurations and deployments are implemented at verylow abstraction levels (e.g. instructions level) →Tedious tasksand error prone

Two kind of systems to develop

Physical installation control and con�gurations, databasecon�gurations (back-ends)User front-ends tools (for example, Web tools)

The system presented is quite simple but then imagine that we alsowant to control the temperature in the building, there are moredevices implied (heating, air conditioning, temperature sensor,blind. . . ) and the relations become much more complex.

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 17: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

ETS3 tool for the KNX/EIB systems con�guration

To increase the abstraction level of systems development: ModelDriven Development

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 18: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Example: Service building (saving energy)Traditional development process

ETS3 tool for the KNX/EIB systems con�guration

To increase the abstraction level of systems development: ModelDriven Development

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 19: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Outline

1 Introduction

2 MotivationExample: Service building (saving energy)Traditional development process

3 HAAIS-DSLModel Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

4 Conclusions

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 20: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Model Driven Development (MDD) Overview

MDD is an emerging software engineering area

MDD focuses on the di�erence between a system designed

and its implementation

The models can guide the development process

Using abstracts models, the code for di�erent platforms maybe generated using model transformations

Several approaches:

Model Driven Architectures (MDA)

Domain Speci�c Language (DSL)

Software Factories (SF)

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 21: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Domain Speci�c Modeling (DSM) Overview

Domain Specific Modeling DSM Use

Domain-SpecificModeling Language

Model Transformation

Code for specific platform or framework

Models

Generated Code

Mo

de

l to

co

de

tra

nsf

orm

ati

on

DSL are based on speci�cdomain concepts

DSL improve thedevelopment of systemsbased on the sameconcepts

Generators andframeworks can bechanged to managedi�erent technologies

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 22: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Concrete MDD approach to develop these kind of systems

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 23: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

De�ning our DSL: Modeling Stack

A technical space is a model management framework.. Forexample, a typical M3, M2, M1 stack model.

It represents speci�c working context with speci�c

implementation technologies

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 24: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

HAAIS-DSL Metamodel (I)

Di�erent kinds of devices to taken into account:

Light sensors, temperature sensors, movement sensor, timer,buttons, etc. These devices have one or more outputs

Actuators like lights, blinds, air conditioning, heating, etc. aredevices with one or more inputs.

Devices can exist with both inputs and outputs. Forexample, a camera with a movement sensor.

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 25: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

HAAIS-DSL Metamodel (II)

De�ne the main basic concepts related with HAAI systems: device,input and outputs, binary or range input and outputs,properties and group address.

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 26: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Example of Model based on HAAIS Metamodel

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

11

1

1

1

1

1

<<null>>

SensorM1N

physical_address = 15/15/1state = on

<<Device>>

SensorM1S

<<Device>>

Timer

<<OutRange>>

out_sM1N

captured_value = 40sensibility = 80

<<OutRange>>

out_sM1S

<<OutRange>>

out_timerM1

<<OutRange>>

out_timerM2

<<GroupAddress>>

dir_M1N1

<<GroupAddress>>

dir_M1N2

<<GroupAddress>>

dir_M1S1

<<GroupAddress>>

dir_M1S2

<<InBinary>>

in_lM1N1

<<InBinary>>

in_lM1N2

<<InBinary>>

in_lM1S1

<<InBinary>>

in_lM1S2

<<Device>>

LightM1N1

<<Device>>

LightM1N2

<<Device>>

LightM1S1

<<Device>>

LightM1S2

<<Device>>

SensorM2N

<<Device>>

SensorM2S

<<OutRange>>

out_sM2N

<<OutRange>>

out_sM2S

<<OutRange>>

LightM2N1

<<OutRange>>

LightM2N2

<<Device>>

LightM2S1

<<GroupAddress>>

dir_M1N1

<<GroupAddress>>

dir_M2N2

<<GroupAddress>>

dir_M2S1

<<GroupAddress>>

dir_M2S2

<<InBinary>>

in_M2N1

<<InBinary>>

in_M2N2

<<InBinary>>

in_M2S1

<<InBinary>>

in_M2S2

<<Device>>

LightM2S2

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 27: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Example of Model based on HAAIS Metamodel

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 28: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Example of Model based on HAAIS Metamodel

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 29: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Example of Model based on HAAIS Metamodel

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 30: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Example detail of Model using HAAIS DSL

How model in detail an speci�c device?

Modeling each device, input or output using their speci�ccharacteristics or properties

These characteristics or properties are semantic information

The characteristics or properties could be added and con�guredat the model, allowing a better knowledge of the system model

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 31: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Example detail of Model using HAAIS DSL

How model in detail an speci�c device?

Modeling each device, input or output using their speci�ccharacteristics or properties

These characteristics or properties are semantic information

The characteristics or properties could be added and con�guredat the model, allowing a better knowledge of the system model

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 32: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Model to code transformation

DOMO

SERVERPROXY DB

WWW

apache

update

mySQLWeb Server

DevicesWeb Client

DOMOUEX.CONFDB

HAAI System modelling

Automatically generated

Front-End

Back-End Back-End

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 33: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Model to code transformation

Procesing the model using speci�c languages

The model normally are stored in XMI (XML ModelInterchange - OMG Speci�cation)

Currently there are several languages to implement modeltransformations: QVT, ATL, MTL, RubyTL, MofScript ...

Code example of MofScripttexttansformation Ecore2XMLcon�gurations (in model_in:'haais_mm') { // HAAIS metamodelmodel_in.EPackage::main() {�le('system_con�guration.xml')model_in.objectsOfType (model_in.EClass) -> forEach (ecc1) {ecc1.devices() // procesing devices information

}model_in.objectsOfType(model_in.EReference)-> forEach (ref) {ref.groupAdress() // processing group address

}self.createCon�guration()

...}

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 34: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Model to code transformation

Procesing the model using speci�c languages

The model normally are stored in XMI (XML ModelInterchange - OMG Speci�cation)

Currently there are several languages to implement modeltransformations: QVT, ATL, MTL, RubyTL, MofScript ...

Code example of MofScripttexttansformation Ecore2XMLcon�gurations (in model_in:'haais_mm') { // HAAIS metamodelmodel_in.EPackage::main() {�le('system_con�guration.xml')model_in.objectsOfType (model_in.EClass) -> forEach (ecc1) {ecc1.devices() // procesing devices information

}model_in.objectsOfType(model_in.EReference)-> forEach (ref) {ref.groupAdress() // processing group address

}self.createCon�guration()

...}

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 35: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Model Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

Code generated for speci�c platforms

Code generated

SQL Database schema, con�guration and data.

Complete con�guration devices and group devices which aremanaged by DomoServer (an speci�c software layer to manage EIBdevices).

Web application implemented on PHP and Ajax to manage thedevices installed on the system. Its is accessible by laptops, PDAs,mobile phones, etc.

DOMO

SERVERPROXY DB

WWW

apache

update

mySQLWeb Server

DevicesWeb Client

DOMOUEX.CONFDB

HAAI System modelling

Automatically generated

Front-End

Back-End Back-End

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 36: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Outline

1 Introduction

2 MotivationExample: Service building (saving energy)Traditional development process

3 HAAIS-DSLModel Driven Development and Domain Speci�c ModelingDevelopment process based on HAAIS-DSLHAAIS-DSL MetamodelModel to code transformation

4 Conclusions

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 37: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Conclusions

Model Driven Development process can be used to develop HomeAutomation and Ambient Intelligence Systems

The models guide the development process

Model transformation allow us to obtain back-end and front-end

Home Automation and Ambient Intelligence

The code and con�guration generation decreases the handwritten code and the number of errors

Model Driven Development can be used in other kind of

embedded devices

Currently, we are extending the set of devices and their properties

Developing an speci�c modeling-tool to help the modeled phase

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 38: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Conclusions

Model Driven Development process can be used to develop HomeAutomation and Ambient Intelligence Systems

The models guide the development process

Model transformation allow us to obtain back-end and front-end

Home Automation and Ambient Intelligence

The code and con�guration generation decreases the handwritten code and the number of errors

Model Driven Development can be used in other kind of

embedded devices

Currently, we are extending the set of devices and their properties

Developing an speci�c modeling-tool to help the modeled phase

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs

Page 39: HAAIS-DSL: DSL to develop Home Automation and Ambient Intelligence Systems · 2009-05-03 · Introduction Motivation HAAIS-DSL Conclusions Introduction Future home and buildings People

icsi-logo

IntroductionMotivation

HAAIS-DSLConclusions

Questions ?

Thanks for your attention

mail: [email protected]

web page: http://quercusseg.unex.es/pjclemente

IIES at EuroSys'09-Pedro J. Clemente([email protected]) HAAIS-DSL: DSL to develop HA and AIs