ArticleslgStudy

engineering

Program structure tree

Program structure tree is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Program structure tree rather than just read about it. In short: A program structure tree (PST) is a hierarchical diagram that displays the nesting relationship of single-entry single-exit (SESE) fragments/regions, showing the organization of a computer program. Nodes in this tree represent SESE regions of the program, while edges represent nesting regions.

Key takeaways

  • Program structure tree belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Program structure tree to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Program structure tree from memory before moving on to harder problems.

Reference excerpt

A program structure tree (PST) is a hierarchical diagram that displays the nesting relationship of single-entry single-exit (SESE) fragments/regions, showing the organization of a computer program. Nodes in this tree represent SESE regions of the program, while edges represent nesting regions. The PST is defined for all control flow graphs.

Bibliographical notes These notes list important works which fueled research on parsing of programs and/or (work)flow graphs (adapted from Section 3.5 in Polyvyanyy, Artem (2012). Structuring Process Models (Ph.D.). University of Potsdam.).

The connectivity properties are the basic properties of graphs and are useful when testing whether a graph is planar or when determining if two graphs are isomorphic. John Hopcroft and Robert Endre Tarjan (1973) developed an optimal (to within a constant factor) algorithm for dividing a graph into triconnected components. The algorithm is based on the depth-first search of graphs and requires O ( | V | + | E | ) {\displaystyle O(|V|+|E|)} time and space to examine a graph with | V | {\displaystyle |V|} vertices and | E | {\displaystyle |E|} edges. Robert Endre Tarjan and Jacobo Valdes (1980) used triconnected components for structural analysis of biconnected flow graphs. The triconnected components of the undirected version of a flow graph are shown to be useful for discovering structural information of directed flow graphs. The triconnected components can be discovered efficiently and form a hierarchy of SESE fragments of a flow graph. Giuseppe Di Battista and Roberto Tamassia (1990) introduced SPQR-trees - a data structure which represents decomposition of a biconnected graph with respect to its triconnected components. Essentially, SPQR-trees are the parse trees of Tarjan and Valdes. The authors showed the usefulness of SPQR-trees for various on-line graph algorithms, e.g., transitive closure, planarity testing, and minimum spanning tree. In particular, the authors proposed an efficient solution to the problem of on-line maintenance of the triconnected components of a graph. Richard C. Johnson et al. (1994) proposed a program structure tree (PST), a hierarchical representation of program structure based on single edge entry and single edge exit regions. The PST can be computed in O ( | E | ) {\displaystyle O(|E|)} time for an arbitrary flow graph, where E {\displaystyle E} is the set of edges in the graph. The disadvantage of the PST is that it exploits the notion of a SESE fragment based on edge entries and exits only. Thus, the PST does not capture those SESE fragments which are based on vertex entries and exits. Carsten Gutwenger and Petra Mutzel (2001) shared their practical experience on linear time computation of the triconnected components of biconnected graphs. They have identified and corrected the faulty parts of the algorithm in and applied the resulting algorithm to the computation of SPQR-trees. The implementation is publicly available. Chun Ouyang et al. (2006–2009) used parsing to translate BPMN diagrams into BPEL processes. The employed notion of a fragment is similar to the notion of a region in. However, the developed parsing algorithm is non-deterministic, i.e., the parse tree is not unique for a given diagram. Jussi Vanhatalo et al. (2008–2009) introduced the Refined Process Structure Tree (RPST). Given a workflow graph, the RPST is unique, modular, and is finer grained than any other known parse tree, i.e., it discovers more SESE fragments than any other technique. In fact, the RPST captures all canonical fragments of a workflow graph which, in turn, represent all SESE fragments of the graph. The RPST can be computed for an arbitrary program/workflow graph. Artem Polyvyanyy, Jussi Vanhatalo, and Hagen Voelzer (2010) proposed a simplified algorithm for computation of the RPST. This simplified algorithm can be employed in a straightforward way as a subroutine for computation of the RPST of an arbitrary program/workflow graph. Both algorithms, the original and the simplified one, allow for an efficient computation of the RPST. However, they provide different structural characterizations of canonical SESE fragments.

External links Java implementation of the Refined Process Structure Tree in the jBPT library (see RPST class in jbpt-deco module). The implementation follows the algorithm described in

References

Worked examples

Example 1 — a first encounter with Program structure tree

Start with the simplest possible case. Write down what Program structure tree claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Program structure tree before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Program structure tree ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Program structure tree

In research
Program structure tree appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Program structure tree in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Program structure tree is common in secondary-school and first-year university syllabi. It links to neighbouring topics Programming constructs, Trees (data structures), so understanding it makes those chapters shorter.
In everyday life
Look for Program structure tree outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Program structure tree in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Program structure tree means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Program structure tree out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Program structure tree in simple terms?

A program structure tree (PST) is a hierarchical diagram that displays the nesting relationship of single-entry single-exit (SESE) fragments/regions, showing the organization of a computer program. Nodes in this tree represent SESE regions of the program, while edges represent nesting regions.

Why does Program structure tree matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Program structure tree?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Program structure tree.

Tags

  • Programming constructs
  • Trees (data structures)

Keep exploring