9
Generative Programming for a Component-based Framework of Distributed Embedded Software Systems Xu Ke, Krzysztof Sierszecki Mads Clausen Institute for Product Innovation, Univer sity of Southern Denmark Grundtvigs Alle 150, 6400 Soenderborg, Denmark {xuke, ksi}@mci.sdu.dk

Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

  • Upload
    gracie

  • View
    38

  • Download
    1

Embed Size (px)

DESCRIPTION

Generative Programming for a Component-based Framework of Distributed Embedded Software Systems. Xu Ke, Krzysztof Sierszecki Mads Clausen Institute for Product Innovation, University of Southern Denmark Grundtvigs Alle 150, 6400 Soenderborg, Denmark {xuke, ksi}@mci.sdu.dk . - PowerPoint PPT Presentation

Citation preview

Page 1: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

Xu Ke, Krzysztof Sierszecki Mads Clausen Institute for Product Innovation, University of Southern DenmarkGrundtvigs Alle 150, 6400 Soenderborg, Denmark{xuke, ksi}@mci.sdu.dk

Page 2: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

Generative Programming for COMDES-II

Software Design

Design of componentmodels in COMDES II

Implementation

Automatic synthesis offramework components

Dom

ain

Des

ign

models

Deploym

ent

Meta-models andconstraints in GME

Framework templates in CodeWorkerExecutable component algorithms in GCC

Illustration of generative programming approach for COMDES-II

Page 3: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

COMDES-II Framework COMDES-II: Component-based Design of Software for Distributed Embedded Systems [version 2] A domain-specific software framework providing

modelling concepts and constraints for different issues in the problem space of a distributed real-time embedded system, such as:

• Component structures, interaction, hierarchy• System architecture, concurrency• Environmental physicality (external events, etc.)• Time

Page 4: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

COMDES-II FrameworkCOMDES-II

Platform Independent Aspect

Components and SystemsConfiguration Framework

- Meta-models of FBs, HARTEX Kernel and Apps- Models of FBs, HARTEX Kernel and Apps- Interaction between different components

Implementation Aspect

FB Framework

- Different kinds of FBs- Reusability and re-configurability of FBs- Hierarchy of FBs- Heterogeneity of FBs

Run-time Framework(HARTEX Kernel)

- Reactivity- Concurrency- Time- Communication between actors

FB,Kernel,Apps

mapping

Make files and linker scripts

Platform Dependent Aspect

Deployment Framework

- Portability- HAL- Control of I/O drivers (sensing and actuating)- Component repository

mapping

manipulation

Page 5: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

depositbelt

feed belt

pressrobotRSwitchA

RRotationRMotor

RMotorA

RMotorB

FBelt

RArmBPress

PressFBelt

DBelt

DBelt

RSwitchB

DBSensorDBMotor

PLamp

FBMotorFBSensor

PSensor

RArmARPosition

RArmBRArmA

RPosition

RArmARPosition

RArmBRPosition

LCDRCX1ButtonsRCX1

ButtonsRCX2

environme

nt

envi

ronm

ent

Models in COMDES-II Two-level specification of the system architecture

briarmarm

stasta

FB_control_SM

inpinp

arm

armA_state

inpinp

arm

armA_position

inpinp

bri

light_sensorECovered

EFB

EOpen

state_updated

raw_value

armAstate

state

armAposition

input

constant

function block instance

output

control_task

RAr arm

RArmA

sta FBe

FBelt

FBS raw

FBSensor

RPoarmarm

RPosition

armarmraw

stasta

control_task

statearmAstate

raw_value

armAposition

feed belt

input communication driver

actor tasklocal signalinput physical driver output communication driver

actor

Page 6: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

Meta-modeling COMDES-II

• physicality (handling external interrupts)• actor structure (I/O drivers, actor task etc.)• actor task concurrency (primitive priority-based scheduling)• actor interaction (actor communication, actor synchronization etc.) • timing aspects (timed multitasking)

Meta-modeling HARTEXTM

• function block structures• function block interaction • function block hierarchy

Meta-modeling function blocksComposition of meta-models

Page 7: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

Automatic Synthesis of COMDES-II

models parser parse tree generator

C sourcefiles

compilerlinkerfinal codeor update

componentinstances

repository -componentalgorithms

linker script

pres

s a

butto

n

BNF scripts templatescripts

treemanipu-

lation

Cod

eWor

ker L

evel

GC

C L

evel

link map Makefile

application synthesis

component generation

re-configuration

Page 8: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

COMDES-II Toolset

Eclipse + CodeWorker Java AP

I

Verificationmodels

COMDES-II Meta-models

xme files

Component/Application

models

ComponentImplementations(C files, makefile)

Model checkers(e.g. UPPAAL)

Automatic synthesis

Model

transfo

rmatio

n

InputPar

sed

repository

compiledCode generator

GME Applicationconfigurations,

linker scriptsConfigurator

read

read

Executables for deployment

stored

Page 9: Generative Programming for a Component-based Framework of Distributed Embedded Software Systems

Conclusion Provides an overview of the generative programming approach for COMDES-II Various modeling concepts and models of computation in COMDES-II are presented Meta-models and semantic constraints of COMDES-II components established in GME are discussed and exemplified An automatic code generation technique developed with CodeWorker tool is demonstrated The deployment of executables based on GCC is briefly described