• No results found

SYNTACTIC THEORY FOR BIGRAPHS

N/A
N/A
Protected

Academic year: 2021

Share "SYNTACTIC THEORY FOR BIGRAPHS"

Copied!
90
0
0

Loading.... (view fulltext now)

Full text

(1)

S

YNTACTIC

T

HEORY FOR

B

IGRAPHS

Troels C. Damgaard ([email protected])

Joint work with Lars Birkedal, Arne John Glenstrup, and Robin Milner

Bigraphical Programming Languages (BPL) Group IT University of Copenhagen

(2)

R

ELEVANT PUBLICATIONS

Damgaard and Birkedal.Axiomatizing Binding Bigraphs. Nordic Journal of Computing, 2006.,

Birkedal, Damgaard, Glenstrup and Milner.Matching of Bigraphs. InProceedings of Graph Transformation for Verification and Concurrency Workshop 2006, Electronic Notes in Theoretical Computer Science . Elsevier, 2007., and

Damgaard.Syntactic Theory for Bigraphs.

Masters Thesis. IT University of Copenhagen, 2006. (with expanded introduction and overviews).

See my webpage for more information (e.g., links to more publications and to the BPL group):

(3)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING Background — Bigraphical Reactive Systems Characterization

Rules — Details

(4)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE

Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING

Background — Bigraphical Reactive Systems Characterization

Rules — Details

6

C

URRENT AND

F

UTURE

W

ORK

(5)

I

NTRODUCING

B

IGRAPHS

B

IGRAPHS AND BIGRAPHICAL REACTIVE SYSTEMS

(BRS

S

)

In one line: Agraphicalmodel ofmobile computationthat emphasizes both

localityandconnectivity— due to Milner and coworkers. Developed with two main aims

to modeldirectlyimportant aspects of ubiquitous systems, and to provide ageneral theoryfor reactive systems, where many existing calculi for mobility and concurrency may be represented and investigated. In particular, the theory provides us with tools to derive from a BRS alabelled transition systemwhose associated bisimulation relation is a congruence relation.

(6)

I

NTRODUCING BIGRAPHS

(

CONT

.)

S

O WHAT IS A BIGRAPH

?

Essentially, abigraphis

aplace graph— a forest, and alink graph— a (hyper-)graph sharing nodes.

(7)

I

NTRODUCING BIGRAPHS

(

CONT

.)

ABIGRAPH—A COMBINATION OF A PLACE GRAPH AND A LINK GRAPH These are examples ofplaceandlinkgraphs:

(8)

A B

IGRAPH

M

ODEL OF AN

O

FFICE

A=

Aconsists of

roots(dashed boxes),

nodes(solid boxes), and

links(green lines).

Each node has acontrol(in sans serif) indicating the number and type of

portsfor linkage.

(9)

B

IGRAPHS ARE

C

OMPOSABLE

A=

Non-ground bigraphs containholes(or sites) and/orinner names.

B=

(10)

B

INDING BIGRAPHS

A=

Bindingbigraphs, enforce a scoping discipline on linkage connected to a binding ports or local outer names —binders.

Allpeers (inner names or ports) linked to a binder, must be nestedwithin

(11)

I

NTERFACES

B:h2,({x},∅),{x,z}i → h2,(∅,∅),∅i

C:h0,(),∅i → h2,({x},∅),{x,z}i

Formally, a bigraph is a morphism in a category ofinterfaces, hence, bigraph composition is simply the categorical composition.

For example,BandCcompose exactly, because theinnerfaceofBis

equalto theouterfaceofC.

(12)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING

Background — Bigraphical Reactive Systems Characterization

Rules — Details

6

C

URRENT AND

F

UTURE

W

ORK

(13)

M

OTIVATION

EXPRESSINGBIGRAPHS

How togivea bigraph? Two basic approaches —

C

ONSTRUCT GRAPH STRUCTURE DIRECTLY

Bigraphs are simply a collection of certain graphs. We can just give

explicit sets of constituents (i.e,nodes,links,names,controls, etc.); and, a number of maps to build bigraph structure (i.e.,nesting,linking, etc.).

