0% found this document useful (0 votes)
66 views8 pages

Formalizing Spider Diagrams

This document introduces and summarizes spider diagrams, which generalize Venn diagrams and Euler circles to provide a more scalable and expressive visual language for software specification. Spider diagrams allow placing both upper and lower bounds on set sizes using spiders (generalized X-sequences) and shading. They also introduce projections to clearly show intersections of more than three curves. The document discusses prior work on visual languages for software specification and claims spider diagrams can be given a formal semantics and logic-based meaning through translation to logical formulae, establishing them as a "visual formalism".

Uploaded by

skw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views8 pages

Formalizing Spider Diagrams

This document introduces and summarizes spider diagrams, which generalize Venn diagrams and Euler circles to provide a more scalable and expressive visual language for software specification. Spider diagrams allow placing both upper and lower bounds on set sizes using spiders (generalized X-sequences) and shading. They also introduce projections to clearly show intersections of more than three curves. The document discusses prior work on visual languages for software specification and claims spider diagrams can be given a formal semantics and logic-based meaning through translation to logical formulae, establishing them as a "visual formalism".

Uploaded by

skw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Formalizing Spider Diagrams

Joseph (Yossi) Gil John Howsey


Department of Computer Science School of Computing & Mathematics
Technion—IIT, Haifa 32000, Israel University of Brighton, Brighton, UK
yogi@cs.technion.ac.il John.Howse@brighton.ac.uk

Stuart Kenty
Computing Laboratory
University of Kent, Canterbury, UK
S.J.H.Kent@ukc.ac.uk

Abstract ticular region of the resulting map is empty.


In 1896, the logician Charles Peirce augmented Venn di-
Geared to complement UML and to the specification of agrams by adding X-sequences as a means for denoting ele-
large software systems by non-mathematicians, spider di- ments [14]. An X-Sequences connecting a number of “min-
agrams are a visual language that generalizes the popu- imal regions” of a Venn-diagram, indicates that their union
lar and intuitive Venn diagrams and Euler circles. The is not empty. Peirce also gave a mechanism for writing dis-
language design emphasized scalability and expressiveness junctive information, which we will not discuss here.
while retaining intuitiveness. In this extended abstract we As an indication of the popularity and intuitiveness of
describe spider diagrams from a mathematical standpoint Venn-Peirce diagrams is the fact that they are used in el-
and show how their formal semantics in terms of logical ementary schools for teaching set theory as an introduc-
expressions can be made. We also claim that all spider dia- tion to mathematics. Still, only recently, full semantics and
grams are self-consistent. inference rules have been developed for Venn-Peirce dia-
Keywords Visual formalisms, software specification, for- grams [15] and Euler circles [4].
mal methods. As a means for writing constraints on sets and their re-
lationships with other sets, Venn-Peirce diagrams are ex-
1. Introduction pressive, but complicated to draw because all possible in-
Circles or closed curves, which we will call contours, have tersections have to be drawn and then some regions shaded.
been in use for the representation of classical syllogisms Drawing the Venn diagram of four or more sets is quite chal-
since at least the Middle Ages [11]. The Swiss mathemati- lenging. As shown by More [12] in the late fifties, there is
cian Leonhard Euler (1707-1783) introduced the notation an algorithm for adding a new contour to a Venn diagram.
we now call Euler circles (or Euler diagrams) [1] to illus- Although it is possible to do so indefinitely, the contours
trate relations between sets. This notation uses the topo- quickly assume weird shapes, with exponential increase in
logical properties of enclosure, exclusion and intersection their curvature. The resulting diagram is very complicated
to represent the set-theoretic notions of subset, disjointness, and difficult to follow. Indeed, it is rare to see Venn dia-
and intersection, respectively. grams of four or more contours. On the other hand, Euler
The 19th century logician John Venn used contours to circles are intuitive and easier to draw, but are not as ex-
represent logical propositions [16]. In Venn diagrams all pressive as Venn diagrams because they lack provisions for
contours must intersect. Moreover, for each non-empty sub- shading and for “X-Sequences”.
set of the contours, there must be a connected region of the In view of their relative merits, it seems natural to com-
diagram, such that the contours in this subset intersect at bine the two notations, by relaxing the demand that all
exactly that region. Shading is then used to show that a par- curves in Venn-diagrams must intersect. Doing this and
 Work done in part while the author was at the IBM T. J. Watson Re-
