SlideShare a Scribd company logo
1 of 140
Download to read offline
A Task Engine for Incremental Name and Type
Analysis
Gabriël Konat
Spoofax Language Workbench
size
Spoofax Language Workbench
Name and Type Analysis
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Name Analysis
Assign to each reference its corresponding definition
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Name Analysis
Assign to each reference its corresponding definition
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Name Analysis
Assign to each reference its corresponding definition
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Name Analysis
Assign to each reference its corresponding definition
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Name Analysis
Assign to each reference its corresponding definition
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Name Analysis
Assign to each reference its corresponding definition
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Type Analysis
Assign a type to each expression
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
Type Analysis
float
Assign a type to each expression
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
Type Analysis
Assign a type to each expression
float
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
B
Type Analysis
Assign a type to each expression
float
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
B
float
Type Analysis
Assign a type to each expression
float
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
B
float
float
Type Analysis
Assign a type to each expression
float
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
float
B
float
float
Type Analysis
Assign a type to each expression
float
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
float
B
int
float
float
Type Analysis
Assign a type to each expression
float
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
float
B
int
float
float
float
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
float m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
float
B
int
float
float
float
float
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
float
B
int
float
float
int
float
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
float
B
int
float
float
int
int
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
float
int
return m()
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
return 1 + b.f
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
B
int
int
return m()
float
float
float
Incremental
Name and Type Analysis
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
return 1 + b.f
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
float
int
return m()
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
return 1 + b.f
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
float
int
return m()
1. Caching
Reuse analysis results from previous analysis
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
return 1 + b.f
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
float
int
return m()
2. Change detection
Which part of the program has changed?
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
return 1 + b.f
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
float
int
return m()
3. Invalidation & propagation
Which calculations are affected by a change?
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
float
4. Dependency tracking
What are the dependencies between calculations?
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
What are the dependencies between calculations?
4. Dependency tracking
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
How to (re-)schedule invalidated calculations?
5. Scheduling
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
f
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Caching
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Change Detection
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Invalidation
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Propagation
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Propagation
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Propagation
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Scheduling
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Scheduling
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
float int
float
Scheduling
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
float
Scheduling
int
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
float
B
int
int
Scheduling
int
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.f;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
Scheduling
int
i
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
Scheduling
int
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
int
Tasks
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
int
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
int
Units of computation ...
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
int
... with cacheable results ...
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
int
... and dependencies on each other
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
int
int
B
int
int
int
resolve class A resolve class B
resolve method m resolve field b
resolve field i
Name resolution
tasks
class C : A {	
!
int n() {	
return m();	
}	
}
class A {	
!
B b;	
!
int m;	
!
int m() {	
return 1 + b.i;	
}	
}
class B {	
!
int i;	
!
float f;	
!
int m() {	
return 0;	
}	
}
resolve class A resolve class B
resolve method m resolve field b
resolve field i
calc type of m()
calc type of i
calc type of b
calc type of b.i
calc type of 1 + b.i
calc type of 0
Name resolution
tasks
Typing tasks
Name and Type Analysis
Name and Type Analysis
with Tasks
class B {	
int i; 	
float f;	
}
class A {	
B b;	
float m() { return 1 + b.i; }	
}
class B {	
int i; 	
float f;	
}
class A {	
B b;	
float m() { return 1 + b.i; }	
}
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
class A {	
B b;	
float m() { return 1 + b.i; }	
}
Facts
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
class A {	
B b;	
float m() { return 1 + b.i; }	
}
Facts
Tasks
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
class A {	
B b;	
float m() { return 1 + b.i; }	
}
Facts
Tasks
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1
Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1 2
Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1 2
3Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1 2
4
3Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1
5
2
4
3Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1
6
5
2
4
3Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1
6
5
7
2
4
3Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1
6
5
7
2
4
3
8
Facts
Tasks
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B1
6
5
7
2
4
3
8
Facts
Tasks
define class A
Incremental	