C

ONSTRUCT INDUCTIVELY FROM SET OF ELEMENTARY BIGRAPHS Construct bigraphsinductivelyas the smallest set of bigraphs built from

a set ofelementary bigraphs; and, a fewoperators.

(14)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(15)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(16)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(17)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(18)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(19)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(20)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(21)

L

ANGUAGE FOR

B

IGRAPHS

(

CONT

.)

(22)

L

ANGUAGE

C

ONSIDERATIONS

The terms in the language are explicitly typed withinterfaces— determining when tensor product, composition, and abstraction iswell defined.

Hence, formation rules ensurewell formedterms denote bigraphs.

Theinterfacefor expressions can be determined by induction.

Similarly, thebigraphdenoted by an expression can be determined by induction.

(23)

C

ONCLUSION

T

HEOREM

(C

OMPLETENESS OF

L

ANGUAGE

)

All binding bigraphs can be expressed using composition, tensor product⊗, and abstraction( ), from constants

1,merge2,y/X, /x,K~y(X~), π,pUq.

(24)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE

Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING

Background — Bigraphical Reactive Systems Characterization

Rules — Details

6

C

URRENT AND

F

UTURE

W

ORK

(25)

M

OTIVATION

M

OTIVATION

As a basis for structured analysis of bigraphs — we develop anormal form theoremthat

details a number of subclasses of bigraphs (overview, next slide); gives a correspondingexpression formatfor each class.

(26)

N

ORMAL

F

ORMS

THEDISCRETEVARIANT FOR MATCHING We analyze bigraphs and define

discrete decomposition — separating a bigraphBinto a global link graph

wand a discrete bigraphD, which has one-one linkage to global outer names;

decomposing a discrete bigraphDinto separate roots — discreteprimes

P; and,

decomposing discrete primesPinto separatenodesandholes.

(27)

N

ORMAL

F

ORMS

(

CONT

.)

THEDISCRETEVARIANT FOR MATCHING We analyze bigraphs and define

discretedecomposition — separating a bigraphBinto agloballink graph wand adiscretebigraphD, which has one-one linkage to global outer names;

decomposing a discrete bigraphDinto separate roots — discrete primes

P; and,

decomposing discrete primesPinto separatenodesandholes.

(28)

N

ORMAL

F

ORMS

(

CONT

.)

THEDISCRETEVARIANT FOR MATCHING We analyze bigraphs and define

discretedecomposition — separating a bigraphBinto agloballink graph wand adiscretebigraphD, which has one-one linkage to global outer names;

decomposing a discrete bigraphDinto separate roots — discreteprimes

P; and,

decomposing discrete primesPinto separate nodes and holes .

(29)

C

ONCLUSION

MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE NORMAL FORM

Main theorem states soundness and completeness of the normal form;

and takes about two pages to state in full detail.

T

HEOREM

(

Schema

: N

ORMAL

F

ORM

)

Any bigraph of classCcan be expressed on the format E .

For any other expression E0on this format, the requirementsR1, . . . ,Rn−1

(between constituents of E and E0) hold.

(30)

C

ONCLUSION

MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE NORMAL FORM

Main theorem states soundness and completeness of the normal form; and takes about two pages to state in full detail.

T

HEOREM

(

Schema

: N

ORMAL

F

ORM

)

Any bigraph of classCcan be expressed on the format E .

For any other expression E0on this format, the requirementsR1, . . . ,Rn−1

(between constituents of E and E0) hold.

(31)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE

Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING

Background — Bigraphical Reactive Systems Characterization

Rules — Details

(32)

M

OTIVATION

M

OTIVATION

Would like to reason about graph equality on thetermlevel — i.e., to reason

syntacticallyabout equality of bigraphs.

For example, we might like to show that:

pcy1⊗pdaz0

(1⊗1) = pcy11⊗pdaz01

,

y/x x/z=y/z.

We give a syntactic equational theory by stating basic equalities between bigraph expressions — extending work forpurebigraphs by Milner.

(33)

