A Collective Tool Demonstration

Tool Developer Handbook

A CASCON 1999 Workshop

Susan Elliott Sim
Department of Computer Science
University of Toronto
10 Kings College Rd.
Toronto, Ontario Canada M5S 3G4
Tel. +1 (416) 978-4158
Fax. +1 (416) 978-4765
simsuz@cs.utoronto.ca
        Dr. Margaret-Anne Storey
Assistant Professor
Department of Computer Science
University of Victoria
PO Box 3055 STN CSC
Victoria, BC Canada V8W 3P6
Tel: +1 (250) 721 8796
Fax: +1 (250) 721 7292
mstorey@csr.uvic.ca

Thank you for agreeing to participate in the Collective Tool Demonstration. The day promises to be fun, exciting, and even nerve-wracking, for participants and organizers alike. Over the course of the today and Wednesday, we expect to learn a lot about the program comprehension tools you have brought-- more than we could by doing separate demonstrations. We want to emphasize that the goal of this workshop is not to find a winner. We are more interested in learning which aspects of the studied tools are useful for particular tasks. In addition, comparing tools directly would be difficult, if not impossible, as it is likely that the participating tools were designed to support varying tasks, and will therefore have different strengths and weaknesses.

We have selected a subject system for you to analyze and your tasks will be given to you in the form of a scenario. In the scenario, you will take the role of a development team assigned to work on an unfamiliar application. You will be using your tool to help understand this subject system. You will be given two sets of tasks. The first set of tasks is primarily concerned with the overall structure of the subject system and you are required to complete these tasks. The second set of tasks is similar to the to-do list for a maintenance programmer. Please complete at least one task from this second set. As you complete the tasks, document your progress as suggested in the General Instructions, below.

The remainder of this handbook is organized as follows:

General Instructions

An observer has been assigned to your team. The observer should be viewed as an apprentice trying to learn both how to use the tool set and to understand the concepts underlying the analysis that you perform. Please assist them with their assignment and answer whatever questions they have.

For each of the tasks, you need to submit two things: a deliverable and a description. The deliverable is the solution to the task. The description is a short note on how you arrived at your solution. If you use any additional resources, please make a note of this in your description. Additional resources include:

We would prefer to receive the deliverables and descriptions as electronic files (which we can copy to floppy disk) but neatly handwritten answers would be OK. We will not require you to submit modified, running code as part of your solutions.

You may run the program to view its behaviour.
The observer may participate in the analysis of the subject system.
There will be a lunch break from 12-1PM.
Stop work at 5PM-- you've earned a break. Afterwards, you can work on your presentations, but your analysis should be essentially complete.

Scenario

xfig is a drawing application that runs on a variety of UNIX platforms. The current version is 3.2.1 and consists of about 30 000 lines of ANSI C. The old xfig team and manager quit the xfig project to move south for higher salaries!

You have been assigned, along with some of your colleagues, to rescue the future development of the xfig application. You are placed under a new manager, a recent MBA graduate, who is impressed that you are going to use some fancy tools to get him and the rest of your new team up to speed.

The first thing the new manager would like you to do is to use your tool(s) to create some documentation which would summarize the main structures and architecture of the xfig application. He would also like you to explore how you would go about implementing some of the changes that were identified in the inherited "TODO" list.

Section 1: Required Tasks

1.1 Documentation

Provide a textual and/or graphical summary of how the xfig source code is organized. This documentation should provide the manager with an overview of the system, and may include a call graph, subsystem decomposition, description of the main data and file structures or any other appropriate information. Use whatever format you think is appropriate, text files, HTML, Word documents, graphics, etc.

Deliverable: The documentation you have created.

1.2 Evaluate the structure of the application.

Your manager would like you to form an opinion on the structure of the xfig program. In particular, you should answer the following questions:

  1. Was it well-designed initially?
  2. Is this original design still intact?
  3. How difficult will it be to maintain and modify?
  4. Are there some modules that are unnecessarily complex?
  5. Are there any GOTO's? If so, how many, what changes would need to be made to remove them?

Deliverable: Your opinion on the answers to the above questions, and justification for the above.

Section 2: Maintenance Tasks

The manager would like you to examine in detail some of the tasks from the "TODO" list. He would like you to outline the changes that would need to be made to the code to complete the task (i.e. which parts will need to be modified) and the impact of the change on the rest of the system. Consider at least one of the following tasks (preferably more), order is not important.

2.1 Modify the existing command panel.

The buttons in the command panel, a.k.a. tool bar, at the top of the window are somewhat unconventional. The tool bar should be more consistent with those in other graphical user interfaces, with the headings "File", "Edit", and "View" justified to the left and "Help" menu item justified on the right side. The buttons currently in the command panel should be re-arranged in the follow way:

File Edit View Help
New
Load/Merge
Save
Save As
Export
Print
Exit
Undo
Paste
Find
Replace
Spell Check
Landscape
Portrait
Redraw
Xfig HTML Reference
Xfig tutorial in pdf
Xfig man pages in pdf
About Xfig

Identify which functions or files would need to be modified in order to implement this change.

Deliverable: A list of functions or files involved in the change.

2.2 Add a new method for specifying arcs.

Currently, arcs are created by specifying three points (you may want to run the program to try this out), which are then used to create a spline curve. Add a feature that allows a user to draw an arc by clicking on the centre of a circle and then selecting two points on the circumference, i.e. by specifying a radius and angle. Identify the functions and files that need to be changed to add this feature. Also explain the approach you would take to implement this new feature.

Deliverable: A list of functions or files involved in the change.

2.3 Bug fix: Loading library objects.

Loading objects from a library causes the program to crash. This error occurs when the user attempts to load a library object using the bookshelf icon on the left-hand side of the screen. When you click on this icon, a dialog box opens that allows you to select a Library and an object to load. Doing so will cause xfig to hang and eventually crash with a "Segmentation Fault" error. Identify the functions or files that need to be changed to repair this defect.

Deliverable: A list of functions or files involved in the repair.

Note: If there are no libraries available to load, it means that xfig was not able to locate a library directory. You can specify one at the command line using the -library_dir or -li switch. In the distribution, the Libraries subdirectory is found in the Examples subdirectory. To start xfig from the distribution root with this option, type:
     ./xfig -li ./Examples/Libraries

Preparing your presentation

We would like you to prepare a short 15 minute presentation for Wednesday. During the presentation, we would like you to include the following topics:

In addressing the questions about time, you do not need to give precise answers.

We will have a laptop available with Powerpoint if you wish to use this to prepare your talk. We also have some transparencies and pens if you would prefer to use those.