SlideShare a Scribd company logo
A Language Independent Task
Engine for Incremental Name
and Type Analysis
Guido H. Wachsmuth
Gabriel D. P. Konat
Vlad A.Vergu
Danny M. Groenewegen
Eelco Visser
Spoofax Language Workbench
Spoofax Language Workbench
Name and Type Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}
Name Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign to each reference its corresponding definition
Name Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign to each reference its corresponding definition
Name Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign to each reference its corresponding definition
Name Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign to each reference its corresponding definition
Name Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign to each reference its corresponding definition
Name Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign to each reference its corresponding definition
Type Analysis
class A {
class C : A {

class B {

B b;
int m;

}
}

float f;

float m() {
return 1 + b.f;
}

int n() {
return m();
}

int i;

int m() {
return 0;
}
}

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

}

float f;

float m() {
return 1 + b.f;
}

}

int i;

int m;

int n() {
return m();
}

float

class B {

int m() {
return 0;
}
}

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

}

float f;

float m() {
return 1 + b.f;
}

}

int i;

int m;

int n() {
return m();
}

float

class B {

int m() {
return 0;
}
}

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

float

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

float
float

Assign a type to each expression
Type Analysis
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

float
float

Assign a type to each expression

int
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

float m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
float

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
m()
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
m()
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
return 1 + b.f
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Incremental
Name and Type Analysis
class A {
class C : A {

B b;

int n() {
return m();
m()
}

int m;

int i;
B

float f;

int m() {
b.f
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
1. Caching

class A {
class C : A {

B b;

int n() {
return m();
m()
}

int m;

int i;
B

float f;

int m() {
b.f
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

Reuse analysis results from previous analysis

int
2. Change detection

class A {
class C : A {

B b;

int n() {
return m();
m()
}

int m;

int i;
B

float f;

int
int m() {
b.f
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

Which part of the program has changed?

int
3. Invalidation & propagation

class A {
class C : A {

B b;

int n() {
return m();
m()
}

int m;

int i;
B

float f;

int m() {
b.f
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

Which calculations are affected by a change?

int
4. Dependency tracking

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

What are the dependencies between calculations?
4. Dependency tracking

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

What are the dependencies between calculations?
4. Dependency tracking

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

What are the dependencies between calculations?
4. Dependency tracking

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

What are the dependencies between calculations?
4. Dependency tracking

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

What are the dependencies between calculations?
4. Dependency tracking

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

What are the dependencies between calculations?
5. Scheduling

class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float

int

float

How to (re-)schedule invalidated calculations?
Caching
Change detection
Invalidation & propagation
Dependency tracking
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
f
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Caching
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Change Detection
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Invalidation
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Propagation
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Propagation
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Propagation
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
float

float
float

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int m;

int i;
B

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

float
float

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

float
int

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
i
return 1 + b.f;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
Scheduling
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
Tasks
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
Units of computation ...
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
... with cacheable results ...
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
... and dependencies on each other
class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
resolve class A

resolve class B

resolve method m

resolve field b
resolve field i

class A {
class C : A {

B b;

int n() {
return m();
}

int i;
B

int m;

float f;

int m() {
return 1 + b.i;
}

}
int

class B {

}

int m() {
return 0;
}
}
int

int
int

int
resolve class A

resolve class B

resolve method m

resolve field b
resolve field i

class A {
class C : A {

B b;

float f;

int m() {
return 1 + b.i;
}

}

int i;

int m;

int n() {
return m();
}

int m() {
return 0;
}

}
calc type of m()

class B {

}
calc type of b
calc type of i
calc type of b.i
calc type of 1 + b.i

calc type of 0
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; }
}
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class B
define field i
type of i is int
define field f
type of f is float

Facts
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class B
define field i
type of i is int
define field f
type of f is float

Facts
Tasks
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class B
define field i
type of i is int
define field f
type of f is float

Facts
Tasks
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int
define field f
type of f is float

Facts
Tasks
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i

type of f is float

Facts
Tasks
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

resolve class B

resolve field b

resolve field i

calc type of b

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i

1

type of i is int
define field f
type of f is float

Facts
Tasks
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

1

type of i is int
define field f
type of f is float

resolve class B

2

resolve field b

resolve field i

Facts
Tasks

calc type of b

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

1

type of i is int
define field f
type of f is float

resolve class B

2

resolve field i

Facts
Tasks

calc type of i
calc type of b.i

resolve field b
calc type of b

3

calc type of 1

calc type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

1

define field f
type of f is float

Facts
Tasks

resolve class B

2

resolve field b

resolve field i

type of i is int

4

calc type of b

calc type of i

3

calc type of 1

calc type of b.i

calc type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

1

resolve class B

2

resolve field b

define field f

5

resolve field i

4

calc type of b

calc type of i

3

calc type of 1

type of f is float

Facts
Tasks

calc type of b.i

calc type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

1

resolve class B

2

resolve field b

define field f

5

resolve field i

4

calc type of b

6

calc type of i

3

calc type of 1

type of f is float

Facts
Tasks

calc type of b.i

calc type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

1

resolve class B

2

resolve field b

define field f

5

resolve field i

4

calc type of b

Facts

6

calc type of i

3

calc type of 1

Tasks

7

calc type of b.i

type of f is float

calc type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

1

resolve class B

2

resolve field b

define field f

5

resolve field i

4

calc type of b

Facts

6

calc type of i

3

calc type of 1

Tasks

7

calc type of b.i

type of f is float

calc
8

type of 1 + b.i
class A {
B b;
float m() { return 1 + b.i; }
}

class B {
int i;
float f;
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

1

resolve class B

2

resolve field b

define field f

5

resolve field i

4

calc type of b

Facts

6

calc type of i

3

calc type of 1

Tasks

7

calc type of b.i

type of f is float

calc
8

type of 1 + b.i
Incremental
Name and Type Analysis
with Tasks
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

type of f is float

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class B {
int i;
float f;
}

class A {
B b;
i
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

type of f is float

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

type of f is float

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

type of f is float

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

type of f is float

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field i

calc type of b

type of f is float

calc type of i

calc type of 1

calc type of b.i

calc type of 1 + b.i
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

calc type of b

type of f is float

calc type of 1
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field f

calc type of b

type of f is float

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f

define field f
type of f is float

1
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

1

resolve field f

calc type of b

type of f is float

2

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

1

resolve field f

calc type of b

type of f is float

2

calc type of f

calc type of 1

3

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

1

resolve field f

calc type of b

type of f is float

2

calc type of f

calc type of 1

3

calc type of b.f

calc
4

type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
f
float m() { return 1 + b.i; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

1

resolve field f

calc type of b

type of f is float

2

calc type of f

calc type of 1

3

calc type of b.f

calc
4

type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field f

calc type of b

type of f is float

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field f

calc type of b

type of f is float

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field f

calc type of b

type of f is float

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field f

calc type of b

type of f is float

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

define field f

resolve field f

calc type of b

type of f is float

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f

1
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

1

resolve field f

calc type of b

2

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

1

resolve field f

calc type of b

2

calc type of f

calc type of 1

3

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

1

resolve field f

calc type of b

2

calc type of f

calc type of 1

3

calc type of b.f

calc
4

type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
class B {
int i;
float f;
}

class A {
B b;
float m() { return 1 + b.f; }
}

define class A
define class B

define method m

type of m is float

define field i

define field b

type of b is B

type of i is int

resolve class B

resolve field b

resolve field f

calc type of b

calc type of f

calc type of 1

calc type of b.f

calc type of 1 + b.f
Language Independence
Traditional typing rule in Spoofax

type-of :
FieldRef(e, f) -> t
where t := <type-of> f
Task creation rule

create-type-task(|ctx) :
FieldRef(e, f) -> task
where
task := <type-lookup(|ctx)> f
Declarative typing rule

type rules
FieldRef(e, f) : t
where definition of f : t
Declarative name binding rule

binding rules
FieldRef(e, f) :
	 refers to Field f in Class c
	 where e has type ClassType(c)
Evaluation
Subject language
Subject application
Feb 2010 - 4 files - 3139 lines of code
3 years later - 55 files - 8991 lines of code
full, non-incremental analysis
15

Parse

Time (s)

12

Collect

Evaluate

9
6
3
0

0

20

40

60

80

100

120

140

160

180

200

220

240

260

280

300

320

340

200

220

240

260

280

300

320

340

Revision

5

Parse

Time (s)

4

Collect

Evaluate

3
2
1
0

0

20

40

60

80

100

120

140

160

180

Revision
full, non-incremental analysis
15

Parse

Time (s) Time (s)

15
9
12
6

Collect

Evaluate

9
3
6
0

0

3

20

40

60

80

100

120

140

160

180

200

220

240

260

280

300

320

340

200

220

240

260

280

300

320

340

Revision

0

0

20

40

60

80

100

120

140

160

180

Revision

5

incremental analysis

Parse

5
3
4
2

Collect

Evaluate

Parse

4

Time (s) Time (s)

Evaluate

Parse

12

Collect

Collect

Evaluate

3
1
2
0
1
0

0

20

40

60

80

100

120

140

160

180

200

220

240

260

280

300

320

340

200

220

240

260

280

300

320

340

Revision
0

20

40

60

80

100

120

140

160

180

Revision
5

Parse

Collect

Evaluate

Time (s)

4
3
2
1
0

0

2

5

10

14

23

33

∆LOC

46

67 103 189
single-file changes
1.5

Parse

Time (s)

1.2

Collect

Evaluate

0.9
0.6
0.3
0

0

20

40

60

80

Revision

100

120
single-file changes
1.5

Parse

Time (s)

1.2

Collect

Evaluate

0.9
0.6
0.3
0

0

20

40

60

80

100

Revision

responsive enough for use in IDE

120
Future Work
Technical
optimization of
fact & task
collection

Evaluation

Research
Technical
optimization of
fact & task
collection
parallelization

Evaluation

Research
Technical

Evaluation

optimization of
fact & task
collection

more languages

parallelization

Research
Technical

Evaluation

optimization of
fact & task
collection

more languages

parallelization

other analyses &
transformations

Research
Technical

Evaluation

Research

optimization of
fact & task
collection

more languages

granularity

parallelization

other analyses &
transformations
Technical

Evaluation

Research

optimization of
fact & task
collection

more languages

granularity

parallelization

other analyses &
transformations

caching
A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013
A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013
A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013
A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013

More Related Content

What's hot

Category Theory for Programmers
Category Theory for ProgrammersCategory Theory for Programmers
Category Theory for Programmers
Santosh Rajan
 
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
vtunotesbysree
 
C Programming
C ProgrammingC Programming
C Programming
amitymbaassignment
 
Unit ii ppt
Unit ii pptUnit ii ppt
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015][Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
Mumbai B.Sc.IT Study
 
Basics of C porgramming
Basics of C porgrammingBasics of C porgramming
Why functional programming and category theory strongly matters
Why functional programming and category theory strongly mattersWhy functional programming and category theory strongly matters
Why functional programming and category theory strongly matters
Piotr Paradziński
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
sachindane
 
Programming in C [Module One]
Programming in C [Module One]Programming in C [Module One]
Programming in C [Module One]
Abhishek Sinha
 
types, types, types
types, types, typestypes, types, types
types, types, types
Fronx Wurmus
 
Category Theory for Mortal Programmers
Category Theory for Mortal ProgrammersCategory Theory for Mortal Programmers
Category Theory for Mortal Programmers
Stephan February
 
Category theory for beginners
Category theory for beginnersCategory theory for beginners
Category theory for beginners
kenbot
 
C programming language character set keywords constants variables data types
C programming language character set keywords constants variables data typesC programming language character set keywords constants variables data types
C programming language character set keywords constants variables data types
Sourav Ganguly
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’eShikshak
 
C language basics
C language basicsC language basics
C language basics
Nikshithas R
 
Concepts of C [Module 2]
Concepts of C [Module 2]Concepts of C [Module 2]
Concepts of C [Module 2]
Abhishek Sinha
 

What's hot (17)

Category Theory for Programmers
Category Theory for ProgrammersCategory Theory for Programmers
Category Theory for Programmers
 
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
 
C Programming
C ProgrammingC Programming
C Programming
 
Unit ii ppt
Unit ii pptUnit ii ppt
Unit ii ppt
 
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015][Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
 
Basics of C porgramming
Basics of C porgrammingBasics of C porgramming
Basics of C porgramming
 
Why functional programming and category theory strongly matters
Why functional programming and category theory strongly mattersWhy functional programming and category theory strongly matters
Why functional programming and category theory strongly matters
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
 
Input And Output
 Input And Output Input And Output
Input And Output
 
Programming in C [Module One]
Programming in C [Module One]Programming in C [Module One]
Programming in C [Module One]
 
types, types, types
types, types, typestypes, types, types
types, types, types
 
Category Theory for Mortal Programmers
Category Theory for Mortal ProgrammersCategory Theory for Mortal Programmers
Category Theory for Mortal Programmers
 
Category theory for beginners
Category theory for beginnersCategory theory for beginners
Category theory for beginners
 
C programming language character set keywords constants variables data types
C programming language character set keywords constants variables data typesC programming language character set keywords constants variables data types
C programming language character set keywords constants variables data types
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’
 
C language basics
C language basicsC language basics
C language basics
 
Concepts of C [Module 2]
Concepts of C [Module 2]Concepts of C [Module 2]
Concepts of C [Module 2]
 

Viewers also liked

Audience opinion
Audience opinionAudience opinion
Audience opinionAdella1
 
Magazine advert construction 2
Magazine advert construction 2Magazine advert construction 2
Magazine advert construction 2benjichandra
 
AHC. Atenció al pacient crònic a l'ICS Terres de l'Ebre
AHC. Atenció al pacient crònic a l'ICS Terres de l'EbreAHC. Atenció al pacient crònic a l'ICS Terres de l'Ebre
AHC. Atenció al pacient crònic a l'ICS Terres de l'Ebre
Institut Català de la Salut
 
Prezentācija md
Prezentācija  mdPrezentācija  md
Prezentācija mdzebiekste
 
Cd cover analyse [autosaved]
Cd cover analyse [autosaved]Cd cover analyse [autosaved]
Cd cover analyse [autosaved]Adella1
 
Yaren güvenç (3)
Yaren güvenç (3)Yaren güvenç (3)
Yaren güvenç (3)
secily77
 
Santiago y Prisciliano
Santiago y Prisciliano Santiago y Prisciliano
Santiago y Prisciliano
J Luque
 
Programma di insieme per coccaglio 23.04.2014
Programma di insieme per coccaglio 23.04.2014Programma di insieme per coccaglio 23.04.2014
Programma di insieme per coccaglio 23.04.2014
Filippo Filippini
 
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
 
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.
 
Bootstrapping Meta-Languages of Language Workbenches
Bootstrapping Meta-Languages of Language WorkbenchesBootstrapping Meta-Languages of Language Workbenches
Bootstrapping Meta-Languages of Language Workbenches
Gabriël Konat
 
free software basics and history
free software basics and historyfree software basics and history
free software basics and history
sivaharivkm
 
kjnliugfdrtgyuhijuyrdexfcghbjkl.
kjnliugfdrtgyuhijuyrdexfcghbjkl.kjnliugfdrtgyuhijuyrdexfcghbjkl.
kjnliugfdrtgyuhijuyrdexfcghbjkl.Adella1
 
Una eina bàsica: les TIC
Una eina bàsica: les TICUna eina bàsica: les TIC
Una eina bàsica: les TIC
Institut Català de la Salut
 
Construction2
Construction2Construction2
Construction2Adella1
 

Viewers also liked (20)

HBellvitge. 7PMassatge Infantil CAP Llibertat.pdf
HBellvitge. 7PMassatge Infantil CAP Llibertat.pdfHBellvitge. 7PMassatge Infantil CAP Llibertat.pdf
HBellvitge. 7PMassatge Infantil CAP Llibertat.pdf
 
Audience opinion
Audience opinionAudience opinion
Audience opinion
 
Magazine advert construction 2
Magazine advert construction 2Magazine advert construction 2
Magazine advert construction 2
 
AHC. Atenció al pacient crònic a l'ICS Terres de l'Ebre
AHC. Atenció al pacient crònic a l'ICS Terres de l'EbreAHC. Atenció al pacient crònic a l'ICS Terres de l'Ebre
AHC. Atenció al pacient crònic a l'ICS Terres de l'Ebre
 
Prezentācija md
Prezentācija  mdPrezentācija  md
Prezentācija md
 
Cd cover analyse [autosaved]
Cd cover analyse [autosaved]Cd cover analyse [autosaved]
Cd cover analyse [autosaved]
 
Interdisciplinary project
Interdisciplinary projectInterdisciplinary project
Interdisciplinary project
 
Yaren güvenç (3)
Yaren güvenç (3)Yaren güvenç (3)
Yaren güvenç (3)
 
Santiago y Prisciliano
Santiago y Prisciliano Santiago y Prisciliano
Santiago y Prisciliano
 
Programma di insieme per coccaglio 23.04.2014
Programma di insieme per coccaglio 23.04.2014Programma di insieme per coccaglio 23.04.2014
Programma di insieme per coccaglio 23.04.2014
 
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
 
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
 
Economic systems
Economic systemsEconomic systems
Economic systems
 
Bootstrapping Meta-Languages of Language Workbenches
Bootstrapping Meta-Languages of Language WorkbenchesBootstrapping Meta-Languages of Language Workbenches
Bootstrapping Meta-Languages of Language Workbenches
 
Costa Ponent. 1PPediatria Alt Penedès.pdf
Costa Ponent. 1PPediatria Alt Penedès.pdfCosta Ponent. 1PPediatria Alt Penedès.pdf
Costa Ponent. 1PPediatria Alt Penedès.pdf
 
free software basics and history
free software basics and historyfree software basics and history
free software basics and history
 
Equipment used
Equipment usedEquipment used
Equipment used
 
kjnliugfdrtgyuhijuyrdexfcghbjkl.
kjnliugfdrtgyuhijuyrdexfcghbjkl.kjnliugfdrtgyuhijuyrdexfcghbjkl.
kjnliugfdrtgyuhijuyrdexfcghbjkl.
 
Una eina bàsica: les TIC
Una eina bàsica: les TICUna eina bàsica: les TIC
Una eina bàsica: les TIC
 
Construction2
Construction2Construction2
Construction2
 

Similar to A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013

Chapter 5.ppt
Chapter 5.pptChapter 5.ppt
Chapter 5.ppt
Dianajeon3
 
C++ polymorphism
C++ polymorphismC++ polymorphism
C++ polymorphismFALLEE31188
 
Lec 6 14_aug [compatibility mode]
Lec 6 14_aug [compatibility mode]Lec 6 14_aug [compatibility mode]
Lec 6 14_aug [compatibility mode]Palak Sanghani
 
Fun with Kotlin
Fun with KotlinFun with Kotlin
Fun with Kotlin
Egor Andreevich
 
Core java
Core javaCore java
Core java
prabhatjon
 
E5
E5E5
E5
lksoo
 
Technical questions
Technical questionsTechnical questions
Technical questions
Kirthan S Holla
 
Blazing Fast, Pure Effects without Monads — LambdaConf 2018
Blazing Fast, Pure Effects without Monads — LambdaConf 2018Blazing Fast, Pure Effects without Monads — LambdaConf 2018
Blazing Fast, Pure Effects without Monads — LambdaConf 2018
John De Goes
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4
Ismar Silveira
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and Swift
Chris Bailey
 
C++ Language
C++ LanguageC++ Language
C++ Language
Vidyacenter
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2Pamidimukkala Sivani
 
function in c
function in cfunction in c
function in c
subam3
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
Prasanth566435
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
v_jk
 
Recursion in C
Recursion in CRecursion in C
Recursion in Cv_jk
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
OliverKane3
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
OliverKane3
 

Similar to A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013 (20)

Chapter 5.ppt
Chapter 5.pptChapter 5.ppt
Chapter 5.ppt
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
C++ polymorphism
C++ polymorphismC++ polymorphism
C++ polymorphism
 
Lec 6 14_aug [compatibility mode]
Lec 6 14_aug [compatibility mode]Lec 6 14_aug [compatibility mode]
Lec 6 14_aug [compatibility mode]
 
Fun with Kotlin
Fun with KotlinFun with Kotlin
Fun with Kotlin
 
Core java
Core javaCore java
Core java
 
E5
E5E5
E5
 
Technical questions
Technical questionsTechnical questions
Technical questions
 
Blazing Fast, Pure Effects without Monads — LambdaConf 2018
Blazing Fast, Pure Effects without Monads — LambdaConf 2018Blazing Fast, Pure Effects without Monads — LambdaConf 2018
Blazing Fast, Pure Effects without Monads — LambdaConf 2018
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and Swift
 
C++ Language
C++ LanguageC++ Language
C++ Language
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
 
function in c
function in cfunction in c
function in c
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
Csharp4 generics
Csharp4 genericsCsharp4 generics
Csharp4 generics
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
 
Recursion in C
Recursion in CRecursion in C
Recursion in C
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

A Language Independent Task Engine for Incremental Name and Type Analysis - SLE 2013

  • 1. A Language Independent Task Engine for Incremental Name and Type Analysis Guido H. Wachsmuth Gabriel D. P. Konat Vlad A.Vergu Danny M. Groenewegen Eelco Visser
  • 4. Name and Type Analysis
  • 5. class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } }
  • 6. Name Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign to each reference its corresponding definition
  • 7. Name Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign to each reference its corresponding definition
  • 8. Name Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign to each reference its corresponding definition
  • 9. Name Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign to each reference its corresponding definition
  • 10. Name Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign to each reference its corresponding definition
  • 11. Name Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign to each reference its corresponding definition
  • 12. Type Analysis class A { class C : A { class B { B b; int m; } } float f; float m() { return 1 + b.f; } int n() { return m(); } int i; int m() { return 0; } } Assign a type to each expression
  • 13. Type Analysis class A { class C : A { B b; } float f; float m() { return 1 + b.f; } } int i; int m; int n() { return m(); } float class B { int m() { return 0; } } Assign a type to each expression
  • 14. Type Analysis class A { class C : A { B b; } float f; float m() { return 1 + b.f; } } int i; int m; int n() { return m(); } float class B { int m() { return 0; } } Assign a type to each expression
  • 15. Type Analysis class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } Assign a type to each expression
  • 16. Type Analysis class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float Assign a type to each expression
  • 17. Type Analysis class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float float Assign a type to each expression
  • 18. Type Analysis class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float float float Assign a type to each expression
  • 19. Type Analysis class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float float float Assign a type to each expression int
  • 20. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float float float int
  • 21. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; float m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float float float int
  • 22. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } float class B { } int m() { return 0; } } float float float int
  • 23. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 24. class A { class C : A { B b; int n() { return m(); m() } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 25. class A { class C : A { B b; int n() { return m(); m() } int m; int i; B float f; int m() { return 1 + b.f; return 1 + b.f } } int class B { } int m() { return 0; } } float float float int
  • 27. class A { class C : A { B b; int n() { return m(); m() } int m; int i; B float f; int m() { b.f return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 28. 1. Caching class A { class C : A { B b; int n() { return m(); m() } int m; int i; B float f; int m() { b.f return 1 + b.f; } } int class B { } int m() { return 0; } } float float float Reuse analysis results from previous analysis int
  • 29. 2. Change detection class A { class C : A { B b; int n() { return m(); m() } int m; int i; B float f; int int m() { b.f return 1 + b.f; } } int class B { } int m() { return 0; } } float float float Which part of the program has changed? int
  • 30. 3. Invalidation & propagation class A { class C : A { B b; int n() { return m(); m() } int m; int i; B float f; int m() { b.f return 1 + b.f; } } int class B { } int m() { return 0; } } float float float Which calculations are affected by a change? int
  • 31. 4. Dependency tracking class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float What are the dependencies between calculations?
  • 32. 4. Dependency tracking class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float What are the dependencies between calculations?
  • 33. 4. Dependency tracking class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float What are the dependencies between calculations?
  • 34. 4. Dependency tracking class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float What are the dependencies between calculations?
  • 35. 4. Dependency tracking class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float What are the dependencies between calculations?
  • 36. 4. Dependency tracking class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float What are the dependencies between calculations?
  • 37. 5. Scheduling class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float int float How to (re-)schedule invalidated calculations?
  • 38. Caching Change detection Invalidation & propagation Dependency tracking Scheduling
  • 39. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 40. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { f return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 41. class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 42. Caching class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 43. Change Detection class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 44. Invalidation class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 45. Propagation class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 46. Propagation class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 47. Propagation class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 48. Scheduling class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 49. Scheduling class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 50. Scheduling class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } float float float int
  • 51. Scheduling class A { class C : A { B b; int n() { return m(); } int m; int i; B float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } int float float int
  • 52. Scheduling class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } int float int int
  • 53. Scheduling class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { i return 1 + b.f; } } int class B { } int m() { return 0; } } int int int int
  • 54. Scheduling class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 55. class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 56. Tasks
  • 57. class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 58. Units of computation ... class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 59. ... with cacheable results ... class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 60. ... and dependencies on each other class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 61. resolve class A resolve class B resolve method m resolve field b resolve field i class A { class C : A { B b; int n() { return m(); } int i; B int m; float f; int m() { return 1 + b.i; } } int class B { } int m() { return 0; } } int int int int
  • 62. resolve class A resolve class B resolve method m resolve field b resolve field i class A { class C : A { B b; float f; int m() { return 1 + b.i; } } int i; int m; int n() { return m(); } int m() { return 0; } } calc type of m() class B { } calc type of b calc type of i calc type of b.i calc type of 1 + b.i calc type of 0
  • 63. Name and Type Analysis
  • 64. Name and Type Analysis with Tasks
  • 65. class B { int i; float f; } class A { B b; float m() { return 1 + b.i; } }
  • 66. class B { int i; float f; } class A { B b; float m() { return 1 + b.i; } }
  • 67. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class B define field i type of i is int define field f type of f is float Facts
  • 68. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class B define field i type of i is int define field f type of f is float Facts Tasks
  • 69. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class B define field i type of i is int define field f type of f is float Facts Tasks
  • 70. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int define field f type of f is float Facts Tasks
  • 71. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i type of f is float Facts Tasks
  • 72. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B resolve class B resolve field b resolve field i calc type of b calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i 1 type of i is int define field f type of f is float Facts Tasks
  • 73. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B 1 type of i is int define field f type of f is float resolve class B 2 resolve field b resolve field i Facts Tasks calc type of b calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 74. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B 1 type of i is int define field f type of f is float resolve class B 2 resolve field i Facts Tasks calc type of i calc type of b.i resolve field b calc type of b 3 calc type of 1 calc type of 1 + b.i
  • 75. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B 1 define field f type of f is float Facts Tasks resolve class B 2 resolve field b resolve field i type of i is int 4 calc type of b calc type of i 3 calc type of 1 calc type of b.i calc type of 1 + b.i
  • 76. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int 1 resolve class B 2 resolve field b define field f 5 resolve field i 4 calc type of b calc type of i 3 calc type of 1 type of f is float Facts Tasks calc type of b.i calc type of 1 + b.i
  • 77. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int 1 resolve class B 2 resolve field b define field f 5 resolve field i 4 calc type of b 6 calc type of i 3 calc type of 1 type of f is float Facts Tasks calc type of b.i calc type of 1 + b.i
  • 78. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int 1 resolve class B 2 resolve field b define field f 5 resolve field i 4 calc type of b Facts 6 calc type of i 3 calc type of 1 Tasks 7 calc type of b.i type of f is float calc type of 1 + b.i
  • 79. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int 1 resolve class B 2 resolve field b define field f 5 resolve field i 4 calc type of b Facts 6 calc type of i 3 calc type of 1 Tasks 7 calc type of b.i type of f is float calc 8 type of 1 + b.i
  • 80. class A { B b; float m() { return 1 + b.i; } } class B { int i; float f; } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int 1 resolve class B 2 resolve field b define field f 5 resolve field i 4 calc type of b Facts 6 calc type of i 3 calc type of 1 Tasks 7 calc type of b.i type of f is float calc 8 type of 1 + b.i
  • 81. Incremental Name and Type Analysis with Tasks
  • 82. class B { int i; float f; } class A { B b; float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b type of f is float calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 83. class B { int i; float f; } class A { B b; i float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b type of f is float calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 84. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b type of f is float calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 85. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b type of f is float calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 86. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b type of f is float calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 87. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field i calc type of b type of f is float calc type of i calc type of 1 calc type of b.i calc type of 1 + b.i
  • 88. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f calc type of b type of f is float calc type of 1
  • 89. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field f calc type of b type of f is float calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 90. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f define field f type of f is float 1
  • 91. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f 1 resolve field f calc type of b type of f is float 2 calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 92. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f 1 resolve field f calc type of b type of f is float 2 calc type of f calc type of 1 3 calc type of b.f calc type of 1 + b.f
  • 93. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f 1 resolve field f calc type of b type of f is float 2 calc type of f calc type of 1 3 calc type of b.f calc 4 type of 1 + b.f
  • 94. class B { int i; float f; } class A { B b; f float m() { return 1 + b.i; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f 1 resolve field f calc type of b type of f is float 2 calc type of f calc type of 1 3 calc type of b.f calc 4 type of 1 + b.f
  • 95. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field f calc type of b type of f is float calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 96. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field f calc type of b type of f is float calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 97. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field f calc type of b type of f is float calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 98. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field f calc type of b type of f is float calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 99. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b define field f resolve field f calc type of b type of f is float calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 100. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 101. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 102. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 103. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f 1
  • 104. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b 1 resolve field f calc type of b 2 calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 105. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b 1 resolve field f calc type of b 2 calc type of f calc type of 1 3 calc type of b.f calc type of 1 + b.f
  • 106. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b 1 resolve field f calc type of b 2 calc type of f calc type of 1 3 calc type of b.f calc 4 type of 1 + b.f
  • 107. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 108. class B { int i; float f; } class A { B b; float m() { return 1 + b.f; } } define class A define class B define method m type of m is float define field i define field b type of b is B type of i is int resolve class B resolve field b resolve field f calc type of b calc type of f calc type of 1 calc type of b.f calc type of 1 + b.f
  • 110. Traditional typing rule in Spoofax type-of : FieldRef(e, f) -> t where t := <type-of> f
  • 111. Task creation rule create-type-task(|ctx) : FieldRef(e, f) -> task where task := <type-lookup(|ctx)> f
  • 112. Declarative typing rule type rules FieldRef(e, f) : t where definition of f : t
  • 113. Declarative name binding rule binding rules FieldRef(e, f) : refers to Field f in Class c where e has type ClassType(c)
  • 117. Feb 2010 - 4 files - 3139 lines of code
  • 118. 3 years later - 55 files - 8991 lines of code
  • 119. full, non-incremental analysis 15 Parse Time (s) 12 Collect Evaluate 9 6 3 0 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 200 220 240 260 280 300 320 340 Revision 5 Parse Time (s) 4 Collect Evaluate 3 2 1 0 0 20 40 60 80 100 120 140 160 180 Revision
  • 120. full, non-incremental analysis 15 Parse Time (s) Time (s) 15 9 12 6 Collect Evaluate 9 3 6 0 0 3 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 200 220 240 260 280 300 320 340 Revision 0 0 20 40 60 80 100 120 140 160 180 Revision 5 incremental analysis Parse 5 3 4 2 Collect Evaluate Parse 4 Time (s) Time (s) Evaluate Parse 12 Collect Collect Evaluate 3 1 2 0 1 0 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 200 220 240 260 280 300 320 340 Revision 0 20 40 60 80 100 120 140 160 180 Revision
  • 125. Technical optimization of fact & task collection Evaluation Research
  • 126. Technical optimization of fact & task collection parallelization Evaluation Research
  • 127. Technical Evaluation optimization of fact & task collection more languages parallelization Research
  • 128. Technical Evaluation optimization of fact & task collection more languages parallelization other analyses & transformations Research
  • 129. Technical Evaluation Research optimization of fact & task collection more languages granularity parallelization other analyses & transformations
  • 130. Technical Evaluation Research optimization of fact & task collection more languages granularity parallelization other analyses & transformations caching