کتاب Automated software debugging solutions

کتاب Automated software debugging solutions

99,000 تومان

تعداد صفحات

53

شابک

978-620-3-20034-8

نویسنده:

, 1.1 Introduction …………………………………………………………………………………… 4
1.2 What is debugging? ……………………………………………………………………….. 5
1.3 Evolution of software debugging ……………………………………………………… 6
CHAPTER TWO: ……………………………………………………………………………….. 8
Literature Review ……………………………………………………………………………….. 8
2.1 Introduction …………………………………………………………………………………… 9
2.2 Error prediction ……………………………………………………………………………… 9
2.3 Past studies on debugging ……………………………………………………………… 10
2.4 Studies on debugging ……………………………………………………………………. 13
2.5 Conclusion ………………………………………………………………………………….. 14
CHAPTER Three: ……………………………………………………………………………… 15
Methodology …………………………………………………………………………………….. 15
3.1 Introduction …………………………………………………………………………………. 16
3.2 Source code representation ……………………………………………………………. 18
3.3 Abstract syntax tree (AST) ……………………………………………………………. 19
3.4 Source code parsing ……………………………………………………………………… 20
3.5 Fingerprinting and indexing of syntax trees …………………………………….. 20
3.6 Methodology of tree fingerprints ……………………………………………………. 21
3.7 MD5 encryption algorithm ……………………………………………………………. 23
3.8 Database creation, matching, suggestion …………………………………………. 27
3.9 Conclusion ………………………………………………………………………………….. 27
CHAPTER FORE: …………………………………………………………………………….. 28
Results ……………………………………………………………………………………………… 28
4.1 Introduction …………………………………………………………………………………. 29
4.2 The time complexity of the proposed approach ……………………………….. 29
4.3 Bug database development ……………………………………………………………. 30
4.4 Runtime comparison …………………………………………………………………….. 30
4.5 Comparison of precision and quality of proposed debugging …………….. 31
4.6 Conclusion ………………………………………………………………………………….. 33
4-7 Conclusions and Suggestions ………………………………………………………… 33
References ………………………………………………………………………………………… 35
1.1 Introduction
Software error detection is one of the most challenging issues in quality assurance
in software manufacturers. Software errors can be detected before or after its
release. However, there are limited resources for detecting and correcting errors
[1]. Errors generally fall into two general categories: syntax errors and semantic
errors. Since there are so many powerful automated tools for detecting syntax
errors, it is very unlikely that such errors will be detected by the time of release.
Semantic errors are those that occur as a result of problems other than syntax
errors and tangible human errors and are usually caused by inconsistencies in
different parts of the code, sometimes very intangible. In such cases, such errors
cannot be easily detected by code review. This is not true for semantic errors
because many factors can contribute to the occurrence of such errors [2].

According to studies, 90% of the total software cost is spent on its maintenance
[3]. Changing and testing code, error correction, etc. are important parts of these
costs. Also, error correction is now done manually by the programmer and there
is no automated process for doing so. Besides, previous studies have not used the
experiences of projects and programs with a similar structure [1], [4]. Manual
error correction in software is very costly, and there are still no automated
techniques that can be implemented operationally. On the other hand, appropriate
and good results have not been presented with sufficient accuracy in the studies
that have been conducted to date [1], [4], and [5]. A report on the number of errors
reported in KDE to 2010 can be seen in Figure 1.1.1. About 3,000 errors were
reported in this database in the first month of 2010, indicating that software
quality is still a key issue in software development
1.3 Evolution of software debugging
The study of debugging techniques is a very attractive trend. Most debugging
innovations are about reducing human involvement and interaction in this
process. Debugging technology has been developed in several steps [8].
1.3.1 Step 1: Stone Age
Early in the invention of the computer, it was very difficult for developers to
generate output for the program. They had to devise new techniques for finding
information about the running program. In addition to fixing the error, they had
to develop a tool to detect the error. Some of the first techniques used for
debugging were hardware tools.
1.3.2 Step 2: Bronze Age: the use of the print command
Developers eventually began using print commands in the program to detect
errors. By doing so, they can track the execution of the program and the values
of important variables. This eliminates the need for programmers in the timeconsuming process of developing debugging hardware tools. This technique is
still used in some cases.
1.3.3 Step 3: Middle Age: Runtime debuggers
Although print commands have made good improvements in debugging
techniques, developers still need a lot of time and effort to develop them. They
need a tool that can execute a command per unit time and display the values of
each variable in the program. This eliminates the need for the programmer to
spend a lot of time finding the right place for print commands. Thus, runtime
debuggers came into play. Runtime debuggers are nothing more than automatic

print commands. This approach enables developers to track program execution
paths and variables without including print commands in the program. All
compilers on the market today have a runtime debugger with them.
1.3.4 Step 4: Now: Automatic debuggers
Runtime debuggers make it very easy to detect errors in the program but are
unable to identify the cause. Developers need better tools to detect and correct
software errors. The developers have realized that some types of errors, such as
memory shortages, unauthorized memory access, etc., can be detected
automatically. This was an important development for software automated
debugging techniques because it automated the error detection process. This tool
can remind developers of the error, and they only need to correct the error.
Automatic debuggers are designed in several forms, the simplest of which is just
a library of functions that can be connected to a program. When running the
program and calling these functions, the debugger detects errors related to
memory and reports them. The disadvantage of such a tool is the inability to
detect the real point where this memory error occurred. This is because the
debugger does not monitor all the commands that the program executes and can
only detect a small number of errors.
All of these techniques have one general drawback, and that is that they require
developers to be present at all stages after compilation. There has not been a major
change in the debugging process from the beginning until now. The code is
written first, and then the errors are searched. This two-step process still exists,
but only at a higher level. This process must be integrated into one step.
1.3.5 Step 5: The near Future: Integrating compiler and runtime debuggers
The next logical step in developing automated debugging techniques is to
integrate these technologies with compilers. The big problem with runtime
debuggers is that these tools are not used enough. Programmers develop their
code and run their error detection tools when they reach the end of the
development process. In this way, developers can detect the errors of their new
program in the initial executions.
In addition to functionality and ease of use, another significant technological
advancement is the integration of runtime debugging tools with compilers. SCIbased tools are the pioneers of this step. These tools are very similar to compilers.
Tools based on this technology parse the program, create the parse tree, and send
the written source code to the compiler. After integrating these tools with

compilers, the debugging process is very short. After creating the parse tree, the
tree can be sent to debugging tools for evaluation.
1.4 Conclusion
In this chapter, the importance of debugging, and its problems and evolution were
stated. Software debugging is the process by which developers try to fix software
code errors. About 60 to 70% of software development time is usually spent in
the debugging phase. The development of this technology was then described in
five stages: 1) hardware debuggers, 2) use of print commands, 3) runtime
debuggers, 4) automatic debuggers, and 5) integration of compilers with runtime
debuggers.
In the next chapter, the literature in this field is first stated because of the
importance of debugging. Debugging literature is then reviewed.

تعداد صفحات

53

شابک

978-620-3-20034-8