Ten Virtues of Structured Graphs (or why structured graphs can be - - PowerPoint PPT Presentation

ten virtues of structured graphs
SMART_READER_LITE
LIVE PREVIEW

Ten Virtues of Structured Graphs (or why structured graphs can be - - PowerPoint PPT Presentation

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks Ten Virtues of Structured Graphs (or why structured graphs can be better than flat ones) Roberto Bruni also based on join work with F. Gadducci, A. Lluch-Lafuente, U.


slide-1
SLIDE 1

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Ten Virtues of Structured Graphs

(or why structured graphs can be better than flat ones) Roberto Bruni

also based on join work with F. Gadducci, A. Lluch-Lafuente, U. Montanari, E. Tuosto

Department of Computer Science, University of Pisa bruni@di.unipi.it

Research supported by March 28-29, 2009, GT-VMT’09, York, UK

Ten Virtues of Structured Graphs (GT-VMT’09) 1/45

slide-2
SLIDE 2

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Outline

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Ten Virtues of Structured Graphs (GT-VMT’09) 2/45

slide-3
SLIDE 3

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

GT-VMT 2009

◮ Graph-based techniques

◮ formal semantics, concurrency, logics, verification, tools

◮ Visual modelling

◮ project planning, network management, traffic control,

business processes, software architectures, www site design, and many more...

◮ Modern software and Sensoria project (service-oriented

computing)

◮ key issues such as scalability, representation distance,

  • pen-endedness, dynamicity, distribution

◮ within specification, design, validation and verification phases Ten Virtues of Structured Graphs (GT-VMT’09) 3/45

slide-4
SLIDE 4

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Sensoria Poster Collage (http://www.sensoria-ist.eu)

Ten Virtues of Structured Graphs (GT-VMT’09) 4/45

slide-5
SLIDE 5

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

All That Graphs

n0 n1 n2 n3 n4 n5 n6 n7 n8 n9 n0 a1 a2 a3 a4 n1 a5 a6 a7 a8 a9 a10 n2 a11 a12 a13 a14 a15 n3 a16 a17 a18 a19 a20 a21 a22 a23 a24 n4 a25 a26 a27 a28 n5 a29 a30 a31 a32 a33 n6 a34 a35 n7 a36 a37 a38 n8 a39 a40 a41 a42 a43 n9 a44 a45 a46 a47 a48

Ten Virtues of Structured Graphs (GT-VMT’09) 5/45

slide-6
SLIDE 6

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

All That Graphs

Ten Virtues of Structured Graphs (GT-VMT’09) 5/45

slide-7
SLIDE 7

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

All That Graphs

Our choice

Ten Virtues of Structured Graphs (GT-VMT’09) 5/45

slide-8
SLIDE 8

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Scenario: Software Architectures as Graphs

◮ D. Garlan & D. Perry, 1995

◮ “... the structure of the components of a program / system,

their interrelationship, and principles and guidelines governing their design and evolution over time.”

◮ components (and connectors) as hyper-edges

◮ (here represented as boxes of various shapes)

◮ ports (and roles) as tentacles

◮ (here represented as arrows)

◮ attachments as nodes

◮ (here represented as smaller circles)

◮ connectors and attachments are sometimes omitted

Ten Virtues of Structured Graphs (GT-VMT’09) 6/45

slide-9
SLIDE 9

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Why “Spaghetti” Graphs are Considered Harmful

◮ When GT applied to large case studies, graphs better be

structured in order to be comprehensible

◮ Analogies with structured programming and type theory

◮ it is helpful to use graphs that are conveniently formatted and

annotated

◮ discard / ignore non-conformant graphs

◮ Analogies with process calculi

◮ containment and links (as in bigraphs) ◮ dynamics and reconfiguration via inductive, conditional rewrite

rules

Ten Virtues of Structured Graphs (GT-VMT’09) 7/45

slide-10
SLIDE 10

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Our proposal

◮ From graphs to hierarchical hypergraphs

◮ certain hyperdeges can contain hypergraphs that can be

hierarchical themselves

◮ arbitrary depth of nesting

◮ ADR (Architectural Design Rewriting)

◮ graphs + their blueprint (like binaries + source templates) ◮ exploit blueprint for applying formal methods ◮ please visit http://www.albertolluch.com/research/adr

to know more

Ten Virtues of Structured Graphs (GT-VMT’09) 8/45

slide-11
SLIDE 11

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Outline

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Ten Virtues of Structured Graphs (GT-VMT’09) 9/45

slide-12
SLIDE 12

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Visualization can Support Formal Methods

Ten Virtues of Structured Graphs (GT-VMT’09) 10/45

slide-13
SLIDE 13

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Architectural Styles

◮ IEEE standard 1471

◮ “... a set of patterns or rules for creating one or more

architectures in a consistent fashion.”

◮ Style = Vocabulary + Rules

◮ Used to construct and document ◮ Used to describe / explain ◮ Used to understand ◮ Used to validate ◮ Used for conformance check ◮ Used to reason about ◮ To be reused Ten Virtues of Structured Graphs (GT-VMT’09) 11/45

slide-14
SLIDE 14

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Uhm...

Can you spot some “regularity”?

Ten Virtues of Structured Graphs (GT-VMT’09) 12/45

slide-15
SLIDE 15

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Graph Re-drawing

And now?

Ten Virtues of Structured Graphs (GT-VMT’09) 13/45

slide-16
SLIDE 16

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Well...

Another try?

Ten Virtues of Structured Graphs (GT-VMT’09) 14/45

slide-17
SLIDE 17

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Another Graph Re-drawing

Can you describe its “shape” (or style)?

Ten Virtues of Structured Graphs (GT-VMT’09) 15/45

slide-18
SLIDE 18

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Styles from Productions

◮ Legenda: titled boxes as non-terminals, ordinary boxes as

terminals

◮ Several readings are possible:

◮ Refinement ◮ Types (Pipeline) and ops (station and cat(·), based on

hyperedge replacement)

◮ station :→ Pipeline ◮ cat : Pipeline × Pipeline → Pipeline ◮ Abstraction Ten Virtues of Structured Graphs (GT-VMT’09) 16/45

slide-19
SLIDE 19

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Types for Pipelines, Rings and Stars

Ten Virtues of Structured Graphs (GT-VMT’09) 17/45

slide-20
SLIDE 20

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Types and Ops for Pipelines, Rings and Stars

Ten Virtues of Structured Graphs (GT-VMT’09) 18/45

slide-21
SLIDE 21

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Memberships (for Pipelines and Stars)

Ten Virtues of Structured Graphs (GT-VMT’09) 19/45

slide-22
SLIDE 22

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-23
SLIDE 23

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-24
SLIDE 24

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-25
SLIDE 25

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-26
SLIDE 26

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-27
SLIDE 27

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-28
SLIDE 28

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-29
SLIDE 29

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example of Derivation (with “Blueprint”)

Ten Virtues of Structured Graphs (GT-VMT’09) 20/45

slide-30
SLIDE 30

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-31
SLIDE 31

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-32
SLIDE 32

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-33
SLIDE 33

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-34
SLIDE 34

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-35
SLIDE 35

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-36
SLIDE 36

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-37
SLIDE 37

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Simplified Typing and Drawing (“Flattening”)

The corresponding proof term is net ( par ( cast ( node ( cat ( station , cat ( station , station ) ) ) ) , cast ( node ( station ) ) ) ) Or just net ( par ( node ( cat ( station , station , station ) ) , node ( station ) ) ) Note that nodes need not be mentioned

Ten Virtues of Structured Graphs (GT-VMT’09) 21/45

slide-38
SLIDE 38

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Another Example: Workflows

Activities composable in series and in parallel (fork & join): disconnected activity and cyclic parts are not allowed

Ten Virtues of Structured Graphs (GT-VMT’09) 22/45

slide-39
SLIDE 39

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Another Example: Workflows

Is this a well-formed workflow?

Ten Virtues of Structured Graphs (GT-VMT’09) 22/45

slide-40
SLIDE 40

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Another Example: Workflows

Activities composable in series and in parallel (fork & join): disconnected activity and cyclic parts are not allowed

Ten Virtues of Structured Graphs (GT-VMT’09) 22/45

slide-41
SLIDE 41

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Another Example: Workflows

Is this a well-formed workflow?

Ten Virtues of Structured Graphs (GT-VMT’09) 22/45

slide-42
SLIDE 42

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Six Virtues of Structured Graphs

◮ Requirements

◮ Type graphs are ok (and synergic to our approach) but limited ◮ Additional logic languages often needed ◮ We can account for many patterns in a natural way

◮ Parsing and browsing

◮ Large graphs are hard to “understand” and navigate ◮ Their blueprint (if any available) helps quite a lot

◮ Model Construction and Model conformance

◮ Conformance is guaranteed by construction ◮ Otherwise hard to recover from scratch (proof-carrying graphs)

◮ Compositionality and Abstraction & Refinement

◮ Interfaces are needed to constrain composition, but hard to

recover in flat graphs

◮ The hierarchical approach makes them available at any level ◮ Different levels of granularity can be considered Ten Virtues of Structured Graphs (GT-VMT’09) 23/45

slide-43
SLIDE 43

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Six Virtues of Structured Graphs

◮ Requirements

◮ Type graphs are ok (and synergic to our approach) but limited ◮ Additional logic languages often needed ◮ We can account for many patterns in a natural way

◮ Parsing and browsing

◮ Large graphs are hard to “understand” and navigate ◮ Their blueprint (if any available) helps quite a lot

◮ Model Construction and Model conformance

◮ Conformance is guaranteed by construction ◮ Otherwise hard to recover from scratch (proof-carrying graphs)

◮ Compositionality and Abstraction & Refinement

◮ Interfaces are needed to constrain composition, but hard to

recover in flat graphs

◮ The hierarchical approach makes them available at any level ◮ Different levels of granularity can be considered Ten Virtues of Structured Graphs (GT-VMT’09) 23/45

slide-44
SLIDE 44

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Six Virtues of Structured Graphs

◮ Requirements

◮ Type graphs are ok (and synergic to our approach) but limited ◮ Additional logic languages often needed ◮ We can account for many patterns in a natural way

◮ Parsing and browsing

◮ Large graphs are hard to “understand” and navigate ◮ Their blueprint (if any available) helps quite a lot

◮ Model Construction and Model conformance

◮ Conformance is guaranteed by construction ◮ Otherwise hard to recover from scratch (proof-carrying graphs)

◮ Compositionality and Abstraction & Refinement

◮ Interfaces are needed to constrain composition, but hard to

recover in flat graphs

◮ The hierarchical approach makes them available at any level ◮ Different levels of granularity can be considered Ten Virtues of Structured Graphs (GT-VMT’09) 23/45

slide-45
SLIDE 45

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Six Virtues of Structured Graphs

◮ Requirements

◮ Type graphs are ok (and synergic to our approach) but limited ◮ Additional logic languages often needed ◮ We can account for many patterns in a natural way

◮ Parsing and browsing

◮ Large graphs are hard to “understand” and navigate ◮ Their blueprint (if any available) helps quite a lot

◮ Model Construction and Model conformance

◮ Conformance is guaranteed by construction ◮ Otherwise hard to recover from scratch (proof-carrying graphs)

◮ Compositionality and Abstraction & Refinement

◮ Interfaces are needed to constrain composition, but hard to

recover in flat graphs

◮ The hierarchical approach makes them available at any level ◮ Different levels of granularity can be considered Ten Virtues of Structured Graphs (GT-VMT’09) 23/45

slide-46
SLIDE 46

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Outline

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Ten Virtues of Structured Graphs (GT-VMT’09) 24/45

slide-47
SLIDE 47

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Style-Preserving Reconfiguration

◮ A reconfiguration is a change in an architecture

◮ static? e.g. for deployment on different platforms,

improvements, updates, upgrades, model-driven transformation

◮ partially specified? e.g. some components are not known at

design time, except for their types

◮ run-time? e.g. triggered by security policies, load balancing,

mobility, QoS assurance, components joining and leaving the system, dynamic binding, wrapping, self-* architectures

◮ Style-preservation is relevant

◮ from well-formed graphs to well-formed graphs (but possibly

with different shapes)

◮ Examples

◮ reverse all actions in a pipeline, serialize a workflow, star to

ring transformation, migrate all clients of a server, close all sub-sessions upon termination of their parents

Ten Virtues of Structured Graphs (GT-VMT’09) 25/45

slide-48
SLIDE 48

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

How to Write Reconfiguration Rules

◮ Using graph transformation

◮ direct manipulation of flat graphs ◮ applicable in non well-formed graphs ◮ well-formedness of results must be proved ◮ in the flat case: rules manipulate components (many steps

required)

◮ in the hierarchical case: rules manipulate groups of

components (one step can suffice)

◮ Exploiting structured graphs

◮ rules manipulate well-formedness proofs ◮ inductive localization of the least part of the proof where the

change is needed

◮ style-preserving by construction Ten Virtues of Structured Graphs (GT-VMT’09) 26/45

slide-49
SLIDE 49

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: 3hub Network

Network hubs have three degrees of connectivity and connections are driven by the style (only allowed: some sort of reversed pyramids)

Ten Virtues of Structured Graphs (GT-VMT’09) 27/45

slide-50
SLIDE 50

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: 3hub Network

A valid 3hubs network

Ten Virtues of Structured Graphs (GT-VMT’09) 27/45

slide-51
SLIDE 51

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: 3hub Network

A valid 3hubs network? or maybe not?

Ten Virtues of Structured Graphs (GT-VMT’09) 27/45

slide-52
SLIDE 52

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: 3hub Network

A valid 3hubs network? or maybe not?

Ten Virtues of Structured Graphs (GT-VMT’09) 27/45

slide-53
SLIDE 53

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: 2hub Network

Network hubs have just two degrees of connectivity and connections are driven by the style (only allowed: rings)

Ten Virtues of Structured Graphs (GT-VMT’09) 28/45

slide-54
SLIDE 54

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: 2hub Network

A valid 2hubs network

Ten Virtues of Structured Graphs (GT-VMT’09) 28/45

slide-55
SLIDE 55

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From 3hub Networks to 2hub Networks

◮ Under certain circumstances, it is required to reconfigure any

valid 3hub network to a valid 2hub network

◮ the whole network must be reconfigured (not just part of it) ◮ total number of hubs is unchanged ◮ 2hubs must form a ring

◮ Idea:

◮ exploit blueprint, not the flat graph ◮ reconfiguration is defined inductively on the structure of the

network

◮ exploit conditional rewrite rules Ten Virtues of Structured Graphs (GT-VMT’09) 29/45

slide-56
SLIDE 56

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From 3hub Networks to 2hub Networks

Reconfigure a single 3hub (note that type is changed: some sort of transduction, context must be adapted)

Ten Virtues of Structured Graphs (GT-VMT’09) 29/45

slide-57
SLIDE 57

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From 3hub Networks to 2hub Networks

Reconfigure the link structure (a transduction, again)

Ten Virtues of Structured Graphs (GT-VMT’09) 29/45

slide-58
SLIDE 58

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From 3hub Networks to 2hub Networks

Reconfigure the whole network (note that type is preserved, rewrite is silent, applicable in any larger context)

Ten Virtues of Structured Graphs (GT-VMT’09) 29/45

slide-59
SLIDE 59

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: Rewrite Rules for Network Transformation

3hub 3to2 − → 2hub x1

3to2

− → y1 x2

3to2

− → y2 x3

3to2

− → y3 3link(x1, x2, x3) 3to2 − → 2link(y1, 2link(y3, y2)) x 3to2 − → y 3net(x) − → 2net(y)

Ten Virtues of Structured Graphs (GT-VMT’09) 30/45

slide-60
SLIDE 60

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Three More Virtues of Structured Graphs

◮ Reconfiguration and Evolution

◮ (flat) graph transformation requires ad-hoc studies and

techniques (e.g., negative application conditions, interfaces, atomicity issues), augmenting the representation distance (high expertize, technology transfer more difficult)

◮ structured graph rewrites can be more handy and efficient (e.g.

graph matching not necessarily required)

◮ style preservation: to be proved vs guaranteed by proofs ◮ concurrency? special cases (edge to edge rules)?

◮ Graphical encoding

◮ seamless grouping of item through the hierarchy (e.g. for

representing nested sessions, transactions, scopes)

◮ in the case of process calculi, facilitated by suitable graph

algebras (see next part of the talk)

◮ Encoding properties (soundness, completness) shown by

structural induction

Ten Virtues of Structured Graphs (GT-VMT’09) 31/45

slide-61
SLIDE 61

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Three More Virtues of Structured Graphs

◮ Reconfiguration and Evolution

◮ (flat) graph transformation requires ad-hoc studies and

techniques (e.g., negative application conditions, interfaces, atomicity issues), augmenting the representation distance (high expertize, technology transfer more difficult)

◮ structured graph rewrites can be more handy and efficient (e.g.

graph matching not necessarily required)

◮ style preservation: to be proved vs guaranteed by proofs ◮ concurrency? special cases (edge to edge rules)?

◮ Graphical encoding

◮ seamless grouping of item through the hierarchy (e.g. for

representing nested sessions, transactions, scopes)

◮ in the case of process calculi, facilitated by suitable graph

algebras (see next part of the talk)

◮ Encoding properties (soundness, completness) shown by

structural induction

Ten Virtues of Structured Graphs (GT-VMT’09) 31/45

slide-62
SLIDE 62

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Outline

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Ten Virtues of Structured Graphs (GT-VMT’09) 32/45

slide-63
SLIDE 63

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

ADR in a Nutshell

◮ ADR formulas:

◮ ADR = Designs + Term Rewriting ◮ Designs = Typed Hierarchical Graphs (with Interfaces)

◮ ADR ingredients:

◮ Sorts: Vocabulary, Types (edge and node labels) ◮ Values: Designs (hierarchical graphs with interfaces) ◮ Operations: Graph-grammar-like rules ◮ Terms: proofs of construction ◮ Terms (with variables): partial Designs, partial proofs ◮ Axioms: properties of operations ◮ Membership predicates: additional style rules ◮ Rewrite rules: behaviour, reconfigurations ◮ Rewrite strategies: style conformance, style analysis, etc. Ten Virtues of Structured Graphs (GT-VMT’09) 33/45

slide-64
SLIDE 64

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Flexible Unifyig Framework for Design, Execution, Reconfiguration

◮ Not necessarily in the spirit of universal models:

◮ node as names + hyper-edge as ops + parallel composition +

name fusion + name hiding = any graph can be obtained

◮ node as names + hyper-edge as ops + type annotation +

tailored constructors = only well-formed designs are described

◮ Some other ADR features:

◮ Membership equational theory (e.g. ACI1, subsorting,

  • verloading)

◮ Flattening axioms (e.g. not all operators are hierarchic)

◮ Some ADR caveats:

◮ different proof terms for the same graph are possible ◮ constraints not fully integrated yet ◮ concurrency aspects not addressed yet Ten Virtues of Structured Graphs (GT-VMT’09) 34/45

slide-65
SLIDE 65

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Maude Prototype for ADR

Ten Virtues of Structured Graphs (GT-VMT’09) 35/45

slide-66
SLIDE 66

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Maude Prototype for ADR

◮ Why Maude?

◮ built-in membership equational theories (e.g. to support style

conformance check)

◮ conditional rewrite rules supported ◮ standard encoding of LTS ◮ built-in search strategies (e.g. to support model finding) ◮ built-in LTL model-checker ◮ defineable logic languages (within the same framework): e.g.

graph logics (Courcelle’s MSO), modal logics, spatial logics

Ten Virtues of Structured Graphs (GT-VMT’09) 35/45

slide-67
SLIDE 67

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

ADR Case Studies

Ten Virtues of Structured Graphs (GT-VMT’09) 36/45

slide-68
SLIDE 68

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From Process Calculi to Graphs

The syntax of process calculi (with name handling)

Ten Virtues of Structured Graphs (GT-VMT’09) 37/45

slide-69
SLIDE 69

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From Process Calculi to Graphs

Terms as graphs

Ten Virtues of Structured Graphs (GT-VMT’09) 37/45

slide-70
SLIDE 70

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From Process Calculi to Graphs

The syntax of graphs

Ten Virtues of Structured Graphs (GT-VMT’09) 37/45

slide-71
SLIDE 71

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

An Example: From Process Calculi to Graphs

Encoding can become cumbersome

Ten Virtues of Structured Graphs (GT-VMT’09) 37/45

slide-72
SLIDE 72

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Re-usable Graph Algebra for Process Calculi

Components as edges l( x), types as design labels L. (designs) D ::= L

x[G]

(graphs) G ::= 0 | x | l( x) | G|G | (νx)G | D y

◮ In L x[G], the nodes

x in G are bound by the interface (as arguments), the other free names of G are global.

◮ We write L y[G{ y/ x}] as a shorthand for L x[G]

y

◮ A flattening axiom for some inessential design label L takes

the form L

xG

y ≡ G{

y/ x} (but G{ y/ x} has still type L) ◮ Structural equivalence as graph isomorphism

Ten Virtues of Structured Graphs (GT-VMT’09) 38/45

slide-73
SLIDE 73

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Re-usable Graph Algebra for Process Calculi

Components as edges l( x), types as design labels L. (designs) D ::= L

x[G]

(graphs) G ::= 0 | x | l( x) | G|G | (νx)G | D y

◮ In L x[G], the nodes

x in G are bound by the interface (as arguments), the other free names of G are global.

◮ We write L y[G{ y/ x}] as a shorthand for L x[G]

y

◮ A flattening axiom for some inessential design label L takes

the form L

xG

y ≡ G{

y/ x} (but G{ y/ x} has still type L) ◮ Structural equivalence as graph isomorphism

Ten Virtues of Structured Graphs (GT-VMT’09) 38/45

slide-74
SLIDE 74

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Re-usable Graph Algebra for Process Calculi

Components as edges l( x), types as design labels L. (designs) D ::= L

x[G]

(graphs) G ::= 0 | x | l( x) | G|G | (νx)G | D y

◮ In L x[G], the nodes

x in G are bound by the interface (as arguments), the other free names of G are global.

◮ We write L y[G{ y/ x}] as a shorthand for L x[G]

y

◮ A flattening axiom for some inessential design label L takes

the form L

xG

y ≡ G{

y/ x} (but G{ y/ x} has still type L) ◮ Structural equivalence as graph isomorphism

Ten Virtues of Structured Graphs (GT-VMT’09) 38/45

slide-75
SLIDE 75

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Re-usable Graph Algebra for Process Calculi

Components as edges l( x), types as design labels L. (designs) D ::= L

x[G]

(graphs) G ::= 0 | x | l( x) | G|G | (νx)G | D y

◮ In L x[G], the nodes

x in G are bound by the interface (as arguments), the other free names of G are global.

◮ We write L y[G{ y/ x}] as a shorthand for L x[G]

y

◮ A flattening axiom for some inessential design label L takes

the form L

xG

y ≡ G{

y/ x} (but G{ y/ x} has still type L) ◮ Structural equivalence as graph isomorphism

Ten Virtues of Structured Graphs (GT-VMT’09) 38/45

slide-76
SLIDE 76

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Re-usable Graph Algebra for Process Calculi

Components as edges l( x), types as design labels L. (designs) D ::= L

x[G]

(graphs) G ::= 0 | x | l( x) | G|G | (νx)G | D y

◮ In L x[G], the nodes

x in G are bound by the interface (as arguments), the other free names of G are global.

◮ We write L y[G{ y/ x}] as a shorthand for L x[G]

y

◮ A flattening axiom for some inessential design label L takes

the form L

xG

y ≡ G{

y/ x} (but G{ y/ x} has still type L) ◮ Structural equivalence as graph isomorphism

Ten Virtues of Structured Graphs (GT-VMT’09) 38/45

slide-77
SLIDE 77

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

A Re-usable Graph Algebra for Process Calculi

Components as edges l( x), types as design labels L. (designs) D ::= L

x[G]

(graphs) G ::= 0 | x | l( x) | G|G | (νx)G | D y

◮ In L x[G], the nodes

x in G are bound by the interface (as arguments), the other free names of G are global.

◮ We write L y[G{ y/ x}] as a shorthand for L x[G]

y

◮ A flattening axiom for some inessential design label L takes

the form L

xG

y ≡ G{

y/ x} (but G{ y/ x} has still type L) ◮ Structural equivalence as graph isomorphism

Ten Virtues of Structured Graphs (GT-VMT’09) 38/45

slide-78
SLIDE 78

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Some Sketches of Encoding

π-calculus in ADR (P process type, G guarded sums type) (νx)Q = Pp[ (νx) Q p ] N + M = Gp[ N p | M p ] Q | R = Pp[ Q p | R p ] CaSPiS in ADR (P process type, S session type)

Q | R = Pp,i,o,r[ p | i | o | r | Q p, i, o, r | R p, i, o, r ] s+ ✄ Q = Pp,i,o,r[ i | o | Sp,r[ Q p, s+, s−, r ] ] s− ✄ Q = Pp,i,o,r[ i | o | Sp,r[ Q p, s−, s+, r ] ]

Ten Virtues of Structured Graphs (GT-VMT’09) 39/45

slide-79
SLIDE 79

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Some Sketches of Encoding

π-calculus in ADR (P process type, G guarded sums type) (νx)Q = Pp[ (νx) Q p ] N + M = Gp[ N p | M p ] Q | R = Pp[ Q p | R p ] CaSPiS in ADR (P process type, S session type)

Q | R = Pp,i,o,r[ p | i | o | r | Q p, i, o, r | R p, i, o, r ] s+ ✄ Q = Pp,i,o,r[ i | o | Sp,r[ Q p, s+, s−, r ] ] s− ✄ Q = Pp,i,o,r[ i | o | Sp,r[ Q p, s−, s+, r ] ]

Ten Virtues of Structured Graphs (GT-VMT’09) 39/45

slide-80
SLIDE 80

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Visualization: adr2graphs (Early Prototype)

Please have a try at http://www.albertolluch.com/adr2graphs

Ten Virtues of Structured Graphs (GT-VMT’09) 40/45

slide-81
SLIDE 81

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

One Last Virtue of Structured Graphs

◮ Logical specification and verification

◮ ad-hoc spatial logics: from “general” to “derived” modalities ◮ formulas closer to visualization (easier to use) ◮ types as properties: a property P demonstrated by structural

induction on type T show that all graphs of type T satisfy P.

◮ re-use existing (efficient) tools whenever possible Ten Virtues of Structured Graphs (GT-VMT’09) 41/45

slide-82
SLIDE 82

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Outline

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Ten Virtues of Structured Graphs (GT-VMT’09) 42/45

slide-83
SLIDE 83

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Where ADR can help

◮ Design of software architectures

◮ drop & bind components + check + correct: tedious, error

prone

◮ bounded FO/SAT (Alloy): performant, but trial & error, no

hint, no guidance

◮ Guaranteed reconfiguration

◮ prove theorems on GT: ad-hoc, manual, limited re-use ◮ model checking on GT: validate a particular instance,

scalability issues, undecidable in general

◮ monitor & repair: no guarantees

◮ Usability

◮ other integrated environment require acquaintance with many

different languages and theories

Ten Virtues of Structured Graphs (GT-VMT’09) 43/45

slide-84
SLIDE 84

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

Related work

◮ Ordinary GT:

◮ nice theory of concurrency, but structure must be encoded

somehow in flat graphs,

◮ problems with grouping and atomicity

◮ Hierarchical graphs:

◮ main difference relies on interfaces

◮ Alloy:

◮ highly specialized SAT solver, but Maude is more flexible Ten Virtues of Structured Graphs (GT-VMT’09) 44/45

slide-85
SLIDE 85

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

End of Talk (Graphs Powered by yEd)

Ten Virtues of Structured Graphs (GT-VMT’09) 45/45

slide-86
SLIDE 86

Introduction Styles for Visual Support Dynamics ADR Concluding Remarks

End of Talk (Graphs Powered by yEd)

Ten Virtues of Structured Graphs (GT-VMT’09) 45/45