Evaluating Logical Structure in Computer Programs Using LLMs

Authors

  • Shanti Tamang University of Memphis
  • Md Abdul Mazid Adnan
  • Mahmudul Islam Sajib
  • Vasile Rus

DOI:

https://doi.org/10.32473/flairs.39.1.141793

Keywords:

Large language model, Code Comprehension, Logical Reasoning, Programming Education

Abstract

Code comprehension theories postulate that programmers need to identify the logical steps of a computer program. This work examines the ability of large language models (LLMs) to identify and explain logical steps and their corresponding blocks of code in well-structured programming tasks. To evaluate the LLMs’ performance, we compare the LLM-identified logical steps with those identified by human experts. We assess the match between human and LLM annotations on this task using automated similarity analysis under multiple alignment strategies. Results show that the highest similarity between LLM-generated and human expert descriptions of the logical steps reaches up to 64.4%.

Downloads

Published

06-05-2026

How to Cite

Tamang, S., Adnan, M. A. M., Sajib, M. I., & Rus, V. (2026). Evaluating Logical Structure in Computer Programs Using LLMs. The International FLAIRS Conference Proceedings, 39(1). https://doi.org/10.32473/flairs.39.1.141793