The Rascal Language Workbench Tijs van der Storm Paul Klint - - PowerPoint PPT Presentation

the rascal language workbench
SMART_READER_LITE
LIVE PREVIEW

The Rascal Language Workbench Tijs van der Storm Paul Klint - - PowerPoint PPT Presentation

The Rascal Language Workbench Tijs van der Storm Paul Klint Jurgen Vinju et al. Tuesday, May 31, 2011 r Rascal Team o h t u a C W L Paul Jurgen Tijs Bob Klint Vinju v/d Storm Fuhrer P M I IBM I N R I A INRIA


slide-1
SLIDE 1

The Rascal Language Workbench

Tijs van der Storm Paul Klint Jurgen Vinju et al.

Tuesday, May 31, 2011

slide-2
SLIDE 2

Rascal Team

Paul Klint Jurgen Vinju Tijs v/d Storm Bob Fuhrer IBM

I N R I A INRIA

L W C a u t h

  • r

I M P

Tuesday, May 31, 2011

slide-3
SLIDE 3

Credits

Esprit: GIPE I & GIPE II (90’ s) ASF+SDF Meta-Environment (00’ s) Eclipse IDE Meta Tooling Platform (IMP) Rascal will be contributed to Eclipse.org in June 2011

“ G e n e r a t i

  • n
  • f

I n t e r a c t i v e P r

  • g

r a m m i n g E n v i r

  • n

m e n t s ” How Tijs & I were drafted...

Tuesday, May 31, 2011

slide-4
SLIDE 4

Rascal application areas

D S L c

  • n

s t r u c t i

  • n

Static Analysis Source-to-source transformation Refactoring Repository Mining MDE Reverse engineering Software Visualisation I D E c

  • n

s t r u c t i

  • n

...

Tuesday, May 31, 2011

slide-5
SLIDE 5

IDE construction = Meta Programming + GUI Programming

Tuesday, May 31, 2011

slide-6
SLIDE 6

IDE construction = Meta Programming + GUI Programming

Eclipse IMP

Tuesday, May 31, 2011

slide-7
SLIDE 7

IDE construction = Meta Programming + GUI Programming

Eclipse IMP Rascal

Tuesday, May 31, 2011

slide-8
SLIDE 8

Meta Programming is about analysis and transformation

  • f (models of) programs

Tuesday, May 31, 2011

slide-9
SLIDE 9

Source Code Models Pictures

Generation Extraction Formalization Visualization Transformation Conversion Analysis

Domain Analysis for Rascal

  • Meta Programming-

Tuesday, May 31, 2011

slide-10
SLIDE 10

Rascal’ s Paradigm

all about textual languages a model is source code a context-free grammar is a meta model a parse tree is a model instance a model transformation is a source-to-source transformation patterns written in concrete syntax textual languages may be mapped to abstract languages

(from the MDE perspective)

Tuesday, May 31, 2011

slide-11
SLIDE 11

Rascal’ s Paradigm

all about abstract languages a model is data (adt, rel, set, map, int, str, loc) a rascal type is a meta model a value is a model instance model transformation is a function some details patterns are values with holes list, set, bag, map matching list, set, bag, map comprehension

(from the MDE perspective)

Tuesday, May 31, 2011

slide-12
SLIDE 12

Tuesday, May 31, 2011

slide-13
SLIDE 13

Design Principles (a.k.a. Requirements)

Scaling up and scaling down Expressivity without magic One-stop-shop (integrated) Open Immediate

Simple = Simple A d v a n c e d = A c c e s s i b l e Meta Programming = Programming Integration = Valuable REPL

Tuesday, May 31, 2011

slide-14
SLIDE 14

Ingredients

Familiar syntax & notation Immutable data Pattern-based dispatch Domain specific data-types General context-free grammars String templates Java back door to reuse third-party code IDE integration via Eclipse IMP

p r

  • c

e d u r a l + + functional parse trees r e l a t i

  • n

s matching traversal modular typed

Tuesday, May 31, 2011

slide-15
SLIDE 15

Demo Outline

First Entities & Instances languages Immediate IDE: highlighting, folding, error marking, ... Java and SQL generation Online checking and error marking Then modular extensions Packages: Source-to-source transformation Derived I: expression language extension Derived II: linking to host language using annotations

Tuesday, May 31, 2011

slide-16
SLIDE 16

Tuesday, May 31, 2011

slide-17
SLIDE 17

Tuesday, May 31, 2011

slide-18
SLIDE 18

Tuesday, May 31, 2011

slide-19
SLIDE 19

Tuesday, May 31, 2011

slide-20
SLIDE 20

Tuesday, May 31, 2011

slide-21
SLIDE 21

Tuesday, May 31, 2011

slide-22
SLIDE 22

Tuesday, May 31, 2011

slide-23
SLIDE 23

Tuesday, May 31, 2011

slide-24
SLIDE 24

Tuesday, May 31, 2011

slide-25
SLIDE 25

Tuesday, May 31, 2011

slide-26
SLIDE 26

Tuesday, May 31, 2011

slide-27
SLIDE 27

Tuesday, May 31, 2011

slide-28
SLIDE 28

Tuesday, May 31, 2011

slide-29
SLIDE 29

Tuesday, May 31, 2011

slide-30
SLIDE 30

Tuesday, May 31, 2011

slide-31
SLIDE 31

Tuesday, May 31, 2011

slide-32
SLIDE 32

Summary

4 languages 1+4 IDEs (Rascal’ s + Dynamically installed) 3 checkers 3 code generators to Java 1 SQL code generator 2 XML code generators Total lines of code: 950 LOC

Tuesday, May 31, 2011

slide-33
SLIDE 33

Design Principles (a.k.a. Requirements)

Scaling up and scaling down Expressivity without magic One-stop-shop (integrated) Open Immediate

N

  • D

a t a b a s e No Coordination N

  • D

i a g r a m s Just Control flow Just EBNF J u s t M a t c h i n g Just Trees Just Relations No Algorithms Just IMP Just Debugging J u s t P r

  • fi

l i n g Just Tracing

Tuesday, May 31, 2011

slide-34
SLIDE 34

Other applications

Infer Generic Type arguments on FGJ [SCAM 2009] LDTA tool challenge: Oberon-0 compiler in 4 levels [LDTA2011] Derric: DSL for CSI (Digital Forensics) [ICSE 2011] Visitor 2 Interpreter refactoring [TOOLS 2011] Student projects (Java analysis, SVN analysis, ...)

Tuesday, May 31, 2011

slide-35
SLIDE 35

S.W .O.T.

[S] simple, powerful, immediate, integral [W] alpha/beta quality, slow [O] optimization, applications, collaboration, growing team [T] the feature creep

Quality of Rascal

Tuesday, May 31, 2011

slide-36
SLIDE 36

Immediate future

Applications in Software Analysis & Transformation Applications in DSL development and evaluation Move to Eclipse.org (next month) More grammarware (CASE for grammars) More source/model visualization import/ export

Tuesday, May 31, 2011

slide-37
SLIDE 37

Questions?

http:/ /www.rascal-mpl.org http:/ /www.eclipse.org/imp http:/ /www.cwi.nl/sen1

Tuesday, May 31, 2011