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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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