A Modular OpenModelica Compiler Backend J. Frenkel W. Braun - - PowerPoint PPT Presentation

a modular openmodelica compiler backend
SMART_READER_LITE
LIVE PREVIEW

A Modular OpenModelica Compiler Backend J. Frenkel W. Braun - - PowerPoint PPT Presentation

OpenModelica Workshop 2011 Chair of Construction Machines and Conveying Technology A Modular OpenModelica Compiler Backend J. Frenkel W. Braun A. Pop M. Sjlund Outline 1. Introduction 2. Concept of Modular Compiler


slide-1
SLIDE 1

Chair of Construction Machines and Conveying Technology

A Modular OpenModelica Compiler Backend

OpenModelica Workshop 2011

  • J. Frenkel • W. Braun
  • A. Pop • M. Sjölund
slide-2
SLIDE 2

1. Introduction 2. Concept of Modular Compiler Backend 3. Roadmap and Implementation Status 4. Conclusion

Outline

Linköping. 07/02/2011 A Modular OpenModelica Compiler Backend. Slide 2

slide-3
SLIDE 3

OpenModelica:

  • pen-source Modelica-based modelling and simulation

environment for industrial and academic usage

  • academic  research and teaching
  • 1. Introduction

Slide 3 Linköping. 07/02/2011 A Modular OpenModelica Compiler Backend.

Modelica Model Simul ation

Frontend

Backend

Flat Model

OpenModelica Compiler

slide-4
SLIDE 4

Started in 2008 with OpenModelica as a user Since 2009 member of the development team

  • Bugfixes
  • Multibody
  • Implemented new features
  • Tearing
  • Relaxation
  • Multibody

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 4

  • 1. Introduction
slide-5
SLIDE 5

What is planned for the backend?

  • Extend existing algorithms
  • Implemented new algorithms

What is wrong with the backend?

  • Functions for symbolic manipulation are very low level
  • Direct access to basic structures
  • Consistency of equation system cannot be guaranteed
  • Changes lead to unexpected side effects

=> High level symbolic manipulation is needed

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 5

  • 1. Introduction
slide-6
SLIDE 6

Optimised form of the system of equations

  • analyse
  • evaluate
  • implement
  • test

ambitious task  needs support from development environment  clear, easy to understand and task related framework

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 6

  • 1. Introduction

symbolic manipulation/optimisation algorithm system of equations

slide-7
SLIDE 7

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 7

  • 1. Introduction

Expectations Current Situation

Redesign of the compiler Backend

slide-8
SLIDE 8
  • 2. Concept

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 8

Packet Concept for Each Level

Symbolic Math Equation System Backend Implementation

Expression Symbol Simplify Solve Variable Equation Algorithm Equation System Modules for Optimisation Matching Sorting Code Writer DAE-Handler for Index Reduction …

slide-9
SLIDE 9

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 9

Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

  • 2. Concept
slide-10
SLIDE 10

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 10

Evaluate Parameter Function Inlining Remove Alias Equations ... Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

  • 2. Concept
slide-11
SLIDE 11

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 11

Matching Sorting DAE-Handler for Index Reduction:

  • Dummy Derivative with

Dynamic State Selection

  • Index Reduction and

Projection/Stabilization Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

  • 2. Concept
slide-12
SLIDE 12

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 12

Remove Alias Equations Function Inlining Inline Integration ... Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

  • 2. Concept
slide-13
SLIDE 13

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 13

Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

  • 2. Concept
slide-14
SLIDE 14

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 14

Tearing Relaxation Function inlining Inline Integration evaluate parameter Remove Alias Equations ... Dummy Derivative Index Reduction with Projection Index Reduction with Stabilization

Assemble your own Compiler!

… Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

  • 2. Concept
slide-15
SLIDE 15

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 15

Interfaces

User Module ... Output ... ... Output ...

XML File

External symbolic Equation system Optimisation Tool

  • 2. Concept

Flat Model Input Phase Past-Optimisation Output Phase Transformation Phase Pre-Optimisation

slide-16
SLIDE 16
  • 3. RoadMap/Status
  • 1. Resort functions
  • 2. Combine functions with the same purpose
  • 3. Implement internal Interfaces for Equation System Pipeline
  • 4. Improve performance of Equation System Pipeline
  • 5. Improve existing Optimisation modules

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 16

slide-17
SLIDE 17
  • 3. RoadMap/Status
  • 1. Resort functions  DONE
  • 2. Combine functions with the same purpose  DONE
  • 3. Implement internal Interfaces for Equation System Pipeline
  • 4. Improve performance of Equation System Pipeline
  • 5. Improve existing Optimisation modules
  • From 24. – 30. Oct. 2010 at

Linköping University Backend Reorganisation Week

Linköping, 07/02/2011 A Modular OpenModelica Compiler Backend Slide 17

slide-18
SLIDE 18

Slide 18 Linköping. 07/02/2011 A Modular OpenModelica Compiler Backend.

  • 4. Conclusion

new Backend Implementation:

  • increase the clarity of the code
  • decrease the error-proneness
  • improve the extensibility
  • improve the maintainability
  • speed development process up
  • improve compiler performance and dependability
  • simplifies implementation of new features
  • decrease barrier of becoming a compiler developer
  • increases usability of the compiler
slide-19
SLIDE 19

The End

Slide 19 Linköping. 07/02/2011 A Modular OpenModelica Compiler Backend.

The Motion Platform at Dresden University can be visited before/during/after the Modelica Conference 2011 in Dresden.

slide-20
SLIDE 20

The End

Slide 20 Linköping. 07/02/2011 A Modular OpenModelica Compiler Backend.

Jens Frenkel Dresden University of Technology jens.frenkel@tu-dresden.de http://tu-dresden.de/bft