Name and Type Analysis	

with Tasks
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
i
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field b
calc type of b
calc type of 1
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
1
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
2
1
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
2
1
3
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
2
1
3 4
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
2
1
3 4
define class A
f
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
float f;
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
1
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
2
1
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
2
1
3
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
2
1
3 4
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
type of i is int
define field i
class B {	
int i; 	
float f;	
}
define class B
resolve field f
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.f
calc type of f
calc type of b.f
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.f; }	
}
resolve class B
define class A
Evaluation
Subject language
Subject application
Feb 2010 - 4 files - 3139 lines of code
3 years later - 55 files - 8991 lines of code
0
3
6
9
12
15
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
Time(s)
Revision
Parse Collect Evaluate
0
1
2
3
4
5
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
Time(s)
Revision
Parse Collect Evaluate
full, non-incremental analysis
0
3
6
9
12
15
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
Time(s)
Revision
Parse Collect Evaluate
0
1
2
3
4
5
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
Time(s)
Revision
Parse Collect Evaluate
0
3
6
9
12
15
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
Time(s)
Revision
Parse Collect Evaluate
0
1
2
3
4
5
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340
Time(s)
Revision
Parse Collect Evaluate
full, non-incremental analysis
incremental analysis
0
0.3
0.6
0.9
1.2
1.5
0 20 40 60 80 100 120
Time(s)
Revision
Parse Collect Evaluate
single-file changes
0
0.3
0.6
0.9
1.2
1.5
0 20 40 60 80 100 120
Time(s)
Revision
Parse Collect Evaluate
single-file changes
responsive enough for interactive usage in IDE
Fact and Taks
Collection
type of i is int
define field i
define field f
type of f is float
class B {	
int i; 	
float f;	
}
define class B
resolve field i
resolve field b
calc type of b
calc type of 1
calc type of 1 + b.i
calc type of i
calc type of b.i
define field b
define method m
type of b is B
type of m is float
class A {	
B b;	
float m() { return 1 + b.i; }	
}
resolve class B
define class A
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Implementation not
concerned with:
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Implementation not
concerned with:
Incrementality
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Implementation not
concerned with:
Incrementality
Execution order
Fact and Task Collection
Class("Point", [	
Field("x"),	
Field("y"),	
Func("print", [	
Print(VarRef("x")),	
Print(VarRef("y"))	
])	
])
def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Implementation not
concerned with:
Incrementality
Execution order
Analysis is described in
terms of tasks
Fact and Task Collection
Declarative Name Analysis Specification
Class(x, _):	
	 defines Class x	
	 scopes Var, Func	
	 	
Field(x):	
	 defines Var x	
	 	
Func(x, _):	
	 defines Func x	
	 scopes Var	
	 	
VarRef(x):	
	 refers to Var x
NaBL
Declarative Name Analysis Specification
Class(x, _):	
	 defines Class x	
	 scopes Var, Func	
	 	
Field(x):	
	 defines Var x	
	 	
Func(x, _):	
	 defines Func x	
	 scopes Var	
	 	
VarRef(x):	
	 refers to Var x
NaBL
Specify name analysis in terms of:	

Definitions	

Namespaces	

Scopes	

References	

Imports
Declarative Name Analysis Specification
Class(x, _):	
	 defines Class x	
	 scopes Var, Func	
	 	
Field(x):	
	 defines Var x	
	 	
Func(x, _):	
	 defines Func x	
	 scopes Var	
	 	
VarRef(x):	
	 refers to Var x
NaBL def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Generates
Declarative Name Analysis Specification
Class(x, _):	
	 defines Class x	
	 scopes Var, Func	
	 	
Field(x):	
	 defines Var x	
	 	
Func(x, _):	
	 defines Func x	
	 scopes Var	
	 	
VarRef(x):	
	 refers to Var x
