VISUAL ABSTRACTION IN THE VISUAL DESIGN PROCESS

S. K. Chang, W. Hua and C. W. Yoo Department of Computer Science University of Pittsburgh, Pittsburgh, PA 15260 USA {chang, cwyoo, hua}@cs.pitt.edu

Abstract: We investigate the properties of syntactically well-formed, semantically valid and pragmatically admissable visual diagrams for the visual design process, supporting transformations among visual diagrams at different levels of abstraction. With this characterization of the visual design process, sound software engineering principles can be applied to the visual design process to effectively and efficiently accomplish the design objectives. This merger of visual design process with software engineering may also lead to the new discipline of visual software engineering.

Keywords: Visual abstraction, visual diagrams, software engineering principles for visual design, visual software engineering

1. Introduction

In many fields of science and engineering, designers rely on visual diagrams and their refinements to design products. For example in designing the relay circuit for a railroad control system, the designer will first draw a circuit diagram which is then transformed into logic equations and finally implemented by a microprocessor-controlled system. Although the designer can directly specify the logic equations, it is much more convenient to draw the relay circuit diagrams first. With CAD tools the creation and display of such visual diagrams is no longer a problem. However, visual diagrams are often much larger than the display screen, therefore the designer has to scroll the visual diagrams in order to view them. Moreover, the current CAD tools are inadequate in supporting the designer to visualize and/or conceptualize the visual diagrams, because it is usually difficult to provide various levels of abstractions for the visual diagrams. Since there is no adequate theoretical framework for visual abstraction, documentation and maintenance of visual diagrams then become a problem. On the other hand, adequate design tools should support multiple views in the design environment [7]. We are therefore faced with the following challenges: (a) how to formulate a theoretical framework for visual abstraction, (b) how to design software tools to provide various levels of abstraction and dynamic visualization, and (c) how to ensure the tools are adequate in supporting the designer's visual design process.

Diagram is a popular representation for visual languages. Daniel D. Hils [4] had a survey of data flow visual languages. Some research have been done to define the syntax of the visual language. In his papers [2, 3], Eric J. Golin uses the picture layout grammar to define the syntax of visual languages. A. Papantonakis and P. J. H. King [6] give the attribute grammar and semantics of their graphical query language. Joe Marks [5] also describes the syntax and semantics of the network diagram. But none of the above works considers visual abstraction. In this paper, our objective is to formally define visual diagrams at various levels of abstraction, which are syntactically well-formed, semantically valid and pragmatically admissable, so that techniques and guidelines can be developed to analyze and synthesize such visual diagrams. With such techniques and guidelines, we can apply sound software engineering principles to help a designer in his visual design process to effectively and efficiently accomplish the design objectives. In other words, design can be done in less time with fewer mistakes and is easier to understand by other designers.

2. A Conceptual Framework for the Visual Design Process

Our viewpoint is that every instance of the visual diagram that the designer creates or sees on the display screen is a part of a visual program. Thus the designer is constantly "programming" through continuous interaction with the visual diagram - although the designer may not know he (she) is "programming". This instance of the visual diagram is called a visual sentence [1]. Moreover, the designer does not merely interact with the visual diagram at a fixed level of abstraction. The visual sentence can be transformed into other visual sentences. Thus our viewpoint leads to a transformational framework.

Given a visual sentence, the designer can transform it into another visual sentence using a vistractor (visualization-and-abstraction operator) to accomplish different effects of visualization and abstraction. In the visual design process, the designer will first create a visual sentence as an initial design. By applying a vistractor, the designer can visualize the initial design at a different abstraction level. The initial design is improved to the detailed design and eventually led to the final design. Correspondingly, the abstracted initial design, detailed design and final design can also be constructed and visualized. This collection of visual sentences used in the visual design process is called a visual design configuration. Similar to a software configuration, the visual design configuration provides detailed documentation of the visual design process for verification, validation, maintenance and many other purposes.

In order to formally characterize the visual design process, in the following sections we will define the visual diagrams and the abstraction of visual diagrams using the aggregation vistractor.

3. Visual Diagrams

A diagram G is a graph that includes nodes N and arcs A. Generally the diagram has a hierarchical structure. A portion of the diagram can be compressed into an aggregate node. If the node is an aggregate node there will be a subdiagram inside this node. Conversely an aggregate node can also be expanded to a subdiagram.

