an eclipse based integrated environment for developing
play

An Eclipse-based Integrated Environment for Developing Executable S - PowerPoint PPT Presentation

An Eclipse-based Integrated Environment for Developing Executable S tructural Operational S emantics S pecifications Adrian Pop and Peter Fritzson Programming Environment Laboratory Department of Computer and Information S cience


  1. An Eclipse-based Integrated Environment for Developing Executable S tructural Operational S emantics S pecifications Adrian Pop and Peter Fritzson Programming Environment Laboratory Department of Computer and Information S cience Linköping University 2006-08-26 S OS ’ 2006, August 26, Bonn, Germany

  2. Outline � Introduction � Relational Meta-Language (RML) � Eclipse Environment for RML � Framework overview � Examples � Conclusions and Future Work � Demo 2

  3. Relational Meta-Language � a system for generation of efficient executable code from S OS / Natural S emantics specifications � fast learning curve, used in teaching and specification of languages such as: Java, Modelica, MiniML, Pascal,.. � developed by Mikael Pet t erson � “ Compiling Nat ural S emant ics” PhD Linköping Universit y 1996 � also as S pringer Lect ure Not es in Comput er S cience (LNCS ) vol. 1549 in 1999 � previously poor environment support (Emacs, command line tools) 3

  4. S OS / Natural S emantics vs. Relational Meta– Language RML has the same visual syntax as S OS / Natural S emantics rule <cond> RelName1(H1,T1) => R1 & ... RelNameN(Hn,Tn) => Rn & ------------------------------ RelName(H, T) => R RML language properties � S eparation of input and output arguments/ results � S tatically strongly typed � Polymorphic type inference � Efficient compilation of pattern-matching 4

  5. S OS / Natural S emantics vs. Relational Meta-Language Natural S emantics formalism Relational Meta-Language integers: v Int ∈ module exp1: (* Abstract syntax of language expressions (abstract syntax): Exp1 *) datatype Exp = INTconst of int :: e Exp v ∈ = | ADDop of Exp * Exp | 1 2 e e + | S UBop of Exp * Exp | MULop of Exp * Exp | 1 2 e e − | DIVop of Exp * Exp | 1* 2 e e | NEGop of Exp relation eval: Exp => int | 1/ 2 e e end | e − 5

  6. Natural S emantics vs. Relational Meta-Language Natural S emantics formalism Relational Meta-Language relation eval: Exp => int = ⇒ (1) v v axiom eval(INTconst(ival)) => ival rule eval(e1) => v1 & ⇒ ⇒ ⇒ 1 1 2 2 v1+v2 v3 e v e v eval(e2) => v2 & int_add(v1,v2) => v3 (2) ------------------------------------- ⇒ 1 2 3 e e v + eval( ADDop(e1, e2) ) => v3 rule eval(e1) => v1 & ⇒ ⇒ ⇒ 1 1 2 2 v1-v2 v3 e v e v eval(e2) => v2 & int_sub(v1,v2) => v3 (3) ------------------------------------- ⇒ 1 2 3 e e v + eval( SUBop(e1, e2) ) => v3 eval(e1) => v1 & rule ⇒ ⇒ ⇒ 1 1 2 2 v1*v2 v3 e v e v eval(e2) => v2 & int_mul(v1,v2) => v3 (4) ------------------------------------- ⇒ 1 2 3 e e v + eval( MULop(e1, e2) ) => v3 eval(e1) => v1 & rule ⇒ ⇒ ⇒ 1 1 2 2 v1/v2 v3 e v e v eval(e2) => v2 & int_div(v1,v2) => v3 (5) ------------------------------------- ⇒ 1 2 3 e e v + eval( DIVop(e1, e2) ) => v3 ⇒ ⇒ eval(e) => v & int_neg(v) => vneg rule -v vneg e v --------------------------------- (6) eval( NEGop(e) ) => vneg − ⇒ e vneg end (* eval *) 6

  7. The Need for RML Integrated Environment � Facilitate language learning and specification development � easy creation of RML proj ects and modules � easy discovery of errors � browsing, code highlighting and assistance � debugging (step, run, stop and inspect features) � code refactorings � Large specifications are hard to develop � Example: The OpenModelica compiler for Modelica � 43 packages � 57083 lines of code � 4054 relations � 132 data structures 7

  8. ystem 8 The RML S Frontend Compiler .c file Compiler .c file RML GCC .rml file

  9. The RML Eclipse Environment – Overview (I) RML RML Parser Compiler RML Code Assistant RML Debugging RML Editor Framework RML Browsing RML System RML Browser RML Debug Interface RML Debugging SOSDT Perspective SOSDT Environment 9

  10. The RML Eclipse Environment – Overview (II) RML .rml file Compiler Type Inference Information RML Parser AST Information RML model RML RML Browser Editor RML Code Assistant Eclipse 10

  11. The RML Eclipse Environment – Overview (III) RML .rml file Compiler Executable RML + Debug Debugging Interface runtime RML Editor Eclipse 11

  12. Creating RML proj ects Creation of RML proj ects using wizards 12

  13. Creating RML modules (I) Creation of RML modules using wizards 13

  14. Creating RML modules (II) Creation of RML proj ects and modules using wizards 14

  15. Code browsing Code Browsing for easy navigation within large RML files. Automatic update on file save. 15

  16. Error detection (I) Parse error detection on file save 16

  17. Error detection (II) S emantic error detection on file save 17

  18. Conclusions and Future work � Conclusions � first prototype of RML Eclipse Environment � proj ect and file management � code browsing and assistance � integrated debugging � Future Work � a lot of bug fixing � code folding (comments, relations, etc) � refactorings (AS T refactorings) � better code checking � faster debugging � more code assistance � code templates � better integration with the RML compiler 18

  19. RML Eclipse Environment Demo 19 Demo

  20. End Thank you! Questions? http://www.ida.liu.se/~pelab/rml RML: SOSDT: http://www.ida.liu.se/~adrpo/sosdt 20

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