Session Title The RGen Ruby Code Generator and its use in Automotive SW Development

Session Type Tutorial

Duration 75 minutes

Session Description

This presentation introduces the RGen Ruby framework and describes real world experience using RGen to support software development in the context of the AUTOSAR automotive standard.

RGen provides internal Ruby DSLs for defining metamodels, model transformations and code generation templates. it is inspired by openArchitectureWare and has evolved from an experiment of bringing together Ruby's dynamic language features and the domain of modelling and code generation. It is now a lightweight and flexible framework that has proven to be useful for several small and medium size projects.

This presentation introduces the RGen based "Pragma" tool which has been created in the "FEM" ECU project at BMW and Lear. Pragma provides a textual language to describe AUTOSAR models as well as a set of model transformations and code generators. The tool is continuously being adapted to the project's changing needs while the FEM SW matures.

Participants will gain a better understanding of how dynamic languages and in particular internal DSLs can be used to efficiently realize modelling and code generation tasks. In projects with a tight time schedule and changing requirements on tooling this efficiency is crucial.

The session describes the challenges faced during development and their solution using Ruby and RGen:

  • Multiple large metamodels specified in different ways
  • Custom Instantiators and Serializers
  • Multiple Model Transformations
  • Multiple Code Generators
  • A textual representation of the DSL as User Interface
  • Automation and constraint checks
  • Performance issues with large models
  • Model visualization
     
Speaker(s) Martin Thiede (Lear Corporation)
Martin Thiede is a software architect and developer with the FEM project at Lear Corporation in Munich. Prior to this Martin worked at BMW Car IT also in Munich on software development and code generation for embedded automotive Electronic Control Units (ECU). Work here included development of an openArchitectureWare based prototype AUTOSAR modelling and code generation tool and design and development of the RGen Framework.

Intended Audience Beginner and upwards. Some knowledge of Ruby would be useful but not essential.