+1 vote
79 views
in Compilers & Operating Systems by

1 Answer

+1 vote
by
selected by (user.guest)
 
Best answer

Dependence Graph: If an attribute b depends on an attribute c then the semantic rule for b must be evaluated after the semantic rule for c 

The dependencies among the nodes can be depicted by a directed graph called dependency graph.

Dependency Graph: Directed graph indicating interdependencies among the synthesized and inherited attributes of various nodes in a parse tree. 

Algorithm to construct dependency graph for each node n in the parse tree do for each attribute a of the grammar symbol do  construct a node in the dependency graph 

for a

for each node n in the parse tree do

for each semantic rule b = f (c1 , c2 , ..., ck ) do { associated with production at n }

for i = 1 to k do

Construct an edge from ci to b

An algorithm to construct the dependency graph. After making one node for every attribute of all the nodes of the parse tree, make one edge from each of the other attributes on which it depends.


Related questions

+1 vote
1 answer 175 views
–1 vote
1 answer 166 views
0 votes
1 answer 6 views
0 votes
1 answer 4 views
asked 16 hours ago in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 6 views
+1 vote
1 answer 32 views
+1 vote
1 answer 31 views
+1 vote
1 answer 34 views
+1 vote
1 answer 30 views
+1 vote
1 answer 38 views
asked Jan 9 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 62 views
asked Jan 8 in Compilers & Operating Systems by (user.guest)
+1 vote
1 answer 63 views
0 votes
1 answer 231 views
+1 vote
1 answer 44 views
+1 vote
1 answer 95 views
asked Sep 15, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 72 views
asked Sep 15, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 496 views
+1 vote
1 answer 78 views
asked Sep 14, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 84 views
+1 vote
1 answer 42 views
+1 vote
1 answer 278 views
asked May 24, 2021 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 1.5k views
+3 votes
1 answer 5.3k views
+3 votes
1 answer 9.5k views
+1 vote
1 answer 263 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 166 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+2 votes
1 answer 144 views
asked Oct 10, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 208 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+2 votes
1 answer 106 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 111 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 613 views
+1 vote
1 answer 153 views
asked Oct 6, 2019 in Compilers & Operating Systems by anonymous
+1 vote
1 answer 318 views
+1 vote
1 answer 162 views
+2 votes
2 answers 321 views
asked Sep 29, 2019 in Compilers & Operating Systems by (user.guest)
+2 votes
1 answer 210 views
+1 vote
1 answer 956 views
+2 votes
1 answer 860 views
+1 vote
1 answer 118 views
Welcome to CPENTalk.com
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

...