meta-programming and mde with rascal · 2020-03-10 · rascal: future development plans...
TRANSCRIPT
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Meta-Programming and MDE with Rascal
Jeroen van den Bos, Mark Hills, Paul Klint, Tijs van der Stormand Jurgen J. Vinju
CWI, INRIA ATEAMS, NFI
2nd Workshop on Algebraic Methods in Model-Based SoftwareEngineering (AMMSE 2011)
Zurich, Switzerland, 30 June 2011
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 1/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 2/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 2/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 2/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 2/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 2/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal: From Algebraic Specification toMeta-Programming
Or...
Lessons learned: ASF to ASF+SDF to Rascal
Some background: design principles of Rascal
Overviews of several Rascal applications, with a focus on MDEand (briefly) linking to existing algebraic specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 3/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Plug for the Paper
Or...
Lessons learned: ASF to ASF+SDF to Rascal
Some background: design principles of Rascal
Overviews of several Rascal applications, with a focus on MDEand (briefly) linking to existing algebraic specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 3/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Plug for the Paper
Or...
Lessons learned: ASF to ASF+SDF to Rascal
Some background: design principles of Rascal
Overviews of several Rascal applications, with a focus on MDEand (briefly) linking to existing algebraic specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 3/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Plug for the Paper
Or...
Lessons learned: ASF to ASF+SDF to Rascal
Some background: design principles of Rascal
Overviews of several Rascal applications, with a focus on MDEand (briefly) linking to existing algebraic specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 3/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Plug for the Paper
Or...
Lessons learned: ASF to ASF+SDF to Rascal
Some background: design principles of Rascal
Overviews of several Rascal applications, with a focus on MDEand (briefly) linking to existing algebraic specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 3/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 4/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
What’s Rascal?
Rascal is
a programming language
for source code analysis and transformation
with rich data types, higher-order functions,
specialized control flow, and advanced pattern matching,including matching over concrete syntax.
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 5/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
What’s Rascal?
Rascal is
a programming language
for source code analysis and transformation
with rich data types, higher-order functions,
specialized control flow, and advanced pattern matching,including matching over concrete syntax.
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 5/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
What’s Rascal?
Rascal is
a programming language
for source code analysis and transformation
with rich data types, higher-order functions,
specialized control flow, and advanced pattern matching,including matching over concrete syntax.
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 5/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
What’s Rascal?
Rascal is
a programming language
for source code analysis and transformation
with rich data types, higher-order functions,
specialized control flow, and advanced pattern matching,including matching over concrete syntax.
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 5/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
What’s Rascal?
Rascal is
a programming language
for source code analysis and transformation
with rich data types, higher-order functions,
specialized control flow, and advanced pattern matching,including matching over concrete syntax.
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 5/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal Features
Familiar, C or Java-like syntax
Immutable data
Rich built-in data types and pattern matching
Domain-specific constructs (traversals, comprehensions, regularexpressions, fixed-point computation)
Arbitrary context-free grammars with generalized parsing
String templates
Java and Eclipse integration
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 6/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Extract, Analyze, SYnthesize
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 7/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal is EASY
Rascal follows the EASY paradigm:
Information is Extracted from the program, such as theprogram’s abstract syntax
This information is then used to Analyze the program, forinstance to check consistency, generate a control flow graph, orbind names to definitions
Finally, the extracted information and the analysis results areused to Synthesize the desired results, such as by transformingthe code or generating visualizations
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 8/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Domain Analysis for Rascal: Meta-Programming
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 9/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 10/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Which Language is This?
PROCEDURE Swap(VAR x, y: INTEGER );
VAR
temp: INTEGER;
BEGIN
temp := x;
x := y;
y := temp
END Swap;
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 11/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Why Look at a Standard Programming Language?
Similar challenges across standard PLs, DSLs, modellinglanguages, etc
Similar desired functionality: IDEs, consistency checking,program analysis, code generation, etc
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 12/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Why Look at Oberon-0?
Part of work done for tools competition at this year’s LDTA
Focused on features as a showcase for Rascal – shows what onecould do for a language defined in Rascal
Features include checkers, code generation, visualization, IDEmenu links
Not too Oberon specific: features shown are ones you coulduse for your own language
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 13/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Goals of Oberon-0 Implementation
Modular
Functional
Visual
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 14/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Goals of Oberon-0 Implementation
Modular
Functional
Visual
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 14/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Goals of Oberon-0 Implementation
Modular
Functional
Visual
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 14/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Parsing in Rascal
Grammars defined using Rascal grammar definition notation
A Rascal program then builds a Java-based parser for thegrammar
Parser is GLL with filtering rules used to remove ambiguities
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 15/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Example: Oberon-0 Grammar
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 16/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Rascal Meta-Programming Architecture
Grammar Source Code
Rascal Parser
AST Builder
Rascal Interpreter
Interpreter Source Code
Java Compiler
Parser Generator
Rascal Programs
AST Generator
AST Source Code
AST Builder Source Code
InputOutput
build-timerun-time
Parse Tree AST
Parser Source Code
build-time flow
run-time flow
data
operation
legend
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 17/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Code Outlining Example: Java in Eclipse
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 18/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Outlining Support in Rascal: Building the Outline
Outlines are built over the concrete syntax of a language
Labels indicate the display name in the outline view
Locations allow the user to jump to the outlined item
Once the outliner is registered, the runtime keeps the view upto date as the source is edited
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 19/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Code Outlining Example: Oberon-0 in Rascal
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 20/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Annotators
Annotators allow annotations to be added to languageconstructs and displayed in the editor
Typical examples: name resolution, type checking – want errorsto be displayed graphically to users, marking error locations
public Module checkModule(Module x) {
m = implode(x);
<m, st> = resolve(m);
errors = { error(l, s) | <l, s> <- st.scopeErrors };
if (errors == {}) {
errors = check(m, st.symbolTable);
}
return x[@messages = errors];
}
registerAnnotator("l4", checkModule);
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 21/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Annotator Example: Type Checking Oberon-0
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 22/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Contributors
Contributors provide a way to add more advanced functionality
Each contribution is a menu item – execution is triggered bythe user
Examples: interaction with external tools, compilation,visualization
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 23/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
An Example Contributors Menu
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 24/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
ParsingOutlinersAnnotatorsContributors OverviewRascal-based Contributors
Visualization Contribution: Control Flow Graph
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 25/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 26/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Goals
First, define a language, with support tools, for entities
Then, extend this to support packages for modularity
Next, extend this language to support entity instances
Finally, add modular extensions to the language
Note: Work by Tijs van der Storm, presented at LWC’11 by JurgenJ. Vinju
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 27/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Goals
First, define a language, with support tools, for entities
Then, extend this to support packages for modularity
Next, extend this language to support entity instances
Finally, add modular extensions to the language
Note: Work by Tijs van der Storm, presented at LWC’11 by JurgenJ. Vinju
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 27/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Entities and Instances
Immediate IDE: highlighting, folding, error marking, etc
Java and SQL generation
Online checking and error marking
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 28/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
An IDE for Entities
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 29/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Generating Java Code
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 30/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Generating SQL Code
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 31/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Defining Entity Concrete Syntax
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 32/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Defining Entity Abstract Syntax
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 33/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
String Template-based Code Generation
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 34/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Checking Entities
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 35/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Registering the Contributors
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 36/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Adding Packages: Package Concrete Syntax
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 37/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Resolving Names
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 38/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Generating Java Code
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 39/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Results
4 languages defined in total
5 total IDEs (1 for Rascal, plus 4 more)
3 checkers defined
3 Java code generators created
1 SQL code generator created
2 XML code generators created
Total SLOC: 950
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 40/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
A Language for Entities and InstancesEntitiesAdding PackagesSummary of ResultsDerric
Derric
Developed for digital forensics
Allows specification of file formats using a DSL
Compiled to optimized Java code
Total code size: 1871 SLOC
Highly competitive in both speed and precision
Developed by a PhD student working at the NFI (DutchForensics Institute)
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 41/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Integration with External Tools
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 42/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Integration with External Tools
Integrating Rascal with K Specifications in Maude
Contributors in Rascal-based IDEs are not limited to thosewritten in Rascal
Example: linking a Rascal-based front-end with a Maude-basedanalysis framework
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 43/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Integration with External Tools
What is Needed to Make the Link (Rascal)?
Grammar for the language
Maudeifier to generate Maude-readable form of program
Support for starting, reading from, writing to, and stoppingMaude
Support for preparing individual tasks and reading back results
Eclipse interaction to display results
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 44/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Integration with External Tools
What is Needed to Make the Link (Maude)?
Specification support for Rascal source locations (if used)
Result generation in parsable format (not necessarily humanreadable)
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 45/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Integration with External Tools
Displaying Analysis Results
Information from the external tool can be used to set upannotations...
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 46/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Integration with External Tools
Displaying Analysis Results (2)
... and to add other information, such as entries in an EclipseProblems view.
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 47/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Outline
1 Introduction to Rascal
2 Rascal for Language Development
3 Developing Modelling Languages
4 Tying into Existing Specifications
5 Rascal: Future Development Plans
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 48/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal Development: A Rough Future Timeline
Syntax: features and documentation finished by the end ofSeptember for an early October release
Performance: ongoing work on improving the performance ofprogram evaluation, with special focus on function call andpattern match performance
Type Checking: currently uses a runtime type system,switching over to static system – work mostly done, butintegrating into Rascal more closely, improving performance soit can run constantly as files are edited
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 49/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal Development: A Rough Future Timeline
Syntax: features and documentation finished by the end ofSeptember for an early October release
Performance: ongoing work on improving the performance ofprogram evaluation, with special focus on function call andpattern match performance
Type Checking: currently uses a runtime type system,switching over to static system – work mostly done, butintegrating into Rascal more closely, improving performance soit can run constantly as files are edited
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 49/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal Development: A Rough Future Timeline
Syntax: features and documentation finished by the end ofSeptember for an early October release
Performance: ongoing work on improving the performance ofprogram evaluation, with special focus on function call andpattern match performance
Type Checking: currently uses a runtime type system,switching over to static system – work mostly done, butintegrating into Rascal more closely, improving performance soit can run constantly as files are edited
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 49/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Rascal in Moving to Eclipse.org!
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 50/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Wrapping Up
The Rascal Language
Rascal for Language Development
MDE: Entities
MDE: Derric
Linking to Existing Specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 51/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Wrapping Up
The Rascal Language
Rascal for Language Development
MDE: Entities
MDE: Derric
Linking to Existing Specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 51/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Wrapping Up
The Rascal Language
Rascal for Language Development
MDE: Entities
MDE: Derric
Linking to Existing Specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 51/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Wrapping Up
The Rascal Language
Rascal for Language Development
MDE: Entities
MDE: Derric
Linking to Existing Specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 51/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
Wrapping Up
The Rascal Language
Rascal for Language Development
MDE: Entities
MDE: Derric
Linking to Existing Specifications
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 51/52
Introduction to RascalRascal for Language Development
Developing Modelling LanguagesTying into Existing Specifications
Rascal: Future Development Plans
For More Information...
Rascal: http://www.rascal-mpl.org
IMP: http://www.eclipse.org/imp
CWI SEN1: http://www.cwi.nl/sen1
Van den Bos, Hills, Klint, Van der Storm, Vinju Meta-Programming and MDE with Rascal 52/52