The block model is an educational model for program comprehension developed by Carsten Schulte. It consists of a grid with *four dimensions* and *three levels*.
| | Text Surface | Program execution (data flow and control flow) | Functions (as means or as purpose), goals of the program | |---|---|---|---| | **Macro Structure** | (Understanding the) overall structure of the program text | Understanding the „algorithm" of the program | Understanding the goal/ the purpose of the program (in its context) | | **Relations** | References between blocks, e.g.: method calls, object creation, accessing data... | sequence of method calls „object sequence diagrams" | Understanding how sub-goals are related to goals, how function is achieved by sub-functions | | **Blocks** | 'Regions of Interests' (ROI) that syntactically or semantically build a unit | Operation of a block, a method, or a ROI (as sequence of statements) | Function of a block, maybe seen as sub-goal | | **Atoms** | Language elements | Operation of a statement | Function of a statement. Goal only understandable in context |
---
The three levels are:
* **Text Surface**: What does it say? * **Program execution**: What does it do? How does data move? * **Function**: What does it accomplish?
The dimensions are:
* **Atoms**: Individual elements of the language * **Blocks**: A group of atoms related synctactically, semantically or through purpose. * **Relations**: The relation between different blocks (eg. how a method is called, or how one sub-goal helps accomplish another) * **Macro Structure**: How everything comes together, the overall structure.