NaBL def-site:	
Class(x, _) -> <store-def(|"Class")> x	
scope-site:	
Class(_, _) -> <scope> ["Var", "Func"]	
!
def-site: 	
Field(x) -> <store-def(|"Var")> x	
!
def-site:	
Func(x, _) -> <store-def(|"Func")> x	
scope-site:	
Func(_, _) -> <scope> ["Var"]	
!
ref-site: 	
VarRef(v) -> <create-lookup-task(|"Var", 	
…fact-dependencies…)> v	
!
analyse = 	
topdown(def-site; scope-site);	
bottomup(ref-site);	
execute-tasks
Generates
resolve Var x
define Var x
define Class Point
define Var y
define Func print
resolve Var y
Declarative Type System Specification
True() : Bool()	
False() : Bool()	
!
And(x, y) : Bool()	
where x : x-ty	
and y : y-ty	
and x-ty == Bool()	
else error 	
"Expected bool"	
and y-ty == Bool()	
else error 	
"Expected bool"
TS
Declarative Type System Specification
True() : Bool()	
False() : Bool()	
!
And(x, y) : Bool()	
where x : x-ty	
and y : y-ty	
and x-ty == Bool()	
else error 	
"Expected bool"	
and y-ty == Bool()	
else error 	
"Expected bool"
TS
Specify type system in terms of:	

Type rules	

Relations	

Error messages
Declarative Type System Specification
True() : Bool()	
False() : Bool()	
!
And(x, y) : Bool()	
where x : x-ty	
and y : y-ty	
and x-ty == Bool()	
else error 	
"Expected bool"	
and y-ty == Bool()	
else error 	
"Expected bool"
TS
create-type-task(|ctx) :	
True() -> <task-create-id(|ctx,[x16])> x16	
where 	
x16 := <type-is(|ctx)> Bool()	
!
create-type-task(|ctx) :	
False() -> <task-create-id(|ctx,[x17])> x17	
where 	
x17 := <type-is(|ctx)> Bool()	
!
create-type-task(|ctx) :	
And(x, y) -> <task-create-id(|ctx,[x7])> x7	
where 	
x-ty := <type-task(|ctx)> x;	
y-ty := <type-task(|ctx);	
eq38 := <type-match(|ctx, Bool());	
<task-create-error-on-failure(|ctx, eq38, "Expected bool")> x;	
eq39 := <type-match(|ctx, Bool())	
<task-create-error-on-failure(|ctx, eq39, "Expected bool")> y;	
x7 := <type-is(|ctx); task-create-id(|ctx, [eq39])> Bool()
Generates
Expressivity of Declarative Specifications
Minus(x, y)	
+ Mul(x, y)	
+ Div(x, y)	
+ Mod(x, y) : ty	
where x : x-ty	
and y : y-ty	
and x-ty <is: Numerical() 	
else error "Expected numerical" on x	
and y-ty <is: Numerical() 	
else error "Expected numerical" on y	
and <promote-bin> (x-ty, y-ty) => ty
ClassDec(acc, ctx, mod*, c, tp*, None(), _, body):	
defines Type c	
of access acc	
of context ctx	
of modifiers mod*	
of type-parameters tp*	
of kind Class()	
of type RefType(TypeName(c), None())	
implicitly defines ImplicitField "this" 	
	 of type RefType(TypeName(c), None())	
scopes TypeParam, Field, ImplicitField, 	
Method, Constructor
NaBL TS
Expressivity of Declarative Specifications
Can specify name and type analysis of Java 3
Minus(x, y)	
+ Mul(x, y)	
+ Div(x, y)	
+ Mod(x, y) : ty	
where x : x-ty	
and y : y-ty	
and x-ty <is: Numerical() 	
else error "Expected numerical" on x	
and y-ty <is: Numerical() 	
else error "Expected numerical" on y	
and <promote-bin> (x-ty, y-ty) => ty
ClassDec(acc, ctx, mod*, c, tp*, None(), _, body):	
defines Type c	
of access acc	
of context ctx	
of modifiers mod*	
of type-parameters tp*	
of kind Class()	
of type RefType(TypeName(c), None())	
implicitly defines ImplicitField "this" 	
	 of type RefType(TypeName(c), None())	
