montiarc
play

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.


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

  2. Ringert, Rumpe, Wortmann Outline Software Engineering RWTH Aachen Seite 2 1. Motivation and Overview 2. The MontiCore Framework 3. Toolchain 4. Evaluations 5 . Conclusion

  3. Ringert, Rumpe, Wortmann Motivation Software Engineering RWTH Aachen Seite 3  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

  4. Ringert, Rumpe, MontiArc Wortmann The Approach Software Engineering Automaton RWTH Aachen Seite 4  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 presented tomorrow at 08:30  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

  5. Ringert, Rumpe, Wortmann Components & Connectors Software Engineering RWTH Aachen Seite 5 components encapsulate subset of system’s connectors effect and regulate MontiArc functionality component’s interactions motor set up to use SimpleBumperBot actuator port A «deploy» BumpControl Motor(MotorPort.A) mRight TouchSensor (SensorPort.S1) Motor(MotorPort.B) mLeft touch sensor set up to sense on port S1 on NXT Lego Brick Timer(500) time to sent ALERT after setting (500 ms)  MontiArc is a textual DSL developed using MontiCore

  6. Ringert, Rumpe, Wortmann MontiArcAutomaton Software Engineering RWTH Aachen Seite 6 MontiArc with I/O ω automata to model component behavior  transition read input MontiArcAutomaton from ports or variables BumpControlSpec1 «chaos completion» Boolean bump Bump = false / rMot = STOP | [], MotorCmd rMot lMot = STOP | [] / rMot = STOP, alternative output lMot = STOP go on ports idle ing Bump = true / rMot = FWD, MotorCmd lMot initial output commands lMot = FWD to motors  Current code generator supports time synchronous execution of transitions with strong causality

  7. Ringert, Rumpe, Wortmann Outline Software Engineering RWTH Aachen Seite 7 1. Motivation and Overview 2. The MontiCore Framework 3. Toolchain 4. Evaluations 5 . Conclusion

  8. Ringert, Rumpe, Wortmann MontiCore Software Engineering RWTH Aachen Seite 8  Framework for language development [KRV10]  Languages: CFG + Context Conditions  Language composition: inheritance, embedding, aggregation MontiArc OCL CD  Parser generation with ANTLR  Compositional symbol table framework [Voe11]  Template-based code generation framework [Sch12]

  9. Ringert, Rumpe, Wortmann MontiCore Framework Overview Software Engineering RWTH Aachen Seite 9 Component Diagram «conform» MontiArcAutomaton DSLTool Model Grammar «uses» «uses» «uses» «uses» used by domain experts «generates» Context MontiCore Parser Conditions «uses» «generates» «creates» «uses» «uses» AST Symbol Tables Java Front-End «uses» «uses» «uses» (Language Framework) Back-End «uses» (Generator) Template Templates Calculators «uses» «generates» Code <FreeMarker>

  10. Ringert, Rumpe, Wortmann Embedding Behavior Modeling Languages Software Engineering RWTH Aachen Seite 10 BumperBot left BumpControl bump:true Motor controller / right = BWD bump:true leftMotor pressed TouchSensor left = BWD / right = STOP, / right = FWD, bumper timer = DOUBLE_DELAY cmd left = FWD left = STOP driving right bump Motor idle backing rightMotor signal = ALERT / left = FWD cmd Signal = ALERT timer turning / right = FWD, signal timer = SINGLE_DELAY Component instance leftMotor of type Motor from the Input port signal Transistion triggered by input platform specific of component ALERT on port signal after library BumpControl driving backwards Timer(500) Also have timer embedded Java as a DSL cmd var t signal next t cmd signal Component instance ? SET * 0 timer of type Timer ? ? t < 500 t+1 instantiated with 500ms ? t == 500 ALERT t+1 …

  11. Ringert, Rumpe, Wortmann Code Generation Software Engineering RWTH Aachen Seite 11  Compositional framework using Freemarker templates with template operators 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  • Mona (specification), Currently available to: • EMF Ecore (graphical editing), • Java/leJOS/rosjava (prototyping) and • Python/ROS (production)  Incremental code generation

  12. Ringert, Rumpe, Wortmann Code Generation Example Software Engineering RWTH Aachen Seite 12 MontiArcAutomaton 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}; MontiCore generates AST * * ASTTransition ASTAutomaton ASTState … … DSLTool calls FreeMarker/Java if (state.equals(State.${ ast .getFrom()}) <# if op .call(guardCalc)>&& (${ op .getVal("guardExp")})</# if > <# foreach c in ast .getChannel_in()> && (${c.getInName()}.getCurVal() != null uses OCL && ${c.getInName()}.getCurVal() == code generation ${ op .include(stream, c.getInput())})</# foreach > { ... state = State.${ast.getTo()};} FreeMarker generates Java public class BumpControl implements Component { ... public void compute() { if (state.equals(State.idle) && (bump.getCurVal() != null && bump.getCurVal() == true ) ) { ... state = State.driving; }}

  13. Ringert, Rumpe, Wortmann Outline Software Engineering RWTH Aachen Seite 13 1. Motivation and Overview 2. The MontiCore Framework 3. Toolchain 4. Evaluations 5 . Conclusion

  14. Ringert, Rumpe, Wortmann Textual Editors and Tooling Software Engineering RWTH Aachen Seite 14  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

  15. Ringert, Rumpe, Wortmann Specifications and Refinement Software Engineering RWTH Aachen Seite 15 MontiArcAutomaton Spec1 «chaos completion» bump:false / rMot: STOP | [], Boolean bump lMot: STOP | [] MotorCmd rMot / rMot: STOP, alternative output lMot: STOP go idle ing bump:true / rMot: FWD, MotorCmd lMot initial commands lMot: FWD to motors transition activated by input  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)

  16. Ringert, Rumpe, Wortmann Graphical Editor Eclipse Plugin Software Engineering RWTH Aachen Seite 16 textual representation graphical representation of the BumpControl automaton of the BumpControl automaton representation of the representation of the component’s ports automaton’s variables

  17. Ringert, Rumpe, Wortmann Outline Software Engineering RWTH Aachen Seite 17 1. Motivation and Overview 2. The MontiCore Framework 3. Toolchain 4. Evaluations 5 . Conclusion

  18. Ringert, Rumpe, Wortmann Coffee Service Software Engineering RWTH Aachen Seite 18 coffee preparation robot 1 2 3 cup dispenser coffee robot delivery robot Issue order to cell Cell phone server informs coffee Coffee delivery robot phone hosted picks up a mug preparation robot which informs the website coffee delivery robot 4 5 The team Coffee delivery robot returns to Coffee preparation robot coffee machine and orders coffee delivers to office

  19. Ringert, Rumpe, Wortmann Toast Service Software Engineering RWTH Aachen Seite 19 toast gripper robot 1 2 3 Toaster Toaster robot activates Toast is toasted Toast gripper robot robot toaster approaches toaster 4 5 Toast gripper robot Toast gripper robot Toast gripper robot approaches toast delivers toast picks up toast

  20. Ringert, Rumpe, Wortmann Toaster Architecture Software Engineering RWTH Aachen Seite 20 MontiArc ToastPickup «deploy» TouchSensor(SensorPort.1) serviceRequest Motor(MotorPort.A) lever LeverControl request = true / rotate = 600°, cmd = START Integer rotate / rotate = 0° up Boolean request down TimerCmd cmd TimerSigbal sig timerSignal = ALERT / rotate = -600° Timer(87sec)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend