Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PapyrusRT: Modelling and Code Generation

Papyrus-RT is an open-source industrial-grade, complete modeling environment for the development of complex, software intensive, real-time, embedded, cyber-physical systems.

This presentation discusses the motivations for the project, the UML-RT language, the tool and the code generation.

This presentation was given in the Open-Source Software for Model Driven Engineering workshop (OSS4MDE'15) collocated with the MODELS'15 conference, Ottawa, Canada, September 29, 2015.

  • Be the first to comment

PapyrusRT: Modelling and Code Generation

  1. 1. © 2014 Zeligsoft Improving embedded software development productivity PapyrusRT: modelling and code generation Ernesto Posse Zeligsoft September 29, 2015 OSS4MDE’15 – Ottawa, Canada
  2. 2. Improving embedded software development productivity © 2014 Zeligsoft What is PapyrusRT? • A new open-source MDE environment for UML-RT • Based on Papyrus, a Eclipse-based environment for UML • UML-RT: UML-based language for real-time embedded systems
  3. 3. Improving embedded software development productivity © 2014 Zeligsoft Collaboration • Zeligsoft (codegen, runtime, CDT int.) • CEA List (tooling, validation, import, CDT int.) • Bran Selic (profile) • Ericsson (req., C++ profile, interm. repr.) • Peter Cigéhn (req., testing) • IncQuery Labs (interm. repr.)
  4. 4. Improving embedded software development productivity © 2014 Zeligsoft Why? • UML-RT history: – 1987: Telos project at BNR – 1992: ObjectTime – 1994: ROOM (Selic, B., Gullekson, G. and Ward, P.) – 1998: UML-RT (Selic, B., Rumbaugh, J.) – 2000: Rational RoseRT – 2006: IBM RSA Real Time Edition
  5. 5. Improving embedded software development productivity © 2014 Zeligsoft Why? • Proprietary tools limit extensibility and customizability • Need to support existing user base • Need of an open-source solution
  6. 6. Improving embedded software development productivity © 2014 Zeligsoft Why Papyrus? • Already supports UML 2.5 • Rich UI • Open-source • Rich Eclipse ecosystem
  7. 7. Improving embedded software development productivity © 2014 Zeligsoft UML-RT • Object-Oriented • Concurrent • Real-Time systems • UML with constraints – Composite Structure Diagrams – State Machine Diagrams
  8. 8. Improving embedded software development productivity © 2014 Zeligsoft UML-RT • Capsules (Actors): – Active classes – Strong encapsulation and well defined interfaces (ports typed by Protocols) – Behaviour: hierarchical state machines – Structure: May contain parts (sub-capsules) – Communication by message-passing (connectors)
  9. 9. Improving embedded software development productivity © 2014 Zeligsoft UML-RT: capsules
  10. 10. Improving embedded software development productivity © 2014 Zeligsoft UML-RT: state machines
  11. 11. Improving embedded software development productivity © 2014 Zeligsoft UML-RT cont. • Protocols: – Port types – Protocol messages (signals): • Input • Output • Input/output – Protocol message parameters – Port role: base/conjugated
  12. 12. Improving embedded software development productivity © 2014 Zeligsoft UML-RT dynamic structure • Capsule roles: • Capsule instances are associated to threads • Services: – SAPs and SPPs with dynamic wiring – Library: Timing, Log, Frame Role Instantiation Ownership Life-time Fixed static container = container Optional dynamic container <= container Plugin dynamic independent independent
  13. 13. Improving embedded software development productivity © 2014 Zeligsoft UML-RT execution semantics • Runtime system • Controllers – Each capsule is associated to a controller – A controller executes a “main” loop – Handles messages addressed to its capsules – Manages the capsule’s lifetimes
  14. 14. Improving embedded software development productivity © 2014 Zeligsoft Code generation • Target language: – Now: C++03 – Later: Java • Target OS: – Now: Linux – Later: Windows, others • Legacy applications
  15. 15. Improving embedded software development productivity © 2014 Zeligsoft Demo (early adopters version)
  16. 16. Improving embedded software development productivity © 2014 Zeligsoft Code generation • Transformation • Implemented in Java and Xtend • Supports incremental generation
  17. 17. Improving embedded software development productivity © 2014 Zeligsoft Code generator structure
  18. 18. Improving embedded software development productivity © 2014 Zeligsoft Some challenges • Introducing an intermediate meta-model: – Designing the meta-model – Introducing an additional step – Transforming an existing step – … while development continues on the existing transformation – … and the meta-model changes too
  19. 19. Improving embedded software development productivity © 2014 Zeligsoft Some more challenges • Dealing with inter-element dependencies • Generating code from non-valid models • Dealing with partially defined models
  20. 20. Improving embedded software development productivity © 2014 Zeligsoft Wish list • Impact analysis – Internal • Dependency: E.g. How does changing the way we generate/transform protocols affect the way we generate/transform capsules? • Consistency: E.g. Does a change break something? – External E.g. How does changing the way we generate/transform protocols affect the runtime, and viceversa?
  21. 21. Improving embedded software development productivity © 2014 Zeligsoft Links • Website https://www.eclipse.org/papyrus-rt/ • Wiki https://wiki.eclipse.org/Papyrus-RT • Bugzilla https://bugs.eclipse.org • Git/Gerrit https://git.eclipse.org/r/papyrus- rt/org.eclipse.papyrus-rt

×