more are spider diagrams. They are named after the “spider
search Center
shape” which generalizes X-sequences in that a “minimal
y Partially funded by the UK EPSRC, grant numbers GR/K67304 and region” may have more than one spider in it, e.g., to denote
GR/M02606 that a set has two or more elements.

1
B Libraries
A C Copies
a
collection
OnHold
Fig. 1: An example spider diagram.
Fig. 1 is a simple spider diagram consisting of three spi- Publications
publication
ders and three contours. The figure uses various visualiza-
tion techniques to specify that
jA B j = 2 Reservations onHoldFor
C\A=C \B =;
a 2 ((B C ) A) [ ((C A) B)
reserved

Spiders may be connected by strands or ties in a region,


to indicate that elements denoted by the spiders may or must
Fig. 2: A constraint diagram.
be the same in that region. Further, a region containing spi-
ders may also be shaded to denote that there are no elements contain them, and arrows as showing the range of relations
in that region other than those shown by the spiders. Thus, when their domain is restricted to the set or element at their
spider diagrams allow placing both an upper bound and a source. Spider diagrams are used to show relationships be-
lower bound on the size of a set. Among other extensions tween all the sets and elements involved. In fact, spider
to traditional notation we find in spider diagrams the notion diagrams can be thought of as constraint diagrams without
of “projections” which are used to show the intersection of the arrows.
more than three curves in a clear and uncluttered manner. Constraint diagrams proved to be an intuitive and useful
Spider diagrams have emerged from a succession of at- tool for design, and several extensions of these were pro-
tempts to provide the software designer with precise, yet posed, including a variant designed for expressing pre- and
intuitive tools to specify a system prior to actually coding post-conditions pairs [9], a three dimensional version for
it. Work along this line of research can be traced all the way behavioral specification [3], and a version used for meta-
back to Harel’s seminal state-charts. It was only the sound specification, i.e., the specification of design patterns [10].
mathematical foundation which they stand upon that en- At the same time, constraint diagrams were employed in
abled the development of “executing” CASE tools [6]. With the software industry to produce informal descriptions of
the advent of the object-oriented paradigm, and the mod- systems.
ernization of software design, came a series of notations, Spider diagrams, the most fundamental layer of con-
for example BON [17], OML [2], and the celebrated UML straint diagrams, are the subject of this treatise. Our ef-
standard [13]. Most of these visual languages are quite re- forts towards upgrading the language into a true “visual for-
stricted in their expressive power in lacking provisions for malism” [5], include the discussion of the essential syntax,
denoting first order predicate logic formulae, which are so semantics and properties of spider diagrams, treating them
essential for describing system invariants. Such formulae both as topological and notational creatures. Following the
are written using either in-borrowed mathematical notations work of Shin [15] and Hammer [4] we show how formal se-
(as in BON), in an auxiliary specialized textual language de- mantics in the form of logical formulae for spider diagrams
signed for that purpose, e.g., OCL [18], or worse, as natural can be given.
language annotations (as was the case with OML). Beyond visual software modeling, spider diagrams have
Spider diagrams have emerged from work on constraint an impact on the field of diagrammatic reasoning, a rela-
diagrams [8], which were introduced as an attempt to rem- tively new field which looks at logic and logical reasoning
edy this situation. The constraint diagram in Fig. 2 ex- from a wholly new perspective. Such extensions are dis-
presses (amongst other constraints) an invariant on a model cussed in [7].
of a library system: for any library object, and any copy of Outline. The remainder of this paper is organized as fol-
that library which is on hold, that copy’s publication must lows. Sec. 2 defines the syntax, and provides an informal
be the same as that associated with the reservation for which semantics which helps to motivate and explain the vari-
it is on hold ous syntactic elements. This section treats spider diagrams
8x 2 Libraries  8y 2 x:collection \ OnHold  as topological creatures. A formal definition of spider di-
y:OnHold:reserved = y:publication:
agrams as a notational device devoid of geometrical and
topological undertones is given in Sec. 3. This definition
This reading is obtained by interpreting the *s as wild- is then used in Sec. 4 to provide formal semantics of the
cards, universal quantifiers ranging over the regions which notation. Sec. 4 also quotes the main result in the study
B C
A
(a) (b) (c)

Fig. 3. The three possible relationships between two contours: in-


Fig. 4: One possible relationship between three contours..
tersection (a), disjointness (b), and containment (c).
of spider diagrams, namely that all legal diagrams are con-
sistent. Finally, Sec. 5 concludes the paper and describes
future research. Due to space limitations proofs are omitted
from this paper. Similarly, some definitions, which were
overly technical, were abridged.

2. Syntax and Informal Semantics


2.1. Contours
Contours are shapes used in a spider diagram to denote sets.
Formally, a contour is a closed non-self-intersecting plane
curve.
Although it is convenient to draw contours as ovals, this
is not mandatory. Other topologies may be used for mak- (a) (b)
ing a visual distinction between different kinds of contour.
Fig. 5: Contours (a) and zones (b) in a clover.
For example, in object-oriented modeling, rectangle con-
tours are used to indicate that a set corresponds to a class Part of the challenge in giving precise semantics to spider
of objects. Since convex contours tend to be more visually diagrams is in systematically dealing with the general case
pleasing we usually try to draw them as such. of relationships among any number of contours.
Different iconic representations, or line styles, may be A contour can be labeled. By convention, contour labels
used to distinguish between different kinds of contours. In are initially capitalized.
state-chart diagrams for example, thick lines may be used
to denote initial states. We will also use dashed lines to 2.2. Districts, Regions and Zones
denote projections, which are a special kind of contour. All The meaning of a diagram is obtained from the topology of
concepts described in this section are independent of the the contours in it. The terms district, region, and zone will
chosen shape or the iconic representation of a contour. become pertinent in the study of this topology.
A diagram contains at least one contour, called the A district (sometimes called a basic region) is the set of
boundary contour. The boundary is a contour which is not points in the plane enclosed by, or lying on, a contour. The
contained in, nor does it intersect with, any other contour. district of the boundary contour is called the domain since it
We do not usually bother to draw the boundary contour: it consists of all points of the diagram. By definition, a district
is assumed to be the bounding box for the diagram, be it the is a connected set. Also, since a district includes the points
edges of the drawing surface, the edges of a figure, etc. on the contour itself, topologically it is a closed set. Fig. 5a
Excepting the boundary, all contours in a Venn diagram shows the districts of a clover—three mutually intersecting
must intersect. We do not require this property in spider non-boundary contours.
diagrams. In spider diagrams, just as in Euler circles, two The regions of a diagram are the non-empty sets which
contours can stand in one of three relations (Fig. 3). An can be formed from its districts by means of set union, inter-
intersection between the contours will mean that the sets section and difference operations. More formally, a region
they denote may intersect. Thus, with the absence of any has the following recursive definition: Any district is a re-
other information, no statement is being made of the rela- gion, and in addition, for any two regions r1 and r2 , the
tionship between these two sets. If the contours do not inter- set r1 [ r2 is a region, as are the sets r1 \ r2 and r1 r2
sect, then they are either disjoint, with the implication that provided they are not empty.
their denoted sets are disjoint, or one of of them is contained Regions are not necessarily closed, nor do they have
in the other, with a corresponding implication on the rela- to be connected. For example, the region corresponding
tionship between the sets they denote. to (A C ) [ (A B ) in Fig. 4 is not connected, neither it
There is a much greater variety of relationships among is a closed set, nor an open one.
more than two contours. Consider for example Fig. 4, in We insist that the number of contours in a diagram is
which one contour is contained in the “union” of two oth- finite. It follows that there are regions which are minimal
ers. The intended semantics is of course that A  B [ C . with respect to set containment. This special kind of region
B A Sets of points

,
D C
E Regions
Districts Zones
Fig. 6: An example of using zone labels.
is a called zone. Formally, a zone (or a minimal region) is
a region having no other region as a proper subset. Notice
that a zone does not have to be connected. For example, Fig. 7. The set-theoretical relationship between zones, districts and
in Fig. 4, the zone corresponding to (B \ C ) A is not regions.
connected. Districts Zones
Fig. 5 shows all but one of the zones of the clover. The domain
zone not shown is that which is formed by subtracting the
districts of all non boundary contours from the domain.
It is not difficult to see that contours partition the do- Fig. 8: The spider of the domain.
main into disjoint zones. Accordingly, we have that all members, we need a new shape: the spider, which is used
the regions can be generated by taking the union of any to denote elements. Spiders are similar to X-sequences, or
non-empty collection of zones. The clover, for example, chains, in Peirce diagrams, except that unlike X-sequences,
has 28 1 = 255 regions in total, which is the number of spiders must be distinct (unless they are joined by a tie or
non-empty ways its eight zones can be combined. by a strand, see below).
A zone can also be a district, as it the case for two out The visual representation of a spider is as a tree with
of the three zones of Fig. 3b. However, it follows from the nodes, called feet. A foot is a drawn as a little black circle
definition that a zone is either completely contained in a or square, and the connecting edges, the legs of the spider,
district, or it disjoint from it. This dichotomy suggests a are drawn as straight lines. We chose the tree representation
canonical method for denoting zones. instead of the linear structure of X-sequence used in tradi-
Definition 1 Let C be a set of contours, and let b 2 C be a
tional Venn-Peirce diagrams since we found that the greater
special boundary contour. Then, the pair hC1 ; C2 i is called
flexibility enables more visually pleasing diagrams.
a contour division if b 2 C1 , C1 \ C2 = ; and C1 [ C2 = C .
We say that a spider touches a zone if it has a foot in
that zone. No spider may touch the same zone twice. A
For a zone z , let C + (z ) be the set of contours that con- spider inhabits the region formed by the union of all the
tain it, and let C (z ) be the set of contours that don’t. zones that the spider touches. This region, called the habitat
Then, hC + (z ); C (z )i is a contour division of the contours of the spider, is intuitively where the element denoted by the
of the diagram which uniquely identifies z . The converse, spider might reside.
namely that all contours divisions correspond to zones is Spiders can be labeled. By convention, spider labels are
true in Venn diagrams, but may not hold in spider diagrams. all lower case. As a simple reflective example, Fig. 8 shows
Topologically, a zone z is the intersection of the districts that the domain is a district, but it may be in addition a zone
of C + (z ), minus the union of districts of C (z ). For exam- (this happens if a diagram has no contours other than the
ple, the zone highlighted in Fig. 5b is calculated by taking boundary).
the intersection of the sets denoted by the contours high- There is a slight semantical difference between spiders
lighted with solid border in Fig. 5a and subtracting the set with circles as feet and spiders with squares as feet. A spi-
denoted by the contour highlighted with a dashed border. der whose feet are circles corresponds to existential quan-
Zones can be optionally labeled. By convention a zone tification. Thus, in Fig. 1, the semantics of the two left most
label is underlined, initially uppercase and placed inside its spiders is that there are two distinct anonymous elements
zone. Using this convention we can read now read Fig. 6 in A B . A spider whose feet are squares represents a
and determine that its semantics is (among other things) given element. The semantics of Fig. 8 is that the specific
A (D [ C ) = A \ B = E: element called “domain” is a member of the set “Districts”.
A more elaborate example is given in Fig. 9. The seman-
The spider diagram Fig. 7 summarizes (in a reflective tics is that there exists a, b, c such that
fashion) some of the terms introduced above: regions are
sets of points, districts and zones are regions, and there b 2 (B C ) [ (C A)
might be zones which are also districts. a 2 (A B) C
2.3. Spiders c 2 (U A) B
So far, our expressive power was limited to sets and their re- where U is the universal set denoted by the boundary con-
lationships. In order to be able to make statements about set tour. In addition, the semantics includes the condition that
A B Zones
a b Shaded Unshaded

c Fig. 11: Shaded and unshaded zones.


C A B C

Fig. 9: Three spiders in a clover example.


A B A B
Fig. 12: Specifying cardinality with spiders.
b b and t is the union of zones z having the property that there
is a sequence of spiders
s = s0 ; s1 ; s2 ; : : : ; sn = t
such that, for i = 0; : : : ; n 1, si and si+1 are connected
D D
a a =
C C by a tie or by a strand in z . So the nest of spiders s and t is a
subregion of the web of spiders s and t. Two spiders s and
(a) (b)
t may (but not necessarily must) denote the same element
Fig. 10: Strands (a) and ties (b) in a spider diagram. if that element is in the set denoted by the web of s and t.
all elements are distinct, i.e., a 6= b, b 6= c, and a 6= c. Clearly, if there is a tie between feet, then a strand between
those feet is redundant. Similarly, multiple strands or ties
2.4. Strands and Ties between the same pairs of feet are redundant.
We introduce the notion of strands and ties to provide a 2.5. Shading and Schrödinger Spiders
means for denoting that spiders may (or must) be the same
should they occur in a certain zone. Venn-Peirce diagrams use shading to specify that a zone is
The increased expressivity does not come at the cost of empty. Hence, a shaded zone in Venn-Peirce diagrams may
visual clarity. There is an intuitive and concise iconic rep- not contain an X-sequence. This condition is relaxed in spi-
resentation for both strands and ties. Suppose that nodes der diagrams, and a shaded zone may contain spiders. The
of two spiders placed in the same zone, are connected by a semantics of a shaded zone is that the set it denotes may not
“strand”, drawn as a wavy line, as shown in Fig. 10a. Then, contain elements other than those indicated by the spiders
this means that the elements that these spiders denote may which touch that zone. A shaded zone which has no spiders
be the same if they occur in this zone. In Fig. 10a elements a is thus empty, in agreement with Venn-Peirce notation. As
and b are required to be distinct only if they are not members shown in Fig. 11, zones are either shaded or unshaded.
of the zone D. Just like labels, shading is not technically part of the ge-
Dually, if the same two nodes are connected by a “tie”, ometry of a diagram. They are rather a property of a set of
drawn as a double straight line resembling an equal sign its points. It is still useful to render shaded zones by actually
(see Fig. 10b for an example), then the two elements must be shading them as in Fig. 11. Although visually appealing,
the same if they occur in the same zone. Thus, the semantics rendering a zone shaded is difficult to draw freehand. An-
other alternative for a visual indication of shading is placing
a  symbol in the zone.
of Fig. 10b is also that
(a 2 D ^ b 2 D) ) a = b: Spiders can be used to place a lower bound on the num-
The nest of spiders s and t is the union of those zones z ber of elements in a set. In Fig. 12, we have that
having the property that there is a sequence of spiders jA Bj  2
s = s0 ; s1 ; s2 ; : : : ; sn = t j(B A) C ) [ (C B )j  1:
such that, for i = 0; : : : ; n 1, si and si+1 are connected Shading a zone which includes spiders has the effect of
by a tie in z . Two spiders which have a non-empty nest are placing an upper bound on the cardinality of elements in
referred to as mates. If both the elements denoted by spiders the set denoted by that zone. In Fig. 13a, the set A contains
s and t are in the set denoted by the same zone in the nest exactly 2 elements; the two spiders in the zone mean lower-
of s and t, then s and t denote the same element. bound of 2 on its size, the shading of the zone ensures that
A strand is a wavy line connecting two feet, from differ- this is also an upper-bound. Also, B contains at most 3
ent spiders, placed in the same zone. The web of spiders s elements; it may contain less as the elements denoted by
C B C
B
c A
c X2
B C
a A (A) X1
B a C A X
b b D D

(a) (b)
D = = = = D
(a) (b) Fig. 15: A projected set (a) and its semantics (b).

Fig. 13. Specifying cardinality with shading and spiders (a) and
2.6. Projections
the effect of ties (b). Sometimes it is necessary to show a set in a certain context.
Intersection can be used for just this purpose: an intersec-
tion of A and B shows the set A in the context of B and
b
a vice-versa. However, intersections also introduce regions
C A
B which may not be of interest. Projections are equivalent
c D to taking the intersection of sets, except that they introduce
fewer regions, with the effect that regions which are not the
Fig. 14: Using Schrödinger spiders. focus of attention are not shown resulting in less cluttered
diagrams.
spiders a, b and c may be selected from other zones. In the A projection is a contour which is used to denote an
same fashion we have that 1  jC j  3. intersection of a set with a “context”. By convention, we
In Fig. 13a, jB j and jC j are related: the more elements use dashed iconic representation to make the distinction be-
in B the less in C , and vice-versa. To avoid this depen- tween projections and other contours.
dency, an exclusive element could be introduced into the A determining label must be associated with any pro-
universal set, i.e., an element which is not a member of any jection p. This label is used to denote the set which is be-
of the sets represented by the other contours. In Fig. 13b, ing projected. The convention is that determining labels are
the same restrictions on jB j and jC j are in force, but this rendered within parenthesis when drawn in a diagram. A
time if a, b and c denote elements in B this has no impact projection can also have a contour label.
on on jC j, as the habitats of these spiders do not include C . Consider Fig. 15(a) for example. The dashed contour, la-
The price is the introduction of the constraint that jDj  1 beled X , denotes the set obtained by “projecting” the set A
when jB j = jC j = 0. onto the context (D [ C ) B , i.e.,
Besides being awkward to draw, and being less than im- X = A \ ((D [ C ) B)
mediately intuitive, the exclusive element of the universal
The same semantics could have been obtained by using
set is undesirable since it forces an unnatural constraint on a
More’s algorithm [12] to draw the Venn diagram of four
diagram. We fix the situation by introducing a new symbol,
contours, as in Fig. 15(b)
the Schrödinger spider, which denotes a set whose size is
either zero or one. Just like Schrödinger’s cat one is not sure X =X [X :1 2
whether the element exists or not. Formally, a Schrödinger
The simplicity of Fig. 15(a) when compared to Fig. 15(b) is
spider is nothing but a kind of a spider, whose semantics is
self evident.
specialized.
As noted above, the semantics of a projection is deter-
The feet of a Schrödinger spider are rendered differently mined by its context, defined by:
from normal non-Schrödinger spiders. An example is given
in Fig. 14, in which zone B contains three Schrödinger spi- Definition 2 The context of a contour c, denoted (c) is the
ders, labeled a, b, and c, while region C contains two un- smallest region that strictly contains the district of c.
labeled Schrödinger spiders. In comparison with Fig. 13b, Strictness ensures that the district itself is not the region
Fig. 14 is less cluttered, and does not force an element into containing the contour. A projection p denotes the set ob-
zone D. tained by intersecting the set denoted by its determining la-
There is a limit to the amount we can express in this no- bel with the set denoted by (p). It must be possible to
tation about the cardinality of sets. For example, we are calculate the set denoted by (p) from the sets denoted by
unable to say that jAj = jB j for a disjoint sets A and B . contours other than p itself.
In order to retain the intuitiveness of spider diagrams, con- There are fascinating mathematical intricacies involving
straints such as this should be placed in an auxiliary textual the intersection of several projections. Due to space con-
annotation, not burdening the visual notation. straints, we will not be able to discuss these here, nor shall
we be able to give the full semantics or even the exact defi- Theorem 1 All spider diagrams are self-consistent.
nition of projections.
The proof is based on the construction of the topological
3. Formal Syntax of Spider Diagrams model of a spider diagrams. The details are omitted.
The definition of a model and compliance have a
In this section we give spider diagrams a formal definition straightforward extension to a spider multi-diagram D. The
which is independent of any topological and visual repre-
sentations thereof. For space reasons, the definition of pro-
U
semantics predicate PD ( ) is simply the conjunction of the

^ Pd(U):
semantics predicate of the individual diagrams:
jections is omitted from this paper.
A spider diagram is a tuple P D (U ) =
hC ; ; Z ; Z ; R; S ; S  ; ; ; ; i d2D

whose components are defined as follows: Thm. 1 does not extend to multi-diagrams. The reason is
(i) C is a finite set whose members are called contours. that it is possible to simultaneously denote that a certain set
The element , which is not a member of C , is called is empty in one diagram and non-empty in another diagram.
the boundary contour. Since non-given spiders are existentially quantified, we
(ii) The set Z  2C is the set of zones, while Z   Z is must map them into formal variables. A non-given spider is
the set of shaded zones. A zone z 2 Z is incident on mapped into a formal variable which will existentially range
a contour c 2 C if c 2 z . U
over .
(iii) R is the set of regions, and let R0 = R [ ;. Let s1 ; : : : ; sk denote the non-given non-Schrödinger
(iv) S is a set of spiders, while S   S is a set of spiders, and let sk+1 ; : : : ; sk+l denote the non-given
Schrödinger spiders. Schrödinger spiders. Let 0 = U U
[ f?g, then, predicate
(v) The function  : S ! R returns the habitat of a U
Pd ( ) is
spider. The function  : S  S ! R0 returns the
nest of any two spiders, while  : S  S ! R0 is a 9xs1 2 U      9xsk 2 U 
function that returns the web of any two spiders. 9xsk+1 2 U0      9xsk+l 2 U0  Q
In addition, we use the value ?, which is not a member
of any of the sets we mention, to denote undefined values. where Q is a predicate involving no quantifiers defined by

Q = Q1 ^ Q2 ^ Q3 ^ Q4 ^ Q5 ^ Q6
We use the dot notation to extract components of a tuple.
Thus, d:Z denotes the zones of a diagram d.
A spider multi-diagram is a collection D of spider dia- and the predicates Qi , i = 1; : : : ; 6 are expanded below.
grams. The function maps the contours of d to subsets of . U
Let us extend its definition to include the interpretation of
4. Formal Semantics other elements of d which are to denote sets in the model:
A model for a spider diagram (i) Boundary. The boundary denotes the universal set.

d = hC ; ; Z ; Z  ; R; S ; S  ; ; ; ; i
( ) = U
(ii) Zones. The semantics of a zone z 2 Z is determined
is a triple
\ [
by which contours enclose it and which don’t
(z ) = (c) (c)
m = hU; ; i
c2z_c= c2C z
U is a set and and are functions:
such that By letting the set intersection operation range over the
 : S ! U [ f?g maps given spiders to elements of boundary contour, we make sure that even the zone
U or to the special symbol ?, and that is external to all contours has a well-defined se-
mantics.
 : C ! 2U maps contours to subsets of U. (iii) Regions. The value of of a region, or more gen-
Given a diagram, we will define a predicate Pd (), called
erally any other collection of zones is simply the
union of the semantics of the zones in the collection:
its semantics predicate. A model complies with a diagram d
For r 2 2Z f;g, let
U
if it satisfies its semantics predicate, i.e., Pd ( ) is true. A
(r) =
[ (z )
diagram is consistent if it has a compliant model. As shall
become easy to see, the empty set is compliant with any z2Z (r)
legal diagram d which has no spiders, i.e., d:S = ;. Our where, for any region r, Z (r) is the set of zones con-
main result is tained in r.
Predicate Q1 (the plane tiling condition) ensures that all 5. Conclusions and Further Work
elements fall within sets denoted by zones:
[ (z) = U This is the first of a two part semantics for constraint di-
agrams. The second part will deal with the semantics of
arrows. We have begun to explore rules for reasoning di-
z2Z rectly with the diagrams, building on recent work in reason-
ing with Venn diagrams and Euler circles. Early results look
This predicate, means that that an intersection of contours
promising, see [7] for details. It is our eventual aim to de-
that doesn’t appear as a zone must be empty. From it fol-
velop tools to support conceptual modeling, including the
lows our intuitive interpretation of disjoint contours and
modeling of software, based on these formal results. The
containing contours: Let c1 and c2 be two distinct con-
formal work goes hand in hand with attempts to popularize
tours in a topological diagram. Then, it follows from the
and obtain feedback on the utility of the notation.
plane tiling condition that if c1 is disjoint from c2 , then
(c1 ) \ (c2 ) = ;. Similarly, if c1 is contained in c2 then
it follows from that condition that (c1 )  (c2 ). References
Predicates Q2 (the spider condition) and Q3 (the [1] L. Euler. Lettres a Une Princesse d’Allemagne, volume 2.
Schrödinger spider condition) ensure that an element de- 1761. Letters No. 102–108.
noted by a spider is in the set denoted by the habitat of the [2] D. Firesmith and B. Henderson-Sellers. Open Modeling
spider: Language (OML) notation specification. By the OPEN Con-

Q2 =
^ (s) 2 ((s)) sortium, 1996.
[3] J. Gil and S. Kent. Three dimensional software modelling.
In Proceedings of International Conference in Software En-

Q3 =
^ (s) 2 ((s)) [ f?g
s2S S 
gineering, Kyoto, Japan, May 1998. IEEE Press.
[4] E. Hammer. Logic and Visual Information. CSLI Publica-
s2S  tions, 1995.
[5] D. Harel. On visual formalisms. In J. Glasgow, N. H.
Narayanan, and B. Chandrasekaran, editors, Diagrammatic
Predicate Q4 (the strangers condition) ensures that ele-
Reasoning, pages 235–271. MIT Press, 1998.
ments denoted by two distinct spiders are equal then they [6] D. Harel, H. Lachover, A. Naamad, A. Pnueli, M. Politi, R.
must fall within the set denoted by their web:
^
Sherman, A. Shtull-Trauring and M. Trakhtenbrot. Statem-
ate: A working environment for the development of complex
(s) = (t) ) (s) = ? _ reactive systems. IEEE Transactions on Software Engineer-
s;t2S ;s6=t ing, 16(4), 403-414, 1990.
(s) 2 ( (s; t)) [7] J. Howse, F. Molina, J. Taylor, S. Kent. Reasoning with
Spider Diagrams. In Proceedings of IEEE Symposium on
Visual Languages (VL99), IEEE Press, 1999.
Predicate Q5 (the mating condition) ensures that if the el- [8] S. Kent. Constraint diagrams: Visualising invariants in ob-
ements denoted by two distinct spiders fall within the set ject oriented models. In In Proceedings of OOPSLA97,
denoted by their nest, then these elements must be equal:
^ ^
ACM SIGPLAN Notices 32, 1997.
[9] S. Kent and Y. Gil. Visualising action contracts in oo mod-
(s); (t) 2 (z ) ) (s) = (t) elling. IEE Proceedings Software, 1998. 145.
s;t2S z2Z ( (s;t)) [10] A. Lauder and S. Kent. Precise visual specification of de-
sign patterns. In Proceedings of ECOOP98, Springer Ver-
lag, 1998.
Finally, predicate Q6 (the shading condition) maintains
[11] R. Lull. Ars Magma. Lyons, 1517.
that the set denoted by a shaded zone contains no elements [12] T. More. On the construction of Venn diagrams. Journal of
other than those denoted by spiders
^ (z)  [ f
Symbolic Logic, 24, 1959.
[13] OMG. UML 1.1. specification. OMG Documents
(s)g ad970802-ad970809, 1997.
z2Z  s2S [14] C. Peirce. Collected Papers. Harvard Univ. Press, 1933.
[15] S.-J. Shin. The Logical Status of Diagrams. CUP, 1994.
Here we adopt the standard convention that a union over [16] J. Venn. On the diagrammatic and mechanical representation
of propositions and reasonings. Phil.Mag., 1880. 123.
an empty range results in the empty set. Together with the
[17] K. Walden and J.-M. Nerson. Seamless Object-Oriented
spider condition, Q6 ensures that the only elements in a set Software Architecture: Analysis and Design of Reliable Sys-
denoted by a shaded zone are the elements represented by tems. Object-Oriented Series, Prentice-Hall, 1994.
any spiders impinging on that zone. Specifically, the set [18] J. Warmer and A. Kleppe. The Object Constraint Language:
denoted by a shaded zone not containing feet of any spiders Precise Modeling with UML. Addison-Wesley, 1998.
is empty.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy