

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


This project requires you to build a program that accepts a path and a set of file patterns on the command line, searches the directory tree rooted at that path, and analyzes each file found for its calling dependencies. That is, the Calls program finds each function defined in the file, then discovers all the functions called by those definitions. When analysis is complete, Calls must show each function defined in each of the files, in alphabetic order, and after the name of each defined function show all the functions it calls directly and indirectly in an indented format. fun1 function defined in analyzed file fun2 called by fun fun4 called by fun fun5 called by fun fun3 called by fun fun2 defined in file as well as called by fun fun4 called by fun fun5 called by fun Here the names fun1, …, fun5 stand for the fully qualified function names. That is, they show namespace and class cscope, like this, where CSE687 is the namespace in which class Anal is embedded: bool CSE687::Anal::analyze(const std::string &file); If fun3, fun4, and fun5 were all defined in other files, then this would be the entire display of data from the analyzed file. Note that you are required to show the calling sequence for all files as a single output set. So, if fun3, fun4, and fun5 are defined in other files, you still show them as calls made by fun1 and fun2. There are several interesting issues to think about. Can you detect constructor calls? destructor calls? operator calls? Should you do the analysis iteratively or recursively? In a single pass or in multiple passes? If you choose a recursive analysis what happens when there are recursive calls in the file analyzed? Should you show calls into the standard libraries and system libraries? Note that you can’t follow the call chain into those libraries, as you don’t have their source code readily available.
CSE687 - Object Oriented Design S 2003 trait to use the “.” Scope resolution operator for C#, instead of the “::” scope resolution used for C+ +.