in Compiler Design
1,685 views
1 vote
1 vote
Construct the DAG for the expression
$((x + y)-((x + y)\ast(x -y))) + ((x+y)\ast(x-y))$
in Compiler Design
1.7k views

2 Answers

1 vote
1 vote

((x+y)−((x+y)∗(x−y))) and ((x+y)∗(x−y)) expression needed to be added together at the end. So according to me, DAG should be following...

 

0 votes
0 votes

DAG for the expression ((x+y)−((x+y)∗(x−y)))+((x+y)∗(x−y))

 

1 comment

I think you missed this part "minus from the Top should be connected to multiply" because of this condition ((x+y)−((x+y)∗(x−y)))
2
2

Related questions