There are two different types of nodes: A complex node sc is the node that includes a diagram inside it, and a port node nport is the node that does not include a diagram. Thus N = Nc U Nport where Nc and Nport are disjoint subsets of complex nodes and port nodes, respectively.

Those complex nodes that include diagrams inside and are expandable to lower level diagrams are called aggregate nodes. A regular node is a complex node which has a self-contained diagram but its internal structure can not be visualized or expanded any more, while an aggregate node is expandable. The union of the set of aggregate nodes Na and the set of regular nodes Nr is Nc.

A port nport is the interface between the inside and the outside of the diagram G.

A port can be either an input port nin or an output port nout, and Nport = Nin U Nout. Since an aggregate node is a compressed diagram, and a regular node has a self-contained diagram inside, there are also ports in a complex node.

An arc is the link from an input port of a diagram or a complex node, to an output port of a diagram or another complex node.

Finally, each node is associated with a label (the name of the node) together with other attributes, and each arc is associated with the name of the arc together with other attributes. In general such labels may be strings of arbitrary length.

As an example, Figure 1(a) illustrates the visual diagram which may be used in designing a relay circuit, and Figure 1(b) illustrates a visual diagram which may be used in specifying a finite-state transition diagram. The two visual diagrams have the same graph so the syntax is the same, but they are used for different purposes so the semantics are different.

The following is the formal definition of a diagram G:

Definition: G = (N, Na, Nr, Nin, Nout, A, fN, fA), where

The pair (ni, nj) with nj in A ni is called an arc of G. The node ni is the initial node and the node nj is the final node of the arc (ni, nj). The node ni is the predecessor of nj, and nj is the successor of ni.

A path is a node-sequence (n1,n2,...,nk), where ni+1 in Ani, for i=1 to k-1.

As a notational convenience, instead of fN(ni) we will write (kni1, ..., knim). Similarly, instead of fA(aj) we will write (kaj1, ..., kajn).

fN(ni).namej stands for knij, j'th attribute of the node ni, and fA(ai).namej stands for kaij, j'th attribute of the arc ai,

Nc is the set of complex nodes and Nc = Na U Nr.

Nport is the set of port nodes and Nport = Nin U Nout.

In Figure 2(a), for example, Nr = {n1,n2, n4,n5}, Na = {n3}, Nin = {n0}, and Nout = { }. In this figure regular nodes are drawn as single circles, aggregate nodes as double circles and port nodes as squares.

If the initial or final node of an arc ai is a complex node, then more specific information about interface ports is provided in the attribute space fA(ai). For example, fA(ai).initial and fA(ai).final denote the internal port of initial node and the internal port of the final node in arc ai, respectively.

An aggregate node na has the same definition as that of diagram G.

4. Abstraction of Visual Diagrams

Given a visual diagram, a user can manipulate it to obtain a new one, or to transform it into another visual diagram. In this section we describe the syntax of the diagram to formally characterize such a transformation by a vistractor called aggregation.

By convention G - N is the intersection of G and -N, where -N means the complement of N, and |G| represents the number of nodes in the diagram G. In what follows we will use the definition G=(N,A) or G=(N) for a diagram instead of formal one, as long as we do not need any other components of G.

If a node doesn't have any predecessor in G, it is called input node of the diagram. We define Ninput to be the non-empty set of input nodes of G. An input port is a kind of input node.

The inverse of A is a function A-1: N --> 2N defined as:

We define A2, A3, ... , A+ and A* as:

A node nj is reachable from ni if nj is in A* ni. A node nj is accessible if it is reachable from one input node in Ninput, and it is inaccessible otherwise.

The connectivity function C: N --> 2N is defined as:

Lemma 1: For every two nodes ni and nj, if ni in C nj, then nj in C ni, so the connectivity function C is symmetric.

Proof: If ni in C nj, then by the definition ni in (A nj U A-1 nj). Case-1: if ni in A nj, then nj in A-1 ni, so nj in C ni. Case-2: if ni in A-1 nj, then nj in A ni, so nj in C ni. In both cases, nj in C ni, so the function C is symmetric. Q.E.D.

Two nodes ni and nj are adjacent if ni in C nj or nj in C ni.