C

ATEGORICAL AXIOMS

Categorical axioms deal with basic properties like

associativity of composition and tensor product,A(BC) = (AB)Cand A⊗(B⊗C) = (A⊗B)⊗C,

unit for composition and tensor products (identities on certain interfaces), and handling symmetries (permutations on the place graph structure)

(C1) AidI = A =idJ A (A:I→J) (C2) A(BC) = (AB)C (C3) A⊗id = A =id⊗A (C4) A⊗(B⊗C) = (A⊗B)⊗C (C5) idI⊗idJ = idI⊗J (C6) (A1⊗B1)(A0⊗B0) = (A1A0)⊗(B1B0) (C7) γI, = idI (C8) γ γ = id

(34)

G

LOBAL LINK AXIOMS

Link axioms mainly state the ways in which compositions oflinkingscan be equally expressed without composition.

(L1) x/x = idx

(L2) /y y/x = /x

(L3) /y y = id

(35)

P

LACING AND ION AXIOMS

Place axioms explain the basic ways in whichplacingexpressions for equal bigraphs can vary.

(P1) merge2(1⊗id1) = id1

(P2) merge2(merge2⊗id1) = merge2(id1⊗merge2)

(P3) merge2γ1,1,(∅,∅) = merge2

Two axioms for ions deal with renaming of the names on both the interfaces of an ion.

(N1) (id1⊗α)K~y(X~) = Kα(~y)(~X)

(36)

B

INDING AXIOMS

Binding axioms state basic equalitites between expressions with the

abstractionoperator and/or theconcretionconstant.

(∅)P=P abstracting no names is the same as not abstracting.

(Y)pYq=id(Y) abstracting a concretion of the namesY is just

an identity onY.

(pXqZ ⊗idY)(X)P=P “concreting” an abstraction of the namesX

gives you back the bigraphPthat you started with.

(idX ⊗(Y)P))G= extending the scope of an abstraction over a set (Y)(P⊗idX)G of global namesX is ok, when the entire expression

has a local innerface.

(37)

C

ONCLUSION

MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE EQUATIONAL THEORY

T

HEOREM

(S

OUNDNESS AND COMPLETENESS

)

For all binding bigraph expressions E and F ,[[E]] = [[F]], i.e.,E and F denote the same bigraph iff`E =F .

(38)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE

Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING Background — Bigraphical Reactive Systems Characterization

Rules — Details

6

C

URRENT AND

F

UTURE

W

ORK

(39)

A

DDING

D

YNAMICS

We buildbigraphical reactive systems(BRS) by giving a set of rewriting rules; expressed essentially as a pair of bigraphs, like those below:

(40)

A

DDING

D

YNAMICS

(

CONT

.)

T

HE MATCHING PROBLEM

To determine, whether and how a redexmatchesa bigraph.

Suppressing some detail — aredexRmatches a groundagenta, ifa decomposes, s.t.,

a=C(R⊗idZ)d

— forcontextC, and discreteparameterd. We can illustrate a match schematically, like this:

(41)

M

OTIVATION

So, we have definitions

D

EFINITION

(A

BIGRAPH

)

“Official” definition:G= (V,E,ctrl,link,prnt) :I →J

D

EFINITION

(A

MATCH IN BIGRAPHS

)

“Official” definition: [. . . ]a=C(R⊗idZ)d, whereCis a context, andd a

discrete parameter [. . . ]

P

ROBLEM

(C

ONSTRUCTING A CONTEXT AND PARAMETER

)

How to construct a contextCand parameterd, given agentaand redexR? Instead, we

(42)

M

ATCHING

S

ENTENCES

We define a new representation for amatch— as arelation— and look to inductively characterize this relation.

D

EFINITION

(M

ATCHING SENTENCE

)

ωa, ωR, ωC`a,R,→C,d

forwirings(essentially, link graphs)ωaRCanddiscretebigraphsa,R,C, d.

a,d are ground,

RandCare products of discrete primes,

(43)

M

ATCHING

S

ENTENCES

(

CONT

.)

D

EFINITION

