Docsity

COM-Based File Dependency Analysis - Project One | CSE 775, Study Guides, Projects, Research of Engineering

Toggle sidebar
bg1
CSE775 – Distributed Objects
Spring 2005
Project #1 – COM-based File Dependency Analysis due
Monday, Feb 14
Purpose:
When a team develops a large software system, management of file dependencies is critically important,
due to the need for almost constant change. Changes occur due to latent errors, performance problems,
changes of requirements, and changes in design. Files are the unit of change management and are the
entities we deal with during unit test. When we test a file it is important that the tested file depend only on
already tested files. Dependency defects, like mutual dependency and dense dependency relationships
make change and test very difficult.
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 source code file found for its type-
based dependencies on other files. That is, the FILEDEP program finds each type declared and defined in
the file collection of all analyzed files, then discovers all the Files that use the name of that type. When
analysis is complete, FILEDEP must show each file in the analyzed set, in alphabetic order, and after the
name of each file show all the files on which it depends:
You should support fully qualified file names 1. That is, show the path and file, like this:
C:\homework\filedep.cpp
C:\homework\fileInfo.h
C:\homework\fileInfo.cpp
…
You are asked to build this program using at least two COM components. One of the components must
execute the directory navigation necessary to find the files to analyze. The other component must carry out
some part, perhaps all, of the dependency analysis. Please don’t use the ATL library for this project – we’ll
use that for subsequent projects.
Requirements:
Your DEPENDS program:
1. shall use standard C++ 2 and the standard library, compile and link from the command li ne, using
VC++ 7.0, as provided in the ECS clusters and operate in the environment provided there 3.
2. shall use services of the COM run-time to support two or more COM objects of your design.
3. shall accept, from the command line, a path name to begin searching for files, and a set of one or
more file name patterns 4.
4. shall display the ordered set of all source code files found in the tree rooted at the given directory
path.
5. shall display, on the lines below each file in 4., the set of files on which it depends.
Note that #include relationships are not strong enough to establish a dependency. It occasionally
happens during the evolution of a module that it may cease to depend on some other file due to
changes made in its source, while the #include is inadvertently left intact.
1 Your FILEDEP program should provide a command line option to display only file names with no path
qualification.
2 This means, for example that you may not use the .Net managed extensions to C++.
3 VC++ ver 7.0 is Visual Studio .Net and is available in all the ECS clusters.
4 You may find it easiest to specify only cpp files on the command line and then analyze any local headers
they include.

Partial preview of the text

Download COM-Based File Dependency Analysis - Project One | CSE 775 and more Study Guides, Projects, Research Engineering in PDF only on Docsity!

CSE775 – Distributed Objects

Spring 2005

Project #1 – COM-based File Dependency Analysis due

Monday, Feb 14

Purpose:

When a team develops a large software system, management of file dependencies is critically important, due to the need for almost constant change. Changes occur due to latent errors, performance problems, changes of requirements, and changes in design. Files are the unit of change management and are the entities we deal with during unit test. When we test a file it is important that the tested file depend only on already tested files. Dependency defects, like mutual dependency and dense dependency relationships make change and test very difficult. 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 source code file found for its type- based dependencies on other files. That is, the FILEDEP program finds each type declared and defined in the file collection of all analyzed files, then discovers all the Files that use the name of that type. When analysis is complete, FILEDEP must show each file in the analyzed set, in alphabetic order, and after the name of each file show all the files on which it depends: You should support fully qualified file names^1. That is, show the path and file, like this: C:\homework\filedep.cpp C:\homework\fileInfo.h C:\homework\fileInfo.cpp … You are asked to build this program using at least two COM components. One of the components must execute the directory navigation necessary to find the files to analyze. The other component must carry out some part, perhaps all, of the dependency analysis. Please don’t use the ATL library for this project – we’ll use that for subsequent projects.

Requirements:

Your DEPENDS program:

1. shall use standard C++^2 and the standard library, compile and link from the command line, using

VC++ 7.0, as provided in the ECS clusters and operate in the environment provided there^3.

2. shall use services of the COM run-time to support two or more COM objects of your design.

3. shall accept, from the command line, a path name to begin searching for files, and a set of one or

more file name patterns^4.

4. shall display the ordered set of all source code files found in the tree rooted at the given directory

path.

5. shall display, on the lines below each file in 4., the set of files on which it depends.

Note that #include relationships are not strong enough to establish a dependency. It occasionally happens during the evolution of a module that it may cease to depend on some other file due to changes made in its source, while the #include is inadvertently left intact. (^1) Your FILEDEP program should provide a command line option to display only file names with no path qualification. (^2) This means, for example that you may not use the .Net managed extensions to C++. (^3) VC++ ver 7.0 is Visual Studio .Net and is available in all the ECS clusters. (^4) You may find it easiest to specify only cpp files on the command line and then analyze any local headers they include.