Predicting the effort of program language comprehension: The case of HLL vs. Assembly
2005 (English)Report (Other academic)
One important aspect of the quality of programming languages is the effort required by a programmer to understand code written in the language. A historical case where this issue was at the forefront was in the debate between the proponents of high-level languages (HLL) and Assembly languages, where the main argument for HLLs were that they were easier for people to understand.
Being one out of a series of articles arguing for a unified theory for software engineering, this article proposes the use of a specific theoretical model from the discipline of cognitive psychology as a tool for predicting language comprehension effort. Describing human problem solving faculties, the ACT-R model [Anderson and Lebiere 1998] predicts that the effort of understanding a program written in C is only 36,5% of the effort of understanding a comparable program written in Assembly.
In order to validate the theory, an experiment was performed where a number of engineering students were exposed to tasks of program comprehension. This empirical assessment demonstrated that the effort of understanding a program written in C is 32,5% of the effort of understanding a comparable program written in Assembly. Comparing the results of the theoretical predictions and the empirical assessments of program comprehension effort, we find that the theoretical model performs surprisingly well. The prediction error for the execution of an Assembly program was 5,1% while the error for C was 6,8%. The prediction error for the ratio between the two program languages amounted to 12,6%.
Place, publisher, year, edition, pages
KTH Royal Institute of Technology, 2005. , 24 p.
ACT-R, Programming Language, C, Assembly, HLL, Unified Theory of Software Engineering, Program Comprehension.
IdentifiersURN: urn:nbn:se:kth:diva-123555OAI: oai:DiVA.org:kth-123555DiVA: diva2:627551
QC 201306182013-06-122013-06-122013-06-18Bibliographically approved