Skip to main content
QUICK REVIEW

[Paper Review] What model(s) for program understanding?

Françoise Détienne|arXiv (Cornell University)|Feb 1, 2007
Reading and Literacy DevelopmentPsychology25 references10 citations
TL;DR

This paper investigates models of program understanding by drawing parallels with text comprehension theories, particularly van Dijk and Kintsch's model. It argues that programming tasks significantly shape cognitive processes and mental representations, proposing that task purpose fundamentally influences how developers understand code, with implications for tool design and education.

ABSTRACT

The first objective of this paper is to present and discuss various types of models of program understanding. They are discussed in relation to models of text understanding. The second objective of this paper is to assess the effect of purpose for reading, or more specifically programming task, on the cognitive processes involved and representations constructed in program understanding. This is done in the theoretical framework of van Dijk and Kintsch's model of text understanding (1983).

Motivation & Objective

  • To analyze and compare various models of program understanding in relation to models of text understanding.
  • To investigate how the purpose of a programming task affects cognitive processes during program comprehension.
  • To apply van Dijk and Kintsch's text understanding framework to the domain of program comprehension.
  • To identify how task-specific goals influence the mental representations developers construct while reading code.
  • To inform the design of better static analysis tools and educational approaches by grounding them in cognitive models.

Proposed method

  • Adapts van Dijk and Kintsch's (1983) model of text understanding to the context of program comprehension.
  • Analyzes programming tasks as goal-directed reading activities, similar to reading for specific purposes in natural language.
  • Compares mental representations formed during program understanding with those formed during text reading, focusing on coherence and integration.
  • Uses theoretical analysis rather than empirical experimentation to explore cognitive structures in program understanding.
  • Classifies program understanding models based on their alignment with cognitive and linguistic frameworks.
  • Emphasizes the role of task context in shaping the construction of mental models during code reading.

Experimental results

Research questions

  • RQ1How do different programming tasks influence the cognitive processes involved in program understanding?
  • RQ2To what extent can models of text understanding be adapted to explain program comprehension?
  • RQ3What types of mental representations do developers form when reading code, and how do these vary with task purpose?
  • RQ4How does the goal of a programming task affect the structure and coherence of the resulting mental model?
  • RQ5What are the implications of task-specific cognitive modeling for static analysis tools and programming education?

Key findings

  • The purpose of a programming task significantly shapes the cognitive processes and mental representations formed during program understanding.
  • Mental models of code are constructed similarly to text comprehension models, particularly in terms of coherence and integration of information.
  • Task context determines the focus and depth of understanding, with different goals leading to different structural interpretations of the same code.
  • Theoretical alignment with van Dijk and Kintsch's model suggests that program understanding is not a passive process but an active, goal-driven construction of meaning.
  • Different models of program understanding are valid depending on the task context, implying no single universal model suffices.
  • Implications for tool design suggest that static analysis tools should be tailored to specific programming tasks to improve developer support.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.