(

V

ALID MATCHING SENTENCE

)

A matching sentence as above isvalidiff

(44)

R

ULES FOR

D

ERIVING

V

ALID

M

ATCHING

S

ENTENCES

M

ATCHING RULES

We give a set of rules forderivingvalid matching sentences. We take two axioms,

one concerned with introducing nonconnected linkage; and,

one, which allows to conclude when we have roots with equal structure in agent and parameter (up to certain renamings).

And seven rules, most of which serve to introduce an elementary bigraph or operator. For example, PRODUCT ωa, ωR, ωC||ω` a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e , and, MERGE ωa, ωR, ωC`a,R,→C,d aglobal .

(45)

R

ULES

— I

LLUSTRATED

(46)

R

ULES

— I

LLUSTRATED

(

CONT

.)

(47)

R

ULES

- D

ETAILS

CLOSE σa, σR,idYR⊗σC`a,R,→C,d σC:→Y]YC σR:→U]YR (id⊗/(YR]YC))σa,(id⊗/YRR,(id⊗/YCC`a,R,→C,d PERM ωa, ωR, ωC`a,Nmi Pπ−1(i),→C,(π⊗id)d ωa, ωR, ωC `a,Nmi Pi,→Cπ,d PRODUCT ωa, ωR, ωC||ω`a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e LSUB σa⊗ωa, ωR, σC⊗ωC`p,R,→P,d σa:Z →W σC:U→W P:U]X ωa, ωR, ωC`(σba⊗id)(Z)p,R,→(cσC⊗id)(U)P,d

(48)

R

ULES

- D

ETAILS

(

CONT

.)

ION ωa, ωR, ωC`(( ~ v)/(X~)⊗id)p,R,→((~v)/(~Z)⊗id)P,d α=~y/~u σ:{~y} → σ||ωa, ωR, σα||ωC`(K~y(~X)⊗id)p,R,→(K~u(~Z)⊗id)P,d SWITCH ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P:→ hW]Yi σ:W→U ωa, ωR, ωC`p,(bσ⊗id)(W)P,→pUq,d PRIME-AXIOM α:X →U β:Z → σL:Y →U p:hY]Zi σ(σL⊗β),id, σ`p,id(X),→pαq,(X)(α−1σL⊗β⊗id1)p WIRING-AXIOM y,X,y/X`id,id,→id,id Rules — illustrated

(49)

C

ONCLUSION

MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE RULES

T

HEOREM

(S

OUNDNESS

)

The rules for matching aresound, that is, any matching sentence that can be derived is valid.

T

HEOREM

(C

OMPLETENESS

)

The rules for matching arecomplete, that is, any valid matching sentence can be derived from the rules.

The equality theory and normal forms are employed heavily to prove these theorems.

(50)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE

Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING

Background — Bigraphical Reactive Systems Characterization

Rules — Details

6

C

URRENT AND

F

UTURE

W

ORK

(51)

C

URRENT WORK

T

ERM MATCHING

In the BPL group we build a tool to experiment with bigraphical reactive systems.

Bigraphs are represented using aterm languagewithconstantsandoperators

corresponding exactly to the elementary bigraphs and combinators.

Based on the work presented — we use a simple approach to implementing matching in such a tool:

First step: Recast rules to work onterms— one simply has to add a single ruleSTRUCTto allow application of structural congruence on terms.

(52)

C

URRENT WORK

(

CONT

.)

N

ORMAL INFERENCES

To specialize the characterization into an algorithm, for mechanicallyfinding

matches, definenormalinferences; kinds of inferences that are

completein the sense that all valid matching sentences can be inferred; and,

suitablerestricted, s.t. inferences can be built mechanically with minimum amount of search.

In particular, normal inference definitions for term matching needs to address preciselyhowandwhereto apply structural congruence.

N

ORMAL INFERENCE VS

.

ALGORITHMIC APPROACH

Each definition of normal inferences correspond to a differentalgorithmic approachto matching.

(53)

F

UTURE

W

ORK

O

N MATCHING

Term-based matching using normal inferences is

