Code Analyzer Components on Distributed Objects - Project 2 | CSE 775, Study Guides, Projects, Research of Engineering

Material Type: Project; Professor: Fawcett; Class: Distributed Objects; Subject: Computer Engineering; University: Syracuse University; Term: Spring 2002;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/09/2009

koofers-user-v8s
koofers-user-v8s 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE791 – Distributed Objects S 2002
Project #2 – Code Analyzer Components due
Monday, Feb 25
Purpose:
The purpose of this project is to build COM components, using the ATL library, that
record, in an XML file, the results of analyzing one or more source code files.
Specifically, you will analyze the cyclomatic complexity1 of each function in each file
presented and record, in an XML file, the following:
User identifier
File name
A sequence of cyclomatic complexities (integer numbers greater than zero)
The sum of the cyclomatic complexities
The second, third, and fourth items are repeated for each file analyzed. You are
required to support analysis of more than one set of files. You will do this by reading
an XML analysis file at program start up, reading a list of files from the command line,
e.g., *.h *.cpp, analyzing them and adding a new element to the analysis file with the
three items listed above for the current user id, and saving the modified analysis file
over the original.
Requirements:
Your CYCLO program:
1. shall compile and link from the command line, using VC++ 6.0, as provided in the
ECS cluster and operate in the environment provided there2.
2. shall provide a COM component that, given a valid filename, analyzes the
cyclomatic complexity of each function definition found in the file3.
3. shall provide a COM component that adds an XML element containing userid, a
sequence of cyclomatic complexity numbers, and the sum of these numbers to an
existing XML document. You will probably wish to use the xml parser you
developed in project #1 to support this requirement.
4. Your client code should load each of the required COM components and then shall
accept from the command line a userid and set of file patterns4. The client shall
perform the specified analysis on each file, read an existing XML analysis
document, and add an appropriate record containing the new analysis information.
5. The client output shall occur only after analysis is complete, and shall consist of a
series of lines of output, one line for each analyzed file. That is, each line contains
a userid, file name, sequence of cyclomatic complexities, sorted in descending
order, and a sum. The first time the program is run there shall be a sequence of
1 We will discuss cyclomatic complexity in class.
2 See notes on project submissions, handed out during the first class.
3 You are encouraged to use the tok and semi modules provided in Proj #2 help
folder.
4 A file pattern is a string of the form “*.h *.cpp”.
pf2

Partial preview of the text

Download Code Analyzer Components on Distributed Objects - Project 2 | CSE 775 and more Study Guides, Projects, Research Engineering in PDF only on Docsity!

CSE791 – Distributed Objects S 2002

Project #2 – Code Analyzer Components due

Monday, Feb 25

Purpose:

The purpose of this project is to build COM components, using the ATL library, that record, in an XML file, the results of analyzing one or more source code files. Specifically, you will analyze the cyclomatic complexity^1 of each function in each file presented and record, in an XML file, the following:  User identifier  File name  A sequence of cyclomatic complexities (integer numbers greater than zero)  The sum of the cyclomatic complexities The second, third, and fourth items are repeated for each file analyzed. You are required to support analysis of more than one set of files. You will do this by reading an XML analysis file at program start up, reading a list of files from the command line, e.g., *.h *.cpp, analyzing them and adding a new element to the analysis file with the three items listed above for the current user id, and saving the modified analysis file over the original.

Requirements:

Your CYCLO program:

  1. shall compile and link from the command line, using VC++ 6.0, as provided in the ECS cluster and operate in the environment provided there^2.
  2. shall provide a COM component that, given a valid filename, analyzes the cyclomatic complexity of each function definition found in the file^3.
  3. shall provide a COM component that adds an XML element containing userid, a sequence of cyclomatic complexity numbers, and the sum of these numbers to an existing XML document. You will probably wish to use the xml parser you developed in project #1 to support this requirement.
  4. Your client code should load each of the required COM components and then shall accept from the command line a userid and set of file patterns^4. The client shall perform the specified analysis on each file, read an existing XML analysis document, and add an appropriate record containing the new analysis information.
  5. The client output shall occur only after analysis is complete, and shall consist of a series of lines of output, one line for each analyzed file. That is, each line contains a userid, file name, sequence of cyclomatic complexities, sorted in descending order, and a sum. The first time the program is run there shall be a sequence of (^1) We will discuss cyclomatic complexity in class. (^2) See notes on project submissions, handed out during the first class. (^3) You are encouraged to use the tok and semi modules provided in Proj #2 help folder. (^4) A file pattern is a string of the form “*.h *.cpp”.

CSE791 – Distributed Objects S 2002

lines for the current userid. Each time the program is run, there shall be additional lines of analysis output for previous userids and for the current userid. To help you understand the display requirements, here is a sample of acceptable output: jDoe: exec.cpp 12, 11, 8 – 31 jDoe: analysis.h 1, 1, 1 - 3 jDoe: analysis.cpp 11, 7, 7, 5, 1, 1 - 32 total: - 66 dSmith: exec.cpp 13, 9, 7, 6 – 35 dSmith: anal.h 1, 1 - 2 dSmith: anal.cpp 11, 7, 7, 5, 1, 1 - 32 total: - 69