MontiArc Automaton Jan Oliver Ringert, Bernhard Rumpe, Andreas - - PowerPoint PPT Presentation

montiarc
SMART_READER_LITE
LIVE PREVIEW

MontiArc Automaton Jan Oliver Ringert, Bernhard Rumpe, Andreas - - PowerPoint PPT Presentation

MontiArc Automaton Jan Oliver Ringert, Bernhard Rumpe, Andreas Wortmann Software Engineering RWTH Aachen http://www.se-rwth.de/ Ringert, Rumpe, Wortmann Outline Software Engineering RWTH Aachen Seite 2 1. Motivation and Overview 2.


slide-1
SLIDE 1

Jan Oliver Ringert, Bernhard Rumpe, Andreas Wortmann Software Engineering RWTH Aachen http://www.se-rwth.de/

MontiArc Automaton

slide-2
SLIDE 2

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 2

Outline

The MontiCore Framework 2. Motivation and Overview 1. Toolchain 3. Evaluations 4. Conclusion 5 .

slide-3
SLIDE 3

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 3

Motivation

  • Robotics challenge for software engineering:
  • vast number of (unique) platforms
  • various programming languages and paradigms
  • complex applications
  • Software hardly reusable or portable
  • this hampers broad propagation of robotics applications
  • Modeling abstracts from implementation issues
  • Current modeling frameworks
  • narrow focus
  • not extensible
slide-4
SLIDE 4

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 4

The Approach

  • Model software architecture and behavior of robotics applications
  • Use established modeling language framework

to allow arbitrary behavior modeling languages

  • I/Oω automata, LightRocks, port-rules, UML/P
  • Use established architecture description language

to describe component and connector architecture

  • Allow code generation to arbitrary target platforms

using a compositional template-based framework

  • Model platform independent software architectures by

postponing choice of platform to deployment

presented tomorrow at 08:30

MontiArc Automaton

slide-5
SLIDE 5

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 5

Components & Connectors

SimpleBumperBot «deploy»

Timer(500) Motor(MotorPort.B) mLeft TouchSensor (SensorPort.S1) Motor(MotorPort.A) mRight BumpControl

MontiArc

time to sent ALERT after setting (500 ms) touch sensor set up to sense on port S1 on NXT Lego Brick motor set up to use actuator port A components encapsulate subset of system’s functionality connectors effect and regulate component’s interactions

  • MontiArc is a textual DSL developed

using MontiCore

slide-6
SLIDE 6

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 6

MontiArcAutomaton

  • MontiArc with I/Oω automata to model component behavior
  • Current code generator supports time synchronous execution of

transitions with strong causality

BumpControlSpec1

«chaos completion»

Boolean bump MotorCmd lMot MotorCmd rMot idle

/ rMot = STOP, lMot = STOP Bump = false / rMot = STOP | [], lMot = STOP | []

go ing

Bump = true / rMot = FWD, lMot = FWD

MontiArcAutomaton

alternative output

  • n ports

initial output commands to motors transition read input from ports or variables

slide-7
SLIDE 7

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 7

Outline

The MontiCore Framework 2. Motivation and Overview 1. Toolchain 3. Evaluations 4. Conclusion 5 .

slide-8
SLIDE 8

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 8

MontiCore

  • Framework for language development [KRV10]
  • Languages: CFG + Context Conditions
  • Language composition: inheritance, embedding, aggregation
  • Parser generation with ANTLR
  • Compositional symbol table framework [Voe11]
  • Template-based code generation framework [Sch12]

MontiArc OCL CD

slide-9
SLIDE 9

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 9

Context Conditions Code Template Calculators Model AST MontiArcAutomaton Grammar Templates Parser <FreeMarker>

«conform» «generates» «creates» «uses» «uses» «uses» «uses» «uses» «uses» «generates»

DSLTool

«uses»

Symbol Tables

«uses» «uses» «uses» «generates» «uses»