nice— it is firmly based on the theory presented here; and

problematic— the pilot-version, we are currently testing, is horribly inefficient.

Hence, we aim (and hope to be able) to build more efficient methods; while retaining our formal foundation.

Some ideas:

Work with aterm normal formmore suited for matching. Instead of matching links “online” while building an inference, derive a set ofconstraintsfor these.

(54)

T

HANK

Y

OU

!

(55)

O

UTLINE

1

B

ACKGROUND

— B

IGRAPHS

2

T

ERM

L

ANGUAGE

Expressing Bigraphs Language

3

N

ORMAL

F

ORM

T

HEOREM

(

S

)

4

E

QUATIONAL

T

HEORY

5

C

HARACTERIZATION OF

M

ATCHING

Background — Bigraphical Reactive Systems Characterization

Rules — Details

(56)

O

UTLINE OF

A

PPENDICES

Term Language Normal Form Rules — Illustrated TheSWITCHrule Proof Method

(57)

I

NDUCTIVE

L

ANGUAGE

DETAILS

D

EFINITION

(I

NDUCTIVE LANGUAGE FOR BINDING BIGRAPHS

)

The smallest set of bigraphs built by three operators —

composition,

tensor product⊗(juxtaposition),

andabstraction(Y)Pof namesY onprimesP;

from the identities on all interfaces and a set of elementary bigraphs. (Details on elementary bigraphs and abstraction — next slides.)

(58)

E

LEMENTARY

B

IGRAPHS

PLACINGS

D

EFINITION

(2

KINDS OFPLACING

)

Merge mergen:hn, ~∅,∅i → h1,[∅],∅i

Permutation π π~X :hm, ~X,Xi → hm, π(X~),Xi

(E

XAMPLES

) M

ERGE AND PERMUTATION

merge3= 0 1 2 {07→2,17→0,27→1}[{x},∅,{y}]= 1 2 0 x x y y Back to overview

(59)

T

ERM

C

ONSTANTS

LINKINGS

D

EFINITION

(2

BASIC KINDS OFLINKINGS

)

Substitutionσ ~y/~X:h0,[ ],Xi → h0,[ ],Yi Closure /X :h0,[ ],Xi →id

(E

XAMPLES

) L

INKINGS Plain substitution [y1,y2,y3]/[{x1,x2},{},{x3}] = x1 y1 x2 y2 x3 y3 Renaming α [y1,y2,y3]/[x1,x2,x3] = x1 y1 x2 y2 x3 y3 Closure /{x1,x2,x3}= x 1 x2 x3 (id ⊗/{z,z }) y1 y2

(60)

E

LEMENTARY

B

IGRAPHS

(

CONT

.)

CONCRETIONS AND IONS

D

EFINITION

(

C

ONCRETIONS AND

I

ONS

)

Concretion pXq :h1,[X],Xi → h1,[∅],Xi

Ion K~y(~X):h1,(X),Xi → h1,(∅),Yi

(E

XAMPLES

) C

ONCRETIONS AND IONS

p{x1,x2}q= 0 x1 x1 x2 x2 K[y1,y2]([{x1},{x2,x3},{}])= K y1y2 x1x2x3 Back to overview

(61)

O

PERATORS

(

CONT

.)

ABSTRACTION(COMPOSITION AND TENSOR PRODUCT)

(Standard categorical composition and tensor product as defined earlier.)

D

EFINITION

(

A

BSTRACTION

)

Abstraction (Y)P:I→ h1,[Y],Z]Yi

(E

XAMPLE

) A

BSTRACTION ({y1,y2})({y3})p{y1,y2,y3,z}q= 0 y1 y1 y2 y2 y3 y3 z z

(62)

B

IGRAPH

A

A MODEL OF AN OFFICE

A=

(63)

N

ORMAL

F

ORM

THENAME-DISCRETEVARIANT–FOR THE EQUATIONAL THEORY

We define and prove that four forms of binding bigraph expressions generate all binding bigraphs, and that those forms are unique up to certain specified isomorphisms.

D

EFINITION

