Build and walk ast using recursive visiting algorithm

Assignment Help C/C++ Programming
Reference no: EM132667111

Below you find a properly tested source that should be passed an analyzer for generating a CFG (Control Flow Graph) view saved as PNG or JPG image.

This is an assignment in which you need to manage following steps:

1) make a C++ analyzer program to build and walk AST using recursive visiting algorithm (no auxiliary software is allowed here, this program must be created without tools like compilers, lexers, llvm, clang etc - it's a key task to be managed);

2) program created in step 1 should be compiled to an '.exe' file. It receives a single argument via command line interface, specifically a name of cpp file containing program posted below

3) once argument passed appropriately via command line, running executable performs parsing and walking AST build from source below to pick data (blocks) which are necessary for building AST;

4) this process is expected generating a single result - that's a PNG or JPG image visualizing cpp source as a control flow graph.

5) If image file is created properly (it provides with view of CFG) then job outcome is just what I need so it looks things are right to finish.

NOTE:

Focus is required on facts as follows:
- analyzer can be written in C++, C, Java or Python, essentially it should build CFG for any C++ programs which are passed into executable code

- no compilers, lexers, already existing analyzers and whatever tools for instant AST or CFG building are allowed here - DO PARSING AND WALKING AST WITHOUT ANY EXTERNAL SOFTWARE, only using recursive visiting algorithm (other walking algorithms can be OK if they are applicable for walking AST without existing software)

- C++ analyzer program must cover following instructions:

1) if / else
2) while
3) for
4) switch / case
5) break;
6) continue
7) return

Unless all of them can be recognized and processed by the program to build CFG, work result to be considered as incomplete and dissatisfactory

Expected solution: a C++ analyzer source which can be compiled by g++ to executable file. It receives cpp program like one posted in this file, generates only PNG- or JPG-formatted image of control flow graph for all functions inside of source analyzed at once.

Attachment:- Core.zip

Reference no: EM132667111

Questions Cloud

Antitrust protocols based on criminal aspects of health care : Analyze the general transition of U.S. health laws based on criminal misconduct in health care to the creation of contract laws,
How supportive and interpersonal psychotherapies are similar : Briefly describe how supportive and interpersonal psychotherapies are similar. Explain at least three differences between these therapies.
What is the cost of goods sold for babe company : What is the cost of goods sold? The printing department used 8,000 labor hours at P5.60 per hour and the binding department used 4,600 hours at P6.00 per hour.
Essence of understanding human behavior : Humanistic psychology has a rich history and tradition of arguing for the human experience as the essence of understanding human behavior.
Build and walk ast using recursive visiting algorithm : Make a C++ analyzer program to build and walk AST using recursive visiting algorithm (no auxiliary software is allowed here, this program must be created
How do you see yourself leading others to resolve issues : How do you see yourself leading others to resolve these issues. Provide TWO exemplars articulating your envisioned future of nursing that will continue.
What the sales of jumbo co must have been : The ending inventories of work in process and finished goods were P38, 000 and P52, 000 respectively. The sales of Jumbo Co. for 2009, must have been
Legal aspects of us health care system administration : Prevailing wisdom reinforces the fact that working in U.S. health care administration in 21st Century requires knowledge of the various aspects of health laws
Why the academic and professional individuals were selected : Clearly and thoroughly explain in detail why the academic and professional individuals/teams were selected to support success in the MSN program.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Average temperature for the month in new york city

As values are read in the loop calculate the necessary sums and values for the following (Do not determine any of the values merely by inspection): The average temperature for the month in New York City and the average temperature for the month in ..

  Write a program that synchronizes the threads

CS314 Operating Systems - Write a program that synchronizes the threads such that deadlock does not occur and no little rascal starves. The output should specify which rascal is eating.

  Question regarding the pointer arithmetic

Write a program that allocates an array on the heap and then iterates through the heap using pointer arithmetic. Print the item as in part 2 at each iteration. Loop backwards through the array using pointer arithmetic and print as well.

  Program that asks the user to enter the number of miles

Write a C - program that asks the user to enter the number of miles traveled and the number of gallons of gasoline consumed. It should then calculate and display the miles-per-gallon value. Confine your output to 1 decimal place.

  Prepare an application that creates a quiz

Prepare an application that creates a quiz, which contains at least five questions about a hobby, popular music, astronomy, or any other personal interest.

  Calculate the commission owing for that record

Construct an algorithm that will read a record on the file, calculate the commission owing for that record, and print the retail price, commission and employee number

  Writer a program that allows the user to enter an unknown

writer a program that allows the user to enter an unknown number of characters stores those characters in a data

  Write program that captures and stores data about automobile

Suppose you were required to write a C++ program that captures and stores data about automobiles that a small dealership in your city sells. Consider the attributes that describe an automobile.

  Demonstrate your understanding of loops

COMP20005 - Engineering Computation - The University of Melbourne - demonstrate your understanding of loops, if statements, functions, and arrays

  Design an algorithm to find the selling price

To make a profit, the prices of the items sold in a furniture store are marked up by 60%. Design an algorithm to find the selling price of an item sold at the furniture store. What information do you need to find the selling price?

  Create a loops that reads from memory an array

Create a loops that reads from memory an array containing an arbitrary number of characters - The program should make a second character array which is identical to the first, except that the case of every alphabetical letter has been reversed

  Prepare a test plan for the test of option code field

If the customer did not make any room reservation options, the front desk clerks should enter "none"; the field should not be blank. The valid option codes are four-character alphabetic codes and should be matched against a list of valid codes. Pr..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd