Vous êtes sur la page 1sur 12

Final Year Project

Interim Report
Shane Lillis,
9514147

Supervisor : Mr. Tom Newe

Software Visualisation /
Comparison Tool

Contents
PAGE
Chapter 1 : Introduction and Project Outline 3
1.1 Project Title and Interpretation
3
1.2 Project Motive 3

1.3 Project Aims and Objectives 3

Chapter 2 : Theory of Software Visualisation 4


2.1 What is Software Visualisation? 4
2.2 Visualising Program text
5

Chapter 3 : Plan Of Action 5


3.1 Work Accomplished to date 5
3.2 Main Goals towards project completion 6
3.3 Proposed Gantt Chart for Project 7

Chapter 4 : Design 8
4.1 Design Approach : OMT, Object Orientation 8
4.2 The Scanning Algorithm
8
4.3 Graphical User Interface
9
4.4 Other Design Issues 9

Chapter 5 : Literature Survey 10


5.1 Software Visualisation 10
5.2 Design Methods 10
5.3 Programming Language
10

Chapter 6 : Requirements of Facilities and Materials 11


6.1 Software Requirements
11
6.2 Hardware Requirements
11

Chapter 7 : References and Sources of Information 12


Chapter 1 :
Introduction and Project Outline
1.1 Project Title and Interpretation
TITLE: Software Visualisation / Comparison Tool
The goal of this project is to research, analyse, design, fully implement and
test a software-based tool which can visualise software code and can compare
different files of code against each other to highlight similarities and differences. I
have made the assumption that this tool will be able to visualise and compare C++
source code. There are 2 reasons for this. The first is that there are a huge amount
of languages in the software programming world today. It is infeasible for such a
tool to be created in such a short time window that could handle all of these
languages. Secondly, of the multitude of languages available today, many are
becoming obsolete. C++ has been chosen because it is a modern language, in both
its object-oriented structure and in its use by many software facilities today.
Note: An internet webpage has been set up in conjunction with this project
to display the latest information on the project. The URL is as follows:
http://www.csn.ul.ie/~mrmen/fyp.html

1.2 Project Motivation


It is often very difficult to see the construction of a source code file by
simply reading it. Likewise, when given 2 pieces of code to compare for
similarities and differences, it can become a daunting task to compare accurately
the files. This is where the software visualisation and comparison tool comes in.
By visualising a source code file, it can become significantly easier to quickly
read through and identify all major components of the source code. Also,
comparison can be done at the touch of a button by comparing the quantity and
type of information in each source code file.

1.3 Project Aims and Objectives


The initial proposal for the project is aimed at implementing the following :

1. To Allow multiple files to be displayed on the screen in their analysed form.

2. To Compare / highlight similar structures, code segments, variables in each


file etc.

3. To Provide a percentage of similarities between modules.

4. To Show on-screen the files being compared.

5. To Display side by side the files being compared.

6. To Research the software visualisation area in detail.

Chapter 2 :
Theory of Software Visualisation
2.1 What is Software Visualisation?
Software Visualisation can be defined as the use of graphical and textual
formalisms to describe the execution of computer programs [MULHOLLAND,
97]. It is the use of visualisation and animation techniques to help people
understand the characteristics of programs [STASKO, 95]. Software visualisation
tools use graphical techniques to make software visible through the display of
programs, program artefacts, and program behaviour. The essential idea is that
visual representations can make the process of understanding software easier
[BALL, SV]. There are essentially two ways in which software can be visualised
1. Program Visualisation [HYRSKYKARI, 93]
2. Algorithm Animation
Program Visualisation can be defined as specifying the program in the
conventional textual manner, and the use of graphics to illustrate some aspects of
the program [HYRSKYKARI, 93]. Algorithm Animation can analyse
predefined algorithms in programs at a much higher level of abstraction.
This project will involve the use of Program Visualisation to analyse
source code files. This will be accomplished by visualising the source code text
onto the screen, as described in chapter 2.2

2.2 Visualising Program Text


Text is the dominant medium for implementing large software systems.
Virtually all coding of large systems takes place in text, and this will likely be the
case for the foreseeable future. [BALL, SV] The following is a scaleable technique
for visualising program text. When visualising the text, two steps must be
visualised by the reader to achieve the desired result

1. Apply different colours to different sections of the code. Each colour may
represent a structure, variable or type of loop as defined by the language
of the source code being analysed.

2. Once applied, each character must be displayed on the screen as a pixel. The
pixel must have the same colour as the character in the colour-schemed
code.

By having many lines of different coloured pixels on the screen, it becomes easier
for the user with a legend to see whats going on inside the code and to see the
immediate structure of the code. This method, therefore, allows the user to
visualise very large amounts of code in only a small area on the screen.

Chapter 3 :
Plan of Action
3.1 Work Accomplished to Date
To date, the vast majority of the work completed has been Research-based.
This will diminish rapidly as the design and implementation stages of the project
take place. The work that has occurred to date can be categorised as follows :

1. Research of Software Visualisation

2. Learning of the Microsoft Visual C++ 5 Programming Language with


Foundation Classes

3. Research of Visualising Program Text

4. Learning of Object Modelling Technique - Software Engineering


Methodology

3.2 Main Goals towards project completion


As of from the end of Week 6 in semester1, the following will be the main
goals for the project in chronological order.

Semester 1:

End of Week 10: Completion of major analysis and design stages in the
OMT cycle.

Start of Week 11: Initial implementation of the application in Visual C++

Semester Break :

Duration of 3 Weeks: Continuation of implementation

Semester 2 :

End of Week 3: Finish implementation of the application.

Start of Week 4: Begin testing of the Software

Start of Week 8: Begin compilation of the Final Report.

Week 10: Final Report Submission

Week 11: Final Bench Demonstration

These goals can be seen on the following Gantt Chart which is often used in
industry to graphically depict timing of a project.

3.3 Proposed Gantt Chart for Project


Chapter 4 :
Design
4.1 Design Approach: OMT, Object Orientation.
When working on any software project, it is important to recognise that
project planning and structure have vital parts to play if the designer is to avoid
ending up with unmanageable code and an unmaintainable software tool. One
software method used to produce good code and a maintainable executable is
OMT : Object Modelling Technique.[RUMBAUGH, 91]. This is an Object-
Oriented technique to which C++ is very suited. Object Orientation means that the
software problem is organised as a collection of discrete objects. The impact of
using an OO approach is that much of the project time is shifted towards analysis.
The life-cycle of OMT is as follows :

ANALYSIS - SYSTEM DESIGN - OBJECT DESIGN - IMPLEMENTATION

The Methodology consist of 3 different models : the Object Model, the


Dynamic Model and the Functional Model.
Use of this modelling technique will aid in the understanding of what
objects are needed and how the objects in the design are to communicate with
each other. The technique provides many different standard ways to represent the
data graphically.

4.2 The Scanning Algorithm.


When the user opens a file to be analysed, it must proceed through a
scanner which has the ability to turn the text in the opened file into a coloured
pixel representation which reflects the programming language constructs of the
opened file. An important factor that must be taken into account at this stage is the
speed at which this can be achieved. Obviously, as fast a speed as is possible is
desired, especially when it is remembered that many code files commonly have
1000+ lines of code. A plausible algorithm therefore must perform only one pass
through the source code of the opened file.

The following algorithm has been devised with the above considerations
in mind.

Open the File


Input a line as a string
Search the string for any relevant structures / variables.
If structure or loop construct
Move to end of structure or loop construct
Add the results to an information array
Log this information to an external log file (for comparison
purposes used later in the program)
Repeat Until EOF
Close the file

At this stage, a display object will read through the array and display
coloured pixels on the screen corresponding to the file information array.
4.3 Graphical User Interface.
The Graphical User Interface is a very important feature of this project.
Because of the complex nature of software visualisation and comparison, it is
vitally important that the GUI be easy to use and easy to understand. It is my
experience that many current Software Visualisation tools available on the market
are very strong when it comes to visualisation and analysis of code but weak when
it comes to a simple understandable interactive interface. When modelling the
user interface, the OMT dynamic model will be mostly used as the dynamic
model is used to define the protocol of the user interaction [DERR, 95]

