Teaching program design through program structure maps (original) (raw)

Program Structure

A program is usually represented as a word chain. It is exactly a word chain that appears as the lexical analyzer output and is parsed. The work shows that a program can be syntactically represented as an oriented word tree, that is a syntactic program tree, program words being located both in tree nodes and on tree arrows. The basic property of a tree is that arrows starting from each node are marked by different words (including an empty word). Semantics can then be directly specified on such tree using either requirements or additional links, and adding instructions to some tree nodes enables program execution specification.

Structure and Interpretation of Computer Programs

Structure and Interpretation of Computer Programs has had a dramatic impact on computer science curricula over the past decade. There are new implementations of most of the major programming systems in the book, including the interpreters and compilers, and the authors have incorporated many small changes that reflect their experience teaching the course at MIT since the first edition was published. A new theme has been introduced that emphasizes the central role played by different approaches to dealing with time in computational models: objects with state, concurrent programming, functional programming and lazy evaluation, and nondeterministic programming.

The influence of structure on computer program comprehension

Behavior Research Methods, Instruments, & Computers, 1987

Previous empirical studies that have relied on debugging (Lucas & and memory as measures of computer program comprehension have led to inconsistent results and conclusions regarding the benefits of structure. The present experiment utilizes a new technique for measuring comprehension that is sensitive to contextual factors that help the programmer to anticipate upcoming lines of a program. Subjects in this experiment were told the general purpose of a program written in English and asked to anticipate the subsequent lines. After the subjects entered their anticipated line, the actual line of the previously written program was shown. Subjects used the lines of the program shown as a contextual guide for their next anticipation. The percentage of correctly anticipated lines was greater for structured programs than for unstructured programs. However, the advantage of structure was more pronounced for long, complex programs than for short, relatively straightforward programs.

Mapping of Concepts in Program Comprehension

2019

Software system’s understanding is the essential part of the software maintenance. Documentation and program source code could be the first aspect in software system’s understanding and its inner work-flow. This understanding of code is known as Program Comprehension (PC). With the advancement in technology and rapid growth in industry, information systems require frequent changes. This change need to be implement a specific idea or behavior which is named as “Concept”. Concept (variable, class, method) is referred as a typical behavior of code performing specific functionality like a student enrollment in student portal. In large scale systems, to locate the concept in the code is a very challenging task which require massive amount of time if performed in conventional ways. The conventional ways mean start finding the location by going through each and every file of the code. Programmer tries to locate these concepts with the help of domain knowledge using concept location techniq...

The structural analysis of programming languages

1981

: A language's structures are some of its most important characteristics. These include the data structures -- those mechanisms that the language provides for organizing elementary data values. They also include the control structures, which organize the control flow. Less obviously, they include the same structures, which partition and organize the name space. Languages can be compared relative to their structures in the data, control, and name domains. This report describes a syntax-independent method of representing the structures of a language which facilitates visual complexity comparisons and is amenable to measurement. The data, control, and name structures of a number of languages are analyzed, including Pascal, LISP, Algol-60, Algol-68, the lambda calculus, FORTRAN, and Basic. (Author)

OBSERVATIONS ON LITERATE PROGRAM STRUCTURE

In this paper we compare the structure of programs written in literate and traditional imperative programming styles. Considering literate programs as "webs" of interconnections, we model and analyze the patterns of connections particular to literate programs, and compare them to the call graph structures of traditional imperative programs. The application of structural graph metrics allow us to visualize the literate and call-graph structures. We then compare, contrast, and interpret the various graph metrics in light of each programming style.

A Language Processing Tool for Program Comprehension

2006

Program Comprehension is a Software Engineering discipline which aims to understand computer code written in a high-level programming language. Program Comprehension is useful for reuse, inspection, maintenance, reverse engineering and many other activities in the context of Software Engineering. In this paper we define a set of techniques to extract static and dynamic information from the target program. These techniques are based on the inclusion of inspection functions and control statements in the system's source code. The first are intended to show the functions actually used. The second are necessary to reduce the number of functions recovered for a better administration. We show a possible implementation of this approach using a language processor generator very useful and easy to use. Our strong motivation was to support the understanding of routing algorithms, available in EAR a routing algorithms evaluation system. To assist the program comprehension task, we generate different views that use the information extracted by our strategy, such as the routing algorithm output (that can be seen as a problem domain view), or the sequence of called functions, and their source and object code (examples of program domain views). Although specific, we intend to generalize this approach.

Program structures: Some new characterisations

Journal of Computer and System Sciences, 1991

Irreducible program flowgraphs are important in the study of program structuredness. In this paper a partial order is defined on the set of irreducible flowgraphs. This allows us to characterise those programs which can be restructured by node splitting, where structuredness is defined in terms of any "subgraph-closed" set of irreducible flowgraphs. This includes all sets of structural components available in modern programming languages such as Ada, Modula-2, and C. In particular, we apply our results to the study of multiple-exit and multilevel exit control structures, giving a new characterisation of the BJ,-charts of Kosaraju and a sharpening of two results of Peterson, Kasami, and Tokura.