C* is the reflexive and transitive closure of C.

A diagram G is connected if for every two nodes ni and nj, ni in C* nj.

A diagram G is well-formed if the following two conditions hold:

Given a diagram G and a node ni, we define SCR(ni) as the maximal strongly connected subdiagram which includes the node ni. A diagram is cycle-free if it does not contain any strongly connected subdiagram. A node ni is self-cyclic if ni in A ni.

Given a well-formed diagram G=(N,A) and a subdiagram G'=(N',A'), there can be an arc between inside and outside of the subdiagram. In other words, inside of the subdiagram, there will be a interface node whose predecessor or successor is in the outside of the subdiagram. We define N'entry to be the entry nodes of G', and N'exit the exit nodes of G' as follows:

Given a well-formed diagram G=(N,A), a subdiagram G' is aggregatable if the following four properties hold:

By this definition, if a subdiagram G' is aggregatable then all incoming arcs are through these entry nodes, and all cycles within G' must contain at least one entry node n'entry in N'entry.

Given a diagram G and a subdiagram G', we use the notation G/G', where the G' is aggregatable, as the aggregated diagram in which the aggregatable subdiagram G' is replaced by an aggregate node.

In the visual design process, a subdiagram can be identified by clicking and dragging interactively as in Figures 2(a) and 4, where the dotted rectangle represents a dragged subdiagram. If a given subdiagram is aggregatable, the subdiagram can be compressed into an aggregate node.

In Figure 2(a), for example, the whole diagram G=({n0,n1,n2, n3,n4,n5},A) is well-formed, because it is connected and every node is reachable from the input node n0. The subdiagram G234 is aggregatable, as it is connected, every node of G234 is reachable from the entry node n2, G234-{n2} is cycle-free, and all the predecessors of the nodes n3 and n4 are inside the subdiagram. Figure 2(b) is the aggregated diagram, where the subdiagram G234 has been compressed into the aggregate node n234. Figure 3 shows the internal diagram for the aggregate node n234, with the input/output ports added.

For a well-formed diagram G=(N,A) and an aggregatable subdiagram G'=(N',A'), the aggregation process X(G,G'), which produces an aggregated diagram G/G', is defined as belows:

In the above definition, the syntax and attributes of the aggregate node are preserved at the attribute space of the node to keep the same characteristics as one of the subdiagram compressed. The preserved characteristics are used for an expansion or de-aggregation of the diagram.

Theorem 1: Given a well-formed diagram G and an aggregatable subdiagram G', the aggregated diagram G/G' is also well-formed.

Proof: Let G1 be the aggregated diagram G/G' and na the aggregate node of G1 which is compressed from G'. If G=G', then |G1|=1, and na is the unique node of G1. Therefore, the G1 is connected and accessible. We will now prove the case of G not equal to G'. Since the diagram G is connected, for every two nodes ni of G' and nj of (G-G'), ni in C* nj, and also nj in C* ni by symmetry. And by the definition of aggregation process, every arc (ni,nk) and every arc (nk,ni) of G, such that ni in G', are replaced by (na,nk) and (nk,na), respectively. In G1, therefore, for every node ni of (G1-{na}), na in C* ni and also ni in C* na by symmetry. For every two nodes ni and nj, ni in C* na and na in C* nj. So ni in C* nj by transitivity, and also nj in C* ni by symmetry. Therefore the aggregated diagram G1 is connected. Since G is accessible, every node of G is reachable from one input node of G. Let p=(n1,n2,...,nk-1,nk) be a path from one input node n1 of G to the node nk of G', such that every node ni in G for i=1~k-1, and nk in G'. By the definition of aggregation process, the arc (nk-1,nk) is replaced by (nk-1,na). So in G1, there exists a path (n1,n2,...,nk-1,na), which means that na is reachable from one input node n1. Assume that every node ni in (G1-{na}) of G1 is reachable from both na and one input node of G1. Hence, every node nj in A-1ni is also not reachable from one input node, a contradiction to the accessibility of the well-formed diagram G. Therefore every node ni in (G1-{na}) of G1 is reachable from either na or one input node of G1. If ni in A*na, then the node na is always reachable from one input node of G1, and ni is also reachable by transitivity. Hence the diagram G1 is accessible. Q.E.D.

