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 deļ¬nition
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 deļ¬nition
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 deļ¬nition
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 deļ¬nition
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 deļ¬nition
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 deļ¬nition
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 ļ¬les - 3139 lines of code
3 years later - 55 ļ¬les - 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-ļ¬le 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-ļ¬le 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 Speciļ¬cation
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 Speciļ¬cation
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:	

Deļ¬nitions	

Namespaces	

Scopes	

References	

Imports
Declarative Name Analysis Speciļ¬cation
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 Speciļ¬cation
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 Speciļ¬cation
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 Speciļ¬cation
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 Speciļ¬cation
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 Speciļ¬cations
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 Speciļ¬cations
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
Ā 
Greenpeace
GreenpeaceGreenpeace
GreenpeaceTheo Gomes
Ā 
Detailsweppics
DetailsweppicsDetailsweppics
DetailsweppicsDetails64
Ā 
Art+motion+3d
Art+motion+3dArt+motion+3d
Art+motion+3dorlando_soto
Ā 
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
Ā 
Final
FinalFinal
FinalAdella1
Ā 
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

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
Ā 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
Ā 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
Ā 
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)jennyeacort
Ā 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
Ā 
Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024
Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024
Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024StefanoLambiase
Ā 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
Ā 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
Ā 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
Ā 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
Ā 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
Ā 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
Ā 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
Ā 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
Ā 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
Ā 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
Ā 
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdfGOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdfAlina Yurenko
Ā 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
Ā 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
Ā 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
Ā 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
Ā 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
Ā 
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Call UsšŸ”>ą¼’+91-9711147426ā‡›Call In girls karol bagh (Delhi)
Ā 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
Ā 
Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024
Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024
Dealing with Cultural Dispersion ā€” Stefano Lambiase ā€” ICSE-SEIS 2024
Ā 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
Ā 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
Ā 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
Ā 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
Ā 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Ā 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
Ā 
Hot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort Service
Hot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort ServiceHot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort Service
Hot Sexy call girls in Patel NagaršŸ” 9953056974 šŸ” escort Service
Ā 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
Ā 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Ā 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
Ā 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
Ā 
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdfGOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM ā€“ DEVOXX GREECE.pdf
Ā 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
Ā 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.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 deļ¬nition
  • 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 deļ¬nition
  • 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 deļ¬nition
  • 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 deļ¬nition
  • 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 deļ¬nition
  • 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 deļ¬nition
  • 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 ļ¬les - 3139 lines of code
  • 107. 3 years later - 55 ļ¬les - 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-ļ¬le 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-ļ¬le 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 Speciļ¬cation 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 Speciļ¬cation 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: Deļ¬nitions Namespaces Scopes References Imports
  • 125. Declarative Name Analysis Speciļ¬cation 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 Speciļ¬cation 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 Speciļ¬cation 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 Speciļ¬cation 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 Speciļ¬cation 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 Speciļ¬cations 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 Speciļ¬cations 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