Component Diagram

Back-End (Generator) Front-End (Language Framework)

MontiCore Framework Overview

used by domain experts Java

MontiCore

«uses»

slide-10
SLIDE 10

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 10

Embedding Behavior Modeling Languages

BumperBot

pressed Timer(500) timer TouchSensor bumper bump / right = STOP, left = STOP bump:true / right = FWD, left = FWD bump:true / right = BWD left = BWD timer = DOUBLE_DELAY Signal = ALERT / right = FWD, timer = SINGLE_DELAY signal = ALERT / left = FWD driving turning idle signal backing Motor leftMotor Motor rightMotor cmd cmd right left timer signal cmd BumpControl controller

Transistion triggered by input ALERT on port signal after driving backwards Component instance timer of type Timer instantiated with 500ms Input port signal

  • f component

BumpControl Component instance leftMotor of type Motor from the platform specific library

cmd var t signal next t SET * ? ? t < 500 ? t+1 ? t == 500 ALERT t+1 …

Also have embedded Java as a DSL

slide-11
SLIDE 11

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 11

Code Generation

  • Compositional framework using Freemarker templates with template
  • perators and AST
  • Generation gap pattern and factories to connect generated

components with manual implementations

  • Allows composition and reuse of code generators
  • e.g., stand-alone OCL2Java generator used for transitions
  • Currently available to:
  • Incremental code generation
  • Mona (specification),
  • EMF Ecore (graphical editing),
  • Java/leJOS/rosjava (prototyping) and
  • Python/ROS (production)
slide-12
SLIDE 12

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 12

Code Generation Example