A series of aggregations can be applied to a diagram. In Figure 4, for example, the three diagrams G0, G1 and G2 constitute a series of aggregations. The diagram G0 of Figure 4(a) can be aggregated to G1 of Figure 4(b), and then finally to G2 of Figure 4(c). The nodes n2, n3 and n4 are aggregated to the node n234, and all the nodes of G1 are aggregated to the node n123456 of G2. Conversely, nodes n123456 of G2 can be expanded into the diagram G1.

Once a subdiagram of G is given by an user and then checked whether the subdiagram is aggregatable or not, the aggregation process is applied to the diagram. The size of the subdiagram and the order of aggregation processes are determined through the user's interactions. An undisciplined user may not find a proper series of aggregations, and sometimes a user may not give a unique series of aggregation to generate a certain aggregated diagram. For example, in Figure 4, the two nodes n2 and n3 can be aggregated first, and then to n234 with n4 next. This shows that there exists another series of aggregations which has a different level and depth, to produce the same aggregated diagram as the one of Figure 4. This kind of abstraction level and style may vary from designer to designer.

The following algorithm accepts an aggregatable subdiagram G' of G and produces another aggregatable subdiagram G" such that |G"| >= |G'| and G' is subset of G".

Algorithm 1 (EXTEND_AGGREGATABLE_SUBDIAGRAM):
Input: a well-formed diagram G=(N,A) and an aggregatable subdiagram G'=(N',A')
Output: an extended aggregatable subdiagram of G'
Method:

Algorithm 1 iterates through successor nodes of the entry nodes of G', applying the four properties of aggregatable diagram until no more changes take place. For example, in Figure 4, if G'={n2,n3}, then Algorithm 1 will extend it to the set {n2,n3,n4}. So the algorithm adds as many nodes as possible to the given aggregatable subdiagram G' if it satisfies the above mentioned four properties, that is, the algorithm produces a submaximal and unique aggregatable subdiagram including G'. Therefore, the algorithm will make it easy to find a series of aggregation and to reduce the aggregation steps.

Lemma 2: If a diagram G is made up of only one node which is self-cyclic, then the diagram is aggregatable.

Proof: The diagram G is clearly connected and has only one entry node, which is accessible by the definition of aggregatable diagram. G-{n} is empty, cycle-free, and is of no predecessors. Hence the diagram is aggregatable. Q.E.D.

Lemma 3: Given a well-formed diagram G which is not a degenerated graph of a single aggregate node, there exists a subdiagram G' of G which is aggregatable.

Proof: Since the diagram G is connected, we can find a topological order (n1,n2,...,nk-m,...,nk) for all nodes of G such that nk-m in A-1nk and nk-m+1 is not in A-1nk for i=1~m-1, that is, nk-m is the nearest predecessor of nk. If the node nk is self-cyclic then the subdiagram G' which is made up of only one node nk is aggregatable by Lemma-2. If the node nk is not self-cyclic then we can construct the subdiagram G' which is made up of two node nk-m and nk. Now we will show that G' is aggregatable. Case-1: if nk-m is the only predecessor of nk, then by the topology the node nk-m will be either an entry node or an input node of G', as the subdiagram G' is well-formed and the node nk-m is reachable from one input node of G. Since G' is connected, both nodes nk-m and nk are reachable from nk-m, and G'-{nk-m} is cycle-free by the assumption such that the node nk-m is not self-cyclic. And A-1nk is a subset of G', so the subdiagram G' is aggregatable. Case-2: if there exists a predecessor of nk outside of G', then nk will be an entry node of G' by the definition of entry node. And by the topology, the node nk will be either an entry node or an input node of G', as mentioned above Case-1. Since G' is connected, both nk-m and nk are reachable from the node nk-m, and G'-{nk-m,nk} is empty and cycle-free, so the subdiagram G' is aggregatable. Q.E.D.

Theorem 2: If a diagram G is well-formed, then the diagram can be compressed into one aggregate node.

