A Feedback System Supporting Students Approaching a High-Level Programming Course
Abstract
:1. Introduction
2. Research Background
2.1. Control Flow Graph
2.2. Dynamic Dependence Graph
2.3. Spectrum-Based Fault Localization
- Nf(e). The test successfully executes line e of the program, and the test result is the number of failures;
- Nf(). The test does not execute line e of the program, and the test result is the number of failures;
- Ns(e). The test successfully executes the e-th line of the program, and the test result is the number of successes;
- Ns(). The test does not execute line e of the program, and the test result is the number of successes.
2.4. Program Slicing and Decomposition
2.5. Software Testing Technique
2.6. Questionnaire Survey
3. Code Debugging Method Design
3.1. System Architecture Diagram
3.2. Pre-Processing of Code Debugging
3.3. Program Dynamic Analysis
- An action that attempts to compare or assign a value to an uninitialized variable;
- The wrong syntax is used for a specific function in the library;
- The program outputs a segmentation fault error;
- The array index value exceeds its bounds;
- The program execution time exceeds expectations or does not break out of the loop.
- The system marks the uninitialized variable flag as a result of the program analysis and prints the error type, the number of error lines, error content, and the variable whose value has been subjected to an access attempt or has been accessed during actual execution;
- Even if students are successful with easier, sample test data, when dealing with more rigorous, real test data, errors in the details of a student’s program can be detected. The feedback message for students includes a reminder of the number of lines and the correct use of the strcmp function;
- During execution, if there is an attempt to access variable c, which is not assigned to the memory address in the sequence, the title prints the error type, line number, and error content of the segmentation fault;
- When executing, it might happen that students do not consider the stop condition of the loop on the periphery of the array, so there is no way to meet the input of the operation test data. As a consequence, the index value of the array trying to access the loop gradually increases and cannot be stopped, resulting in an error exceeding the array boundary;
- When dealing with more complex test data, students might enter a loop with imperfect conditional judgment, which leads to program execution taking too long, which may take up system performance. It is easy to see why student-made programs might cause this.
3.4. The Method of Analyzing Mistakes in the Program Process
4. Feedback Message Design and Debugging Method
5. The Solution Implementation Method
5.1. System Description
5.2. System Process
- Dynamic analysis subsystem: The dynamic analysis subsystem corresponds to the error location module. The error location module packages the variable relationship in each line of statements into Variable DAO and concatenates objects with ArrayList to form a set of dynamic dependency path structures:
- 1-1
- Gcov. In the error location module, the Gcov tool is used to analyze the code to obtain the code coverage, and the spectral error location is used to calculate the similarity coefficient according to the code coverage; finally, the similarity coefficient is calculated. Data are stored in the array;
- 1-2
- Valgrind. In the error location module, the Valgrind tool is both used to analyze the code to obtain memory leaks and reports of illegal uses of memory and to analyze the report content to locate the location of illegally used memory;
- 1-3
- GDB. In the error location module, the GDB tool is used to analyze the code, track the execution path of the program step by step, store the dependencies of each line of statements, and store them in ArrayList;
- 1-4
- Error location module. The error location module packages the similarity coefficient, Valgrind report, and dependencies into ArrayList<VariableDAO> and sends the object to the error identification module.
- Error classification subsystem: The error classification subsystem corresponds to the error identification module, the error classification and labeling module, and the analysis result module. The error identification module identifies whether there are common errors in the dynamic dependency path structure and retrieves the wrong ones. The object is sent to the error classification and tag module, which error-classifies and tags the question and code, converts the classified Variable DAO to ErrorReportDAO, and sends the object to the analysis result module. Corresponding feedback is given according to the type of classified data:
- 2-1
- Error identification module. The error identification module identifies errors according to the data transmitted by the error positioning module, compares the dynamic analysis structure to see if there are any of the five potential types of error rules, and sends the comparison results to the error classification and tag module;
- 2-2
- Error classification and marking module. The error classification and marking module is classified according to the comparison results; different error rules are classified into different error categories, and the Variable DAO identified as the error is converted into ErrorReportDAO; finally, the object is sent to the analysis result module;
- 2-3
- Analysis result module. The analysis result module translates the error report into format and content that are easy for users to understand and, finally, sends the result to the uploading system through the socket.
- Thematic question-setting subsystem: The thematic question-setting subsystem corresponds to the marking function in the error classification and marking module. It marks different title-type labels for different program categories, and the error classification subsystem generates questions according to the theme. The label of the subsystem and different statistical reports are calculated:
- 3-1
- Error classification and marking module. The topic-based question-setting subsystem is mainly implemented for the marking function in the error classification and marking module, which marks different programs according to the type of questions marked by the teacher, so that the homework uploading system can perform statistics for different question types and different error categories.
5.3. Program Experiment and Results
- Debugging examples involving the use of an uninitialized variable
- 2.
- Array index out of bounds
- 3.
- Incorrect use of the library
- 4.
- Segmentation Fault
- 5.
- Irrationally long execution time of the program
6. Experiment
6.1. System Information
6.2. Results and Comparison of Statistical Analyses
6.3. Comparison with Other Studies
6.4. Questionnaire Survey Statistics
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Chen, I.-L. Research and Analysis of International Digital Skills Training Strategies. 2017. Available online: https://ws.ndc.gov.tw/001/administrator/10/relfile/0/11615/7d9e04a0-977e-4c0a-9248-3fb953c4572b.pdf (accessed on 10 June 2022).
- Patil, S.; Bhosale, M.; Kamble, R. Program Recommendation System for Students or Coder through View Histories and Feedback Systems. In Proceedings of the 2020 International Conference on Smart Innovations in Design, Environment, Management, Planning, and Computing (ICSIDEMPC), Aurangabad, India, 30–31 October 2020; pp. 185–187. [Google Scholar]
- Paiva, J.C.; Queirós, R.; Leal, J.P.; Swacha, J.; Miernik, F. Managing Gamified Programming Courses with the FGPE Platform. Information 2022, 13, 45. [Google Scholar] [CrossRef]
- Jung, E.; Lim, R.; Kim, D. A Schema-Based Instructional Design Model for Self-Paced Learning Environments. Educ. Sci. 2022, 12, 271. [Google Scholar] [CrossRef]
- Baniassad, E.; Zamprogno, L.; Hall, B.; Holmes, R. STOP THE (AUTOGRADER) INSANITY: Regression Penalties to Deter Autograder Overreliance. In Proceedings of the 52nd ACM Technical Symposium on Computer Science Education (SIGCSE ’21), Virtual Event, 13–20 March 2021; pp. 1062–1068. [Google Scholar]
- Zamprogno, L.; Holmes, R.; Baniassad, E. Nudging student learning strategies using formative feedback in automatically graded assessments. In Proceedings of the 2020 ACM SIGPLAN Symposium on SPLASH-E (SPLASH-E 2020), Virtual, 20 November 2020; pp. 1–11. [Google Scholar]
- Marquès, J.M.; Calvet, L.; Arguedas, M.; Daradoumis, T.; Mor, E. Using a Notification, Recommendation and Monitoring System to Improve Interaction in an Automated Assessment Tool: An Analysis of Students’ Perceptions. Int. J. Hum.–Comput. Interact. 2022, 38, 351–370. [Google Scholar] [CrossRef]
- Malysheva, Y.; Kelleher, C. Assisting Teaching Assistants with Automatic Code Corrections. In Proceedings of the 2022 CHI Conference on Human Factors in Computing Systems (CHI ’22), New Orleans, LA, USA, 29 April 2022–5 May 2022; pp. 1–18. [Google Scholar]
- Sychev, O. Write a Line: Tests with Answer Templates and String Completion Hints for Self-Learning in a CS1 Course. In Proceedings of the 2022 IEEE/ACM 44th International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET), Pittsburgh, PA, USA, 22–24 May 2022; pp. 265–276. [Google Scholar] [CrossRef]
- Allen, F.E.; Cocke, J. A program data flow analysis procedure. Commun. ACM 1976, 19, 137. [Google Scholar] [CrossRef]
- Allen, F.E. Control flow analysis. ACM Silgan Not. 1970, 5, 1–19. [Google Scholar] [CrossRef] [Green Version]
- Ferrante, J.; Ottenstein, K.J.; Warren, J.D. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 1987, 9, 319–349. [Google Scholar] [CrossRef]
- Naish, L.; Lee, H.J.; Ramamohanarao, K. A model for spectra-based software diagnosis. ACM Trans. Softw. Eng. Methodol. 2011, 20, 1–32. [Google Scholar] [CrossRef]
- Jaccard, P. Étude comparative de la distribution florale dans une portion des Alpes et des Jura. Bull. Soc. Vaud. Sci. 1901, 37, 547–579. [Google Scholar]
- Tang, C.M.; Chan, W.K.; Yu, Y.T. Theoretical, Weak and Strong Accuracy Graphs of Spectrum-based Fault Localization Formulas. In Proceedings of the 2017 IEEE 41st Annual Computer Software and Applications Conference, Turin, Italy, 4–8 July 2017; pp. 78–83. [Google Scholar]
- Troya, J.; Segura, S.; Parejo, J.A.; Ruiz-Cortés, A. Spectrum-Based Fault Localization in Model Transformations. ACM Trans. Softw. Eng. Methodol. 2018, 27, 13.1–13.50. [Google Scholar] [CrossRef]
- Kulczynski, S. Die Pflanzenassoziationen der Pieninen. Bulletin International de l’Academie Polonaise des Sciences et des Lettres: Classe des Sciences Mathematiques et Naturelles, B (Sciences Naturelles) 1927, 2, 57–203. [Google Scholar]
- Wong, W.E.; Debroy, V.; Gao, R.; Li, Y. The DStar method for effective software fault localization. IEEE Trans. Reliab. 2013, 63, 290–308. [Google Scholar] [CrossRef]
- Ochiai, A. Zoogeographic studies on the soleoid fishes found in Japan and its neighboring regions. Bull. Jpn. Soc. Sci. Fish. 1957, 22, 526–530. [Google Scholar] [CrossRef] [Green Version]
- Janssen, T.; Abreu, R.; van Gemund, A.J. Zoltar: A toolset for automatic fault localization. In Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, Auckland, New Zealand, 16–20 November 2009; pp. 662–664. [Google Scholar]
- Pearson, S.; Campos, J.; Just, R.; Fraser, G.; Abreu, R.; Ernst, M.D.; Pang, D.; Keller, B. Evaluating and Improving Fault Localization. In Proceedings of the 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE), Buenos Aires, Argentina, 20–28 May 2017; pp. 609–620. [Google Scholar]
- Xie, X.; Chen, T.; Kuo, F.-C.; Xu, B. A theoretical analysis of the risk evaluation formulas for spectrum-based fault localization. ACM Trans. Softw. Eng. Methodol. 2013, 22, 1–40. [Google Scholar] [CrossRef]
- Xie, X.Y.; Kuo, F.C.; Chen, T.Y.; Yoo, S.; Harman, M. Provably optimal and human-competitive results in subset for spectrum based fault localization. In Proceedings of the International Symposium on Search Based Software Engineering, SSBSE 2013, St. Petersburg, Russia, 24–26 August 2013; Volume 8084. [Google Scholar]
- Weiser, M. Programmers use slices when debugging. Commun. ACM 1982, 25, 446–452. [Google Scholar] [CrossRef]
- Weiser, M. Program slicing. IEEE Trans. Softw. Eng. 1984, 4, 352–357. [Google Scholar] [CrossRef]
- Negi, G.; Elias, E.; Kohli, R.; Bibhu, V. Reliability analysis of test cases for program slicing. In Proceedings of the 2016 International Conference on Innovation and Challenges in Cyber Security (ICICCS-INBUSH), Greater Noida, India, 3–5 February 2016; pp. 36–40. [Google Scholar]
- Agrawal, H.; Joseph, R. Horgan, Dynamic program slicing. ACM SIGPlan Not. 1990, 25, 246–256. [Google Scholar] [CrossRef]
- Al-Fedaghi, S. Computer Program Decomposition and Dynamic/Behavioral Modeling. IJCSNS Int. J. Comput. Sci. Netw. Secur. 2020, 20, 152–163. [Google Scholar]
- Henard, C.; Papadakis, M.; Harman, M.; Jia, Y.; Traon, Y.L. Comparing White-Box and Black-Box Test Prioritizationd. In Proceedings of the 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE), Austin, TX, USA, 14–22 May 2016; pp. 523–534. [Google Scholar]
- Borodin, A.V.; Zavyalova, Y.V. An Ontology-Based Semantic Design of the Survey Questionnaires. In Proceedings of the 2016 19th Conference of Open Innovations Association (FRUCT), Jyvaskyla, Finland, 7–11 November 2016; pp. 10–15. [Google Scholar]
Code Error Feedback Method | This Paper | Lucas et al. [6] | Joan et al. [7] |
---|---|---|---|
Test failure vs. test pass | Yes | Yes | Yes |
Code coverage | Yes | Yes | Yes |
Feedback analysis interface | Yes | Yes | No |
Program analysis and program error location | Yes | Yes | No |
Feedback message after debug feedback function | Yes | No | No |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kuo, J.-Y.; Lin, H.-C.; Wang, P.-F.; Nie, Z.-G. A Feedback System Supporting Students Approaching a High-Level Programming Course. Appl. Sci. 2022, 12, 7064. https://doi.org/10.3390/app12147064
Kuo J-Y, Lin H-C, Wang P-F, Nie Z-G. A Feedback System Supporting Students Approaching a High-Level Programming Course. Applied Sciences. 2022; 12(14):7064. https://doi.org/10.3390/app12147064
Chicago/Turabian StyleKuo, Jong-Yih, Hui-Chi Lin, Ping-Feng Wang, and Zhen-Gang Nie. 2022. "A Feedback System Supporting Students Approaching a High-Level Programming Course" Applied Sciences 12, no. 14: 7064. https://doi.org/10.3390/app12147064
APA StyleKuo, J.-Y., Lin, H.-C., Wang, P.-F., & Nie, Z.-G. (2022). A Feedback System Supporting Students Approaching a High-Level Programming Course. Applied Sciences, 12(14), 7064. https://doi.org/10.3390/app12147064