automaton BumpControl { state idle [initial {rMotor:STOP,lMotor:STOP}], driving, backing, turning; idle -> driving {bump:true}/{rMotor:FWD,lMotor:FWD}; driving -> backing {bump:true}/{rMotor:BWD,lMotor:BWD,timerCmd:DOUBLE}; MontiArcAutomaton

ASTTransition ASTState ASTAutomaton * *

… …

AST

MontiCore generates

if (state.equals(State.${ast.getFrom()}) <#if op.call(guardCalc)>&& (${op.getVal("guardExp")})</#if> <#foreach c in ast.getChannel_in()> && (${c.getInName()}.getCurVal() != null && ${c.getInName()}.getCurVal() == ${op.include(stream, c.getInput())})</#foreach> { ... state = State.${ast.getTo()};} FreeMarker/Java public class BumpControl implements Component { ... public void compute() { if (state.equals(State.idle) && (bump.getCurVal() != null && bump.getCurVal() == true) ) { ... state = State.driving; }} Java

DSLTool calls FreeMarker generates uses OCL code generation

slide-13
SLIDE 13

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 13

Outline

The MontiCore Framework 2. Motivation and Overview 1. Toolchain 3. Evaluations 4. Conclusion 5 .

slide-14
SLIDE 14

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 14

Textual Editors and Tooling

  • Partially generated Eclipse plugins for each language
  • Compositonal context condition Java framework
  • Maven driven build process
  • Prototypical deployment language (using views) available
  • Working on a platform independent modeling concept
  • Integrated editors for component model test language
slide-15
SLIDE 15

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 15

Specifications and Refinement

Spec1

«chaos completion»

Boolean bump MotorCmd lMot MotorCmd rMot idle

/ rMot: STOP, lMot: STOP bump:false / rMot: STOP | [], lMot: STOP | []

go ing

bump:true / rMot: FWD, lMot: FWD

MontiArcAutomaton

  • When turned on the BumperBot does not drive until the bumper is

pressed and the BumperBot starts going forward only if the bumper is pressed.

  • Behavior of components may be stepwise refined
  • refinement is removing underspecification/nondeterminism
  • We can check refinement by a translation to automated theorem prover

Mona (WS1S)

alternative output initial commands to motors transition activated by input

slide-16
SLIDE 16

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 16

Graphical Editor Eclipse Plugin

representation of the component’s ports graphical representation

  • f the BumpControl automaton

textual representation

  • f the BumpControl automaton

representation of the automaton’s variables

slide-17
SLIDE 17

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 17

Outline

The MontiCore Framework 2. Motivation and Overview 1. Toolchain 3. Evaluations 4. Conclusion 5 .

slide-18
SLIDE 18

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 18

Coffee Service

Issue order to cell phone hosted website Cell phone server informs coffee preparation robot which informs the coffee delivery robot Coffee delivery robot picks up a mug Coffee delivery robot returns to coffee machine and orders coffee Coffee preparation robot delivers to office

coffee preparation robot coffee delivery robot cup dispenser robot

1 2 3 4 5

The team

slide-19
SLIDE 19

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 19

Toast Service

Toaster robot activates toaster Toast is toasted Toast gripper robot approaches toaster Toast gripper robot approaches toast Toast gripper robot picks up toast

1 2 3 4 5

Toast gripper robot delivers toast

Toaster robot toast gripper robot

slide-20
SLIDE 20

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 20

Toaster Architecture

ToastPickup «deploy»

Timer(87sec) Motor(MotorPort.A) lever

MontiArc

TouchSensor(SensorPort.1) serviceRequest

LeverControl

Boolean request Integer rotate

/ rotate = 0° request = true / rotate = 600°, cmd = START

up down

timerSignal = ALERT / rotate = -600°

TimerCmd cmd TimerSigbal sig

slide-21
SLIDE 21

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 21

ToastPickup Architecture

ToastPickup «deploy»

Motor(MotorPort.C) left Motor(MotorPort.A) gripper ArmController

MontiArc

Motor(MotorPort.B) up TouchSensor(SensorPort.1) serviceRequest

slide-22
SLIDE 22

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 22

ArmControl

ToastPickup Behavior

Boolean request Integer gripper

MontiArcAutomaton

idle Integer upDown has toast at toast Integer leftRight

  • ver

toaster with toast

  • ver

plate

  • ver

toaster

request = true / gripper = 120°, upDown = 300°, leftRight = 90° / upDown = -300° / gripper = -120° / upDown = 300° / leftRight = -90° / gripper = 120°

slide-23
SLIDE 23

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 23

Challenge: Libraries

  • Different platforms require different libraries
  • Controllers should be platform-independent

Models

«uses» «uses» «uses»

without implementation

Models ModelLibrary PlatformLibrary

with automaton implementation

Code Code

«uses»

platform-specific manual implementations generated by MontiCore

ModelLibraryImpl.. PlatformSpecificImpl.

Controller Implementation Controller Models

Models Application

slide-24
SLIDE 24

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 24

Challenge: Deployment

  • How to use the same controller models

for different robot platforms?

  • Use generic models as long as possible
  • Let deployment take care of it

Motor for a LEGO NXT robot controlled via Java in leJOS

Control Generic Motor

deployment model: GenericMotor = NXTMotor NXTMotor.Port = PORT_A MotorCmd

Control leJOS Motor

MotorCmd

  • Models remain platform agnostic
  • Requires modifications to deployment language

+ Dlej + Dros

Motor for a LEGO NXT robot controlled via ROS in Python

Control NXT Motor

MotorCmd

slide-25
SLIDE 25

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 25

Outline

The MontiCore Framework 2. Motivation and Overview 1. Toolchain 3. Evaluations 4. Conclusion 5 .

slide-26
SLIDE 26

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 26

Conclusion

  • We can model robotics software architectures as

MontiArcAutomaton extends MontiArc

  • We can describe robot behavior with I/Oω automata
  • Emdedding other DSLs is easily possible due to

the compositional approach of MontiCore

  • We can generate code for various languages and platforms
  • Supported by a flexible toolchain and a graphical editor
  • There are several interesting challenges
slide-27
SLIDE 27

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 27

Strategic research directions in robotic software development

  • What are the problems of software development in robotics that can

be considered "solved"? 1. Transfer of binary solutions between similar platforms 2. Communication of software modules 3. Abstract description of system architecture and behavior

  • What are the solutions to these problems that can be considered

best practice and why? 1. A framework supporting strict CBSE 2. An established communication framework (ROS, CORBA, …) 3. Our contribution allows an integrated modeling of architecture and component behavior. This wholesome modeling approach to robotic application reduces the conceptual gap between problem domain and implementation domain.

slide-28
SLIDE 28

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 28

Strategic research directions in robotic software development

  • To what extent the solutions to these problems are robotic-specific?

1. They are not. CBSE is best practice in other domains as well. 2. This holds for communication frameworks too. 3. Development of effective robotics applications requires experts from several domains. Providing corresponding modeling languages allows to abstract from implementation details and thus frees them from becoming software engineering experts.

  • What problems of software development in robotics remain to be

solved?

  • An integrated system/domain model able to capture robotic systems

at suitable levels of abstraction while covering the breadth of diverse platforms and applications.

  • Robotics currently lacks efficient languages for modeling specific

problems (e.g., manipulation, reasoning, …)

  • Awareness and support for modeling the robotic system as a

composition of the cyber and physical world and being able to describe, analyze and animate it as such.

slide-29
SLIDE 29

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 29

Strategic research directions in robotic software development

  • Why state-of-the art software technology is not adequate to solve

these problems?

  • Solutions focus on well-defined problems, specific platforms and

narrow domains. They are thus not easily transferred and new problems often require different tools, methodologies.

  • Solutions by software engineers are mainly concerned with

describing and analyzing the software system but have shortcomings in capturing a system’s physical environment.

  • Robotics and software engineering still are considered two

mostly disjoint disciplines.

  • What are the promising research directions to solve the open

problems?

  • Abstract and universal/multi-purpose description techniques and

system models to transfer methodology and solutions between different robotic applications

slide-30
SLIDE 30

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 30

End.

Thank you

slide-31
SLIDE 31

Ringert, Rumpe, Wortmann Software Engineering RWTH Aachen

Seite 31

Literature

  • [HBK11] M. Hägele, N. Blümlein, O. Kleine: Wirtschaftlichkeitsanalysen neuartiger Servicerobotik-

Anwendungen und ihre Bedeutung für die Robotik-Entwicklung. Fraunhofer IPA und ISI: Studie im Auftrag des BMWF; Stuttgart 2010.

  • [HRR12] A. Haber, J. O. Ringert, B. Rumpe: MontiArc - Architectural Modeling of Interactive

Distributed and Cyber-Physical Systems. RWTH Aachen University, Technical Report. AIB-2012-

  • 03. February 2012.
  • [KRV10] H. Krahn, B. Rumpe, S. Völkel: MontiCore: a Framework for Compositional Development
  • f Domain Specific Languages. In: International Journal on Software Tools for Technology

Transfer (STTT), Volume 12, Issue 5, pp. 353-372, September 2010.

  • [Sch12] M. Schindler: Eine Werkzeuginfrastruktur zur agilen Entwicklung mit der UML⁄P. Shaker

Verlag, ISBN 978-3-8440-0864-7. Aachener Informatik-Berichte, Software Engineering Band 11. 2012.

  • [SSL11] C. Schlegel, A. Steck, A. Lotz: Model-Driven Software Development in Robotics:

Communication Patterns as Key for a Robotics Component Model. Introduction into Modern

  • Robotics. Edited by Daisuke Chugo, Sho Yokota. iConcept Press. 2011, S. pp. 119-150
  • [Voe11] S. Völkel: Kompositionale Entwicklung domänenspezifischer Sprachen. Shaker Verlag,

ISBN 978-3-8440-0328-4. Aachener Informatik-Berichte, Software Engineering Band 9. 2011.