scopes TypeParam, Field, ImplicitField, 	
Method, Constructor
NaBL TS
Demo
Future Work
Technical Evaluation Research
optimization of
fact & task
collection
Technical Evaluation Research
optimization of
fact & task
collection
parallelization
Technical Evaluation Research
optimization of
fact & task
collection
parallelization
more languages
Technical Evaluation Research
optimization of
fact & task
collection
parallelization
more languages
other analyses &
transformations
Technical Evaluation Research
optimization of
fact & task
collection
parallelization
more languages
other analyses &
transformations
granularity
Technical Evaluation Research
optimization of
fact & task
collection
parallelization
more languages
other analyses &
transformations
granularity
caching
Guido H.Wachsmuth
Vlad A.Vergu
Danny M. Groenewegen
EelcoVisser
Acknowledgements
Name Binding Language (NaBL) [Konat. SLE ’12]
Task Engine for Incremental Name and Type Analysis [Wachsmuth. SLE ’13]
Augusto Passalaqua
Eduardo S. Amorim
Pierre Neron

More Related Content

Viewers also liked

Yr 8 nha trang camping email
Yr 8 nha trang camping emailYr 8 nha trang camping email
Yr 8 nha trang camping emailEd
 
Detailsweppics
DetailsweppicsDetailsweppics
DetailsweppicsDetails64
 
Evaluation
EvaluationEvaluation
EvaluationAdella1
 
S.k. teiksma
S.k. teiksmaS.k. teiksma
S.k. teiksmadacoteka
 
hvjesxdfghjngtgvhbnm
hvjesxdfghjngtgvhbnmhvjesxdfghjngtgvhbnm
hvjesxdfghjngtgvhbnmAdella1
 
Where do you get all those coupons
Where do you get all those couponsWhere do you get all those coupons
Where do you get all those couponspublixcouponqueen
 
Spanish Art. 1- Intro; Prehistory
Spanish Art. 1- Intro; PrehistorySpanish Art. 1- Intro; Prehistory
Spanish Art. 1- Intro; PrehistoryJ Luque
 
Stephen Bohane: Encouraging Businesses
Stephen Bohane: Encouraging BusinessesStephen Bohane: Encouraging Businesses
Stephen Bohane: Encouraging BusinessesPartner to Succeed
 
Music Magazine Analysis
Music Magazine AnalysisMusic Magazine Analysis
Music Magazine Analysisbenjichandra
 
Magazine Advert Construction
Magazine Advert Construction Magazine Advert Construction
Magazine Advert Construction benjichandra
 
Location
LocationLocation
LocationAdella1
 
Construction for music video
Construction for music videoConstruction for music video
Construction for music videoAdella1
 
kljiouht65drsetryuio;l
kljiouht65drsetryuio;lkljiouht65drsetryuio;l
kljiouht65drsetryuio;lAdella1
 
Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011
Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011
Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011Accessibil-IT Inc.
 
Nervous and endocrine system
Nervous and endocrine systemNervous and endocrine system
Nervous and endocrine systemsherrymariani
 

Viewers also liked (20)

Yr 8 nha trang camping email
Yr 8 nha trang camping emailYr 8 nha trang camping email
Yr 8 nha trang camping email
 
Greenpeace
GreenpeaceGreenpeace
Greenpeace
 
Detailsweppics
DetailsweppicsDetailsweppics
Detailsweppics
 
Art+motion+3d
Art+motion+3dArt+motion+3d
Art+motion+3d
 
Portfolio geert jan_kraan.key
Portfolio geert jan_kraan.keyPortfolio geert jan_kraan.key
Portfolio geert jan_kraan.key
 
