• 沒有找到結果。

When the size of program is small, it is possible for programmers to discover the bugs without much help from tools

N/A
N/A
Protected

Academic year: 2021

Share "When the size of program is small, it is possible for programmers to discover the bugs without much help from tools"

Copied!
4
0
0

加載中.... (立即查看全文)

全文

(1)

1

Chapter 1 Introduction

The complexity of software has grown significantly than before. So, developing efficient, bug free software is much more difficult and time consuming than before.

We need effective software engineering tools to alleviate this problem.

Debugging is the dirty little secret of computer science. Despite all the progress made in the last decades: faster computers, networking, easy-to use graphical interface, and else, we still face some embarrassing facts: Debugging a complex program is not easy. Programmers need to get the whole information of variables or data structures, figure out what causes the error, try to find where the bugs may be, and then fix them. When the size of program is small, it is possible for programmers to discover the bugs without much help from tools. But, as the sizes of programs grow, programmers become incapable of processing large amount of information. They need some tools to help them understand the complex programs. Unfortunately, current debugger tools are inadequate for their need.

Traditional debugger only provides textual display for programmers to display the debugging information. It is not user-friendly and is difficult to get the whole picture of complex data structures. Although programmers can still get the needed information from textual information, it could be helpful if a graphic representation can be constructed from the textual information.

Visualizing program data structures can ease the debugging process. Two broad categories of visualization have been developed for debugging and education: textual and graphical. Textual techniques display various aspects of execution in several windows simultaneously. Examples include DBX Tool [1], which displays the source

(2)

2

code, the current execution line where breakpoints have been set, and the values of specified variables whenever execution is interrupted. MTDBX [2] displays the state of each task in a parallel program.

Graphical techniques display control flow, data structures, and even algorithms in graphics. Examples include PROVIDE [3], which provides a potential for a high level of data abstraction during visualization. The user is able to specify this abstraction by selecting a picture icon provided by the environment for a program data set or object. The instructional system Amethyst [4] displays the call stack and data values in graphics. In summary, above-mentioned researches provide a 2D graphical display. These systems emphasize how to display the information effectively, accurately, and aesthetically.

It seems 2D technique can help programmers visualizing and debugging the program to some extent, but unfortunately 2D graphical display has its limitation.

When the program size is very large, the 2D plane can be easily filled with graphic objects. The layout is filled with too much information. It is difficult for programmers to retrieve useful information in this situation. In summary, most visualization tools may have scalability problem. A visualized debugger should be able to scale well but current visualized debuggers are not yet close to that goal. Programmers need a powerful visualization tool to help them, but the 2D plane is too limited. In this thesis, we extend the visualization into 3D to address the problem.

Since there are too many data structures that can be visualized in different ways, we focus on debugging programs using linked-list data structures. Linked-list data structure in a program is often dynamic which cause trouble for debugging. It is usually dynamically determined during execution. It can be used as a tree, a queue, a network, or a combination of these. If programmers make a mistake to use a null pointer or point a pointer to a wrong address, it may produce unexpected results or

(3)

3

crash. Sometimes, it can be very difficult to discover where the bug is. We believe linked-list visualization is one of the most important facilities for visualized debuggers.

Some debuggers can display linked-list graphically. DS_Viewer [5] effectively presents data structures themselves for a given program state and groups of data structures about their interrelationships. For the data structure presentation, the user is provided a display window for any single data structure instance formatted with its fields and field values. For groups of data structure instances, a graphical drawing space is provided in which pictures of these data structure instances and their interrelationships are drawn as blocks and arrows. Visualization and Interactive Programming Support debugging system (VIPS) [6] provided an animation facility for linked-list. Users can see the linked-lists add or delete a node graphically in program execution. However, it had only one fixed display window, which shows each node’s data values and objects in a display which can not be resized. Therefore, only part of a large linked-list could be displayed. This makes it very difficult to understand the overall organization of a linked-list. So, in version 2 of VIPS [7], they provide zoom in and zoom out functions to address the problem. However, when the number of nodes increases rapidly, it begins to display the data poorly.

Our research concentrates on integrating the visualization tool and debugger tool.

We construct a system called DIVINE (3D Interactive Visualization Environment for Debugging). DIVINE can be divided into two parts. One is the debugger and the other is the visualization subsystem. The debugger is a window-based debugger. And the visualization subsystem provides a meaningful visualization to aid debugging for programs with complex linked-list structure. In order to strengthen the scalability, the visualization subsystem creates and displays the debugging information in the 3D environment. Users can use a data glove to interact with the debugger and the

(4)

4

visualization subsystem.

Currently, the debuggees are Java programs. The debugger gathers the debugging information from JPDA (Java Platform Debugger Architecture) and sends them to the visualization subsystem through Winsock (The socket API under window platform).

The visualization subsystem gets the debugging information, and displays them in the 3D graphical environment. When users need more information, the visualization subsystem sends a request command to the debugger and waits for the debugger to return the needed information. Users do not need to key in any command. They use the data glove with particular gestures and simple keyboard keys to communicate with the debugger.

The remainder of this paper is structured as follow. Chapter 2 briefly describes the background of software visualization. Chapter 3 presents the DIVINE system.

Chapter 4 describes the implementations of DIVINE. Chapter 5 is the conclusion.

參考文獻

相關文件

Too good security is trumping deployment Practical security isn’ t glamorous... USENIX Security

Valor acrescentado bruto : Receitas do jogo e dos serviços relacionados menos compras de bens e serviços para venda, menos comissões pagas menos despesas de ofertas a clientes

了⼀一個方案,用以尋找滿足 Calabi 方程的空 間,這些空間現在通稱為 Calabi-Yau 空間。.

Reading Task 6: Genre Structure and Language Features. • Now let’s look at how language features (e.g. sentence patterns) are connected to the structure

 Promote project learning, mathematical modeling, and problem-based learning to strengthen the ability to integrate and apply knowledge and skills, and make. calculated

(a) A special school for children with hearing impairment may appoint 1 additional non-graduate resource teacher in its primary section to provide remedial teaching support to

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =>

Courtesy: Ned Wright’s Cosmology Page Burles, Nolette & Turner, 1999?. Total Mass Density