The effect of semantic complexity on the comprehension of program modules

https://doi.org/10.1016/S0020-7373(84)80060-7Get rights and content

Abstract

An important variable affecting the comprehension of programs is their psychological complexity. While some work has been done on surface or low-level semantic features which affect complexity (e.g. variable-naming and indentation), little has been done on the effects of higher-level semantic features. This article presents an experiment in which pairs of program modules were equated on surface complexity and on function, while the complexity of the semantic constructs involved varied. The constructs chosen for study were iteration vs recursion, the type of data structures employed (arrays vs linked lists) and the straightforwardness of the algorithm used. The modules were presented to student programmers to memorize. They were asked for immediate recall, to perform hand execution and for recall again 48 h later. The more semantically complex modules produced significantly worse hand-execution performance and worse delayed-recall. These results are described in relation to the Shneiderman & Mayer syntactic/semantic model of programming behavior.

References (22)

  • M.H. Halstead
  • Cited by (11)

    • Systematic literature review of empirical studies on mental representations of programs

      2020, Journal of Systems and Software
      Citation Excerpt :

      Examination of the Findings column in Table A.2 reveals considerable variation in the description of the representations formed by programmers and the strategies used during the program comprehension process. The studies conducted by Shneiderman (1976), McKeithen et al. (1981), Ehrlich and Soloway (1984), Mynatt (1984), Barfield (1986, 1997), Guerin and Matthews (1990), Furman (1998), and Fan (2010) found that programmers used chunking to develop a mental representation of the code. Chunking involves the grouping of lines of code together during the comprehension process.

    • A guessing measure of program comprehension

      1995, International Journal of Human - Computer Studies
    • The role of program structure in software maintenance

      1992, International Journal of Man-Machine Studies
    • Syntax, Predicates, Idioms - What Really Affects Code Complexity?

      2017, IEEE International Conference on Program Comprehension
    View all citing articles on Scopus
    View full text