Higraphs, a Visual Formalism - The Modelling, Simulation and...

22
Higraphs, a Visual Formalism abstract and concrete visual syntax + basic semantics refined in specific formalisms such as Statecharts visualizing complex information in a compact fashion visualizing non-quantitative, structural information use topological, not geometrical constructs combine: 1. Venn diagrams (Jordan curve: inside/outside): enclosure, intersection 2. hypergraphs (extending graphs) David Harel. On visual formalisms. CACM, 31(5):514-530, May 1988. COMP 304 [email protected] Higraphs 1/22

Transcript of Higraphs, a Visual Formalism - The Modelling, Simulation and...

Higraphs, a Visual Formalism

• abstract and concrete visual syntax + basic semantics

refined in specific formalisms such as Statecharts

• visualizing complex information in a compact fashion

• visualizing non-quantitative, structural information

⇒ use topological, not geometrical constructs

⇒ combine:

1. Venn diagrams (Jordan curve: inside/outside):

enclosure, intersection

2. hypergraphs (extending graphs)

David Harel. On visual formalisms. CACM, 31(5):514-530, May 1988.

COMP 304 [email protected] Higraphs 1/22

Higraphs 1. Venn diagrams, Euler circles

R

P Q

B

A

• visual syntax: topological notions (as opposed to geometrical)

insideness, enclosure, intersection, exclusion

• semantics: mathematical set operations

subset (B ⊂ A), union (P ∪ Q), intersection (P ∩ Q), difference

(P \ Q)

COMP 304 [email protected] Higraphs 2/22

Higraphs 2. Hypergraphsa

b c

de f g

h i

a graph a hypergraph

• syntax: topological notion of connectedness

• semantics: relations between sets

graph: edges encode a binary relation G ⊆ X × X

hypergraph: hyperedges encode non-binary relation

HG ⊆ 2X (undirected), HG ⊆ 2X × 2X (directed).

COMP 304 [email protected] Higraphs 3/22

Higraphs

Combine:

1. sets + cartesian product

2. hypergraphs

COMP 304 [email protected] Higraphs 4/22

Visual syntax: blobsA

D

E

• syntax: blob

• semantics: set

• syntax: insideness

• semantics: subset ⊂ (not membership ∈)

COMP 304 [email protected] Higraphs 5/22

Unique Blobs

B

A

C

P

Q R

S

U

E

K

L

M

N

O

P

W

T

V F

D

X

• syntax: empty space

• semantics: meaningless, must identify intersection explicitly

⇒ atomic blobs are identifiable sets (e.g., A ∩ D identified as B)

• syntax: non-atomic blobs (contain other blobs)

• semantics: union of enclosed sets (e.g., K = L ∪ M ∪ N ∪ O ∪ P )

COMP 304 [email protected] Higraphs 6/22

syntax: orthogonal componentssemantics: unordered cartesian product ⊗

syntax:

B

A

C

P

Q R

S

U

E

K

L

M

N

O

P

W

X

Y

T

V F

D

G H

semantics:

K = G ⊗ H = (L ∪ M) ⊗ (N ∪ O ∪ P )

COMP 304 [email protected] Higraphs 7/22

Meaningless constructs

A C

DB

• syntactically possible, semantically nonsense

• alternative semantics might give meaning to these constructs

COMP 304 [email protected] Higraphs 8/22

Simple Higraph

J

blobs orthogonalcomponents

A

B D

EC

F L

I

HG

K

M

COMP 304 [email protected] Higraphs 9/22

AND/OR levels

or: meaning of blobs (e.g., K and L) in an orthogonal component:

K ∪ L ⇒ in K or in L.

and: meaning of orthogonal components (e.g., A1 and A2):

A1 ⊗ A2 ⇒ in A1 and in A2.

COMP 304 [email protected] Higraphs 10/22

Induced Acyclic Graph (blob/orth compalternation)

����

����

����

����

����

����

����

��������

����

����

��������

����

����

����

����

����

����

����

��������

����

����

����������������������������������������

����������������������������������������

�������������������������������������������������������������������������������������������������������������������������

�������������������������������������������������������������������������������������������������������������������������

