List of My Teaching Courses

Posted on Sun 10 March 2024 in courses • Tagged with courses, teaching


Continue reading

A gentle introduction to search-based software refactoring

Posted on Thu 05 May 2022 in blog • Tagged with blog, ANTLR, compiler, tutorial

Finding the best sequence of the refactoring operation to ab applied to a software system is an optimization problem. It can be solved by search techniques in the field known as search-based software engineering (SBSE). In this approach, refactorings are applied stochastically to the original software solution, and then the software is measured using a fitness function consisting of one or more software quality measures. Unfortunately, there is no technical document describing an implementation of decent search-based refactoring. In this tutorial, I am going to explain the implementation of search-based refactoring at the source code level from scratch.


Continue reading

CodART: Automated Source Code Refactoring Toolkit

Posted on Mon 02 May 2022 in blog • Tagged with blog

Refactoring engines are tools that automate the application of refactorings: first, the user chooses a refactoring to apply, then the engine checks if the transformation is safe, and if so, transforms the program.


Continue reading

Automated refactoring of the Java code using ANTLR in Python

Posted on Mon 02 May 2022 in blog • Tagged with blog, ANTLR, compiler, tutorial

Refactoring is a type of program transformation that preserves the program’s behavior. The goal of refactoring is to improve the program’s internal structure without changing its external behavior. In this way, the program quality, defined and measured in terms of quality attributes, is improved. The refactoring process could be automated to reduce the required time and cost and increase the reliability of applied transformation. In this tutorial, I give a short description of how we can automate the refactoring process with ANTLR in Python.


Continue reading

Program dynamic analysis with ANTLR

Posted on Tue 30 March 2021 in blog • Tagged with blog, ANTLR, compiler, tutorial

Dynamic analysis refers to extracting specific information from the program related to the program’s execution. Therefore, it requires to execute the program under analysis. Often the source code must be augmented in a way that executing the program outputs the additional information required for dynamic analysis. A well-known technique for this aim is program instrumentation. The ANTLR tool can be used to instrument the source code effectively. In this tutorial, I explain how we can use the ANTLR tool to instrument the C++ program in the Python programming language.


Continue reading