Files
Leurquin_49142100_2026.pdf
Open access - Adobe PDF
- 983.4 KB
Details
- Supervisors
- Faculty
- Degree label
- Abstract
- Code pattern matching can help detect common design patterns or coding flaws. One possible usage scenario is for analysing code of students who are learning how to program. Pyttern, however, is an existing pattern query language for analysing Python programs which aims to have a beginner-friendly learning curve. This thesis explores the possible adaptation of Pyttern to other programming languages than Python, using Java as case study. The problem is two-fold. Firstly, we implement Jattern, a language for querying Java code inspired by and largely reusing the existing implementation of Pyttern. Secondly, we merge all the common parts between Pyttern and Jattern so that any implementation extending the framework to a future programming language will have an easier time. We conclude the thesis with a guide explaining how to add support for other programming languages to the refactored version of Pyttern. Finally, we validate the results with a series of unit tests that have been developed using a small framework.