Tuesday, March 22, 2016

DAG(Directed acyclic graph)

DAG(Directed acyclic graph):   A Directed acyclic graph is a graph with no cycles which gives a picture of how the value computed by each statement in a basic block is used in subsequent statement in the block . That is,  a DAG has node for every sub-expression of the expression. An interior node represents n operator & its child represents an operand.

DAG is mainly used to identify the same expression.

Example:  Let us the following expression-
       a + a*(b-c)+(b-c)*d.

DAG for the expression is shown
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Related Posts:

  • What is Assembler? Assembler: Assembly code is passed to an assembler for further procesing that is, if the source language is assembly language & the target language is machine language, then the trasnlator is called an assembler. If You… Read More
  • Basic Blocks Basic Blocks: A basic block is a sequence of consecutive statement in which flow of control enters at the beginning & leaves at the end without halt or possibility of branching except at the end of the basic block. … Read More
  • What are the advantages of generating intermediate code? The advantages of generating intermediate code  Intermediate Code Generation:   After syntax & semantic analysis the compiler generates an explicit intermediate representation of the source program. To… Read More
  • Write the major issues in the design of a code generator? The major issues in the design of a code generator There are some major issues in the design of a code generator. They are - Memory Management Instruction selection Register allocation Evaluation order If You want … Read More
  • DAG(Directed acyclic graph) DAG(Directed acyclic graph):   A Directed acyclic graph is a graph with no cycles which gives a picture of how the value computed by each statement in a basic block is used in subsequent statement in the block . T… Read More

0 comments:

Post a Comment