4.4 Other Design Issues


Comparing any number of files may be achieved by scanning through each
programs log file to document and count the similarities and differences between
the files. Also, through this method, it will be possible to provide percentage
similarities between files.

Note: This designs mentioned here are only initial designs, and like in any good
project, are subject to alteration during the analysis and design time of the project.

Chapter 5 :
Literature Survey
The following is a list of some of the resources that I have put to use in the research stage
of the project to date.

Research of Software Visualisation Theory and Visualising Program Text

MulHolland, P. (1997): Using a Fine-Grained Comparitive Evaluation Technique


to Understand and Design Software Visualisation Tools Empirical Studies of
Programmers Seventh Workshop, New York: ACM Press.

Hyrskykari, A. (1993): Development of Program Visualisation Systems 2nd


Czech British Symposium of Visual Aspects of Man_Machine Systems, March 27
1993, Praha.

Stasko, J.T., Muthukumarasamy, J. (1995): Visualising Program Executions on


Large Data Sets Using Semantic Zooming GVU Technical Report GIT-GVU-95-
02
Microsoft Visual C++ Programming Language and MFCs

Sams Teach Yourself Visual C++ 5 in 24 hours, Williams, M., Sams


Publishing, 1998

The Visual C++ Handbook Second Edition, Murray, W., Pappas, C.,
Osbourne McGraw-Hill, 1995

Windows 95 and NT Programming with the Microsoft Foundation Class


Library, Murray, H., Pappas, C., 1996

OMT (Object Modelling Technique)

Dr. John Nelsons Software Engineering OMT Notes, 1998

"Object-Oriented Modeling and Design", Rumbaugh, Blaha, Premerlani, Eddy,


Lorensen, Prentice Hall, 1991

"Applying OMT: A Practical Step-by-Step Guide to Using the Object Modeling


Technique", Kurt W. Derr, SIGS Books, 1995

Chapter 6 :
Requirements of Facilities and Materials
6.1 Software Requirements
This software project will be implemented on the Windows 95 operating system
using the Microsoft Visual C++ 5.0 Developers Studio. It is hoped that the tool will be
fully Win-32 bit compatible, i.e. compatible with Windows 98 and Window NT. Other
software requirements will include MS Word 95/97, MS Project 95, Adobe Acrobat (for
researching .papers in PDF format), GhostView (for researching papers in .PS format).
The Pico text editor on the Skynet Linux Server will be used to create the webpage and
Cool3D will be used to provide graphics for the page. The standard DOS-based FTP
program will be used to back-up the project work to the Skynet server.

6.2 Hardware Requirements


The minimum specification computer that will be used is a Pentium 75 Mhz with
16Mbs of RAM and 1GB of hard disk space.
Chapter 7 :
References and Sources of Information
For this report, the references and sources of information are as follows:

Papers :

MulHolland, P. (1997): Using a Fine-Grained Comparitive Evaluation Technique


to Understand and Design Software Visualisation Tools Empirical Studies of
Programmers Seventh Workshop, New York: ACM Press.

Hyrskykari, A. (1993): Development of Program Visualisation Systems 2nd


Czech British Symposium of Visual Aspects of Man_Machine Systems, March 27
1993, Praha.

Stasko, J.T., Muthukumarasamy, J. (1995): Visualising Program Executions on


Large Data Sets Using Semantic Zooming GVU Technical Report GIT-GVU-95-
02

Books:

Rumbaugh, 91: "Object-Oriented Modeling and Design", Rumbaugh, Blaha,


Premerlani, Eddy, Lorensen, Prentice Hall, 1991
Derr, R.W. 95 ---- "Applying OMT: A Practical Step-by-Step Guide to Using the
Object Modeling Technique", Kurt W. Derr, SIGS Books, 1995

Internet Sites :

Ball, T. http://www.bell-labs.com/tball

Vous aimerez peut-être aussi