Syntax Directed Translation
Syntax Directed Translation
Syntax Directed Translation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Dependency Graphs (ASU Ch 5.1 Fig 5.7)<br />
8<br />
• Evaluation order is given by a<br />
topological sort - any TS<br />
gives a valid order of<br />
evaluation for the semantic<br />
rules<br />
• i.e. the dependent attributes<br />
c 1 , c 2 , c 3 , …, c k are known at<br />
the node before f is evaluated<br />
• rule sequence (see figure)<br />
a4 := real<br />
a5 := a4<br />
add_type(id3.entry, a5)<br />
a7 := a5<br />
add_type(id2.entry, a7)<br />
a9 := a7<br />
add_type(id1.entry, a9)<br />
Example directed graph<br />
real id 1 , id 2 , id 3<br />
D<br />
4<br />
T.type = real<br />
L.in = real<br />
real L.in = real , id 3<br />
9<br />
L.in = real , id 2<br />
10<br />
id 1<br />
14/10/2014 DFR - CC - SDT<br />
7<br />
1<br />
5<br />
8<br />
6<br />
2<br />
3