International Journal of Computer Science and Software Engineering (IJCSSE), Volume 7, Issue 1, January 2018
ISSN (Online): 2409-4285 www.IJCSSE.org Page: 12-16
A Development of Static Analysis Program and Its Application
Wanwipa Titthasiri, Asst.Prof.,Dr.1 and Chantapat Tancharoen2
1, 2 Department of Computer Science, Rangsit University, Pathumthani, 12000, Thailand
[email protected], [email protected]
ABSTRACT Furthermore, AEC (Asian Economic Community) and Thailand is moving forward to 'Thailand 4.0' which is an the policy of Thailand 4.0 are coming in a few years. economic model aiming to promote creativity, Thailand may encounter a crisis. But if Thai CS innovation, and technology for developing the country. graduates are well prepared thoroughly, the AEC would Therefore, it is necessary to produce high-quality not affect them badly. graduates in order to invent those innovations and Despite the fact that there is an increasing demand for technology. The main purpose of this research was to CS graduates who will be experts in developing software develop a static analysis program to evaluate and its innovation, the programming skills of recent CS programming behavior of first-year students who graduates typically fall short of employers’ enrolled an introductory programming course. The expectations.[5] In addition, one of the important knowledge of compiler and software engineering were reasons for rejecting CS major study, were its’ used to develop this program. It evaluates student’s difficulties, especially in programming and technical programs in software metric as an indicator to represent courses,[12] Research has shown that first year CS different programming behaviors. In addition, it also students struggle with learning how to program and produces statistical reports and graphs. Finally, the understanding programming concepts.[7] Even though, research result shows the strengths and weaknesses of CS education is not the study of programming, but students' programming capability. It is believed that this programming is an important tool for the student in CS finding would be a valuable guideline for lecturers to learning and working in ICT realm. It is a core skill for redesign his or her basic programming course to improve first year CS students. However, it is found that the students programming capability. students’ programs are often poorly constructed because beginning students often try to solve a problem as Keywords: Static Analysis, Analysis Program, quickly as possible without thinking about the quality of Programming Teaching, Novice Programmer, Computer their programs.[10] Learning to program is a difficult Science. process. In order to become a highly competent in programming, student programming exercises should be needed to analyze and find out their weaknesses. These 1. INTRODUCTION could be considered as alternative solutions in programming class to improve student performance in “While hardware is now the largest single IT budget programming courses. item for most small and medium businesses (SMBs), it will be the slowest growing category over the next four years for that group”.[2] Moreover, Darrow [2] pointed 2. OBJECTIVES that as of this year more than half of the money will be spent on software. It was shown that spending by SMBs The objectives of this study are: 1) to develop a static on hardware was 1.1% compound annual growth rate analysis program; 2) to apply this program for doing an (CAGR) over the next four years compared to 6.6% analysis of student programming exercises; and 3) to growth in software spending. Consequently, assist lecturers to improve their beginning students employment opportunities for computer science (CS) ’programming teaching. graduates are strong growth in the coming years. SIPA (Software Industry Promotion Agency)-Public organization in Thailand-reveals software market survey 2016, software production value grows 4.3%.[5] It was reported that 42.6% of all ICT employment category in 2016 was software design and programming.[5]
International Journal of Computer Science and Software Engineering (IJCSSE), Volume 7, Issue 1, January 2018 13
W. Titthasiri and C. Tancharoen
3. LITERATURE REVIEWS shown that beginning students’ programs are often poorly constructed. Therefore, this paper introduces a 3.1 The Program Analysis static analysis program which uses both software engineering metrics and relative comparison to judge the The program analysis has been classified into two types quality of beginning student’s program and finally of analyses: static and dynamic. Static analysis is the provide suggestions to lecturers about how is the process of examining source code without executing the programming teaching for the first year CS student program. Dynamic analysis is the process of running a improved. program through a set of data.[10] The literature indicate that there are some systems as program analysis to help novice students learn to program. For example: 4. METHODOLOGY Talus[11] is an automatic program debugging tool for the Lisp language; 2) CourseMaster[4] is a client-server The approach in this study is based on both software system providing functions for automatic assessment of engineering and compiler construction. The researchers students work in Java and C++; 3) Expresso [6] is divided the study into the following two phases: a static designed to identify beginning student Java analysis program’s development and its application. programming errors; 4) ELP[8] is an online interactive and constructive environment for learning to program. 4.1 A Development of Static Analysis Program Much research has used these systems to help novice students to learn to program. Most of them are large There are many techniques to develop static analysis systems and are designed for Java, C++ source codes. In program. Lexical analysis and syntax analysis have been this study, a static analysis program was developed to adopted in compiler construction application vary from help lecturers learn about beginning students’ programs. string matching based on the program source code to It is used to show problems in C# code including matching program paragraph representations. Software unnecessary complexity and software metric which is a metrics are the results of this static analysis program. way to measure the quality of programs. They have been used to evaluate beginning student’s program. For example, line of codes, number of local 3.2 Previous Works variables and global variables, Halstead software metrics, and so on. Moreover, some techniques of Truong, Roe, and Bancroft[10] introduced a static optimization phase in compiler construction are also analysis framework which can be used to give beginning adopted in this program because they provide useful students practice in writing better quality Java programs information about the structure of a program which and to assist teaching staff in the marking process. measure the difficulty or complexity of program. Taherkhani, Malni, and Korhonen[1] addressed the problem of automatic algorithm recognition and 4.2 Program Implementation introduce a method based on static analysis to recognize 1) Participants This study was participated by 23 CS algorithm. freshmen who enrolled in an introductory C# Truong, Roe, and Bancroft[9] described a “Fill in the programming course offered by the department of gap” program analysis framework which tests students’ computer science at Rangsit University, Thailand. solutions and give feedback on their correctness, detects All of them had not had programming experience. logic errors and provide hints on how to fix these errors. 2) Procedure The experiment was conducted in the Chen and Lin [3] examined correlations between second semester, 2016. All participants were students’ learning styles and their performance in writing offered lectures and hands-on exercises which and debugging Java programs. took place in a computer lab. There were two Toomey [13] reported on a tool called Arjen which is 120-minutes class periods per week. designed to quantify the errors made by novice Programming constructs covered included, programmers. input/output, variables, arithmetic and logic In the literature, existing research has used program expressions, classes, methods, conditional analysis system as a tool to give students write program statements, loops, and arrays. The following three and useful feedback. By these tools, people learn novice problems, shown in Fig.1 were intended to assess programmers’ errors, algorithms, and how to fix them. students’ comprehension of programming But no research has been done to evaluate software concepts, their ability to apply these concepts in engineering metrics and to determine how the constructs programming tasks-problem solving, algorithmic of student’s program compare with standard or model thought, and C# code transforming. In this study, program, written by the expert. Much research has
International Journal of Computer Science and Software Engineering (IJCSSE), Volume 7, Issue 1, January 2018 14
W. Titthasiri and C. Tancharoen
students were asked to write all of three complete compute the difference among them, as shown in C# programs in the hands-on programming tests. equation (1)