(B

INDING DISCRETE NORMAL FORM

(BDNF))

MDNF M ::= (K~y(~X)⊗idZ)P PDNF P ::= (YB) merge n+k⊗idY Nn ipαiq ⊗Nk i Mi π DDNF D ::= (P0⊗. . .⊗Pn−1)π⊗α BDNF B ::= ω⊗Nn i σbi D More details for each form on the next pages.

(64)

N

ORMAL

F

ORM

(

CONT

.)

DETAILS

F

REE DISCRETE MOLECULES

MDNF

Anyfree discrete moleculeM :I→ h1,{~y} ]Zican be expressed as

(K~y(~X)⊗idZ)P

whereP:I→ h1,({X~}),{X~} ]Ziis a name-discrete prime.

This expression isuniqueup to renaming of the local names on the innerface of the ion, and (correspondingly) on the outer face of the primeP.

(For formal details see [Damgaard, Birkedal, ’06].)

(65)

N

ORMAL

F

ORM

(

CONT

.)

DETAILS

N

AME

-

DISCRETE PRIMES

PDNF

Anyname-discrete primeP:I→ h1,YB,Yican be expressed as

(YB) mergen+k⊗idY(pα0q⊗ · · · ⊗pαn−1q⊗M0⊗ · · · ⊗Mk−1)π

where everyMi :→ hYiMiis a free discrete molecule, and for renamings

αi :→YiC, we haveY = (

U

i∈nYiC)]

U

i∈kYiM.

This expression isuniqueup to reordering of the concretions and molecules, and the ordering of the sites inside the molecules; the permutationπchanges accordingly to preserve the innerface.

(66)

N

ORMAL

F

ORM

(

CONT

.)

DETAILS

N

AME

-

DISCRETE BIGRAPHS

DDNF

Anyname-discrete bigraphDwith outer widthncan be expressed as

(P0⊗. . .⊗Pn−1)π⊗α

where everyPi is a name-discrete prime,αis a renaming, andπis a

permutation.

This expression isuniqueup to reordering of the the sites inside the primes; the permutationπchanges accordingly to preserve the innerface.

(For formal details see [Damgaard, Birkedal, ’06].)

(67)

N

ORMAL

F

ORM

(

CONT

.)

DETAILS

B

IGRAPHS

BDNF

AnybigraphG:I→ hn, ~YB,{Y~B} ]YFican be expressed as

ω⊗ n O i b σi ! D

whereD:I→ hn, ~X,{X~} ]Ziis name-discrete,ω:Z →YFis a (global)

wiring, and eachσbi : (X~i)→(Y~Bi)is a local substitution on the bound names

ofD.

The expression isuniqueup to (local and global) renamings on the innerface of the wiring and (correspondingly) on the outerface ofD.

(68)

R

ULES

— I

LLUSTRATED

R

ULES

— I

LLUSTRATED

This section contains illustrated versions of the rules.

(69)

R

ULES

— D

ETAILS

PREMISE CLOSE σa, σR,idYR⊗σC`a,R,→C,d σC:→Y]YC σR:→U]YR (id⊗/(YR]YC))σa,(id⊗/YRR,(id⊗/YCC`a,R,→C,d If

(70)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION CLOSE σa, σR,idYR⊗σC`a,R,→C,d σC:→Y]YC σR:→U]YR (id⊗/(YR]YC))σa,(id⊗/YRR,(id⊗/YCC`a,R,→C,d Then

(71)

R

ULES

— D

ETAILS

(

CONT

.)

PREMISE PERM ωa, ωR, ωC`a,Nmi Pπ−1(i),→C,(π⊗id)d ωa, ωR, ωC`a,Nmi Pi ,→Cπ,d If

(72)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION PERM ωa, ωR, ωC`a,Nmi Pπ−1(i),→C,(π⊗id)d ωa, ωR, ωC`a,Nmi Pi ,→Cπ,d Then

(73)

R

ULES

— D

ETAILS

(

CONT

.)

PREMISE PRODUCT ωa, ωR, ωC||ω`a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e If

(74)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION PRODUCT ωa, ωR, ωC||ω`a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e Then

