1-8hit |
Takashi ISHIO Hiroki WAKISAKA Yuki MANABE Katsuro INOUE
Logging the execution process of a program is a popular activity for practical program understanding. However, understanding the behavior of a program from a complete execution trace is difficult because a system may generate a substantial number of runtime events. To focus on a small subset of runtime events, a dynamic object process graph (DOPG) has been proposed. Although a DOPG can potentially facilitate program understanding, the logging process has not been adapted for DOPGs. If a developer is interested in the behavior of a particular object, only the runtime events related to the object are necessary to construct a DOPG. The vast majority of runtime events in a complete execution trace are irrelevant to the interesting object. This paper analyzes actual DOPGs and reports that a logging tool can be optimized to record only the runtime events related to a particular object specified by a developer.
Takehiko MURAKAWA Masaru NAKAGAWA
Thinking process development diagram is a graphical expression from which readers can easily find not only the hierarchy of a given problem but the relationship between the problem and the solution. Although that has been developed as an idea creation support tool in the field of mechanical design, we referred to the restricted version as clamshell diagram to attempt to apply to other fields. In this paper we propose the framework for drawing the diagram of the SQL statement. The basic idea is to supply the hierarchical code fragments of a given SQL statement in the left side of the diagram and to put the meaning written in a natural language in the right. To verify the usefulness of the diagram expression, we actually drew several clamshell diagrams. For three SQL statements that are derived from the same specification, the resulting diagrams enable us to understand the difference visually.
Shinpei HAYASHI Junya KATADA Ryota SAKAMOTO Takashi KOBAYASHI Motoshi SAEKI
One of the approaches to improve program understanding is to extract what kinds of design pattern are used in existing object-oriented software. This paper proposes a technique for efficiently and accurately detecting occurrences of design patterns included in source codes. We use both static and dynamic analyses to achieve the detection with high accuracy. Moreover, to reduce computation and maintenance costs, detection conditions are hierarchically specified based on Pree's meta patterns as common structures of design patterns. The usage of Prolog to represent the detection conditions enables us to easily add and modify them. Finally, we have implemented an automated tool as an Eclipse plug-in and conducted experiments with Java programs. The experimental results show the effectiveness of our approach.
Knowledge-based program understanding is widely known as one of the key issues in programming education support systems and environments for novices. Most program understanders, however, have limitations. One of them is an ability to deal with a single programming language, while human tutors can comprehend plural languages by means of generalized knowledge on programming languages and techniques. This paper proposes the concepts and methodology of the knowledge-based program understander ALPUS II, which deals with plural programming languages, i. e. , Pascal and C, by means of generalized abstract syntax AL and knowledge representations based on it. ALPUS II is an extension of ALPUS, which dealt with a single programming language Pascal, and is a sub-system of an intelligent programming environment INTELLITUTOR. The INTELLITUTOR system consists of a guided programming editor GUIDE and a knowledge-based program understander ALPUS II, and is available on the Internet. In the process of comprehension source statements written in Pascal or C are translated into AL representation first. Since the contents of the programming knowledge bases are adjusted to deal with the AL representations the program comprehension procedure is available for both Pascal and C. It is possible to append other programming languages by simply attaching a transformation module for each additional procedural language. It is noted that knowledge acquisition tasks for additional languages are not needed since the contents of the knowledge base are generalized for multiple use. The INTELLITUTOR system was implemented in the frame-based knowledge engineering environment ZERO on a UNIX server machine in the Internet environment. ALPUS II demonstrates interesting features in program comprehension for the C language by means of the transformed knowledge from the already available knowledge for Pascal, which was developed for ALPUS, in a feasibility study. The current version of ALPUS II supports almost full specifications for Pascal and a Pascal-associated subset for C. This limitation should be reasonable for programming practice at freshmen classes of a university.
We propose a new inferring programmers' intention system COSMO based on a classification of assignment statements. COSMO is a subsystem of our intelligent programming environment for programming education. The programming environment consists of a program understanding system designed for novice programmers and a novice program evaluation support system designed for teachers, both of which use the technique of the program slicing. Usually, the method of program slicing requires selection of slicing criteria. However, automatic selection of effective slicing criteria is difficult. Here we propose a new inferring programmers' intention system COSMO with automatic selection of effective slicing criteria. In our system, the slicing criteria are inferred using the context structure model of programs. Programs are regarded as natural language texts in the model and analyzed using a similar thinking in context structure analyses of natural language texts. The model is based on a classification of assignment statements using dependence analysis of programs. Furthermore, COSMO obtains networks with information on top-down decomposition of problems as a result of inferring programmers' intention. Therefore, COSMO is useful for understanding programs without presupposed knowledge.
This paper discusses the experimental evaluation of the knowledge-based program understander ALPUS and methods of program normalization based on the evaluation to improve the flexibility of the system performance. ALPUS comprehends students' buggy Pascal programs using four kinds of programming knowledge, detects logical bugs, infers user's intentions and gives advice for fixing bugs. By means of the combination of the pattern matching technique and the HPG-based formalism of programming knowledge in addition to program normalization high performance of comprehension has been achieved for relatively complex programs such as Quicksort programs. The experimental evaluation told that program normalization would solve some 55% of unsucceeded student programs. Program normalization has contributed both in decreasing the number of knowledge patterns and increasing the flexibility. This paper proposes a five-step normalization procedure which works well in an experimental situation.
The background concepts and methodologies of the knowledge-based program understander ALPUS is discussed. ALPUS understands user's buggy Pascal programs using four kinds of programming knowledge: the knowledge on algorithms, programming techniques, the Pascal language, and logical bugs. The knowledge on algorithms, the key knowledge, is represented in a form of hierarchical data structure called Hierarchical Procedure Graph (HPG). In HPG each node represents a chunk of operations called process," which is consisted of sub-processes. The other knowledge is maintained as independent knowledge bases and linked to associated processes of the HPG. The knowledge about bugs acquired by cognitive experiment is grouped into three categories: bugs on algorithms, programming techniques, and the Pascal language, and connected to associated elements of programming knowledge respectively. ALPUS tries to understand user's buggy programs, detects logical bugs, infers user's intentions, and gives advices for fixing bugs. Program understanding is achieved by three steps: normalization, variable identification, and process and technique identification. Normalization results in improving flexibility of understanding. Variable, process and technique identifications are achieved by knowledge-based pattern matching. Intentions are inferred by means of information attached to buggy patterns. The result of comprehension is reported to a user (i.e., student). Experimental results using Quicksort programs written by students show that the HPG formalism is quite powerful in understanding algorithm-oriented programs. The ALPUS's way of program comprehension is useful in the situation of programming education in an intermediate class of an engineering school. The ALPUS system is a subsystem of the intelligent programming environment INTELLITUTOR for learning programming, which was implemented in the frame-based knowledge engineering environment ZERO on a UNIX workstation.
This paper describes the concepts and methodologies of the INTELLITUTOR system which is an integrated intelligent programming environment for learning programming. INTELLITUTOR attempts to work as a human programming tutor to guide a user, i.e., a student, in writing a computer program, to detect logical errors within it, and to make advices not only for fixing them but also for letting him notice his misunderstandings. The system consists of three major modules, i.e., GUIDE, ALPUS and TUTOR. GUIDE is a guided editor for easy coding, ALPUS is an algorithm-based program understander, and TUTOR is an embedded-intelligent tutoring system for programming education. The ALPUS system can infer user's intentions from buggy codes in addition to detecting logical errors by means of knowledge-based reasoning. ALPUS uses four kinds of programming knowledge: 1) knowledge on algorithms, 2) Knowledge on programming techniques, 3) Knowledge on a programming language, and 4) Knowledge on logical errors. These knowledge are organized in a hierarchical procedure graph (HPG) as a multi-use knowledge base. The knowledge on logical errors was obtained by means of cognitive experiments. The student model is built by means of the results of ALPUS and interactions between a student and the system. Teaching is done based on the student model. Because the ITS subsystem, i.e., TUTOR, is embedded within the intelligent programming environment interactions for creating the student model could be minimized. Although the current system deals with the PASCAL language, most of the knowledge is applicable to those of procedure-oriented programming languages. The INTELLITUTOR system was implemented in the frame-based knowledge engineering environment ZERO and working on a UNIX workstation for system evaluation.