Syed Ali Haider, Ph.D.

about me | research | teaching | service
back to projects
Project Title:
Students:
Advisor:
Documents:
Static Code Analysis for early-stage programmers (2021)
Mathew Kessler, Tyler Harrison, Aiden Storey
Dr. Syed A. Haider
Description

Early-stage programming learners or freshmen students face the dilemma of a lack of support when it comes to learning the fundamentals of programming. Despite the abundance of resources available online and increasing in number every day, a staggering number of resources focus on hit-and-trial methods of learning. This essentially means that when the learner makes a mistake, an error is shown which is typically output by the compiler. Fixing the error helps the learner grasp the information and store it in their memory. A similar error in the future will invoke a memory recall and make it easier to find a solution. While this method of learning anything, let alone programming, will do the job, the lack of fundamental knowledge transfer is not addressed i.e., why was the error thrown in the first place? Existing tools provide information about how to solve a problem but do not touch the topic of how to use the programming constructs optimally.

This is where our static code analysis (SCA) solution comes into the picture. Static code analysis allows the programmer to find errors in the code without running the program. Available tools try to de-code programmers’ intent and propose corrections to the code. Even these tools can only catch a minuscule number of errors. On the other hand, tools used in the production environment not only propose fixes to the code but will fix the code as well. The two extremes leave the students with no choice but to rely on often over-burdened Tas or other tutoring services. This project aimed to develop a component-based code analysis that can provide suggestions and show if a construct is written correctly or not. We use open-source ANTLR and take inspiration from tools such as spongebugs.