Proof: By Lemma 3, there exists an aggregatable subdiagram G' of the well formed diagram G. And by Theorem-1 its aggregated diagram G/G' is also well-formed. So there exists a series of aggregations (G0,G1,...,Gn) such that G0=G, Gi=X(Gi-1, G'(i)) and Gi is not equal to Gi-1 for i=1~n. And by the definition of the aggregation process, |Gi| >= |Gi-1| for i=1~n. Since number of arcs and nodes of G are finite, we can conclude that |Gn|=1 and n < K for a certain constant K. Q.E.D.

Definition: A diagram is completely aggregatable if there exists a series of aggregations (G0,G1,...,Gn) such that |Gn|=1 and n For example, Figure 4 shows that the diagram G0 is completely aggregatable, as it can be compressed finally into one aggregate node with the series of aggregation (G0,G1,G2).

Theorem 3: A diagram G is well-formed if and only if it is completely aggregatable.

Proof: If the diagram G is well-formed, then by Theorem 2 the diagram is completely aggregatable. If the diagram G is completely aggregatable, then by the definition of aggregatable diagram it should be connected. Assume that G is not accessible. Since there exists a node n which is not reachable from one input node of G, we can not find any aggregatable subdiagram which includes the node n. Since the diagram G can not be aggregated any more, it is not completely aggregatable, a contradiction. Q.E.D.

The above lemmas and theorems show that well-formedness and aggregatability are equivalent concepts.

5. Valid and Admissable Visual Diagrams

A well-formed diagram is syntactically correct, but additional constraints must be satisfied so that the diagram can be semantically valid. We now describe the constraints for a diagram to be semantically valid.

V1. Arcs and nodes must be compatible. If the nodes ni1 and ni2 have attributes xi1 and xi2, respectively, and arc ai =(ni1, ni2) has attributes yi, then (xi1, xi2, yi) is in constraints set R.

V2. Every input port in Nin can not be used as a final node of an arc, and every output port in Nout can not be used as an initial node of an arc.

V3. The intersection of Nin iNout is empty.

V4. The visual diagrams must be unambiguous. Let ai = (ni1, ni2), aj = (nj1, nj2) be two arcs of G. If fN(ni1) = fN(nj1) and fN(ni2) = fN(nj2), then fA(ai) is not equal to fA(aj).

V5. Every interface port of a complex node can not be used for both input port and output port of the complex node. Let ai = (ni1, ni2), aj = (nj1, nj2) be two distinct arcs of G, where ni,nj in Nc. If fN(ni1) = fN(nj2), then fA(ai).initial is not equal to fA(aj).final. Similarly if fN(ni2) = fN(nj1), then fA(ai).final is not equal to fA(aj).initial.

V6. If an interface port of a complex node is used for an input inside, then its indegree should be no more than one. That is, if ai = (ni1, ni2), aj = (nj1, nj2) be two distinct arcs of G, where ni2,nj2 in Nc, and if fN(ni2) = fN(nj2), then fA(ai).final is not equal to fA(aj).final.

In addition to the above described semantic constraints, there are also pragmatic constraints, because we must put some constraints on the diagram drawn by the user in order to obtain a pragmatically admissable diagram.

A1. |N| < MAX_NODE_NUM

|N| means the cardinality of the set N, and this constraint means the number of nodes in one diagram should not exceed a maximum number.

A2. constraints on node degree

fN(n).degree < MAX_NODE_DEGREE

fN(n).degree means the degree attribute of the node n.

Assume n in Na, we define the diagram which describes n as Ga=lookdown(n)=( Na, Naa, Nra, N{in}a, N{out}a, Aa, fNa, fAa).

G and Ga should satisfy:

a) |N{in}a U N{out}a| < MAX_NODE_DEGREE.

b) fN(n).degree=|N{in}a U N{out}a|

c) fN(n).degree_in=|N{in}a|

d) fN(n).degree_out=|N{out}a|

e) fN(n).degree_in>0, for all n in N - N{in}

f) fN(n).degree_out>0, for all n in N{in}

A3. |N{in}| > 0, |N{out}| >= 0

Every diagram should have at least one input port, which allows the digram to be connected to the other diagram or the environment. This constraint is also a connectivity constraint.

In addition to the above pragmatic constraints, we may also add other informal constraints to incorporate certain design guidelines (see Section 7).

6. The Visual Design Process

In the previous sections we defined well-formed, valid, admissable visual diagrams. We can develop analysis algorithms for deciding whether a visual diagram is well-formed, valid and admissable. Only such diagrams will be in the collection of diagrams maintained by the system to form a visual design configuration. The analysis algorithms can be formal or informal. For syntactic checking, formal algorithms that are checked automatically are readily available:

Algorithm 2 (CHECK_WELL_FORMEDNESS):
Input: a diagram G=(N,A)
Output: "yes" if well-formed, "no" otherwise
Method:

Algorithm 3 (CHECK_AGGREGATABILITY):
Input: a well-formed diagram G=(N,A) and a subdiagram G'=(N',A')
Output: "yes" if the subdiagram G' is aggregatable, "no" otherwise.
Method:

It is also straightforward to develop an algorithm to check whether a visual diagram is valid and admissable. Thus the visual design configuration can be documented and maintained following sound software engineering principles.

As mentioned above, the aggregate node is based upon the concept of abstraction. With aggregate nodes, the designer can work on the design problem at any desirable level of abstraction. We can apply the above described analysis algorithms to help the designer synthesize visual diagrams correctly. The aggregation vistractor enables the designer to generate diagrams at different levels of abstraction. Informal or heuristic rules can also be incorporated into the analysis algorithms, so that they serve as design guidelines for the designer.

7. Discussion

Visual diagrams are only one type of visual languages which are becoming increasingly important in human-computer interaction. Compared to traditional programming languages, in general visual languages are simpler to learn and use, avoid the need for experienced user, interact more effectively, and are more appealing to the average user. Even though visual languages are rapidly gaining importance, there is yet to be developed a standard set of criteria that measures the quality of visual languages. In [1] S.K. Chang and P. Mussio proposed a practical set of design criteria for visual languages, based upon the theory of visual sentences as programs. These criteria were used to rate the quality of nine popular software and the visual programming software developed by the Visual Computer Laboratory at the University of Pittsburgh. The results show a trend of improved ratings from older software to more recent ones. Also, the ratings help us understand how practical the proposed criteria are in measuring the quality of visual languages. These criteria are based upon the theory of visual languages with emphasis on adequate communication between human and computer or between human and human. Thus it is a principled approach. We will further refine the criteria based upon the above framework of visual abstraction, aided by further experiments and empirical observations. These evaluation criteria will lead to the formulation of constraints (the DO's and DONT's) for the designer to follow, to be incorporated into the "guidebook" of the visual design process.

Conversely, the visual design process may also lead to a visual software design process and become useful to software design in general. Traditionally, visual design is used only at the initial design phase in the software design process. A refined visual design process may facilitate the incorporation of visual design in every phase of software design, leading to what we tentatively call visual software engineering. The exploration of visual software engineering will become increasingly important, aided by the merger of software engineering principles with the visual design process.

References

[1] S. K. Chang and P. Mussio, "Customized Visual Language Design", Proc. of Eighth Int'l Conference on Software Engineering and Knowledge Engineering, June 10-12, 1996, Lake Tahoe, Nevada, 553-562.

[2] Eric J. Golin, "Parsing Visual Languages with Picture Layout Grammars", Journal of Visual Languages and Computing, Vol. 2, No. 4, pp. 371-393, 1991.

[3] Eric J. Golin and Steven P. Reiss, "The Specification of Visual Language syntax", Journal of Visual Languages and Computing, Vol. 1, No. 2, pp. 141-157, 1990.

[4] Daniel D. Hils, "Visual Languages and Computing Survey: Data Flow Visual Programming Languages", Journal of Visual Languages and Computing, Vol.3, No. 4, pp. 69-101, 1992.

[5] Joe Marks, "A Formal Specification Scheme for Network Diagrams That Facilitates Automated Design", Journal of Visual Languages and Computing, Vol. 2, No. 4, pp. 395-414, 1991.

[6] A. Papantonakis and P. J. H. King, "Syntax and Semantics of Gql, a Graphical Query Language", Journal of Visual Languages and Computing, Vol. 6, No. 1, pp. 3-25, 1995.

[7] P. Roesch, "User Interaction in a Multi-View Design Environment", IEEE Symposium on Visual Languages, Sept 3-6, 1996, Boulder, 316-323.

Technical Report TR 97-02, February 1997, Department of Computer Science, University of Pittsburgh.

Figures: Figure-1a, Figure-1b, Figure-2a, Figure-2b, Figure-3, Figure-4a, Figure-4b, Figure-4c.