(75)

R

ULES

— D

ETAILS

(

CONT

.)

PREMISE

LSUB σa⊗ωa, ωR, σC⊗ωC`p,R,→P,d σa:Z →W σC:U→W

ωa, ωR, ωC`(σba⊗id)(Z)p,R,→(cσC⊗id)(U)P,d

(76)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION

LSUB σa⊗ωa, ωR, σC⊗ωC`p,R,→P,d σa:Z →W σC:U→W

ωa, ωR, ωC`(σba⊗id)(Z)p,R,→(cσC⊗id)(U)P,d

(77)

R

ULES

— D

ETAILS

(

CONT

.)

PREMISE

MERGE ωa, ωR, ωC`a,R,→C,d aglobal

ωa, ωR, ωC`(merge⊗id)a,R,→(merge⊗id)C,d

(78)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION

MERGE ωa, ωR, ωC`a,R,→C,d aglobal

ωa, ωR, ωC`(merge⊗id)a,R,→(merge⊗id)C,d

(79)

R

ULES

— D

ETAILS

(

CONT

.)

PREMISE ION ωa, ωR, ωC`((~v)/(X~)⊗id)p,R,→((~v)/(~Z)⊗id)P,d α=~y/~u σ:{~y} → σ||ωa, ωR, σα||ωC`(K~y(~X)⊗id)p,R,→(K~u(~Z)⊗id)P,d If

(80)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION ION ωa, ωR, ωC`((~v)/(X~)⊗id)p,R,→((~v)/(~Z)⊗id)P,d α=~y/~u σ:{~y} → σ||ωa, ωR, σα||ωC`(K~y(~X)⊗id)p,R,→(K~u(~Z)⊗id)P,d Then

(81)

R

ULES

— D

ETAILS

(

CONT

.)

PREMISE SWITCH ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P:→ hW]Yi σ:W→U ωa, ωR, ωC`p,(σb⊗id)(W)P,→pUq,d If

(82)

R

ULES

— D

ETAILS

(

CONT

.)

CONCLUSION SWITCH ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P:→ hW]Yi σ:W→U ωa, ωR, ωC`p,(σb⊗id)(W)P,→pUq,d Then

(83)

T

HE SWITCH RULE

All rules work, intuitively, by comparing structure in the agent and context position

ωa, ωR, ωC`a,R,→C,d.

A single rule,SWITCH, allows us (essentially) toswitchredex structure to the context position, when the context contains only a hole.

SWITCH

ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P :→ hW]Yi σ:W →U ωa, ωR, ωC`p,(bσ⊗id)(W)P ,→pαq,d

Intuitively,SWITCHallows us to

build inferences by initially seeking to match agent and context; and, when reaching aholein the context,switchredex structure to the context position in the matching sentence.

(84)

T

HE SWITCH RULE

All rules work, intuitively, by comparing structure in the agent and context position

ωa, ωR, ωC`a,R,→C,d.

A single rule,SWITCH, allows us (essentially) toswitchredex structure to the context position, when the context contains only a hole.

SWITCH

ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P :→ hW]Yi σ:W →U ωa, ωR, ωC`p,(bσ⊗id)(W)P ,→pαq,d

Intuitively,SWITCHallows us to

build inferences by initially seeking to match agent and context; and, when reaching aholein the context,switchredex structure to the context position in the matching sentence.

(85)

T

HE SWITCH RULE

All rules work, intuitively, by comparing structure in the agent and context position

ωa, ωR, ωC`a,id,→R,d.

A single rule,SWITCH, allows us (essentially) toswitchredex structure to the context position, when the context contains only a hole.

SWITCH

ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P :→ hW]Yi σ:W →U ωa, ωR, ωC`p,(bσ⊗id)(W)P ,→pαq,d

Intuitively,SWITCHallows us to

(86)

P

ROOF

M

ETHOD

(C

OMPLETENESS

)

D

EFINITION