����������������������������������������������������������������������

����������������������������������������������������������������������

������������������������������

������������������������������

����������������������������������������

����������������������������������������

����������

����������

����������

����������

����������

����������

����������������������������������������

����������������������������������������

������������������������������

������������������������������

����������

����������

������������������������������������������������������������

������������������������������������������������������������

����������

����������

������������������������������

������������������������������

������������������������������

������������������������������

����������

����������

������������������������������

������������������������������

����������������������������������������

����������������������������������������

hc j

kf

i

ed l

b

OR level (blob level)

AND level (orthogonal component level)

OR level

AND level

OR level

g a

m

COMP 304 [email protected] Higraphs 11/22

Adding (hyper) edges

A

P

Q RU

K

L

M

N

P

W

X

Y

T

V F

D

S

O

C

B

E

• syntax: hyperedges

• syntax: attach ends to contour of any blob, inter-level possible

• semantics: known for blobs and hyperedges, but combination ?

COMP 304 [email protected] Higraphs 12/22

Syntax . . . Semantics ?

A B C

D E

COMP 304 [email protected] Higraphs 13/22

Fully connected semantics (clique)

A

B

C

DE

COMP 304 [email protected] Higraphs 14/22

Entity Relationship Diagram

WORKSFOR

EMPLOYEES

ISA

PAID ON

ISA

PILOTS

CANFLY AIRCRAFT

SALARIES

DATES

SECRETARIES

COMP 304 [email protected] Higraphs 15/22

Higraph version of E-R diagram

employees

others

pilots

for

paidon

dates

months

canfly

equipment

aircraftnuts

bolts

arrivedin

years

...

...secretaries

works

salaries

replace is-a relationship by insideness

COMP 304 [email protected] Higraphs 16/22

Extending the higraph is easy

employees

for

paidon

canfly

secretaries

others

pilots

men women

works

married

try this in E-R . . .

COMP 304 [email protected] Higraphs 17/22

Formally (syntax)

A higraph H is a quadruple

H = (B, E, σ, π)

B: finite set of all unique blobs

E: set of hyperedges

⊆ X × X, ⊆ 2X , ⊆ 2X × 2X

The subblob (direct descendants) function σ

σ : B → 2B

σ0(x) = {x}, σi+1 =⋃

y∈σi(x)

σ(y), σ+(x) =+∞⋃

i=1

σi(x)

COMP 304 [email protected] Higraphs 18/22

Subblobs+ cycle free

x 6∈ σ+(x)

The partitioning function π associates equivalence relationship with x

π : B → 2B×B

Equivalence classes πi are (by definition) orthogonal components of x

π1(x), π2(x), . . . , πkx(x)

kx = 1 means a single orthogonal component (no partitioning)

Blobs in different orthogonal components of x are disjoint

∀y, z ∈ σ(x) : σ+(y) ∩ σ+(z) = ∅

unless in the same equivalence class

COMP 304 [email protected] Higraphs 19/22

Simple Higraph

J

blobs orthogonalcomponents

A

B D

EC

F L

I

HG

K

M

COMP 304 [email protected] Higraphs 20/22

Orthogonal Components induced by π

B = {A, B, C, D, E, F, C, G, H, I, J, K, L, M}

E = {(I, H), (B, J), (L, C)}

ρ(A) = {B, C, H, J}, ρ(G) = {H, I}, ρ(B) = {D, E}, ρ(C) = {E, F},

ρ(J) = {K, L, M}

ρ(D) = ρ(E) = ρ(F ) = ρ(H) = ρ(I) = ρ(K) = ρ(L) = ρ(M) = ∅

π(J) = {(K, K), (K, L), (L, L), (L, K), (M, M)}

Induces equivalence classes π1(J) = {K, L} and π2(J) = {M}, . . .

These are the orthogonal components

COMP 304 [email protected] Higraphs 21/22

Higraph applications

• E-R diagrams

• object-model diagrams

Example use in

David Harel and Eran Gery. Executable object modeling with

statecharts. IEEE Computer, pages 31-42, 1997.

• UML activity diagrams

• Statecharts

COMP 304 [email protected] Higraphs 22/22