





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Evaluation Methods, Dynamic methods, Rule based, Oblivious, Problems, Traversing parse tree, Ad Hoc Analysis are basic concepts discussed of course.
Typology: Slides
1 / 29
This page cannot be seen from the preview
Don't miss anything!






















2
1
Bit^1
0
Parse tree for –
4
1
val: -
Bit 1
0
Inherited Attributes
pos: 0 val: 5
pos: 0 val: 1
pos: 1 val: 4
pos: 1 val: 0
pos: 2 val: 4
pos: 2 val: 4
neg: true
5
1
val: -
Bit 1
0
Synthesized Attributes
pos: 0 val: 5
pos: 0 val: 1
pos: 1 val: 4
pos: 1 val: 0
pos: 2 val: 4
pos: 2 val: 4
neg: true
7
1
val: -
Bit 1
0
peel away parse tree
pos: 0 val: 5
pos: 0 val: 1
pos: 1 val: 4
pos: 1 val: 0
pos: 2 val: 4
pos: 2 val: 4
neg: true
8
1
val: -
1
0
dependence graph
pos: 0 val: 5
pos: 0 val: 1
pos: 1 val: 4
pos: 1 val: 0
pos: 2 val: 4
pos: 2 val: 4
neg: true
10
Evaluation Methods
Dynamic methods
Build the parse tree
Build the dependence graph
Topological sort the graph
Define attributes in topological
order
11
Evaluation Methods
Dynamic methods
Build the parse tree
Build the dependence graph
Topological sort the graph
Define attributes in topological
order
13
Evaluation Methods
Dynamic methods
Build the parse tree
Build the dependence graph
Topological sort the graph
Define attributes in topological
order
14
Evaluation Methods
Dynamic methods
Build the parse tree
Build the dependence graph
Topological sort the graph
Define attributes in topological
order
16
Evaluation Methods
Oblivious (passes, dataflow)
Ignore rules and parse tree
Pick a convenient order (at
design time) and use it
17
Problems
Attribute grammars have
not achieved widespread
use due to a myraid of
problems
19
Problems
non-local computation
traversing parse tree
storage management for
short-lived attributes
lack of high-quality
inexpensive tools
20
Problems
non-local computation
traversing parse tree
storage management for
short-lived attributes
lack of high-quality
inexpensive tools