NaBL: A Meta-Language forDeclarative Name Binding    and Scope Rules     Gabriël Konat, Lennart Kats, Guido Wachsmuth, Eel...
Name Binding and Scopefunction power(x: Int, n: Int): Int {  if(n == 0) {    return 1;  } else {    return x * power(x, n ...
Context: Spoofax Language Workbench          http://spoofax.org
Demonstration of NaBL in Spoofax
module names                                    rules // properties and variablesimports include/Cam                      ...
Name Binding Concepts                         class defines              partial class                         type  refer...
OutlookLanguage definition = CFG + NBD + TS + DS           Single source for        Language reference manual      Efficient...
The Language Designer’s Workbench             NWO VICI 2012 grant: 1.5M Euro for 5 years                  Declarative Lang...
12th International Conferenceon Generative Programming:Concepts & Experiences(GPCE13)
Upcoming SlideShare
Loading in …5
×

NaBL: A Meta-Language for Declarative Name Binding and Scope Rules

1,233 views

Published on

Slides from talk for Code Generation 2013 in Cambridge. Most of the presentation was a live demonstration and is not reflected in the slides. Slide 5 is the code that we ended up developing during the presentation.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,233
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

NaBL: A Meta-Language for Declarative Name Binding and Scope Rules

  1. 1. NaBL: A Meta-Language forDeclarative Name Binding and Scope Rules Gabriël Konat, Lennart Kats, Guido Wachsmuth, Eelco Visser
  2. 2. Name Binding and Scopefunction power(x: Int, n: Int): Int { if(n == 0) { return 1; } else { return x * power(x, n - 1); }}
  3. 3. Context: Spoofax Language Workbench http://spoofax.org
  4. 4. Demonstration of NaBL in Spoofax
  5. 5. module names rules // properties and variablesimports include/Cam Property(name, t, _): defines Property name of type tnamespaces Module Type Property Variable Function Var(name): refers to Variable namerules // modules refers to Property name Module(name, _): VarDeclInit(name, t, _): defines Module name defines Variable name of type t scopes Type in subsequent scoperules // entities and types VarDecl(name, t): defines Variable name of type t Entity(name, _, _, _): defines Type name Arg(name, t): scopes Type, Property, Function, Variable defines Variable name of type t Type0(name): rules // functions and calls refers to Type name FunDef(name, arg*, t, _): Type(name, _): defines Function name of type (t*, t) refers to Type name scopes Variable where arg* has type t* TypeParam(name): defines Type name FunDecl(name, arg*, t): defines Function name of type (t*, t) scopes Variable where arg* has type t* ThisCall(name, _): refers to Function name Name binding and scope MethCall(e, name, e*):rules for Cam (toy) language refers to Function name in Type t_name where e has type Type(t_name, _)
  6. 6. Name Binding Concepts class defines partial class type refers inheritancenamespaces namespace using scopes method field imports variable parameter block
  7. 7. OutlookLanguage definition = CFG + NBD + TS + DS Single source for Language reference manual Efficient (incremental) compiler Execution engine (interpreter) Integrated development environment
  8. 8. The Language Designer’s Workbench NWO VICI 2012 grant: 1.5M Euro for 5 years Declarative Language Definition Syntax Name Type Dynamic TransformsDefinition Binding System Semantics Editor Correctness Compiler Tests (IDE) Proofbridging the gap between language engineering and semantics engineering
  9. 9. 12th International Conferenceon Generative Programming:Concepts & Experiences(GPCE13)

×