Evaluation
EvaluationEvaluation
Evaluation
 
S.k. teiksma
S.k. teiksmaS.k. teiksma
S.k. teiksma
 
hvjesxdfghjngtgvhbnm
hvjesxdfghjngtgvhbnmhvjesxdfghjngtgvhbnm
hvjesxdfghjngtgvhbnm
 
Where do you get all those coupons
Where do you get all those couponsWhere do you get all those coupons
Where do you get all those coupons
 
Spanish Art. 1- Intro; Prehistory
Spanish Art. 1- Intro; PrehistorySpanish Art. 1- Intro; Prehistory
Spanish Art. 1- Intro; Prehistory
 
Stephen Bohane: Encouraging Businesses
Stephen Bohane: Encouraging BusinessesStephen Bohane: Encouraging Businesses
Stephen Bohane: Encouraging Businesses
 
Music Magazine Analysis
Music Magazine AnalysisMusic Magazine Analysis
Music Magazine Analysis
 
Magazine Advert Construction
Magazine Advert Construction Magazine Advert Construction
Magazine Advert Construction
 
My pictures
My picturesMy pictures
My pictures
 
Location
LocationLocation
Location
 
Construction for music video
Construction for music videoConstruction for music video
Construction for music video
 
Final
FinalFinal
Final
 
kljiouht65drsetryuio;l
kljiouht65drsetryuio;lkljiouht65drsetryuio;l
kljiouht65drsetryuio;l
 
Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011
Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011
Ontario Integrated Accessibility Regulation - FINAL - June 3, 2011
 
Nervous and endocrine system
Nervous and endocrine systemNervous and endocrine system
Nervous and endocrine system
 

Similar to A Task Engine for Name and Type Analysis

Similar to A Task Engine for Name and Type Analysis (6)

Domain-Specific Type Systems
Domain-Specific Type SystemsDomain-Specific Type Systems
Domain-Specific Type Systems
 
Chapter 5.ppt
Chapter 5.pptChapter 5.ppt
Chapter 5.ppt
 
C++ polymorphism
C++ polymorphismC++ polymorphism
C++ polymorphism
 
Fun with Kotlin
Fun with KotlinFun with Kotlin
Fun with Kotlin
 
Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monads
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 

