Basic Block OpCode

I have attached the code below. I included hw8.gen.codes.c which is a working file and will help you understand the op code generation, however hw11.gen.codes.parser.c file is the one that I have been working on for creating basic blocks. I would like this code by this Saturday at 9:00am Mountain Standard Time.

Here is the full instructions:

The function traverse_ast(node) is a function that traverses the syntax subtree pointed to by node and builds the flow graph of basic blocks of intermediate codes.

We perform an in-order traversal recursive algorithm to process the actions/semantics encoded in the abstract syntax tree.

We always maintain a global variable current_bb which is the basic block that we are currently developing. Initially, we create a new empty basic block by calling fg_bb_new(). This is both the current basic block and the entry basic block for the flow graph. Note that we create the basic block in advance before we process any abstract syntax tree nodes to generate intermediate codes.

In processing a syntax tree, we always maintain a current basic block. Suppose we have finished processing a (abstract syntax) subtree with a root labelled AST_IF_THEN. Note that the statement located immediately after the IF statement is the target of the branch link of the if-condition test. That is, the intermediate codes for the statement after the IF statement belongs to a new basic block. As our convention requires the current_bb to be created in advance, we need to call fg_bb_new() as part of the processing for the AST_IF_THEN node. There are other cases (for example, processing a AST_While node) that we need to create an empty current basic block at the end of the processing.

You can compare the output of your program to that returned by the executable hw11

Source codes for the flow graph module (fg.h, fg.c) can be found in the project resource page.

NOTE: For this homework, we assume that there are no initializations of global variable. (We still allow declarations of global variables though.)

Beceriler: C Programlama

Daha fazlasını gör: tree of a graph, tree in order, tree in algorithm, tree graph, tree and graph, syntax programming, syntax in programming, recursive programming example, recursive programming, recursive program example, recursive function example, recursive algorithm example, recursive algorithm, programming syntax, programming statement, programming homework help, programming graph, programming basic, programming algorithm example, part of graph, part of a graph, op note, node programming, node of a tree, node graph

İşveren Hakkında:
( 2 değerlendirme ) Albuquerque, United States

Proje NO: #4457593



I have lex/yacc experience,can help you.

%selectedBids___i_period_sub_7% gün içinde 99%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(0 Değerlendirme)

Bu iş için 4 freelancer ortalamada $99 teklif veriyor


i think i can have to try it.

in %bids___i_period_sub_35% gün içinde104%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

Hi sir. Great pleasure to see your project.

in %bids___i_period_sub_35% gün içinde93%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

Hi, Dear. NO PROBLEM in your job development. Please check your PMB. Thanks for your regard

in %bids___i_period_sub_35% gün içinde99%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)