The size of a matching sentenceωa, ωR, ωC`a,R,→C,dis the number of ions ina.

P

ROOF METHOD

Establish a series of lemmas that express how a valid sentence may be derived by applications of inference rules to valid sentences of lesser or equal size.

Use normal form theorems to help

I decompose components of given valid sentence; and,

I verify that the claimed valid sentences, do exist.

— in particular, unicity results for normal form theorems yield a number of equalities for decomposed parts, which help here.

Lemmas and main theorem on following pages.

(87)

P

ROOF

M

ETHOD

(C

OMPLETENESS

) (

CONT

.)

L

EMMA

(1)

Every valid sentenceωa, ωR, ωCa,R,→C,d is provable using theCLOSE and thePERMrule on a valid sentence, of equal size, of the form

σa, σR, σCa,S,→Nni Pi,e.

L

EMMA

(2)

Every valid sentenceσa, σR, σCa,R,→P⊗Nni Pi,d , with P and Pi prime

and discrete, is provable using thePRODUCTrule on valid sentences, of lesser or equal size, of the formσP

a, σPR, σPC||σCS p,S,→P,e and σaC, σRC, σCC||σCSa0,R0,→Nn

(88)

P

ROOF

M

ETHOD

(C

OMPLETENESS

) (

CONT

.)

L

EMMA

(3)

Every valid sentenceσa, σR, σCa,R,→id,d is provable usingPRODUCT

andWIRING-AXIOM.

L

EMMA

(4)

Every valid sentenceωa, ωR, ωCp,R,→P,d , with p and P prime and discrete, is provable using theLSUBrule on a valid sentence, of lesser or equal size, of the formω0a, ωR0, ωC0 p0,R,P0,d , where p0and P0are discrete free primes.

(89)

P

ROOF

M

ETHOD

(C

OMPLETENESS

) (

CONT

.)

L

EMMA

(5)

Every valid sentenceσa, σR, σCp,R,→P,d , with p and P discrete and free primes, is provable usingMERGE,PRODUCT(iterated), andSWITCHrules on valid sentences, each of lesser or equal size, and each on one of two forms:

σa0, σR0, σC0 pN,id,PN,e, where pnand PNare free discrete primes,

σa0, σR0, σC0 m,S,→M,e, where m and M are free discrete molecules.

L

EMMA

(6)

Every valid sentenceσa, σR, σCm,R,→M,d , with m and M free discrete molecules, is provable using theIONrule on a valid sentence

σa0, σR0, σC0 p,R,→P,d , of lesser size, where p and P are discrete primes.

(90)

P

ROOF

M

ETHOD

(C

OMPLETENESS

) (

CONT

.)

T

HEOREM

The rules for matching are complete, that is, any valid matching sentence can be derived from the rules.

P

ROOF

.

By induction on the size of a sentence. By the lemmas above, we have that all valid sentences with sizencan be derived from valid sentences of the form σa, σR, σCm,R,→M,d, withmandM free discrete molecules, of size less than or equal ton. By Lemma 6, these can be derived from sentences of size less thann.

References

Related documents

[r]

In order to simulate battery behavior, a new method is proposed that is used in energy production systems in the presence of wind and solar sources.. A new optimization algorithm

As long as the circuit works normally, there are no problems handling the negative voltage input to the circuit, because the inverting lead of the TLC07X is at a positive voltage.

The inter-relation between the EMG signal, various finger pinch/hand grip strengths and joint angles for five fingers have been established and can be used as control

campaign automation, lead management, and CRM integrations (much of this functionality was gained through the vendor’s acquisition of Vtrenz in 2007). Silverpop’s ESP heritage has

Al llarg d’aquests anys, tots els infants que han passat per aquest taller de teatre han après moltes coses, però el que més ens ha gratificat han estat les ganes i la il·lusió

  Alliance  and  partnership  building  is  an  unnatural  act  for  most  of  us.  Weʹre  educated,  socialized,  and  rewarded  in  ways 

Ferdinand Metz was instrumental in establishing the Chefs’ Apprenticeship, Certification and Master Chefs’ Certification program in America in the mid-70, and he spearheaded a 20