Recently uploaded

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Recently uploaded (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

A Task Engine for Name and Type Analysis

  • 1. A Task Engine for Incremental Name and Type Analysis Gabriël Konat
  • 4. Name and Type Analysis
  • 5. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } }
  • 6. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Name Analysis Assign to each reference its corresponding definition
  • 7. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Name Analysis Assign to each reference its corresponding definition
  • 8. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Name Analysis Assign to each reference its corresponding definition
  • 9. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Name Analysis Assign to each reference its corresponding definition
  • 10. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Name Analysis Assign to each reference its corresponding definition
  • 11. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Name Analysis Assign to each reference its corresponding definition
  • 12. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Type Analysis Assign a type to each expression
  • 13. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } Type Analysis float Assign a type to each expression
  • 14. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } Type Analysis Assign a type to each expression float
  • 15. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } B Type Analysis Assign a type to each expression float
  • 16. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } B float Type Analysis Assign a type to each expression float
  • 17. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } B float float Type Analysis Assign a type to each expression float
  • 18. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } float B float float Type Analysis Assign a type to each expression float
  • 19. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } float B int float float Type Analysis Assign a type to each expression float
  • 20. class B { ! int i; ! float f; ! int m() { return 0; } } class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } float B int float float float
  • 21. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! float m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } float B int float float float float
  • 22. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } float B int float float int float
  • 23. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } float B int float float int int
  • 24. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float float int return m()
  • 25. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } return 1 + b.f class B { ! int i; ! float f; ! int m() { return 0; } } int B int int return m() float float float
  • 27. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } return 1 + b.f class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float float int return m()
  • 28. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } return 1 + b.f class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float float int return m() 1. Caching Reuse analysis results from previous analysis
  • 29. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } return 1 + b.f class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float float int return m() 2. Change detection Which part of the program has changed?
  • 30. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } return 1 + b.f class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float float int return m() 3. Invalidation & propagation Which calculations are affected by a change?
  • 31. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float float 4. Dependency tracking What are the dependencies between calculations?
  • 32. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float What are the dependencies between calculations? 4. Dependency tracking
  • 33. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float How to (re-)schedule invalidated calculations? 5. Scheduling
  • 34. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float
  • 35. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float f
  • 36. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float i
  • 37. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Caching i
  • 38. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Change Detection i
  • 39. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Invalidation i
  • 40. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Propagation i
  • 41. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Propagation i
  • 42. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Propagation i
  • 43. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Scheduling i
  • 44. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Scheduling i
  • 45. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B float int float Scheduling i
  • 46. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B int float Scheduling int i
  • 47. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int float B int int Scheduling int i
  • 48. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.f; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int Scheduling int i
  • 49. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int Scheduling int
  • 50. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int int
  • 51. Tasks
  • 52. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int int
  • 53. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int int Units of computation ...
  • 54. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int int ... with cacheable results ...
  • 55. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int int ... and dependencies on each other
  • 56. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } int int B int int int resolve class A resolve class B resolve method m resolve field b resolve field i Name resolution tasks
  • 57. class C : A { ! int n() { return m(); } } class A { ! B b; ! int m; ! int m() { return 1 + b.i; } } class B { ! int i; ! float f; ! int m() { return 0; } } resolve class A resolve class B resolve method m resolve field b resolve field i calc type of m() calc type of i calc type of b calc type of b.i calc type of 1 + b.i calc type of 0 Name resolution tasks Typing tasks
  • 58. Name and Type Analysis
  • 59. Name and Type Analysis with Tasks
  • 60. class B { int i; float f; } class A { B b; float m() { return 1 + b.i; } }
  • 61. class B { int i; float f; } class A { B b; float m() { return 1 + b.i; } }
  • 62. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B class A { B b; float m() { return 1 + b.i; } } Facts
  • 63. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B class A { B b; float m() { return 1 + b.i; } } Facts Tasks
  • 64. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B class A { B b; float m() { return 1 + b.i; } } Facts Tasks
  • 65. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } Facts Tasks define class A
  • 66. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B Facts Tasks define class A
  • 67. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 Facts Tasks define class A
  • 68. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 2 Facts Tasks define class A
  • 69. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 2 3Facts Tasks define class A
  • 70. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 2 4 3Facts Tasks define class A
  • 71. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 5 2 4 3Facts Tasks define class A
  • 72. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 6 5 2 4 3Facts Tasks define class A
  • 73. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 6 5 7 2 4 3Facts Tasks define class A
  • 74. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 6 5 7 2 4 3 8 Facts Tasks define class A
  • 75. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B1 6 5 7 2 4 3 8 Facts Tasks define class A
  • 76. Incremental Name and Type Analysis with Tasks
  • 77. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A
  • 78. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A i
  • 79. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A f
  • 80. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A f
  • 81. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A f
  • 82. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field b calc type of b calc type of 1 define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A f
  • 83. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A f
  • 84. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B 1 define class A f
  • 85. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B 2 1 define class A f
  • 86. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B 2 1 3 define class A f
  • 87. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B 2 1 3 4 define class A f
  • 88. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B 2 1 3 4 define class A f
  • 89. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 90. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A float f;
  • 91. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 92. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 93. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 94. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 95. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 96. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 97. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A 1
  • 98. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A 2 1
  • 99. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A 2 1 3
  • 100. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A 2 1 3 4
  • 101. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 102. type of i is int define field i class B { int i; float f; } define class B resolve field f resolve field b calc type of b calc type of 1 calc type of 1 + b.f calc type of f calc type of b.f define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.f; } } resolve class B define class A
  • 106. Feb 2010 - 4 files - 3139 lines of code
  • 107. 3 years later - 55 files - 8991 lines of code
  • 108. 0 3 6 9 12 15 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 Time(s) Revision Parse Collect Evaluate 0 1 2 3 4 5 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 Time(s) Revision Parse Collect Evaluate full, non-incremental analysis
  • 109. 0 3 6 9 12 15 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 Time(s) Revision Parse Collect Evaluate 0 1 2 3 4 5 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 Time(s) Revision Parse Collect Evaluate 0 3 6 9 12 15 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 Time(s) Revision Parse Collect Evaluate 0 1 2 3 4 5 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 Time(s) Revision Parse Collect Evaluate full, non-incremental analysis incremental analysis
  • 110. 0 0.3 0.6 0.9 1.2 1.5 0 20 40 60 80 100 120 Time(s) Revision Parse Collect Evaluate single-file changes
  • 111. 0 0.3 0.6 0.9 1.2 1.5 0 20 40 60 80 100 120 Time(s) Revision Parse Collect Evaluate single-file changes responsive enough for interactive usage in IDE
  • 113. type of i is int define field i define field f type of f is float class B { int i; float f; } define class B resolve field i resolve field b calc type of b calc type of 1 calc type of 1 + b.i calc type of i calc type of b.i define field b define method m type of b is B type of m is float class A { B b; float m() { return 1 + b.i; } } resolve class B define class A
  • 114. Fact and Task Collection Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ])
  • 115. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Fact and Task Collection
  • 116. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Fact and Task Collection
  • 117. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Fact and Task Collection
  • 118. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Fact and Task Collection
  • 119. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Implementation not concerned with: Fact and Task Collection
  • 120. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Implementation not concerned with: Incrementality Fact and Task Collection
  • 121. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Implementation not concerned with: Incrementality Execution order Fact and Task Collection
  • 122. Class("Point", [ Field("x"), Field("y"), Func("print", [ Print(VarRef("x")), Print(VarRef("y")) ]) ]) def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Implementation not concerned with: Incrementality Execution order Analysis is described in terms of tasks Fact and Task Collection
  • 123. Declarative Name Analysis Specification Class(x, _): defines Class x scopes Var, Func Field(x): defines Var x Func(x, _): defines Func x scopes Var VarRef(x): refers to Var x NaBL
  • 124. Declarative Name Analysis Specification Class(x, _): defines Class x scopes Var, Func Field(x): defines Var x Func(x, _): defines Func x scopes Var VarRef(x): refers to Var x NaBL Specify name analysis in terms of: Definitions Namespaces Scopes References Imports
  • 125. Declarative Name Analysis Specification Class(x, _): defines Class x scopes Var, Func Field(x): defines Var x Func(x, _): defines Func x scopes Var VarRef(x): refers to Var x NaBL def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Generates
  • 126. Declarative Name Analysis Specification Class(x, _): defines Class x scopes Var, Func Field(x): defines Var x Func(x, _): defines Func x scopes Var VarRef(x): refers to Var x NaBL def-site: Class(x, _) -> <store-def(|"Class")> x scope-site: Class(_, _) -> <scope> ["Var", "Func"] ! def-site: Field(x) -> <store-def(|"Var")> x ! def-site: Func(x, _) -> <store-def(|"Func")> x scope-site: Func(_, _) -> <scope> ["Var"] ! ref-site: VarRef(v) -> <create-lookup-task(|"Var", …fact-dependencies…)> v ! analyse = topdown(def-site; scope-site); bottomup(ref-site); execute-tasks Generates resolve Var x define Var x define Class Point define Var y define Func print resolve Var y
  • 127. Declarative Type System Specification True() : Bool() False() : Bool() ! And(x, y) : Bool() where x : x-ty and y : y-ty and x-ty == Bool() else error "Expected bool" and y-ty == Bool() else error "Expected bool" TS
  • 128. Declarative Type System Specification True() : Bool() False() : Bool() ! And(x, y) : Bool() where x : x-ty and y : y-ty and x-ty == Bool() else error "Expected bool" and y-ty == Bool() else error "Expected bool" TS Specify type system in terms of: Type rules Relations Error messages
  • 129. Declarative Type System Specification True() : Bool() False() : Bool() ! And(x, y) : Bool() where x : x-ty and y : y-ty and x-ty == Bool() else error "Expected bool" and y-ty == Bool() else error "Expected bool" TS create-type-task(|ctx) : True() -> <task-create-id(|ctx,[x16])> x16 where x16 := <type-is(|ctx)> Bool() ! create-type-task(|ctx) : False() -> <task-create-id(|ctx,[x17])> x17 where x17 := <type-is(|ctx)> Bool() ! create-type-task(|ctx) : And(x, y) -> <task-create-id(|ctx,[x7])> x7 where x-ty := <type-task(|ctx)> x; y-ty := <type-task(|ctx); eq38 := <type-match(|ctx, Bool()); <task-create-error-on-failure(|ctx, eq38, "Expected bool")> x; eq39 := <type-match(|ctx, Bool()) <task-create-error-on-failure(|ctx, eq39, "Expected bool")> y; x7 := <type-is(|ctx); task-create-id(|ctx, [eq39])> Bool() Generates
  • 130. Expressivity of Declarative Specifications Minus(x, y) + Mul(x, y) + Div(x, y) + Mod(x, y) : ty where x : x-ty and y : y-ty and x-ty <is: Numerical() else error "Expected numerical" on x and y-ty <is: Numerical() else error "Expected numerical" on y and <promote-bin> (x-ty, y-ty) => ty ClassDec(acc, ctx, mod*, c, tp*, None(), _, body): defines Type c of access acc of context ctx of modifiers mod* of type-parameters tp* of kind Class() of type RefType(TypeName(c), None()) implicitly defines ImplicitField "this" of type RefType(TypeName(c), None()) scopes TypeParam, Field, ImplicitField, Method, Constructor NaBL TS
  • 131. Expressivity of Declarative Specifications Can specify name and type analysis of Java 3 Minus(x, y) + Mul(x, y) + Div(x, y) + Mod(x, y) : ty where x : x-ty and y : y-ty and x-ty <is: Numerical() else error "Expected numerical" on x and y-ty <is: Numerical() else error "Expected numerical" on y and <promote-bin> (x-ty, y-ty) => ty ClassDec(acc, ctx, mod*, c, tp*, None(), _, body): defines Type c of access acc of context ctx of modifiers mod* of type-parameters tp* of kind Class() of type RefType(TypeName(c), None()) implicitly defines ImplicitField "this" of type RefType(TypeName(c), None()) scopes TypeParam, Field, ImplicitField, Method, Constructor NaBL TS
  • 132. Demo
  • 134. Technical Evaluation Research optimization of fact & task collection
  • 135. Technical Evaluation Research optimization of fact & task collection parallelization
  • 136. Technical Evaluation Research optimization of fact & task collection parallelization more languages
  • 137. Technical Evaluation Research optimization of fact & task collection parallelization more languages other analyses & transformations
  • 138. Technical Evaluation Research optimization of fact & task collection parallelization more languages other analyses & transformations granularity
  • 139. Technical Evaluation Research optimization of fact & task collection parallelization more languages other analyses & transformations granularity caching
  • 140. Guido H.Wachsmuth Vlad A.Vergu Danny M. Groenewegen EelcoVisser Acknowledgements Name Binding Language (NaBL) [Konat. SLE ’12] Task Engine for Incremental Name and Type Analysis [Wachsmuth. SLE ’13] Augusto Passalaqua Eduardo S. Amorim Pierre Neron