Helsinki

University

of

Technology

Department

of

Computer

Science

Digital

Systems

Laboratory

Otaniemi

Otakaari

SF

-LCB-

ESPOO

FINLAND

HELSINKI

UNIVERSITY

OF

TECHNOLOGY

DIGITAL

SYSTEMS

LABORATORY

Series

A

Research

Reports

ISSN

-LCB-

No.

March

ISBN

-LCB-

-LCB-

ON

THE

COMPOSITIONALITY

AND

ANALYSIS

OF

ALGEBRAIC

HIGH-LEVEL

NETS

Johan

Lilius

Digital

Systems

Laboratory

Department

of

Computer

Science

Helsinki

University

of

Technology

Otaniemi

FINLAND

HELSINKI

UNIVERSITY

OF

TECHNOLOGY

DIGITAL

SYSTEMS

LABORATORY

Series

A

Research

Reports

ISSN

-LCB-

No.

March

ISBN

-LCB-

-LCB-

On

the

Compositionality

and

Analysis

of

Algebraic

High-Level

Nets

Johan

Lilius

Abstract

This

work

discusses

three

aspects

of

net

theory

compositionality

of

nets

analysis

of

nets

and

high-level

nets

Net

theory

has

often

been

criticised

for

the

difficulty

of

giving

a

compositional

semantics

to

a

net

In

this

work

we

discuss

this

problem

form

a

category

theoretic

point

of

view

In

category

theory

compositionality

is

represented

by

colimits

We

show

how

a

high-level

net

can

be

mapped

into

a

low-level

net

that

represents

its

behaviour

This

construction

is

functorial

and

preserves

colimits

giving

a

compositional

semantics

for

these

high-level

nets

Using

this

semantics

we

propose

some

proof

rules

for

compositional

reasoning

with

high-level

nets

Linear

logic

is

a

recently

discovered

logic

that

has

many

interesting

properties

From

a

net

theoretic

point

of

view

its

interest

lies

in

the

fact

that

it

is

able

to

express

resources

in

an

analogous

manner

to

nets

Several

interpretations

of

Petri

nets

in

terms

of

linear

logic

exist

In

this

work

we

study

a

model

theoretic

interpretation

where

the

behaviour

of

the

net

gives

a

model

of

linear

logic

This

construction

is

extended

to

cover

the

algebraic

high-level

nets

defined

in

this

work

Printing

TKK

Monistamo

Otaniemi

Helsinki

University

of

Technology

Phone

-LCB-

Department

of

Computer

Science

Digital

Systems

Laboratory

Telex

htkk

sf

Otaniemi

Otakaari

SF

-LCB-

ESPOO

FINLAND

E-mail

lab@hutds.hut.fi

-LCB-

i

-LCB-

Contents

Introduction

Petri

Nets

are

Monoids

General

structure

of

the

model

Completeness

properties

Algebraic

High-Level

nets

Algebraic

net

specifications

Cocompleteness

Cocontinuity

of

Sem

Composition

with

colimits

Linear

Logic

and

AHL-Nets

What

is

linear

logic

Quantales

and

nets

The

interpretation

of

Linear

Logic

in

AHL-Nets

Conclusions

References

A

Appendix

Introduction

to

Category

Theory

A.

Basic

category

theory

A.

Limits

A.

Adjunctions

Introduction

In

this

work

we

discuss

three

ingredients

of

net

theory

the

problem

of

compositionality

the

analysis

of

nets

and

high-level

nets

These

three

ingredients

are

bound

together

by

the

use

of

category

theory

One

of

the

main

criticisms

often

raised

against

net

theory

is

the

fact

that

unlike

for

example

for

the

process

algebra

CCS

-LSB-

-RSB-

there

does

not

exists

a

formulation

of

a

compositional

semantics

that

has

been

generally

accepted

By

a

compositional

semantics

we

mean

a

semantics

that

comes

equipped

with

some

operations

These

semantical

operations

must

have

an

interpretation

in

terms

of

nets

in

the

following

way

When

the

operation

is

applied

to

subnets

it

gives

rise

to

a

compound

net

and

the

semantics

of

this

compound

net

can

be

calculated

by

applying

the

correspondig

semantic

operation

on

the

semantics

of

the

subnets

Examples

of

compositional

operations

in

CCS

are

parallel

composition

and

choice

As

a

consequence

net

theorists

have

developed

other

methods

for

reasoning

about

properties

of

nets

Two

methods

that

can

be

used

are

invariant

analysis

and

reachability

analysis

Invariant

analysis

is

a

good

method

to

reason

about

properties

that

can

be

deduced

from

the

static

structure

of

the

net

When

one

wants

to

talk

about

the

specific

behaviour

of

a

net

one

has

to

resort

to

reachability

analysis

Reachability

analysis

is

a

technique

that

involves

a

database

of

states

and

instances

of

transition

firings

and

a

corresponding

query

language

Recently

a

logic

called

linear

logic

-LSB-

-RSB-

that

seems

suitable

as

a

query

language

has

been

discovered

One

of

our

aims

is

to

assess

the

usefulness

of

this

logic

for

reasoning

about

high

level

nets

In

practice

it

has

been

noted

that

the

modeling

of

systems

is

best

done

with

high-level

net

formalisms

We

wish

to

use

category

theory

to

apply

ideas

on

compositionality

and

analysis

to

high-level

nets

because

category

theory

has

been

specifically

developed

as

a

tool

to

compare

and

bind

together

different

areas

in

mathematics

In

this

work

category

theory

will

be

used

to

talk

about

nets

algebraic

specifications

and

logics

The

results

presented

in

this

work

are

as

follows

We

propose

rules

for

compositional

reasoning

with

high-level

nets

using

colimits

We

establish

a

functor

from

a

category

of

high-level

nets

to

a

category

of

models

for

linear

logic

The

model

in

the

image

of

the

functor

represents

the

behaviour

of

the

net

Using

this

functor

we

propose

an

interpretation

for

the

predicate

version

of

linear

logic

As

our

approach

to

compositionality

is

based

on

category

theory

we

need

a

notion

of

net

morphism

There

exists

a

classical

definition

of

net

morphism

for

Place/Transition

systems

-LSB-

-RSB-

but

it

has

one

deficiency

it

does

not

pre

serve

the

dynamics

-LSB-

-RSB-

Why

should

a

morphism

preserve

the

dynamics

the

reader

may

now

ask

On

a

philosophical

level

morphisms

between

objects

in

mathematics

are

maps

that

preserve

the

structure

of

these

objects

It

seems

plausible

to

choose

the

behaviour

as

the

structure

to

preserve

also

in

view

of

the

fact

that

this

will

allow

us

to

relate

two

nets

by

their

behaviour

and

not

simply

by

their

graphical

representation

Apart

from

the

more

philosophical

arguments

this

choice

of

morphism

has

some

other

arguments

that

speak

for

it

First

of

all

it

is

possible

to

study

the

preservation

of

properties

of

nets

by

these

morphisms

For

example

it

is

easy

to

deduce

that

the

preservation

of

behaviour

implies

the

preservation

of

quasiliveness

and

termination

and

the

reflection

of

boundedness

and

deadlocks

For

a

proof

of

these

properties

consult

e.g.

-LSB-

-RSB-

Secondly

as

category

theoretic

constructions

are

mainly

concerned

with

morphisms

it

is

possible

to

study

the

preservation

of

properties

by

these

constructs

Then

because

these

constructions

are

rules

for

creating

new

objects

from

old

ones

it

is

possible

to

derive

rules

for

reasoning

about

whole

nets

by

reasoning

about

their

parts

-LSB-

-RSB-

When

defining

a

category

of

nets

one

has

to

settle

on

a

suitable

mathematical

representation

for

the

multisets

of

places

and

possibly

transitions

and

the

flow

relation

in

the

net

Usually

the

flow

relation

in

the

net

is

represented

by

a

pair

of

maps

from

the

transitions

to

the

places

a

well

known

representation

for

graphs

A

net

morphism

is

then

a

pair

of

maps

between

the

places

and

transitions

of

the

nets

respectively

Finally

a

commutativity

condition

is

imposed

on

the

maps

The

approaches

then

mainly

differ

on

the

structure

imposed

on

the

sets

of

transitions

and

places

and

on

the

kind

of

maps

between

these

Also

one

or

the

other

of

the

net

morphism

maps

may

be

turned

around

In

the

approach

taken

by

Winskel

-LSB-

-RSB-

transitions

and

places

are

represented

by

vectors

and

a

net

morphism

consists

of

a

pair

of

matrices

that

are

interpreted

as

relations

Meseguer

and

Montanari

-LSB-

-RSB-

suggest

monoids

as

the

structure

on

the

transitions

and

places

This

means

that

a

net

morphism

consists

of

a

pair

of

monoid

homomorphism

A

recent

idea

by

Carolyn

Brown

and

Doug

Gurr

-LSB-

-RSB-

is

to

turn

the

map

on

the

places

around

and

relax

the

commutativity

requirement

to

a

requirement

of

lax

naturality

-LSB-

-RSB-

The

flow

relation

is

represented

by

a

pair

of

subobjects

of

the

cartesian

product

of

the

set

of

places

with

the

set

of

transtions

Finally

Husberg

-LSB-

-RSB-

defines

a

multiset

as

a

product

All

these

choices

give

rise

to

different

kinds

of

constructions

on

nets

The

model

proposed

by

Winskel

has

many

commonalities

with

the

process

algebra

CCS

-LSB-

-RSB-

Indeed

CCS

processes

were

one

of

the

main

motivations

in

this

work

-LSB-

-RSB-

One

way

to

see

this

is

by

observing

how

close

the

product

in

Winskels

category

is

to

the

synchronisation

construct

in

CCS

In

CCS

a

synchronisation

is

not

compulsory

This

is

reflected

in

the

product

through

the

fact

that

the

original

transitions

are

left

in

the

net

with

the

new

synchronised

transition

On

the

other

hand

the

approach

taken

by

Meseguer

and

Montanari

gives

us

a

rich

hierarchy

of

categories

of

nets

The

categories

differ

in

the

amount

of

structure

imposed

on

the

transitions

The

simplest

category

is

the

category

of

Petri

nets

while

the

most

complex

is

the

category

of

Petri

categories

where

a

Petri

net

is

extended

to

a

category

By

working

with

groups

instead

of

monoids

the

completeness

properties

of

some

of

these

categories

have

been

studied

by

Dimitrovici

et

al.

in

-LSB-

-RSB-

These

results

have

then

been

applied

by

Hummert

in

his

dissertation

-LSB-

-RSB-

to

define

a

notion

of

net

module

The

most

novel

approach

is

the

one

taken

by

Carolyn

Brown

and

Doug

Gurr

It

is

based

on

the

Dialectica

Categories

of

Valeria

de

Paiva

-LSB-

-RSB-

which

are

a

category

theoretic

model

of

Godels

Dialectica

interpretation

of

higher

order

arithmetic

-LSB-

-RSB-

The

constructs

available

in

these

categories

give

rise

to

very

interesting

constructions

on

nets

that

have

a

connection

with

linear

logic

Unfortunately

the

approach

currently

only

works

with

elementary

nets

We

have

chosen

to

work

with

the

categories

of

Meseguer

and

Montanari

The

main

reason

for

this

is

the

existence

of

a

rich

hierarchy

of

categories

that

are

related

by

left

adjoints

This

hierarchy

allows

us

to

choose

the

right

level

of

abstraction

at

each

point

of

the

discussion

As

we

are

interested

in

using

colimits

to

specify

compositional

proof

rules

and

colimits

are

preserved

by

left

adjoints

there

is

an

added

bonus

in

this

approach

The

second

ingredient

of

this

work

are

high-level

nets

These

are

nets

where

tokens

are

allowed

some

individuality

and

the

inscriptions

on

the

net

are

taken

from

some

formal

system

other

than

the

natural

numbers

Several

different

models

of

high-level

nets

exists

The

most

influential

models

are

certainly

the

Predicate/transition

nets

by

Genrich

-LSB-

-RSB-

and

the

Coloured

Petri

nets

by

Jensen

-LSB-

-RSB-

When

modelling

systems

in

practice

these

high-level

models

have

been

found

indispensable

Systems

often

consist

of

several

processes

that

are

run

with

different

parameters

With

high-level

nets

it

is

possible

to

give

one

net

for

all

processes

and

model

the

different

parameters

with

individual

tokens

When

modeling

with

low-level

nets

one

would

have

to

draw

each

different

run

by

a

net

of

its

own

This

is

also

known

as

the

football

field

syndrome

For

an

example

the

reader

may

consult

pictures

and

on

page

where

figure

is

the

low-level

equivalent

of

figure

The

use

of

algebraic

specification

as

a

specification

method

for

sequential

systems

is

well

known

-LSB-

-RSB-

The

idea

to

combine

algebraic

specifications

with

Petri

nets

has

been

put

forward

by

several

people

-LRB-

c.f.

e.g.

-LSB-

-RSB-

-RRB-

The

motivation

for

this

approach

is

that

the

specification

of

a

distributed

system

consists

of

two

parts

the

specification

of

the

data

to

be

distributed

into

the

system

and

the

paths

that

the

data

will

take

The

use

of

algebraic

specification

for

the

data

and

Petri

nets

for

the

dynamics

then

suggests

itself

The

approaches

mainly

differ

in

the

amount

of

explicit

category

theory

introduced

The

method

used

by

Reisig

in

-LSB-

-RSB-

and

Reisig

and

Vautherin

in

-LSB-

-RSB-

could

be

termed

the

initial

algebra

approach

The

meaning

-LRB-

semantics

-RRB-

of

a

specification

is

there

defined

as

any

algebra

which

is

isomorphic

to

the

quotient

term

algebra

of

the

specification

Dimitrovici

et

al.

-LSB-

-RSB-

allow

the

interpretation

in

any

algebra

of

the

specification

Some

consequences

of

this

are

explored

in

-LSB-

-RSB-

Here

the

emphasis

is

not

so

much

on

the

exact

structure

of

the

specifications

as

on

the

category

theoretic

properties

of

the

net

specifications

Our

definition

of

high-level

net

is

modelled

after

-LSB-

-RSB-

We

have

added

types

to

the

algebraic

specification

as

this

seems

the

natural

thing

to

do

For

the

semantics

we

have

chosen

the

approach

by

Dimitrovici

et

al.

The

idea

is

that

each

high-level

net

can

be

mapped

into

a

low

level

net

that

represents

the

behaviour

of

the

high-level

net

The

third

and

final

ingredient

is

the

analysis

of

nets

We

are

looking

for

a

logic

to

describe

properties

of

nets

Linear

logic

is

a

logic

discovered

by

J-Y

Girard

-LSB-

-RSB-

It

can

be

thought

of

as

a

resource

conscious

logic

and

has

thus

recently

gained

considerable

interest

from

the

computer

science

community

Applications

include

implementation

models

for

functional

languages

-LSB-

-RSB-

the

study

of

process

algebras

-LSB-

-RSB-

logic

programming

-LSB-

-RSB-

planning

in

AI

-LSB-

-RSB-

and

net

theory

-LSB-

-RSB-

The

list

is

by

no

means

meant

to

be

comprehensive

because

the

field

is

advancing

very

rapidly

The

applications

relevant

to

our

purposes

are

the

applications

to

net

theory

The

aim

in

these

studies

is

twofold

Linear

logic

is

a

logic

with

many

new

connectives

that

are

difficult

to

understand

intuitively

from

a

logical

point

of

view

as

they

arise

in

a

purely

formal

manner

By

giving

an

interpretation

of

linear

logic

in

terms

of

Petri

nets

one

tries

to

give

an

intuitive

meaning

to

the

connectives

in

terms

of

resources

But

on

the

other

hand

if

one

tries

to

axiomatise

Petri

nets

in

classical

logic

one

soon

runs

into

technical

difficulties

due

to

the

so

called

frame

problem

This

problem

does

not

arise

when

axiomatising

Petri

nets

within

linear

logic

Thus

the

study

of

the

connections

between

linear

logic

and

Petri

nets

may

benefit

both

areas

of

research

There

are

different

ways

in

which

one

can

tackle

the

problem

The

current

approaches

can

be

classified

as

proof

theoretic

-LSB-

-RSB-

model

theoretic

-LSB-

-RSB-

and

category

theoretic

-LSB-

-RSB-

In

the

proof

theoretic

approach

the

idea

is

to

try

to

relate

computations

in

nets

to

proofs

of

linear

logic

formulae

Brown

-LSB-

-RSB-

equates

a

net

to

a

formula

of

linear

logic

and

proves

that

reachability

corresponds

to

provability

in

linear

logic

On

the

other

hand

Gunter

and

Gehlot

-LSB-

-RSB-

view

a

net

as

a

theory

They

are

able

to

relate

the

cut-elimination

of

a

proof

-LRB-

c.f.

-LSB-

-RSB-

sec.

-RRB-

to

the

notion

of

maximally

concurrent

process

The

model

theoretic

approaches

of

Brown

-LSB-

-RSB-

and

Engberg

and

Winskel

-LSB-

-RSB-

are

essentially

the

same

The

idea

is

to

generate

a

model

of

linear

logic

from

the

behaviours

of

a

net

This

is

the

approach

that

we

will

pursue

in

chapter

The

category

theoretic

approaches

can

really

not

be

compared

as

their

aims

are

completely

different

The

idea

in

-LSB-

-RSB-

is

to

take

the

categories

of

nets

of

Meseguer

and

Montanari

and

close

them

under

the

new

operators

of

linear

logic

The

approach

of

Brown

and

Gurr

-LSB-

-RSB-

has

already

been

discussed

while

discussing

categories

of

nets

The

interesting

thing

about

their

approach

is

the

fact

that

the

constructions

they

define

can

be

interpreted

as

linear

logic

connectives

The

approach

could

be

summed

up

in

the

slogan

nets

are

linear

logic

propositions

The

structure

of

this

work

is

as

follows

First

we

discuss

our

choice

of

model

for

the

low-level

nets

and

prove

some

completeness

and

cocompleteness

results

for

them

Then

we

present

the

notion

of

algebraic

net

The

semantics

of

an

algebraic

net

is

defined

as

a

functor

into

a

category

of

Place/Transition

systems

Preservation

of

colimits

by

this

semantics

is

studied

This

property

is

then

used

to

present

some

proof

rules

for

combining

algebraic

nets

In

the

final

part

of

this

work

we

give

an

interpretation

of

linear

monadic

predicate

logic

in

terms

of

the

behaviour

of

the

algebraic

nets

We

then

close

off

with

some

discussion

and

an

outlook

to

future

research

It

is

assumed

that

the

reader

has

a

general

knowledge

of

net

theory

category

theory

and

the

theory

of

algebraic

specification

The

appendix

contains

a

short

introduction

to

the

rudiments

of

category

theory

Other

concepts

are

introducted

as

needed

in

the

main

body

of

the

text

Petri

Nets

are

Monoids

In

this

section

we

will

look

at

a

category

theoretic

model

of

Petri

nets

where

the

algebraic

structure

in

which

multisets

are

coded

is

that

of

a

monoid

The

model

has

been

proposed

by

Meseguer

and

Montanari

in

-LSB-

-RSB-

It

is

based

on

the

observation

that

the

markings

of

the

net

obey

a

commutative

monoidal

law

This

monoidal

structure

is

induced

on

the

markings

by

the

firing

rule

in

the

sense

that

if

the

firing

of

a

transition

induces

a

change

ffi

in

the

marking

the

double

firing

-LRB-

if

possible

-RRB-

of

the

same

transition

induces

a

change

ffi

in

the

marking

Thus

we

see

that

there

is

a

natural

monoidal

structure

on

the

markings

The

observation

to

make

now

is

that

a

single

transition

with

some

input

and

output

places

can

be

viewed

as

a

net

This

net

has

two

possible

markings

the

input

places

are

marked

or

the

output

places

are

marked

Each

of

these

markings

correspond

to

an

element

of

the

free

monoid

on

the

set

of

places

of

the

net

The

input

and

output

weighting

functions

can

now

be

interpreted

as

monoid

homomorphisms

The

usefulness

of

viewing

the

set

of

places

as

a

monoid

will

become

clear

in

the

following

subsection

Mainly

the

monoidal

structure

on

the

places

induces

a

monoidal

structure

on

the

transitions

giving

a

rich

hierarchy

of

categories

with

increasingly

rich

structures

on

the

transitions

The

monoidal

structure

on

the

transitions

is

used

to

represent

the

concurrent

firing

of

transitions

Thus

if

we

think

of

the

monoidal

operation

on

the

places

-LRB-

conditions

-RRB-

as

meaning

the

conditions

hold

simultaneously

the

operation

on

the

transitions

has

the

reading

the

events

happen

simultaneously

Hence

the

monoidal

operation

can

be

used

as

a

representation

of

parallelism

or

in

other

words

the

algebraic

structure

of

parallelism

is

monoidal

In

this

model

a

very

liberal

view

of

nets

is

taken

For

example

in

some

constructions

isolated

places

are

useful

In

some

categories

the

net

with

only

one

transition

and

place

connected

in

a

loop

plays

a

very

important

role

by

being

the

terminal

net

Essentially

this

means

that

we

wish

to

treat

nets

as

graphs

Also

the

nets

will

not

have

initial

markings

This

means

that

the

behaviour

of

the

net

is

a

much

more

abstract

concept

The

behaviour

of

the

net

includes

all

the

possible

behaviours

of

the

net

It

has

been

proved

by

Winskel

-LSB-

-RSB-

that

coproducts

do

not

exists

in

the

category

of

Petri

nets

with

initial

markings

All

our

categories

now

have

coproducts

because

they

lack

initial

markings

But

in

these

cases

the

coproduct

merely

consists

of

the

juxtaposition

of

the

individual

nets

with

no

connections

between

the

components

So

the

lack

of

initial

marking

makes

the

coproduct

something

different

than

non-deterministic

choice

There

are

two

solutions

to

this

problem

The

first

one

is

obviously

to

put

the

initial

markings

back

into

the

net

in

some

way

This

can

be

done

in

a

very

elegant

way

by

restricting

the

structure

of

the

initial

marking

as

has

been

proposed

by

Meseguer

and

Montanari

-LSB-

-RSB-

The

less

obvious

one

is

to

look

for

some

other

colimits

that

would

allow

us

to

implement

non-deterministic

choices

As

we

shall

see

this

is

also

possible

The

investigation

of

other

colimits

is

of

interest

also

in

view

of

the

fact

that

the

product

and

coproduct

of

nets

with

initial

markings

are

rather

arbitrary

They

do

not

allow

for

a

more

controlled

compositional

construction

of

nets

We

shall

be

interested

in

colimits

that

could

allow

us

to

control

the

extent

of

synchronisation

of

the

nets

in

an

elegant

way

This

section

consists

of

two

subsections

The

first

subsection

discusses

the

different

categories

of

nets

that

are

derivable

in

the

models

while

the

second

subsection

discusses

the

completeness

properties

of

some

specific

categories

in

this

model

A

critical

discussion

of

the

use

of

the

existing

colimits

will

be

done

in

section

General

structure

of

the

model

In

this

subsection

we

shall

first

take

a

look

at

the

different

categories

of

nets

The

categories

are

all

derived

from

the

category

of

graphs

by

adding

structure

to

the

set

of

transitions

Then

we

shall

see

that

these

categories

are

related

by

a

sequence

of

adjunctions

The

importance

of

these

adjunctions

will

become

apparent

in

section

where

we

will

make

good

use

of

the

fact

that

left

adjoints

preserve

colimits

Finally

we

shall

try

to

give

some

characterising

examples

so

that

the

reader

can

get

a

feel

for

the

differences

between

the

morphisms

in

these

categories

The

first

thing

we

need

to

do

is

define

a

category

of

graphs

-LSB-

-RSB-

Definition

The

category

of

graphs

Graph

has

as

objects

graphs

hT

P

oi

and

morphisms

pairs

hf

gi

of

functions

such

that

the

diagram

T

o

P

f

g

T

P

commutes

By

adding

a

free

monoidal

structure

on

the

places

we

get

the

category

Petri

Definition

The

category

of

Petri

nets

Petri

has

as

objects

Petri

nets

hT

P

oi

and

as

morphisms

graph

morphisms

hf

gi

where

g

is

a

monoid

homomorphism

If

we

want

partial

maps

on

the

transitions

we

can

do

it

by

adding

a

special

element

to

the

set

of

transitions

In

this

way

we

get

the

category

of

pointed

Petri

nets

Definition

The

category

of

pointed

Petri

nets

has

as

objects

pointed

nets

h

-LRB-

T

-RRB-

P

oi

and

as

morphisms

graph

morphisms

hf

gi

where

f

is

a

pointed

function

and

g

is

a

monoid

homomorphism

If

we

add

a

monoidal

structure

to

the

transitions

we

get

the

category

of

Petri

commutative

monoids

Definition

A

Petri

commutative

monoid

consists

of

a

Petri

net

where

the

set

of

transitions

is

a

commutative

monoid

-LRB-

T

-RRB-

and

where

o

-LRB-

T

-RRB-

P

are

monoid

homomorphisms

A

Petri

commutative

monoid

homomorphism

is

a

Petri

net

morphism

hf

gi

where

f

is

monoid

homomorphism

This

defines

a

category

CMonPetri

The

reader

should

note

that

the

monoid

on

the

transitions

need

not

be

free

The

idea

here

is

that

the

monoidal

structure

on

the

transitions

reflects

the

structure

of

the

computation

If

there

are

synchronisation

constraints

in

the

system

these

are

expressed

as

conditions

on

the

transition

monoid

The

above

categories

can

all

be

augmented

with

reflexive

structures

To

each

place

we

adjoin

an

identity

transition

that

represents

the

fact

that

nothing

happens

at

that

specific

place

The

corresponding

categories

are

CMonRPetri

RPetri

RGraph

The

last

category

in

the

hierarchy

is

the

category

of

Petri

categories

Definition

A

Petri

category

is

a

small

category

C

-LRB-

P

T

id

-RRB-

whose

set

of

objects

is

a

free

commutative

monoid

and

whose

set

of

arrows

has

a

commutative

monoid

structure

-LRB-

T

idI

-RRB-

that

is

not

necessarily

free

and

is

compatible

with

the

categorical

structure

in

the

sense

that

the

source

and

target

functions

o

T

P

are

monoid

homomorphisms

and

that

respects

identities

and

-LRB-

sequential

-RRB-

composition

-LRB-

-RRB-

-LRB-

-RRB-

and

o

-LRB-

-RRB-

o

-LRB-

-RRB-

id

-LRB-

-LRB-

-RRB-

-RRB-

and

id

-LRB-

o

-LRB-

-RRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

Given

u

v

v

w

we

have

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

Given

two

Petri

Categories

C

and

D

a

Petri

category

morphism

from

C

to

D

is

a

functor

that

is

a

monoid

homomorphism

when

restricted

to

both

the

objects

and

the

morphisms

This

data

determines

a

category

CatPetri

The

equations

are

equivalent

to

saying

that

the

operation

is

a

bifunctor

C?C

C.

Furthermore

this

implies

that

a

Petri

category

is

a

monoidal

category

A

Petri

net

can

be

completed

to

a

Petri

category

by

the

following

proof

rules

u

in

P

t

u

u

in

T

-LSB-

N

-RSB-

-LRB-

t

-RRB-

u

and

o

-LRB-

t

-RRB-

v

in

N

t

u

v

in

T

-LSB-

N

-RSB-

u

v

v

w

in

T

-LSB-

N

-RSB-

ffi

u

w

in

T

-LSB-

N

-RSB-

t

u

v

in

T

-LSB-

N

-RSB-

t

u

v

in

T

-LSB-

N

-RSB-

The

rules

define

a

functor

T

-LSB-

-RSB-

Petri

CatPetri

which

is

left

adjoint

to

the

forgetful

functor

U

CatPetri

Petri

The

category

CatPetri

has

several

uses

First

of

all

due

to

the

existence

of

the

left

adjoint

T

we

can

think

of

the

CatPetri

net

T

-LSB-

N

-RSB-

as

a

kind

of

generalised

behaviour

of

the

net

The

CatPetri

net

T

-LSB-

N

-RSB-

contains

all

possible

behaviours

of

the

net

N

This

kind

of

abstract

behaviour

is

studied

in

-LSB-

-RSB-

where

it

is

related

to

the

different

notions

of

process

for

Place/Transition

systems

-LRB-

cf.

a

bt

fp

-LRB-

a

-RRB-

fp

-LRB-

b

-RRB-

ft

-LRB-

t

-RRB-

Figure

A

morphism

in

Petri

-LSB-

-RSB-

-RRB-

Secondly

the

notion

of

morphism

is

a

very

strong

one

and

we

shall

have

reason

to

examine

it

further

in

the

sequel

Actually

the

left

adjoint

T

is

the

composition

of

several

left

adjoints

because

there

exists

a

sequence

of

left

adjoints

between

the

categories

defined

above

Petri

CMonPetri

CatPetri

These

left

adjoints

allow

us

to

relate

the

different

categories

and

their

morphisms

to

each

other

A

comparison

of

the

different

categories

allows

us

to

characterise

the

morphism

by

their

possible

actions

on

transitions

ffl

Petri

A

transition

is

mapped

to

another

transition

-LRB-

see

figure

-RRB-

ffl

We

can

erase

parallel

transitions

-LRB-

see

figure

-RRB-

ffl

CMonPetri

A

transition

is

mapped

onto

parallel

compositions

of

transitions

-LRB-

see

figure

-RRB-

ffl

CatPetri

A

transition

can

be

mapped

onto

an

entire

computation

with

sequential

and

parallel

compositions

of

transitions

-LRB-

see

figure

-RRB-

The

morphisms

are

listed

in

their

order

of

complexity

The

sequence

of

left

adjoints

mentioned

previously

makes

this

order

an

inclusion

in

the

sense

that

with

a

more

complex

morphism

we

can

achieve

all

that

can

be

achieved

with

the

more

simpler

one

All

the

morphisms

obey

the

following

important

theorem

Theorem

The

morphisms

preserve

behaviour

That

is

given

a

marking

in

there

exists

a

corresponding

marking

in

a

b

d

c

e

fp

-LRB-

a

-RRB-

fp

-LRB-

b

-RRB-

fp

-LRB-

c

-RRB-

fp

-LRB-

d

-RRB-

fp

-LRB-

e

-RRB-

ft

-LRB-

-RRB-

ft

-LRB-

-RRB-

Figure

A

morphism

in

b

a

t

fp

-LRB-

a

-RRB-

fp

-LRB-

b

-RRB-

ft

-LRB-

t

-RRB-

Figure

A

morphism

in

CMonPetri

a

t

b

Figure

A

morphism

in

CatPetri

a

b

c

d

e

f

r

Figure

The

net

This

fact

is

a

consequence

of

the

fact

that

in

CatPetri

morphisms

are

functors

and

thus

preserve

parallel

and

sequential

compositions

of

transitions

in

other

words

the

behaviour

Now

through

the

sequence

of

left

adjoints

this

result

transfers

to

the

other

morphisms

too

To

compare

the

morphisms

discussed

here

with

the

morphisms

defined

by

Winskel

in

-LSB-

-RSB-

the

following

observations

can

be

made

ffl

a

Petri

morphism

corresponds

to

a

synchronous

morphism

ffl

a

morphism

corresponds

to

an

asynchronous

morphism

and

ffl

a

CMonPetri

morphism

corresponds

to

a

homomorphism

Before

ending

this

subsection

we

shall

briefly

discuss

the

morphisms

in

CatPetri

so

that

the

reader

will

get

a

feel

for

what

we

mean

by

behaviour

in

T

-LSB-

N

-RSB-

We

shall

illustrate

this

by

discussing

refinement

as

some

morphisms

in

CatPetri

can

be

interpreted

as

refinement

morphisms

In

the

net

in

figure

we

wish

to

refine

the

transition

r

by

the

net

R

in

figure

A

simple

graphical

substitution

gives

as

a

result

the

net

in

figure

Now

there

exists

a

morphism

f

T

-LSB-

-RSB-

T

-LSB-

-RSB-

in

CatPetri

given

by

the

following

assignments

r

-LRB-

-RRB-

c

d

g

h

e

f

Figure

The

net

R.

f

Figure

The

net

The

net

can

thus

be

interpreted

as

a

refinement

of

Unfortunately

the

morphism

f

does

not

preserve

deadlock

freeness

because

both

R

and

are

deadlock

free

but

is

not

This

is

because

from

the

marking

c

b

both

steps

f

and

and

are

possible

The

resulting

markings

are

dead

The

problem

arises

because

the

net

R

exhibits

a

phenomenon

called

initial

concurrency

where

the

initial

transitions

and

need

not

fire

concurrently

There

are

standard

solutions

to

this

problem

-LRB-

see

e.g.

-LSB-

-RSB-

p.

-RRB-

where

one

requires

that

the

refinement

net

shall

obey

conditions

ensuring

that

it

will

act

like

a

transition

with

respect

to

its

environment

ffl

it

can

not

move

without

being

activated

by

the

environment

ffl

it

has

the

same

possible

behaviours

whenever

it

is

activated

ffl

it

may

not

deadlock

ffl

it

consumes

and

produces

tokens

in

a

coincident

manner

The

first

condition

means

that

the

net

shall

not

be

marked

initially

The

second

condition

means

that

the

net

is

not

allowed

to

store

tokens

The

final

condition

prevents

initial

and

final

concurrency

But

there

is

a

way

in

which

to

interpret

the

morphism

f

so

that

it

preservers

deadlock-freeness

Because

the

morphism

is

in

CatPetri

it

is

actually

mapping

behaviours

to

behaviours

Thus

it

can

be

interpreted

as

specifying

that

for

the

net

to

be

a

deadlock-free

refinement

of

the

transitions

have

to

be

fired

in

the

order

-LRB-

-RRB-

A

further

investigation

of

this

interpretation

may

be

of

use

in

the

theory

of

refinement

Completeness

properties

The

main

aim

of

this

subsection

is

to

show

which

colimits

do

exist

in

Petri

The

fact

that

Petri

does

not

have

all

colimits

will

lead

to

definition

of

a

category

PetriG

which

is

a

subcategory

of

Petri

that

has

all

colimits

The

lack

of

arbitrary

limits

and

colimits

in

the

category

Petri

follows

from

the

lack

of

the

corresponding

limits

and

colimits

in

the

category

of

free

abelian

monoids

This

is

illustrated

by

the

lack

of

equalizers

and

coequalizers

The

following

two

counter-examples

are

due

to

Jos?e

Meseguer

-LSB-

-RSB-

First

equalizers

Counterexample

Take

the

following

two

maps

from

N

to

N

f

-LRB-

x

y

z

-RRB-

g

-LRB-

x

y

z

-RRB-

The

equalizer

of

the

pair

f

g

is

the

set

E

f

-LRB-

x

y

z

-RRB-

which

is

generated

by

the

set

of

vectors

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

This

set

of

vectors

E

is

not

a

free

monoid

because

we

have

the

identity

-LRB-

-RRB-

For

coequalizers

there

is

an

analogous

counterexample

Counterexample

Take

the

following

two

maps

from

N

to

N

-LRB-

x

-RRB-

-LRB-

x

-RRB-

The

coequalizer

of

these

two

maps

is

the

following

submonoid

of

N

Q

fnjn

not

divisible

by

which

is

clearly

not

free

This

leaves

us

with

the

following

two

propositions

Proposition

The

category

Petri

has

all

products

Proof

The

net

hf?g

OE

i

is

the

terminal

object

The

product

-LRB-

see

figure

of

two

nets

and

is

-RSB-

oi

where

the

projections

are

pairs

ssi

hssiT

ssiP

i

with

ssiT

-LRB-

-RRB-

Ti

and

ssiP

-LRB-

-RSB-

-RRB-

Pi

for

i

The

maps

and

o

are

defined

by

-LRB-

-RRB-

-LRB-

-RRB-

o

-LRB-

-RRB-

-LRB-

-RRB-

Proposition

The

category

Petri

has

all

coproducts

Proof

The

initial

object

is

the

empty

net

hOE

OE

i

The

coproduct

is

the

disjoint

union

of

the

two

nets

-RSB-

-RSB-

-RSB-

-RSB-

The

idea

that

the

empty

net

is

the

initial

object

may

at

first

seem

slightly

puzzling

because

an

initial

object

in

the

category

of

monoids

is

any

one

object

monoid

where

the

object

is

the

unit

element

But

in

nets

the

unit

element

is

to

be

thought

of

as

the

empty

marking

which

means

the

empty

set

of

places

The

fact

that

Petri

lacks

more

useful

colimits

makes

it

at

first

sight

not

very

useful

in

its

applications

to

compositionality

Fortunately

there

is

a

solution

to

this

problem

proposed

by

Hummert

in

-LSB-

-RSB-

Recall

that

we

started

with

the

category

of

graphs

to

which

we

then

added

structure

The

choice

of

morphism

that

was

made

is

the

reason

that

cocompleteness

was

lost

By

changing

the

morphism

cocompleteness

can

be

regained

Figure

is

the

product

of

and

Definition

The

category

PetriG

has

as

objects

Petri

nets

and

as

morphism

pairs

of

functions

hft

fpi

such

that

T

o

P

ft

f?p

T

P

commutes

-LRB-

f?p

is

the

free

extension

of

fp

to

a

monoid

homomorphism

-RRB-

The

following

is

obvious

Proposition

PetriG

is

a

wide

subcategory

of

Petri

An

example

will

illustrate

the

difference

between

the

morphisms

Figure

shows

a

map

that

is

a

map

in

PetriG

Its

inverse

is

a

map

in

Petri

but

not

in

PetriG

Morphism

in

PetriG

are

essentially

graph

morphism

and

the

category

of

graphs

has

all

colimits

Because

the

category

PetriG

is

the

subcategory

of

a

bt

fp

-LRB-

-RRB-

a

fp

-LRB-

-RRB-

a

fp

-LRB-

-RRB-

b

ft

-LRB-

-RRB-

t

Figure

A

morphism

in

PetriG

Petri

that

corresponds

to

the

image

of

the

free

functor

F

-LSB-

Graph

-RSB-

that

is

left

adjoint

to

the

forgetful

functor

U

Petri

Graph

the

category

PetriG

is

cocomplete

More

explicitly

the

constructions

are

show

below

Theorem

PetriG

is

cocomplete

Proof

We

list

the

simple

colimits

ffl

the

initial

object

is

the

net

hOE

OE

i

ffl

the

coproduct

is

the

juxtaposition

of

the

two

nets

with

the

obvious

injections

and

ffl

the

coequalizer

of

is

the

net

N

hT

P

oi

with

T

coeq

-LRB-

-RRB-

in

Set

P

coeq

-LRB-

-RRB-

in

Set

The

maps

o

are

defined

by

the

universal

property

of

the

coequalizer

Unfortunately

we

do

not

have

all

products

in

PetriG

Consider

the

nets

in

figure

If

were

to

be

the

product

of

and

this

would

imply

the

existence

of

projections

ssi

hssiT

ssiP

i

for

i

But

in

PetriG

there

exist

no

maps

Ni

To

get

a

category

that

is

both

complete

and

cocomplete

we

still

need

to

make

a

change

in

the

morphism

on

the

places

The

map

on

places

is

essentially

a

map

in

Set

If

we

extend

the

map

to

allow

partial

functions

we

can

then

construct

the

product

We

shall

not

be

concerned

with

this

category

in

this

work

Figure

The

category

PetriG

does

not

have

all

probucts

Algebraic

High-Level

nets

The

aim

of

this

section

is

to

define

a

category

of

algebraic

high-level

nets

and

define

their

semantics

in

terms

of

Petri

nets

The

basic

idea

behind

algebraic

high-level

nets

is

to

label

the

arcs

of

the

net

with

terms

from

an

algebraic

specification

of

a

datatype

-LSB-

-RSB-

Because

algebraic

specifications

have

a

notion

of

implementation

given

in

terms

of

so

called

SPEC-algebras

we

are

able

to

give

a

semantics

for

our

high-level

nets

in

terms

of

Petri

nets

This

semantics

can

be

seen

as

the

unfolding

of

the

high-level

net

into

a

low-level

net

The

algebraic

high-level

nets

we

define

are

essentially

the

algebraic

nets

of

Reisig

and

Vautherin

proposed

in

-LSB-

-RSB-

The

section

is

structured

as

follows

We

start

by

defining

algebraic

high-level

nets

and

their

semantics

The

main

result

of

the

first

subsection

is

the

fact

that

the

semantics

is

a

functor

from

the

category

of

algebraic

high-level

nets

to

the

category

PetriG

The

second

subsection

is

concerned

with

the

proof

of

cocompleteness

of

the

category

of

algebraic

high-level

nets

This

result

allows

us

then

in

the

third

subsection

to

prove

that

the

semantics

functor

preserves

colimits

This

fact

is

the

main

result

of

this

section

and

it

is

then

used

in

the

final

subsection

to

discuss

some

proof

rules

for

compositional

reasoning

with

high-level

nets

The

results

in

this

section

are

based

on

the

results

in

-LSB-

-RSB-

although

the

notion

of

algebraic

high-level

net

there

is

slightly

more

complicated

than

ours

Our

nets

differ

from

the

nets

proposed

by

Reisig

in

-LSB-

-RSB-

by

allowing

interpretations

other

than

the

initial

What

this

means

is

that

we

view

multisets

of

terms

essentially

as

an

abbreaviation

for

multiple

arcs

between

transitions

and

places

while

Reisig

incorporates

the

notion

of

a

multiset

into

the

specification

of

the

abstract

datatype

We

shortly

define

the

concepts

relating

to

algebraic

specification

that

will

be

used

henceforth

in

this

work

For

a

more

thorough

discussion

see

-LSB-

-RSB-

An

algebraic

specification

SPEC

hSO

OP

EQi

is

composed

of

a

set

of

sorts

SO

a

set

of

operator

symbols

OP

and

equations

EQ

A

SPEC-algebra

A

contains

for

every

sort

s

SO

a

carrier

set

As

and

for

every

operator

symbol

op

OP

an

operation

opA

that

satisfies

the

equations

A

homomorphism

between

two

SPEC-algebras

f

A

B

is

a

family

of

maps

fs

As

Bs

that

are

compatible

with

the

operations

The

term

algebra

of

the

specification

SPEC

is

denoted

by

TOP

The

term

algebra

with

variables

from

a

set

X

is

denoted

by

TOP

-LRB-

X

-RRB-

For

each

SPEC

algebra

A

there

exists

an

evaluation

function

evalA

TOP

A.

Let

assA

X

A

be

a

variable

assignment

The

ass

A

TOP

-LRB-

X

-RRB-

A

denotes

the

unique

extension

of

assA

for

X

to

TOP

-LRB-

X

-RRB-

Algebraic

net

specifications

An

Algebraic

High-Level

net

-LRB-

AHL-net

-RRB-

consists

of

three

parts

an

abstract

datatype

specification

SPEC

a

net

that

has

arcs

labeled

with

terms

from

this

specification

and

a

SPEC-algebra

that

is

the

semantics

of

the

specification

For

technical

reasons

it

is

advantageous

to

approach

the

formal

definition

of

AHL-nets

in

two

stages

We

first

define

an

algebraic

net

specification

Definition

An

Algebraic

Net

Specification

is

a

tuple

NS

hSO

OP

EQ

X

T

;P

pre

post

sorti

where

ffl

hSO

OP

EQi

is

a

specification

ffl

X

is

a

set

of

SO-sorted

variables

ffl

T

P

are

sets

of

transitions

and

places

respectively

ffl

pre

post

T

-LSB-

P

TOP

-LRB-

X

-RRB-

-RSB-

and

ffl

sort

P

SO

V

ar

-LRB-

t

-RRB-

X

is

the

union

of

the

variables

in

pre

-LRB-

t

-RRB-

post

-LRB-

t

-RRB-

The

definition

formalises

the

intuitive

idea

that

given

a

net

we

can

instead

of

labeling

the

net

with

integers

as

with

P/T-systems

label

the

net

with

terms

from

the

term

algebra

TOP

-LRB-

X

-RRB-

Actually

we

label

the

net

with

multisets

of

terms

-LRB-

elements

of

TOP

-LRB-

X

-RRB-

-RRB-

because

then

we

do

not

need

multiple

arcs

between

places

and

transitions

We

shall

sometimes

refer

to

algebraic

net

specifications

NSi

hTi

Pi

prei

postii

In

this

case

it

is

understood

that

the

specification

part

hSO

OP

EQi

is

the

same

for

all

NSi

In

figure

we

have

a

specification

for

the

dining

philosophers

problem

The

specification

is

divided

into

two

parts

the

first

consisting

of

the

algebraic

specification

of

the

net-inscriptions

and

the

second

consisting

of

the

inscribed

net

This

particular

specification

contains

philosophers

The

abstract

datatype

specification

in

the

net

specification

has

a

standard

notion

of

implementation

By

now

combining

the

net

specification

with

an

implementation

that

is

a

SPEC-algebra

we

get

an

algebraic

high-level

net

Definition

Let

A

Alg

-LRB-

SPEC

-RRB-

and

NS

be

an

algebraic

net

specification

Then

an

Algebraic

High-level

Net

is

a

pair

AN

hNS

Ai

As

noted

previously

an

algebraic

net

specification

consists

of

two

parts

the

algebraic

specification

part

and

the

net

part

Because

the

net

is

annotated

with

terms

from

a

specification

and

the

specification

has

a

well

defined

semantics

in

terms

of

SPEC-algebras

we

can

ask

what

this

semantics

does

to

the

net

part

of

the

algebraic

net

specification

It

turns

out

that

the

semantics

transforms

the

high-level

net

into

a

corresponding

low-level

net

according

to

the

following

definition

Definition

Given

an

algebraic

high-level

net

AN

hNS

Ai

we

can

define

a

Petri

net

FNS

-LRB-

A

-RRB-

hTF

PF

F

oF

i

as

follows

ffl

PF

S

Asort

-LRB-

p

-RRB-

p

ffl

TF

fht

ass

#Aij

assA

-LSB-

V

ar

-LRB-

t

-RRB-

A

-RSB-

t

Tg

ffl

F

-LRB-

ht

ass

#Ai

-RRB-

ass?A

-LRB-

pre

-LRB-

t

-RRB-

-RRB-

ffl

oF

-LRB-

ht

ass

#Ai

-RRB-

ass?A

-LRB-

post

-LRB-

t

-RRB-

-RRB-

with

ass?A

TOP

-LRB-

X

-RRB-

-LRB-

P

A

-RRB-

We

shall

often

talk

of

an

interpretation

of

NS

in

A.

By

this

we

mean

the

net

FNS

-LRB-

A

-RRB-

For

a

place

p

in

the

high-level

net

we

create

a

number

of

places

in

the

low-level

net

such

that

to

every

possible

token

x

that

may

reside

in

place

p

there

exists

a

place

-LRB-

ie

the

pair

hp

xi

-RRB-

in

the

low-level

net

that

represents

the

fact

that

x

is

in

place

p.

Analogously

for

the

transitions

for

a

transition

t

in

the

high-level

net

we

have

to

create

transitions

in

the

low-level

net

that

represent

the

fact

that

the

transition

fires

with

a

specific

assignment

on

the

variables

The

construction

can

be

viewed

as

an

unfolding

of

the

high-level

net

into

a

low-level

net

An

example

will

clarify

the

construction

Figure

gives

an

interpretation

in

the

algebra

A

-LRB-

A

-RRB-

with

A

-RSB-

and

fr

l

sorts

phil

fork

opns

phil

fork

l

phil

fork

r

phil

fork

eqns

l

-LRB-

phi

-RRB-

fi

r

-LRB-

phi

-RRB-

fi

for

i

r

-LRB-

-RRB-

p

f

x

l

-LRB-

x

-RRB-

r

-LRB-

x

-RRB-

e

xx

l

-LRB-

x

-RRB-

r

-LRB-

x

-RRB-

x

Figure

The

specification

NS

of

the

dining

philosophers

problem

We

have

omitted

the

obvious

type

declarations

from

the

set

of

functions

The

functions

r

l

have

the

following

definition

x

r

l

while

the

functions

are

the

constant

functions

The

interpretation

of

NS

in

A

is

given

in

figure

A

slightly

more

interesting

interpretation

is

the

interpretation

in

the

algebra

A

-LRB-

f?g

fidg

-RRB-

which

gives

the

net

in

figure

The

net

shows

just

the

amount

of

tokens

consumed

and

produced

by

each

transition

i.e.

transition

takes

one

token

from

place

p

tokens

from

place

f

and

produces

one

token

to

place

e

Some

uses

for

this

interpretation

are

discussed

in

-LSB-

-RSB-

The

point

with

this

construction

is

that

it

is

functorial

because

given

a

morphism

f

with

Alg

-LRB-

SPEC

-RRB-

we

have

the

following

Proposition

Let

hNS

and

hNS

be

algebraic

high-level

nets

based

on

the

same

net

specification

Then

given

a

Alg

-LRB-

SPEC

-RRB-

morphism

f

the

semantics

FNS

can

be

extended

to

a

functor

FNS

ADT

-LRB-

SPEC

-RRB-

PetriG

by

the

following

assignments

ffl

FNS

-LRB-

f

-RRB-

T

-LRB-

ht

ass

-RRB-

ht

ass

f

i

and

ffl

FNS

-LRB-

f

-RRB-

P

-LRB-

hp

ai

-RRB-

hp

f

-LRB-

a

-RRB-

i.

Proof

We

show

that

FNS

-LRB-

f

-RRB-

T

and

FNS

-LRB-

f

-RRB-

P

form

a

PetriG-morphism

i.e.

-LRB-

FNS

-LRB-

f

-RRB-

T

-LRB-

t

-RRB-

-RRB-

FNS

-LRB-

f

-RRB-

P

-LRB-

-LRB-

t

-RRB-

-RRB-

he

he

he

hp

hf

hp

hf

hp

hf

-LSB-

x

-RSB-

-LSB-

x

-RSB-

-LSB-

x

-RSB-

-LSB-

x

-RSB-

-LSB-

x

-RSB-

-LSB-

x

-RSB-

Figure

The

interpretation

of

NS

in

A.

p

f

e

Figure

The

interpretation

of

NS

in

A

-LRB-

FNS

-LRB-

f

-RRB-

T

-LRB-

t

-RRB-

-RRB-

FNS

-LRB-

f

-RRB-

P

-LRB-

-LRB-

t

-RRB-

-RRB-

Now

for

pre

-LRB-

FNS

-LRB-

f

-RRB-

T

-LRB-

t

-RRB-

-RRB-

-LRB-

ht

ass

f

i

-RRB-

-LRB-

ass

f

-RRB-

-LRB-

pre

-LRB-

t

-RRB-

-RRB-

fi

-LRB-

-LRB-

pre

-LRB-

t

-RRB-

-RRB-

-RRB-

FNS

-LRB-

f

-RRB-

P

-LRB-

-LRB-

t

-RRB-

-RRB-

Analogously

for

post

Why

do

we

need

these

definitions

and

proofs

Because

we

want

to

define

a

notion

of

AHL-morphism

In

the

above

definitions

we

have

always

kept

the

specification

SPEC

and

the

net

constant

Thus

we

have

a

different

functor

for

each

net

specification

In

such

a

situation

the

natural

category

theoretic

question

to

ask

is

whether

given

a

map

between

net

specifications

there

exists

a

natural

transformation

between

the

corresponding

functors

To

answer

this

question

we

need

a

notion

of

morphism

between

algebraic

net

specifications

Definition

An

NS-morphism

between

algebraic

net

specifications

is

a

pair

hhT

hP

i

where

hT

and

hP

such

that

ffl

hxP

-LRB-

-LRB-

t

-RRB-

-RRB-

-LRB-

hT

-LRB-

t

-RRB-

-RRB-

and

ffl

hxP

-LRB-

-LRB-

t

-RRB-

-RRB-

-LRB-

hT

-LRB-

t

-RRB-

-RRB-

where

hxP

-LSB-

TOP

-LRB-

X

-RRB-

-RSB-

-LSB-

TOP

-LRB-

X

-RRB-

-RSB-

is

defined

by

hxP

-LRB-

M

-RRB-

-LRB-

s

-RRB-

M

hp

-LRB-

-RRB-

=p

M

-LRB-

p

-RRB-

with

M

-LSB-

TOP

-LRB-

X

-RRB-

-RSB-

and

s

Again

notice

that

we

keep

the

specification

constant

Now

we

can

prove

that

given

an

ANS-morphism

there

exists

a

natural

transformation

between

the

corresponding

functors

The

idea

is

that

the

functors

F

are

indexed

by

the

nets

Given

a

specification

SPEC

each

net

defines

a

different

functor

F

in

such

a

way

that

a

map

between

different

nets

induces

a

natural

transformation

between

the

corresponding

functors

Proposition

Let

h

be

an

NS-morphism

then

there

exists

a

natural

transformation

Proof

Define

-LRB-

A

-RRB-

-LRB-

-LRB-

A

-RRB-

P

-LRB-

A

-RRB-

T

-RRB-

as

follows

-LRB-

A

-RRB-

T

-LRB-

ht

ass

#Ai

-RRB-

hhT

-LRB-

t

-RRB-

ass

#Ai

and

-LRB-

A

-RRB-

P

-LRB-

hp

ai

-RRB-

hhP

-LRB-

p

-RRB-

ai

Now

for

to

be

a

natural

transformation

the

following

equations

must

be

satisfied

-LRB-

f

-RRB-

T

-LRB-

-LRB-

-RRB-

T

-LRB-

t

-RRB-

-RRB-

-LRB-

-RRB-

T

-LRB-

-LRB-

f

-RRB-

T

-LRB-

t

-RRB-

-RRB-

-LRB-

f

-RRB-

P

-LRB-

-LRB-

-RRB-

P

-LRB-

p

-RRB-

-RRB-

-LRB-

-RRB-

P

-LRB-

-LRB-

f

-RRB-

P

-LRB-

p

-RRB-

-RRB-

The

first

equation

is

equivalent

to

-LRB-

f

-RRB-

T

-LRB-

hhT

-LRB-

t

-RRB-

ass

-RRB-

hh

-LRB-

t

-RRB-

ass

f

i

-LRB-

-RRB-

T

-LRB-

ht

fi

-RRB-

-LRB-

-RRB-

T

-LRB-

-LRB-

f

-RRB-

T

-LRB-

ht

ass

-RRB-

-RRB-

For

the

second

equation

notice

that

-LRB-

f

-RRB-

P

-LRB-

-RRB-

P

hidP

fi

hhP

hhP

fi

It

remains

to

prove

that

the

compositions

-LRB-

f

-RRB-

T

-LRB-

-LRB-

-RRB-

T

-LRB-

t

-RRB-

-RRB-

-LRB-

-RRB-

T

-LRB-

-LRB-

f

-RRB-

T

-LRB-

t

-RRB-

-RRB-

-LRB-

f

-RRB-

P

-LRB-

-LRB-

-RRB-

P

-LRB-

p

-RRB-

-RRB-

-LRB-

-RRB-

P

-LRB-

-LRB-

f

-RRB-

P

-LRB-

p

-RRB-

-RRB-

are

PetriG-morphisms

according

to

definition

on

page

-LRB-

-LRB-

f

-RRB-

P

-LRB-

-RRB-

P

-RRB-

-LRB-

-LRB-

ht

-RRB-

-RRB-

-LRB-

-LRB-

f

-RRB-

P

-LRB-

-RRB-

P

-RRB-

-LRB-

-LRB-

-LRB-

t

-RRB-

-RRB-

-RRB-

hhP

fi

-LRB-

-LRB-

t

-RRB-

-RRB-

-LRB-

ass

f

-RRB-

-LRB-

hxP

-LRB-

-LRB-

t

-RRB-

-RRB-

-RRB-

-LRB-

ass

f

-RRB-

-LRB-

-LRB-

hT

-LRB-

t

-RRB-

-RRB-

-RRB-

-LRB-

hhT

-LRB-

t

-RRB-

-LRB-

ass

f

i

-RRB-

-LRB-

-LRB-

f

-RRB-

T

-LRB-

-RRB-

T

-RRB-

With

the

help

of

the

notion

of

NS-morphism

and

SPEC-morphism

we

can

now

define

the

category

of

algebraic

high-level

nets

Definition

The

category

AHL

-LRB-

SPEC

-RRB-

has

as

objects

algebraic

high-level

nets

and

as

morphisms

pairs

fAH

hfANS

fAi

where

fANS

MorANS

-LRB-

SPEC

-RRB-

and

fA

MorAlg

-LRB-

SPEC

-RRB-

The

reason

for

the

approach

taken

will

become

apparent

from

the

ease

with

which

we

now

can

prove

the

following

important

fact

Theorem

The

assignment

Sem

-LRB-

hNS

Ai

-RRB-

FNS

-LRB-

A

-RRB-

defines

a

functor

Sem

AHL

-LRB-

SPEC

-RRB-

PetriG

Proof

The

following

diagram

commutes

because

of

propositions

-LRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

fA

-RRB-

R

-LRB-

fANS

fA

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

fA

-RRB-

R

-LRB-

-RRB-

Sem

-LRB-

-RRB-

In

conclusion

then

the

result

of

this

section

is

that

there

exists

a

well

defined

semantics

for

AHL-nets

in

terms

of

Petri

nets

The

well

definedness

is

expressed

in

the

fact

that

there

exists

a

functor

from

AHL

-LRB-

SPEC

-RRB-

to

PetriG

The

rest

of

this

section

will

be

concerned

with

proving

that

the

functor

Sem

is

cocontinous

and

then

showing

some

applications

of

this

fact

Cocompleteness

The

aim

of

this

subsection

is

to

prove

that

AHL

-LRB-

SPEC

-RRB-

is

cocomplete

The

proof

is

approached

in

stages

From

the

fact

that

ANS

-LRB-

SPEC

-RRB-

morphism

essentially

just

change

the

underlying

net

it

is

easy

to

deduce

that

the

category

ANS

-LRB-

SPEC

-RRB-

is

cocomplete

Theorem

The

category

ANS

-LRB-

SPEC

-RRB-

is

cocomplete

Proof

We

describe

coproducts

and

coequalizers

ffl

coproducts

Let

NSi

hTi

Pi

prei

posti

sortii

for

i

Define

-RSB-

-RSB-

Clearly

the

injections

ini

NSi

are

ANS

-LRB-

SPEC

-RRB-

morphisms

R

NS

The

universal

arrow

h

T

P

i

is

defined

by

T

-LRB-

t

-RRB-

fiT

-LRB-

t

-RRB-

for

t

Ti

and

P

-LRB-

p

-RRB-

fiP

-LRB-

p

-RRB-

for

P

Pi

with

i

ffl

coequalizers

Let

qP

coeq

-LRB-

fP

gP

-RRB-

and

qT

coeq

-LRB-

fT

gT

-RRB-

in

Set

Define

the

coequalizer

of

f

g

q

NS

as

NS

hT

P

pre

post

sorti

with

T

T

P

P

pre

-LRB-

-LSB-

t

-RSB-

-RRB-

-LRB-

p

-RRB-

L

-LRB-

-LSB-

t

-RSB-

-RRB-

-LRB-

-RRB-

and

post

-LRB-

-LSB-

t

-RSB-

-RRB-

-LRB-

p

-RRB-

L

-LRB-

-LSB-

t

-RSB-

-RRB-

-LRB-

p

-RRB-

where

T

iff

such

that

fT

-LRB-

-RRB-

and

gT

-LRB-

-RRB-

the

relation

P

is

defined

analogously

It

is

easy

to

verify

that

hqT

qP

i

NS

is

an

ANS

-LRB-

SPEC

-RRB-

morphism

and

that

it

satisfies

the

universal

property

The

cocompleteness

of

AHL

-LRB-

SPEC

-RRB-

then

follows

from

the

fact

that

both

ADT

-LRB-

SPEC

-RRB-

and

ANS

-LRB-

SPEC

-RRB-

are

cocomplete

The

colimits

are

calculated

componentwise

Theorem

AHL

-LRB-

SPEC

-RRB-

is

cocomplete

Cocontinuity

of

Sem

The

aim

of

this

subsection

is

to

prove

the

main

result

of

this

section

that

the

functor

Sem

AHL

-LRB-

SPEC

-RRB-

PetriG

preserves

colimits

Again

we

do

the

proof

in

stages

Proposition

Let

NS

be

an

algebraic

net

specification

Then

the

functor

FNS

ADT

-LRB-

SPEC

-RRB-

PetriG

preserves

coproducts

and

coequalizers

Proof

ffl

coproduct

Let

and

be

SPEC-algebras

Then

there

clearly

exists

a

PetriG-isomorphism

FNS

-LRB-

-RRB-

FNS

-LRB-

-RRB-

FNS

-LRB-

-RRB-

because

the

interpretations

of

and

are

disjoint

ffl

coequalizer

Let

NS

hT

P

pre

post

sorti

let

f

g

be

SPEC-morphisms

and

let

A

be

the

coequalizer

of

f

g

with

the

canonical

injection

q

A

Then

because

FNS

is

functor

we

have

FNS

-LRB-

f

-RRB-

FNS

-LRB-

q

-RRB-

FNS

-LRB-

g

-RRB-

FNS

-LRB-

q

-RRB-

The

universal

property

for

FNS

-LRB-

q

-RRB-

follows

from

the

universal

property

of

q.

Thus

FNS

-LRB-

A

-RRB-

is

the

coequalizer

of

FNS

-LRB-

f

-RRB-

and

FNS

-LRB-

g

-RRB-

The

assignment

ass

A

is

given

by

ass

q.

Proposition

Let

A

be

a

SPEC-algebra

Then

if

is

a

coproduct

in

ANS

-LRB-

SPEC

-RRB-

then

-LRB-

A

-RRB-

is

the

coproduct

of

-LRB-

A

-RRB-

and

-LRB-

A

-RRB-

in

PetriG

and

if

NS

is

the

coequalizer

of

in

ANS

-LRB-

SPEC

-RRB-

then

FNS

-LRB-

A

-RRB-

is

the

coequalizer

of

-LRB-

A

-RRB-

-LRB-

A

-RRB-

in

PetriG

Proof

It

is

clear

that

the

PetriG-nets

-LRB-

A

-RRB-

and

-LRB-

A

-RRB-

-LRB-

A

-RRB-

are

isomorphic

because

the

coproduct

is

calculated

on

the

net

part

Let

f

g

be

ANS

-LRB-

SPEC

-RRB-

morphisms

and

let

NS

hT

P

pre

posti

be

the

coequalizer

of

Because

we

have

a

natural

transformation

we

have

that

-LRB-

f

-RRB-

-LRB-

q

-RRB-

-LRB-

g

-RRB-

-LRB-

q

-RRB-

The

universal

property

is

then

easily

verified

as

in

the

previous

proof

Theorem

The

functor

Sem

AHL

-LRB-

SPEC

-RRB-

PetriG

is

finitely

cocontinous

Proof

Follows

from

propositions

and

Composition

with

colimits

The

use

of

colimits

to

combine

smaller

specification

to

larger

ones

is

a

technique

first

applied

in

the

specification

language

CLEAR

-LSB-

-RSB-

It

is

now

a

standard

technique

in

the

theory

of

algebraic

specifications

On

the

other

hand

in

categorical

approaches

to

net-theory

colimits

have

played

little

role

until

recently

This

is

maybe

in

part

due

to

the

negative

result

of

Winskel

in

-LSB-

-RSB-

on

the

non-existence

of

coproducts

in

the

category

of

Place/Transitionnets

with

initial

marking

In

the

paper

by

Meseguer

and

Montanari

-LSB-

-RSB-

limits

and

colimits

are

mentioned

but

no

interesting

examples

except

the

standard

product

and

coproduct

constructs

are

discussed

The

recent

papers

by

Dimitrovici

Hummert

and

Petrucci

-LSB-

-RSB-

contain

the

first

thorough

discussion

of

colimits

in

categories

of

nets

Especially

the

dissertation

of

Hummert

-LSB-

-RSB-

contains

interesting

applications

of

colimits

to

nets

He

defines

a

notion

of

net

module

and

studies

the

compatibility

of

the

notion

with

invariants

and

parametrised

data

structures

In

the

following

we

shall

sketch

some

applications

of

our

own

Specifically

we

will

discuss

how

some

of

the

standard

process

algebra

combinators

can

be

implemented

for

nets

in

terms

of

colimits

All

will

be

implemented

as

pushouts

To

reason

about

the

combined

net

in

terms

of

its

components

we

have

to

analyze

the

structure

of

the

corresponding

combinators

in

PetriG

The

simplest

and

easiest

combinator

is

the

combinator

for

parallel

composition

It

is

defined

as

the

coproduct

of

the

components

Now

according

to

theorem

the

interpretation

of

this

construct

is

the

coproduct

Sem

-LRB-

-RRB-

Sem

-LRB-

-RRB-

in

PetriG

To

reason

about

this

net

in

terms

of

its

components

we

must

study

whether

we

can

map

the

coproduct

to

the

components

In

PetriG

this

is

certainly

not

possible

because

the

inverses

of

the

injections

are

not

PetriG-morphisms

But

in

the

injections

have

inverses

We

thus

have

the

following

correspondence

between

transitions

in

the

coproduct

and

transitions

in

its

components

Proposition

Let

be

the

coproduct

and

and

let

be

the

injections

Then

M

t

M

in

iff

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

in

Sem

-LRB-

-RRB-

and

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

in

Sem

-LRB-

-RRB-

Truthfully

it

must

be

stated

that

the

proposition

is

trivial

but

the

point

is

not

so

much

the

proposition

itself

as

the

proof

technique

The

idea

is

to

find

a

morphism

not

necessarily

in

PetriG

but

in

some

other

net-category

presented

in

section

A

more

interesting

example

is

that

of

non-deterministic

choice

Non-deterministic

choice

in

nets

raises

some

slightly

philosophical

issues

that

concern

the

autoconcurrency

of

transitions

i.e.

the

fact

that

a

transition

may

be

multiply

enabled

that

we

shall

shortly

discuss

before

defining

the

construction

The

reason

for

the

non-existence

of

the

coproduct

in

the

general

categories

of

Winskel

is

due

on

an

intuitive

level

to

the

fact

that

non-determinism

is

difficult

to

interpret

in

the

presence

of

non-unit

weights

on

the

input

arcs

Examine

the

two

nets

and

in

figure

They

consist

of

only

one

transition

each

but

with

net

having

an

input

weight

of

on

its

transition

Suppose

we

want

to

construct

the

non-deterministic

choice

between

the

actions

and

The

obvious

construction

is

to

share

the

input

place

giving

the

net

N

also

in

figure

For

action

to

be

enabled

we

must

have

an

initial

marking

of

in

place

a

But

with

this

marking

we

can

perform

action

twice

So

net

N

does

not

represent

the

choice

but

the

choice

The

construction

of

the

choice

is

clearly

not

possible

The

solution

proposed

by

Meseguer

and

Montanari

in

-LSB-

-RSB-

is

to

restrict

the

nets

to

have

a

weight

of

on

the

arcs

from

the

initially

marked

places

We

shall

also

adopt

a

N

Figure

Nets

illustrating

the

problem

with

choice

a

solution

analogous

to

this

The

nets

will

be

of

such

a

form

that

the

place

on

which

the

choice

is

to

be

made

has

no

incoming

arcs

and

the

outgoing

arcs

in

both

nets

have

the

same

inscription

The

maps

Sem

-LRB-

ini

-RRB-

are

now

constructed

in

CMonPetri

All

the

places

of

the

other

net

are

mapped

onto

the

place

s

and

the

transitions

on

the

idle

transition

ts

Then

we

have

Proposition

Let

and

be

two

AHL-nets

Denote

the

place

on

which

the

choice

is

to

be

made

by

s.

Define

a

net

S

consisting

of

only

the

place

s

The

nondeterministic

choice

between

the

nets

is

now

the

push-out

AN

S

Let

M

be

the

marking

with

only

place

s

occupied

Then

M

t

M

in

AN

iff

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

in

Sem

-LRB-

-RRB-

or

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

in

Sem

-LRB-

-RRB-

The

proof

of

the

proposition

is

easy

because

Sem

-LRB-

ini

-RRB-

being

a

CMonPetrimorphism

preserves

behaviour

x

x

l

-LRB-

x

-RRB-

r

-LRB-

x

-RRB-

l

-LRB-

x

-RRB-

r

-LRB-

x

-RRB-

xx

Figure

The

dual

of

the

dining

philosophers

net

Sequential

composition

of

two

nets

can

also

be

constructed

as

a

push-out

Given

two

nets

and

that

we

want

to

compose

we

need

to

specify

the

places

on

which

they

are

to

be

patched

together

Let

this

set

be

IO

Construct

the

net

with

only

places

from

IO

The

sequential

composition

of

and

is

now

the

pushout

AN

IO

The

behaviour

of

the

composition

is

easily

deduced

from

the

behaviour

of

the

components

The

last

notion

typically

found

in

process

calculi

is

that

of

synchronisation

This

is

where

push-outs

fail

to

give

a

nice

characterisation

The

reasons

are

rather

technical

but

the

reader

can

get

an

intuition

for

the

problem

by

recalling

that

both

Winskel

and

Meseguer

and

Montanari

construct

synchronisation

as

a

product

i.e.

a

limit

not

a

colimit

Because

synchronisation

is

the

sharing

of

transitions

between

nets

the

implementation

in

terms

of

push-outs

would

require

the

existence

of

a

map

from

a

net

with

a

single

transition

and

no

places

to

some

other

net

But

because

maps

are

supposed

to

preserve

the

environment

of

a

transition

and

this

is

not

the

case

for

the

required

map

such

a

map

does

not

exist

Synchronisation

can

be

implemented

be

means

of

push-outs

but

it

requires

the

introduction

of

a

new

notion

of

net

duality

The

dual

of

a

net

N

is

the

net

N

op

that

has

as

transitions

the

places

of

N

and

as

places

the

transitions

of

N

Figure

depicts

the

dual

of

the

philosophers

net

in

figure

Synchronisation

can

now

be

implemented

by

taking

the

dual

of

the

nets

to

be

synchronised

constructing

the

push-out

and

thereby

sharing

the

transitions

-LRB-

which

now

are

places

-RRB-

and

taking

the

dual

again

The

steps

are

illustrated

in

figures

With

respect

to

the

behaviour

we

can

now

say

the

following

Proposition

Let

AN

be

the

synchronisation

of

the

nets

and

constructed

as

t

t

Figure

The

nets

to

be

synchronised

at

transitions

t.

t

N

t

N

Figure

The

duals

of

the

nets

above

t

N

t

N

t

Figure

The

push-out

construction

t

Figure

The

result

of

taking

the

dual

of

the

push-out

f

g

Figure

A

net-reduction

considered

as

a

coequalizer

described

above

Then

M

t

M

in

AN

iff

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

in

Sem

-LRB-

-RRB-

and

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

Sem

-LRB-

-RRB-

-LRB-

Sem

-LRB-

M

-RRB-

-RRB-

in

Sem

-LRB-

-RRB-

where

the

projections

pri

are

defined

as

-LRB-

t

-RRB-

-LRB-

t

iff

t

iff

t

and

-LRB-

p

-RRB-

-LRB-

p

iff

p

iff

p

in

The

definition

of

is

analogous

The

proof

is

again

easy

because

and

are

and

thus

preserve

reachable

markings

As

a

last

example

we

shall

shortly

evaluate

the

application

of

colimits

to

describe

net

transformations

and

specifically

net

reductions

-LRB-

cf.

-LSB-

-RSB-

-RRB-

By

a

net-reduction

we

shall

mean

a

transformation

of

a

net

into

a

simpler

but

equivalent

net

For

an

example

consider

the

net

in

figure

The

existence

of

the

two

places

between

the

transitions

and

seems

superfluous

because

the

net

in

the

same

figure

has

an

equivalent

behaviour

The

reduction

can

be

constructed

as

a

coequalizer

as

shown

in

the

figure

This

is

a

very

simple

reduction

More

complex

reductions

like

the

reduction

of

sequential

chains

of

transitions

to

one

single

transition

seem

to

require

a

more

complex

notion

of

net-morphism

allowing

for

change

of

signature

and

the

mapping

of

operators

in

one

signature

to

derived

operators

in

an

other

This

would

seem

a

profitable

area

to

further

research

In

this

section

we

have

defined

a

category

of

high-level

nets

and

given

its

semantics

by

a

functor

into

the

category

PetriG

In

the

next

section

this

functor

will

be

exploited

in

the

construction

of

a

model

for

linear

logic

Linear

Logic

and

AHL-Nets

The

aim

of

this

section

is

to

show

how

linear

logic

can

be

used

to

describe

properties

of

AHL-nets

It

is

structured

as

follows

The

first

subsection

gives

a

short

introduction

to

linear

logic

In

the

second

subsection

a

class

of

models

for

linear

logic

called

quantales

are

presented

It

is

shown

how

a

Petri

net

generates

a

quantale

In

the

third

and

last

subsection

we

present

the

interpretation

of

linear

logic

in

quantales

and

discuss

how

properties

of

AHL-nets

are

expressed

What

is

linear

logic

Linear

logic

was

discovered

by

J-Y

Girard

-LSB-

-RSB-

while

trying

to

extend

his

coherent

semantics

a

domain

theoretic

model

of

second-order

lambda-calculus

-LSB-

-RSB-

to

a

sum

of

types

construct

The

sum

of

types

is

the

mathematical

analogue

to

the

union

types

of

programming

languages

and

its

treatment

in

denotational

semantics

is

troublesome

Indeed

this

was

also

the

case

with

coherent

semantics

but

as

a

side

product

linear

logic

was

discovered

The

name

linear

stems

according

to

Girard

-LSB-

-RSB-

from

the

linear

algebra

like

nature

of

some

of

the

connectives

of

linear

logic

Modern

introductions

to

linear

logic

like

appendix

B

in

-LSB-

-RSB-

introduce

linear

logic

through

the

sequent

calculus

as

this

to

date

is

the

most

accessible

way

to

understanding

linear

logic

Essentially

the

different

flavours

of

linear

logic

-LRB-

intuitionistic

classical

and

predicate

-RRB-

are

obtained

by

deleting

the

contraction

and

weakening

rules

from

the

standard

sequent

calculus

formulations

of

the

corresponding

logics

In

figure

the

sequent

calculus

formalisation

of

linear

intuitionistic

predicate

logic

is

given

When

comparing

the

formulation

in

figure

to

formulations

of

intuitionistic

predicate

logic

one

can

immediately

see

that

the

effect

of

deleting

the

two

structural

rules

of

contraction

and

weakening

is

significant

of

the

standard

rules

for

the

logical

connectives

-LRB-

-RRB-

-RRB-

are

present

they

have

all

been

replaced

by

new

connectives

We

will

give

intuitive

interpretations

in

terms

of

the

behaviour

of

a

net

to

all

these

connectives

in

subsection

Below

we

shall

just

give

an

informal

description

of

the

intuitionistic

version

of

the

calculus

The

new

connectives

are

classified

as

multiplicatives

-LRB-

tensor

and

linear

implication

-LRB-

-RRB-

additives

-LRB-

tensor

sum

and

direct

sum

-RRB-

and

exponentials

-LRB-

of

course

-RRB-

The

distinction

between

multiplicatives

and

additives

is

best

seen

in

the

sequent

calculus

by

noticing

that

the

additives

always

use

the

same

context

while

the

multiplicatives

are

used

to

combine

different

contexts

On

an

intuitive

level

the

need

for

the

large

number

of

connectives

can

be

understood

as

follows

Take

the

introduction

rule

for

the

Axiom

-LRB-

Id

-RRB-

A

A

Structural

Rule

A

B

C

-LRB-

Exchange

-RRB-

B

A

C

Cut

Rule

A

A

B

B

Logical

Rules

-LRB-

R

-RRB-

A

-LRB-

L

-RRB-

A

A

B

-LRB-

R

-RRB-

A

B

A

B

C

-LRB-

L

-RRB-

A?B

C

A

B

-LRB-

R

-RRB-

A

-LRB-

B

A

B

C

-LRB-

-LRB-

L

-RRB-

A

-LRB-

B

C

A

B

-LRB-

R

-RRB-

A&B

A

C

A&B

C

B

C

-LRB-

L

-RRB-

A&B

C

A

A

B

B

-LRB-

R

-RRB-

A

B

A

C

B

C

-LRB-

L

-RRB-

A?B

C

A

-LRB-

R

-RRB-

A

A

B

-LRB-

Dereliction

-RRB-

A

B

A

A

B

-LRB-

Contraction

-RRB-

A

B

B

-LRB-

Weakening

-RRB-

A

B

A

-LSB-

a

x

-RSB-

B

-LRB-

W-L

-RRB-

x

A

B

A

-LRB-

W-R

-RRB-

x

A

A

B

-LRB-

W-L

-RRB-

x

A

B

A

-LSB-

a

x

-RSB-

-LRB-

W-R

-RRB-

x

A

Figure

Sequent

calculus

for

intuitionistic

predicate

LL

and

connective

in

the

sequent

calculus

of

intuitionistic

logic

A

C

-LRB-

-RRB-

A

B

C

The

correctness

of

this

rule

is

based

on

the

interpretation

of

a

sequent

C

as

the

conjunction

of

all

the

premisses

in

entail

C.

Thus

in

the

presence

of

weakening

the

above

rule

is

actually

an

abbreviation

for

the

following

proof

A

C

-LRB-

Weakening

-RRB-

A

B

C

A

B

C

Indeed

there

exist

sequent

calculus

formulations

of

classical

and

intuitionistic

logic

that

take

this

approach

and

simply

have

one

introduction

rule

for

on

the

left

-LRB-

c.f.

-LSB-

-RSB-

-RRB-

Now

it

is

easy

to

see

that

without

weakening

we

have

to

postulate

a

rule

that

allows

the

introduction

of

conjuncts

on

the

left

But

as

we

have

deleted

weakening

we

want

to

give

the

connective

a

new

name

so

that

this

implicit

use

of

weakening

can

be

distinguished

from

other

uses

Thus

the

analogue

to

our

rule

above

is

the

rule

-LRB-

L

-RRB-

in

figure

On

the

other

hand

the

rule

A

B

-LRB-

R

-RRB-

A

B

that

introduces

conjunction

of

the

right

does

not

implicitly

use

the

weakening

rule

This

is

represented

in

figure

by

the

rule

-LRB-

R

-RRB-

The

removal

of

the

contraction

and

weakening

rules

makes

the

fragment

with

the

multiplicatives

and

additives

strictly

weaker

than

intuitionistic

logic

To

get

the

strength

of

intuitionistic

logic

back

the

exponential

connective

of

course

is

introduced

The

idea

is

that

we

can

allow

weakening

and

contraction

but

that

we

as

previously

want

to

mark

the

use

explicit

or

implicit

of

weakening

The

rules

of

weakening

and

contraction

are

put

back

in

the

logic

as

logical

rules

for

the

connective

of

course

The

sequent

calculus

in

figure

lacks

rules

for

negation

Linear

negation

that

is

to

be

distinguished

from

intuitionistic

negation

is

introduced

by

first

fixing

a

logical

constant

denoting

linear

absurdity

and

then

defining

A

A

-LRB-

Intuitionistic

propositional

logic

can

now

be

encoded

into

intuitionistic

linear

logic

One

example

of

such

a

coding

is

the

translation

A

B

A&B

A

B

A

B

A

-RRB-

B

A

-LRB-

B

A

A

-LRB-

Other

translations

are

given

in

-LSB-

-RSB-

They

all

have

different

properties

in

the

sense

that

they

enlighten

different

aspects

about

the

provability

in

intuitionistic

logic

The

remaining

connectives

are

the

quantifiers

Girard

gives

their

definition

in

semantic

terms

as

infinite

generalisations

of

the

additives

Their

names

are

any

W

and

some

V.

Because

they

are

defined

as

infinite

additives

they

are

less

general

than

the

classical

connectives

The

quantifiers

have

been

studied

by

Girard

in

-LSB-

-RSB-

but

there

only

their

proof-theoretic

properties

are

investigated

The

above

discussion

was

on

a

very

intuitive

level

and

was

meant

to

give

the

reader

a

feel

for

linear

logic

The

reader

interested

in

more

details

is

referred

to

the

book

-LSB-

-RSB-

and

the

paper

-LSB-

-RSB-

For

the

reader

fluent

in

french

there

exists

a

very

readable

paper

by

Girard

published

in

the

french

version

of

Scientific

American

-LSB-

-RSB-

Finally

for

the

reader

wishing

just

to

get

a

glimpse

of

the

subject

the

short

paper

by

A.

Scedrov

-LSB-

-RSB-

is

highly

recommended

Quantales

and

nets

Quantales

are

models

of

linear

logic

They

can

be

seen

as

an

algebraic

axiomatisation

of

the

sequent

calculus

rules

of

linear

logic

in

the

same

vein

as

boolean

algebras

are

an

algebraic

axiomatisation

of

classical

logic

Quantales

were

originally

introduced

by

Mulvey

-LSB-

-RSB-

in

an

attempt

to

cast

light

on

the

connections

between

C

algebras

and

quantum

mechanics

We

do

not

claim

to

understand

what

this

means

But

the

work

by

Mulvey

and

Girard

's

attempts

to

give

a

semantics

of

linear

logic

in

terms

of

C

algebras

-LSB-

-RSB-

inspired

several

authors

to

study

quantales

and

their

relation

to

linear

logic

-LSB-

-RSB-

In

this

subsection

we

shall

show

how

given

a

net

we

can

construct

a

quantale

that

describes

the

behaviour

The

construction

described

in

this

section

was

independently

discovered

by

Brown

-LSB-

-RSB-

and

Engberg

and

Winskel

-LSB-

-RSB-

The

general

idea

is

to

view

places

as

propositions

The

interpretation

of

a

proposition

p

will

then

be

the

set

of

all

markings

that

are

reachable

from

the

corresponding

place

p

in

the

net

-LSB-

-RSB-

or

the

set

of

all

markings

that

are

a

prerequisite

for

the

fact

that

place

p

become

marked

-LSB-

-RSB-

The

construction

is

based

on

the

facts

that

the

reachability

relation

defines

a

quantic

nucleus

-LRB-

a

map

that

is

weaker

than

a

quantale

morphsim

-RRB-

and

that

the

image

of

a

quantic

nucleus

is

a

quantale

This

allows

for

a

very

elegant

formalisation

of

the

construction

in

two

steps

First

a

quantale

that

is

not

related

to

the

behaviour

of

the

net

is

generated

Secondly

the

reachability

relation

is

used

to

generate

a

quantic

nucleus

which

then

gives

us

the

wanted

quantale

Our

contribution

is

the

proof

that

both

constructions

yield

a

functor

from

the

category

PetriG

to

the

category

of

quantales

Quant

We

can

then

use

the

functor

from

AHL

-LRB-

SPEC

-RRB-

to

PetriG

to

extend

the

interpretation

to

highlevel

nets

The

exact

details

of

the

interpretation

are

described

in

section

The

subsection

first

presents

the

relevant

background

on

quantales

and

then

discusses

the

details

of

the

construction

and

proves

its

functoriality

Finally

a

variation

of

the

construction

is

presented

Quantales

The

aim

of

this

subsubsection

is

to

give

the

relevant

background

that

allows

us

to

state

theorem

which

tells

us

that

the

image

of

a

quantic

nucleus

is

a

quantale

A

quantale

is

essentially

a

complete

lattice

enriched

with

a

monoidal

operation

For

the

relevant

notions

of

lattice

theory

and

the

theory

of

ordered

sets

we

refer

to

-LSB-

-RSB-

and

-LSB-

-RSB-

Definition

A

commutative

quantale

Q

is

a

quadruple

hQ

I

i

such

that

ffl

hQ

i

is

a

complete

join

semi-lattice

with

top

-LRB-

-RRB-

and

bottom

-LRB-

-RRB-

ffl

hQ

Ii

is

a

commutative

monoid

and

ffl

the

monoidal

operation

-LRB-

tensor

-RRB-

distributes

over

joins

i.e.

for

J

an

indexing

set

a

bj

-LRB-

a

bj

-RRB-

Although

a

complete

join

semi-lattice

is

actually

a

complete

lattice

-LRB-

cf.

-LSB-

-RSB-

I.

-RRB-

we

want

to

make

this

distinction

because

we

want

a

loser

notion

of

morphism

than

that

of

a

lattice

homomorphism

Definition

A

morphism

of

quantales

is

a

function

f

that

is

monotonic

and

preserves

W

and

I.

Proposition

Quantales

and

their

morphism

form

a

category

Quant

As

previously

mentioned

the

quantale

representing

the

net

will

be

constructed

in

two

steps

The

first

step

will

construct

a

quantale

from

a

net

but

this

quantale

will

not

represent

the

behaviour

of

the

net

This

quantale

is

then

transformed

into

a

quantale

describing

the

behaviour

of

the

net

in

the

second

step

The

idea

in

the

second

step

is

to

take

sets

of

markings

closed

under

forward

or

backward

reachability

as

the

elements

and

prove

that

this

construction

gives

a

quantic

nucleus

Then

we

can

use

theorem

and

get

the

wanted

quantale

To

formalise

this

we

need

some

technical

definitions

and

lemmata

To

prove

the

correctness

of

the

construction

we

need

to

show

that

taking

the

forwards

or

backwards

closure

under

reachability

corresponds

to

what

is

called

a

quantic

nucleus

To

define

a

quantic

nucleus

we

first

need

the

definition

of

a

closure

operator

Definition

Let

Q

be

a

quantale

A

function

j

Q

Q

is

a

closure

operator

iff

a

b

-RRB-

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-LRB-

j

is

monotonic

-RRB-

a

j

-LRB-

a

-RRB-

-LRB-

j

is

increasing

-RRB-

and

j

-LRB-

a

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

-RRB-

-LRB-

j

is

idempotent

-RRB-

A

quantic

nucleus

is

a

closure

operator

that

loosely

respects

the

monoidal

operation

of

the

quantale

Definition

A

closure

operator

j

Q

Q

is

a

quantic

nucleus

iff

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

j

-LRB-

a

b

-RRB-

for

all

a

b

Q

The

following

lemmata

will

be

of

use

in

subsection

Lemma

a

b

-RRB-

a

c

b

c

for

all

c

Q

Proof

a

b

-RRB-

-LRB-

a

b

-RRB-

c

b

c

-LRB-

a

c

-RRB-

-LRB-

b

c

-RRB-

b

c

a

c

b

c

Lemma

j

-LRB-

a

b

-RRB-

j

-LRB-

a

j

-LRB-

b

-RRB-

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

b

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-RRB-

Proof

a

j

-LRB-

a

-RRB-

-RRB-

a

b

j

-LRB-

a

-RRB-

b

-RRB-

j

-LRB-

a

b

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

b

-RRB-

b

j

-LRB-

b

-RRB-

-RRB-

j

-LRB-

a

-RRB-

b

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

b

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-RRB-

On

the

other

hand

from

the

definition

of

a

quantic

nucleus

we

have

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

j

-LRB-

a

b

-RRB-

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-RRB-

j

-LRB-

j

-LRB-

a

b

-RRB-

-RRB-

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-RRB-

j

-LRB-

a

b

-RRB-

Combining

the

above

we

get

j

-LRB-

a

b

-RRB-

j

-LRB-

a

j

-LRB-

b

-RRB-

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

b

-RRB-

j

-LRB-

j

-LRB-

a

-RRB-

j

-LRB-

b

-RRB-

-RRB-

Now

proving

that

closure

under

reachability

defines

a

quantic

nucleus

is

really

not

enough

because

a

quantic

nucleus

on

a

quantale

Q

is

not

necessarily

a

quantale

endomorphism

But

the

following

theorem

by

Niefield

and

Rosenthal

-LSB-

-RSB-

tells

us

that

a

quantic

nucleus

is

a

quantale

morphism

although

not

an

endomorphism

Theorem

Let

Q

be

a

quantale

and

j

Q

Q

a

quantic

nucleus

Then

the

image

of

of

j

is

a

quantale

Qj

with

a

j

b

j

-LRB-

a

b

-RRB-

and

j

Q

Qj

is

a

quantale

morphism

The

construction

In

this

subsection

we

shall

show

how

the

reachability

relation

in

a

net

defines

a

quantic

nucleus

Take

the

set

of

all

markings

of

a

net

mark

-LRB-

N

-RRB-

As

previously

seen

the

markings

of

a

net

are

elements

of

a

monoid

-LRB-

the

monoidal

operation

will

be

denoted

by

to

distinguish

it

from

the

operation

in

the

quantale

-RRB-

We

can

easily

extend

this

monoidal

operation

to

sets

of

markings

i.e.

for

P

Q

mark

-LRB-

N

-RRB-

define

P

Q

fp

qjp

P

q

Qg

The

following

two

lemmata

are

obvious

Lemma

Let

N

hT

P

oi

be

a

net

Let

P

-LRB-

mark

-LRB-

N

-RRB-

-RRB-

be

the

powerset

of

the

markings

of

N

Let

be

the

zero

marking

ie

the

unit

of

the

monoid

P

Then

hP

-LRB-

mark

-LRB-

N

-RRB-

-RRB-

i

is

a

commutative

monoid

Lemma

hP

-LRB-

mark

-LRB-

N

-RRB-

-RRB-

i

is

a

commutative

quantale

Furthermore

the

assignment

q

N

hP

-LRB-

mark

-LRB-

N

-RRB-

-RRB-

i

defines

a

function

from

jPetriGj

to

jQuantj

The

use

of

quantic

nuclei

depends

heavily

on

the

linearity

and

monotonicity

of

the

behaviour

of

Petri

nets

Lemma

Let

be

markings

of

a

net

N

such

that

and

Then

In

the

sequel

the

ordering

on

the

markings

is

to

be

interpreted

in

terms

of

the

reachability

relation

as

follows

iff

ie

iff

is

reachable

from

The

ordering

is

easily

extended

to

sets

of

markings

Definition

Let

A

B

be

sets

of

markings

Then

A

B

iff

for

every

a

A

there

exists

b

B

such

that

a

b.

Given

an

ordering

we

can

always

define

upward

and

downward

closure

operators

In

the

sequel

we

shall

focus

on

downward

closure

We

shall

return

to

upward

closure

in

subsection

Definition

Let

N

be

a

net

For

A

mark

-LRB-

N

-RRB-

the

forward

evolution

of

A

is

the

endofunction

-LRB-

A

-RRB-

A

m

ag

It

is

obvious

that

A

B

iff

A

B

when

A

B

are

downward

closed

Proposition

q

-LRB-

N

-RRB-

q

-LRB-

N

-RRB-

is

a

quantic

nucleus

Proof

Clearly

is

increasing

and

idempotent

For

the

other

properties

A

B

-RRB-

A

-LRB-

B

-RRB-

-RRB-

-LRB-

A

-RRB-

-LRB-

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

A

-RRB-

-LRB-

B

-RRB-

-LRB-

A

-RRB-

-LRB-

B

-RRB-

A

m

ag

B

m

bg

-LRB-

A

B

-RRB-

p

mg

-LRB-

A

B

-RRB-

The

results

of

this

subsection

are

summed

up

in

the

following

theorem

Theorem

The

following

data

define

a

quantale

ffl

the

elements

are

subsets

of

mark

-LRB-

N

-RRB-

closed

under

forward

evolution

ffl

the

ordering

is

subset

inclusion

ffl

the

monoidal

operation

is

A

B

-LRB-

A

B

-RRB-

and

ffl

the

unit

is

I

-LRB-

-RRB-

The

functoriality

of

In

this

subsection

we

shall

prove

the

functoriality

of

The

result

is

intuitively

clear

since

a

net

morphism

preserves

the

reachability

and

thus

should

in

some

way

be

compatible

with

the

closure

operators

The

main

question

then

is

that

of

the

definition

of

for

a

net

morphism

The

obvious

extension

of

f

to

quantales

does

not

work

because

we

can

only

claim

the

following

Lemma

Let

f

be

a

net

morphism

Then

f

-LRB-

A

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

This

is

so

because

if

for

example

the

net

is

a

subnet

of

then

clearly

the

set

of

markings

reachable

from

m

in

is

smaller

than

the

set

of

markings

reachable

from

m

in

But

on

the

other

hand

it

would

be

reasonable

to

conjecture

that

by

mapping

a

closed

set

of

markings

in

to

the

closure

of

the

corresponding

markings

in

we

would

get

a

functor

Indeed

this

is

the

case

as

the

following

theorem

shows

Theorem

Let

f

be

a

PetriG

morphism

and

let

q

-LRB-

-RRB-

q

-LRB-

-RRB-

be

the

corresponding

net-quantales

The

the

assignment

-LRB-

f

-RRB-

-LRB-

A

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

for

A

q

-LRB-

-RRB-

defines

a

functor

PetriG

Quant

Proof

Essentially

we

have

to

prove

that

-LRB-

f

-RRB-

q

-LRB-

-RRB-

q

-LRB-

-RRB-

is

a

quantale

morphism

-LRB-

f

-RRB-

is

monotonic

A

B

-RRB-

A

B

-RRB-

f

-LRB-

A

-RRB-

f

-LRB-

B

-RRB-

f

preserves

reachability

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

-LRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

-LRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-RRB-

-LRB-

A

-RRB-

-LRB-

f

-RRB-

-LRB-

B

-RRB-

-LRB-

f

-RRB-

preserves

joins

-LRB-

f

-RRB-

-LRB-

A

B

-RRB-

-LRB-

f

-LRB-

A

B

-RRB-

-RRB-

-LRB-

f

-LRB-

A

-RRB-

f

-LRB-

B

-RRB-

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

-LRB-

f

-LRB-

B

-RRB-

-RRB-

-LRB-

f

-RRB-

-LRB-

A

-RRB-

-LRB-

f

-RRB-

-LRB-

B

-RRB-

-LRB-

f

-RRB-

preserves

the

tensor

-LRB-

f

-RRB-

-LRB-

A

B

-RRB-

-LRB-

f

-RRB-

-LRB-

-LRB-

A

B

-RRB-

-RRB-

-LRB-

f

-LRB-

-LRB-

A

B

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

f

-LRB-

A

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-LRB-

A

B

-RRB-

-RRB-

-LRB-

f

-LRB-

A

-RRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

-LRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-LRB-

-LRB-

A

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-RRB-

-LRB-

A

B

-RRB-

Thus

-LRB-

f

-RRB-

-LRB-

B

-RRB-

-LRB-

f

-LRB-

A

-RRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

On

the

other

hand

by

lemma

-LRB-

f

-LRB-

A

-RRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

-LRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

-LRB-

f

-LRB-

B

-RRB-

-RRB-

-RRB-

-LRB-

f

-RRB-

-LRB-

A

-RRB-

-LRB-

f

-RRB-

-LRB-

B

-RRB-

In

other

words

-LRB-

f

-RRB-

-LRB-

A

B

-RRB-

-LRB-

f

-RRB-

-LRB-

A

-RRB-

-LRB-

f

-RRB-

-LRB-

B

-RRB-

-LRB-

f

-RRB-

preserves

the

unit

-LRB-

f

-RRB-

-LRB-

-RRB-

-LRB-

f

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

f

-LRB-

-RRB-

-RRB-

-RRB-

-LRB-

-RRB-

But

clearly

which

implies

f

-LRB-

-RRB-

f

-LRB-

-LRB-

-RRB-

so

that

-LRB-

f

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

Thus

-LRB-

f

-RRB-

-LRB-

-RRB-

Upwards

closed

sets

of

markings

The

choice

for

the

ordering

is

arbitrary

and

other

possibilities

exist

For

example

Engberg

and

Winskel

-LSB-

-RSB-

take

the

dual

interpretation

They

define

the

ordering

on

markings

by

m

iff

m

Then

they

also

take

downward

closed

subsets

of

markings

It

is

easy

to

see

that

this

corresponds

to

taking

upward

closed

subsets

with

the

ordering

of

the

previous

section

that

is

-LRB-

A

-RRB-

A

a

mg

It

is

routine

to

verify

that

defines

a

quantic

nucleus

The

verification

that

the

assignment

-LRB-

f

-RRB-

-LRB-

A

-RRB-

-LRB-

f

-LRB-

A

-RRB-

-RRB-

defines

a

functor

PetriG

Quant

is

also

routine

We

should

now

ask

ourselves

what

the

differences

between

the

quantales

based

on

upward

and

downward

closed

sets

of

markings

are

The

main

difference

is

in

the

intuitive

interpretation

of

the

connectives

A

proposition

is

interpreted

by

its

possible

gain

in

the

case

of

forward

reachability

and

as

the

sufficient

requirement

in

the

case

of

backward

reachability

The

technical

differences

are

more

straightforward

except

for

the

treatment

of

linear

implication

but

we

shall

return

to

this

below

The

interpretation

of

Linear

Logic

in

AHL-Nets

In

this

subsection

we

will

show

how

linear

logic

can

be

used

to

express

properties

of

AHL-nets

To

talk

about

properties

of

the

net

we

introduce

typed

intuitionistic

predicate

linear

logic

The

introduction

of

a

typed

version

of

intuitionistic

linear

predicate

logic

is

strictly

speaking

not

necessary

but

it

simplifies

the

generation

of

a

language

from

a

net

We

shall

not

pay

much

attention

to

the

types

as

there

are

standard

methods

for

converting

typed

predicate

logics

into

untyped

variants

-LRB-

cf.

-LSB-

-RSB-

-RRB-

The

development

of

the

language

follows

-LSB-

-RSB-

Definition

A

first

order

signature

is

a

triple

hS

i

where

ffl

S

is

a

set

of

sorts

ffl

is

an

S

S-indexed

family

of

sets

of

operator

or

function

symbols

and

ffl

is

an

S

indexed

family

of

sets

of

predicate

or

relation

symbols

The

definition

of

sentences

over

a

first-order

signature

requires

the

following

auxiliary

definitions

Let

X

be

a

fixed

infinite

set

of

variable

symbols

and

let

X

X

S

be

a

partial

function

i.e.

sort

assignment

We

will

also

think

of

X

as

the

union

of

the

sets

Xs

fx

X

jX

-LRB-

x

-RRB-

sg

Define

the

S-indexed

family

TERMX

-LRB-

-RRB-

of

-LRB-

X

-RRB-

terms

to

be

the

carriers

of

T

-LRB-

X

-RRB-

the

free

algebra

with

generators

X.

Define

the

S-indexed

function

Free

on

TERMX

-LRB-

-RRB-

inductively

by

Frees

-LRB-

x

-RRB-

x

for

x

Xs

and

Frees

-LRB-

oe

-LRB-

tn

-RRB-

-RRB-

Sni

Free

-LRB-

ti

-RRB-

Finally

define

TERM

-LRB-

-RRB-

to

be

the

disjoint

union

of

all

TERMX

-LRB-

-RRB-

This

means

that

we

always

know

the

variables

and

their

type

in

a

term

Definition

A

well-formed

-LRB-

X

-RRB-

formula

is

an

element

of

the

carrier

of

the

-LRB-

one-sorted

-RRB-

free

algebra

WFFX

-LRB-

-RRB-

having

atomic

-LRB-

X

-RRB-

formula

fss

-LRB-

tn

-RRB-

jss

u

with

u

sn

and

ti

TERMX

-LRB-

-RRB-

sig

as

generators

and

having

the

following

one-sorted

signature

constants

I

binary

infix

operators

-LRB-

and

unary

prefix

operators

-LRB-

Wx

-RRB-

and

-LRB-

Vx

-RRB-

for

each

x

X.

Let

WFF

-LRB-

-RRB-

be

the

union

of

all

WFFX

-LRB-

-RRB-

The

functions

V

ar

and

Free

give

the

set

of

variables

and

free

variables

that

are

used

in

formulae

are

defined

inductively

by

V

ar

-LRB-

c

-RRB-

Free

-LRB-

c

-RRB-

for

c

Ig

V

ar

-LRB-

ss

-LRB-

tn

-RRB-

-RRB-

Free

-LRB-

ss

-LRB-

tn

-RRB-

-RRB-

Sni

Freesi

-LRB-

ti

-RRB-

V

ar

-LRB-

A?B

-RRB-

V

ar

-LRB-

A

-RRB-

-LSB-

V

ar

-LRB-

B

-RRB-

and

Free

-LRB-

A?B

-RRB-

Free

-LRB-

A

-RRB-

-LSB-

Free

-LRB-

B

-RRB-

with

f

-LRB-

g

V

ar

-LRB-

-LRB-

W

x

-RRB-

P

-RRB-

V

ar

-LRB-

-LRB-

V

x

-RRB-

P

-RRB-

V

ar

-LRB-

P

-RRB-

-LSB-

fxg

and

Free

-LRB-

-LRB-

W

x

-RRB-

P

-RRB-

Free

-LRB-

-LRB-

V

x

-RRB-

P

-RRB-

Free

-LRB-

P

-RRB-

fxg

An

sentence

is

a

closed

formula

that

is

an

formula

P

for

which

Free

-LRB-

P

-RRB-

The

typed

linear

intuitionistic

predicate

language

over

a

first

order

signature

is

the

set

of

all

sentences

and

it

is

denoted

L

When

the

context

is

clear

the

shall

be

omitted

The

sequent

calculus

formulation

of

the

axiom

system

of

the

typed

linear

intuitionistic

predicate

calculus

is

given

in

figure

To

formulate

properties

of

an

AHL-net

in

a

language

L

we

must

define

how

the

AHL-net

generates

a

language

Definition

The

first

order

signature

AN

generated

by

an

AHL-net

AN

is

given

by

S

SO

OP

and

P

where

P

is

the

set

of

places

of

the

net

The

language

generated

by

AN

will

be

denoted

by

LAN

Notice

that

all

the

predicates

in

our

language

will

be

monadic

predicates

Recall

that

the

composition

-LRB-

Sem

-LRB-

NS

A

-RRB-

-RRB-

defines

a

quantale

QAN

for

the

net

AN

The

language

LAN

can

now

be

interpreted

in

the

quantale

QAN

Definition

The

interpretation

of

the

language

LAN

in

the

quantale

QAN

is

given

by

the

following

rules

For

reasons

of

clarity

we

have

omitted

explicit

mention

of

the

quantale

in

the

interpretation

-LSB-

-LSB-

ss

-LRB-

t

-RRB-

-RSB-

-RSB-

-LRB-

-LRB-

hss

evalA

-LRB-

t

-RRB-

i

-RRB-

iff

t

is

a

ground

term

-LRB-

S

-LSB-

V

ar

-LRB-

t

-RRB-

A

-RSB-

-LRB-

hss

ass

A

-LRB-

t

-RRB-

i

-RRB-

-RRB-

-LSB-

-LSB-

-RSB-

-RSB-

fthe

set

of

all

reachable

markings

of

the

netg

-LSB-

-LSB-

-RSB-

-RSB-

-LSB-

-LSB-

I

-RSB-

-RSB-

-LRB-

-RRB-

-LSB-

-LSB-

A

B

-RSB-

-RSB-

#fa

bja

-LSB-

-LSB-

A

-RSB-

-RSB-

and

b

-LSB-

-LSB-

B

-RSB-

-RSB-

g

-LSB-

-LSB-

A&B

-RSB-

-RSB-

-LSB-

-LSB-

A

-RSB-

-RSB-

T

-LSB-

-LSB-

B

-RSB-

-RSB-

-LSB-

-LSB-

A

B

-RSB-

-RSB-

-LSB-

-LSB-

A

-RSB-

-RSB-

S

-LSB-

-LSB-

B

-RSB-

-RSB-

-LSB-

-LSB-

A

-LRB-

B

-RSB-

-RSB-

Sf

-LSB-

-LSB-

C

-RSB-

-RSB-

j

-LSB-

-LSB-

C

A

-RSB-

-RSB-

-LSB-

-LSB-

B

-RSB-

-RSB-

g

-LSB-

-LSB-

-LRB-

W

x

-RRB-

P

-RSB-

-RSB-

T

-LSB-

-LSB-

P

-LSB-

x

a

-RSB-

-RSB-

-RSB-

and

-LSB-

-LSB-

-LRB-

V

x

-RRB-

P

-RSB-

-RSB-

S

-LSB-

-LSB-

P

-LSB-

x

a

-RSB-

-RSB-

-RSB-

Semantic

entailment

in

the

quantale

is

defined

as

An

j

A

iff

-LSB-

-LSB-

-RSB-

-RSB-

-LSB-

-LSB-

An

-RSB-

-RSB-

-LSB-

-LSB-

A

-RSB-

-RSB-

The

idea

behind

this

interpretation

is

the

following

A

predicate

describes

a

place

The

denotation

of

the

predicate

ss

is

the

set

of

all

markings

obtainable

from

the

possible

markings

of

the

place

it

denotes

in

other

words

the

set

of

resources

we

could

obtain

if

we

had

ss

The

connectives

are

then

interpreted

as

follows

Anything

possible

to

gain

from

a

marking

in

-LSB-

-LSB-

A

B

-RSB-

-RSB-

must

be

possible

to

gain

by

having

both

resources

a

-LSB-

-LSB-

A

-RSB-

-RSB-

and

b

-LSB-

-LSB-

B

-RSB-

-RSB-

Then

if

x

is

a

resource

we

gained

by

a

non-deterministic

choice

between

resources

A

and

B

it

must

be

a

consequence

of

either

A

or

B.

Thus

A

B

is

the

union

of

the

consequences

of

A

and

B.

On

the

other

hand

if

we

have

a

consequence

x

of

A&B

we

know

that

regardless

of

our

choice

of

A

or

B

x

will

always

be

a

consequence

of

A

or

B

respectively

It

is

then

natural

to

interpret

as

disjoint

union

The

interpretation

of

A

-LRB-

B

expresses

the

idea

that

no

consequence

of

A

-LRB-

B

can

give

us

more

when

taken

together

with

some

c

than

we

would

gain

by

having

the

appropriate

b

-LSB-

-LSB-

B

-RSB-

-RSB-

The

interpretation

of

-LRB-

Wx

-RRB-

P

is

the

set

of

markings

that

are

reachable

regardless

of

the

identity

of

the

specific

markings

of

P

That

is

each

marking

m

-LRB-

Wx

-RRB-

P

must

be

a

consequence

of

-LSB-

-LSB-

ass

A

x

-LRB-

P

-RRB-

-RSB-

-RSB-

for

any

assignment

ass

A

x

The

interpretation

of

the

V-quantifier

-LRB-

some

-RRB-

is

analogous

The

truth

of

an

sentence

with

respect

to

a

quantale

QAN

is

defined

in

terms

of

the

ordering

relation

and

the

interpretation

of

the

logical

constant

I.

Definition

An

sentence

P

is

true

in

a

quantale

QAN

-LRB-

ie

QAN

j

P

-RRB-

iff

-LSB-

-LSB-

I

-RSB-

-RSB-

-LSB-

-LSB-

P

-RSB-

-RSB-

We

shall

also

say

that

the

property

P

holds

in

a

net

AN

iff

-LSB-

-LSB-

I

-RSB-

-RSB-

QAN

-LSB-

-LSB-

P

-RSB-

-RSB-

Lemma

j

m

-LRB-

iff

marking

m

is

reachable

from

When

taking

the

interpretation

proposed

by

Engberg

and

Winskel

the

direction

of

the

linear

implication

in

the

lemma

is

changed

i.e

the

lemma

becomes

j

m

-LRB-

iff

marking

is

reachable

from

m.

Proposition

The

interpretation

as

given

above

is

sound

with

respect

to

the

sequent

calculus

An

A

-RRB-

An

j

A

Proof

By

case

inspection

and

induction

over

the

length

of

the

sequents

For

example

the

proof

soundness

with

respect

to

the

rule

for

existential

quantifiers

is

as

follows

By

hypothesis

we

have

A

-LSB-

t

x

-RSB-

that

is

-LSB-

-LSB-

-RSB-

-RSB-

-LSB-

-LSB-

A

-LSB-

t

x

-RSB-

-RSB-

-RSB-

Now

by

definition

we

have

-LSB-

-LSB-

A

-LSB-

t

x

-RSB-

-RSB-

-RSB-

-LSB-

-LSB-

-LRB-

V

x

-RRB-

A

-RSB-

-RSB-

which

by

transitivity

implies

-LSB-

-LSB-

-RSB-

-RSB-

-LSB-

-LSB-

-LRB-

V

x

-RRB-

A

-RSB-

-RSB-

i.e.

-LRB-

Vx

-RRB-

A.

Some

examples

will

illustrate

the

definitions

Example

Let

AN

be

the

dining

philosophers

net

of

figure

on

page

with

the

interpretation

of

figure

Then

we

can

state

the

following

properties

A

philosopher

can

eat

if

he

can

get

both

forks

QAN

j

e

-LRB-

-RRB-

-LRB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

because

-LSB-

-LSB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

fhp

hf

hf

he

and

-LSB-

-LSB-

e

-LRB-

-RRB-

-RSB-

-RSB-

fhp

hf

hf

he

clearly

imply

that

f

-LSB-

-LSB-

C

-RSB-

-RSB-

j

-LSB-

-LSB-

C

e

-LRB-

-RRB-

-RSB-

-RSB-

-LSB-

-LSB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

g

If

philosophers

and

are

hungry

and

there

are

enough

forks

it

is

possible

for

exactly

one

philosopher

to

start

eating

QAN

j

e

-LRB-

-RRB-

e

-LRB-

-RRB-

-LRB-

p

-LRB-

-RRB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

because

-LSB-

-LSB-

e

-LRB-

-RRB-

e

-LRB-

-RRB-

-RSB-

-RSB-

-LSB-

-LSB-

e

-LRB-

-RRB-

-RSB-

-RSB-

-LSB-

-LSB-

-LSB-

e

-LRB-

-RRB-

-RSB-

-RSB-

fhe

he

hp

hf

hf

hp

hf

hf

while

-LSB-

-LSB-

p

-LRB-

-RRB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

fhp

hp

hf

hf

hf

he

he

so

that

-LSB-

-LSB-

C

-RSB-

-RSB-

hf

hf

and

thus

-LSB-

-LSB-

e

-LRB-

-RRB-

e

-LRB-

-RRB-

-LRB-

p

-LRB-

-RRB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

But

QAN

e

-LRB-

-RRB-

e

-LRB-

-RRB-

-LRB-

p

-LRB-

-RRB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

because

-LSB-

-LSB-

e

-LRB-

-RRB-

e

-LRB-

-RRB-

-RSB-

-RSB-

-LSB-

-LSB-

e

-LRB-

-RRB-

-RSB-

-RSB-

-LSB-

-LSB-

e

-LRB-

-RRB-

-RSB-

-RSB-

and

thus

-LSB-

-LSB-

e

-LRB-

-RRB-

e

-LRB-

-RRB-

-LRB-

p

-LRB-

-RRB-

p

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

For

any

philosopher

there

is

some

fork

that

is

not

needed

for

the

philosopher

to

start

eating

QAN

j

xphil

yfork

e

-LRB-

x

-RRB-

f

-LRB-

y

-RRB-

-LRB-

p

-LRB-

x

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

The

interpretation

of

this

formula

is

complicated

and

we

shall

only

sketch

the

details

-LSB-

-LSB-

xphil

yfork

e

-LRB-

x

-RRB-

f

-LRB-

y

-RRB-

-LRB-

p

-LRB-

x

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

-LSB-

-LRB-

-LSB-

-LSB-

e

-LRB-

phi

-RRB-

f

-LRB-

fi

-RRB-

-LRB-

p

-LRB-

phi

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

Now

-LSB-

-LSB-

p

-LRB-

phi

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

fhp

phii

hf

hf

hf

he

phii

hf

gi

and

-LSB-

-LSB-

e

-LRB-

phi

-RRB-

f

-LRB-

gj

-RRB-

-RSB-

-RSB-

fhp

phii

hf

gii

hf

gi

hf

gji

he

phii

hf

gjig

One

can

now

see

that

-LSB-

-LSB-

e

-LRB-

phi

-RRB-

f

-LRB-

gj

-RRB-

-LRB-

p

-LRB-

phi

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

for

the

pairs

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

and

this

then

leads

to

the

result

that

-LSB-

-LSB-

xphil

yfork

e

-LRB-

x

-RRB-

f

-LRB-

y

-RRB-

-LRB-

p

-LRB-

x

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

-RSB-

-RSB-

A

property

describing

transition

QAN

j

xphil

e

-LRB-

x

-RRB-

-LRB-

p

-LRB-

x

-RRB-

f

-LRB-

l

-LRB-

x

-RRB-

-RRB-

f

-LRB-

r

-LRB-

x

-RRB-

-RRB-

because

-LSB-

-LSB-

p

-LRB-

x

-RRB-

f

-LRB-

l

-LRB-

x

-RRB-

-RRB-

f

-LRB-

r

-LRB-

x

-RRB-

-RRB-

-RSB-

-RSB-

-LSB-

fhp

phii

hf

gii

hf

gi

he

phiig

and

thus

-LSB-

-LSB-

xphil

e

-LRB-

x

-RRB-

-LRB-

p

-LRB-

x

-RRB-

f

-LRB-

l

-LRB-

x

-RRB-

-RRB-

f

-LRB-

r

-LRB-

x

-RRB-

-RRB-

-RSB-

-RSB-

As

we

can

see

the

calculation

of

the

interpretation

of

the

quantifiers

is

very

complicated

But

this

is

was

is

to

be

expected

when

working

with

quantifiers

Notice

also

the

form

of

the

lhs

of

the

implication

in

example

We

had

to

explicitly

mention

the

left

over

fork

although

what

we

would

have

wanted

to

be

able

to

say

something

like

from

the

initial

marking

any

philosopher

can

start

eating

For

this

end

we

need

a

wildcard

marking

Lemma

-LSB-

-LSB-

m

-RSB-

-RSB-

mg

Proof

-LSB-

-LSB-

m

-RSB-

-RSB-

#fm

bjb

-LSB-

-LSB-

-RSB-

-RSB-

g

mg

Example

now

becomes

QAN

j

xphil

e

-LRB-

x

-RRB-

-LRB-

p

-LRB-

x

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

f

-LRB-

-RRB-

In

this

section

we

presented

a

construction

for

generating

a

quantale

from

a

net

The

functoriality

of

the

construction

was

then

proved

Finally

using

this

construction

and

the

results

from

the

previous

chapter

an

interpretation

of

intuitionistic

predicate

linear

logic

in

terms

of

algebraic

high-level

nets

was

proposed

Conclusions

In

this

thesis

we

have

presented

a

high-level

net

class

called

algebraic

highlevel

nets

discussed

some

compositionality

properties

of

this

class

and

proposed

a

language

for

describing

properties

of

these

nets

In

this

section

we

shall

first

give

a

brief

review

of

the

contents

of

this

thesis

then

mention

some

questions

that

we

left

open

discuss

the

connections

with

other

high-level

formalisms

and

finally

give

some

suggestions

on

topics

for

further

research

We

started

by

describing

different

categories

of

Petri

nets

The

simplest

of

these

categories

Petri

has

Petri

nets

without

capacities

as

objects

The

intention

was

to

use

these

as

semantics

for

high-level

nets

To

this

end

we

studied

the

different

kinds

of

morphisms

of

these

categories

and

their

completeness

and

cocompleteness

properties

Finally

we

defined

a

category

PetriG

that

has

all

colimits

Then

we

defined

algebraic

high-level

nets

These

nets

are

essentially

a

generalisation

of

P/T-nets

with

the

arc-weights

replaced

by

terms

from

an

algebraic

theory

The

semantics

of

these

nets

was

defined

in

terms

of

a

functor

from

the

category

of

algebraic

high-level

nets

the

category

of

Petri

nets

PetriG

This

functor

was

then

proved

to

be

cocontinuous

that

is

to

be

colimit

preserving

Using

this

functor

we

proposed

some

rules

for

compositional

reasoning

with

high-level

nets

The

correctness

proofs

of

these

rules

made

good

use

of

the

hierarchy

of

net-categories

defined

in

section

It

should

be

noted

that

rules

for

compositional

reasoning

with

nets

have

also

been

presented

by

Winskel

in

-LSB-

-RSB-

The

novelty

in

our

approach

is

that

we

give

the

rules

for

high-level

nets

and

the

rules

are

all

based

on

push-outs

To

be

able

to

express

properties

of

these

nets

we

introduced

linear

logic

The

models

of

linear

logic

are

quantales

We

showed

how

to

construct

a

quantale

from

a

net

such

that

the

quantale

reflects

the

behaviour

of

the

net

This

construction

was

proved

to

be

functorial

By

composing

this

functor

with

the

semantics

functor

from

section

the

interpretation

of

linear

logic

in

net-quantales

was

extended

to

predicate

linear

logic

The

interpretation

allows

one

to

express

propositions

about

the

reachability

of

markings

Several

examples

were

discussed

There

are

several

questions

that

we

did

not

touch

upon

Even

though

the

problem

of

synchronisation

may

be

solved

with

a

different

kind

of

morphism

the

exact

properties

of

the

duality

construction

for

high-level

nets

are

not

clear

and

should

be

investigated

Also

the

preservation

of

limits

and

colimits

by

the

functors

is

an

interesting

question

that

merits

further

study

On

a

more

philosophical

level

there

is

the

problem

of

the

intuitive

interpretation

of

the

additives

The

usual

interpretation

is

that

they

describe

different

aspects

of

choice

namely

internal

and

external

choice

the

idea

being

that

with

internal

choice

the

environment

is

unable

to

influence

the

choice

while

with

external

choice

the

environment

is

specifically

able

to

force

one

or

the

other

of

the

behaviours

But

as

pointed

out

by

Brown

in

-LSB-

-RSB-

a

fundamental

assumption

in

net

theory

is

that

no

external

observer

can

influence

the

course

of

events

and

that

conflicts

are

resolved

internally

by

the

net

So

the

exact

meaning

of

these

connectives

is

still

unclear

It

should

be

noted

that

the

aim

of

this

work

was

to

get

an

interpretation

of

linear

predicate

logic

so

an

answer

to

this

problem

was

not

expected

The

most

known

high-level

net

formalisms

are

Predicate/Transition

nets

-LRB-

PrT

nets

-RRB-

-LSB-

-RSB-

and

Coloured

nets

-LSB-

-RSB-

PrT-nets

arise

through

the

idea

of

dynamising

predicate

logic

using

predicates

with

changing

extensions

Due

to

the

use

of

variables

formal

expressions

products

and

sums

PrT-nets

are

essentially

a

syntax

based

formalism

On

the

other

hand

Coloured

nets

can

be

seen

as

a

more

semantically

oriented

model

because

they

have

been

motivated

as

shorthands

for

conventional

Petri

nets

Our

algebraic

high-level

nets

can

be

seen

as

a

mixture

of

both

the

previous

models

As

in

PrT-nets

we

have

variables

formal

expressions

and

sums

but

for

example

our

formalism

lacks

the

ability

to

add

conditions

on

transitions

On

the

other

hand

we

have

sums

of

functions

-LRB-

operators

-RRB-

as

in

Coloured

nets

An

interesting

point

is

also

that

given

our

interpretation

of

linear

predicate

logic

the

predicates

can

be

understood

in

terms

of

the

dynamic

predicates

of

PrT-nets

Both

the

theory

of

PrT-nets

and

the

theory

of

Coloured

nets

discuss

the

topic

of

invariant

analysis

very

thoroughly

It

is

not

known

what

kind

of

invariants

our

algebraic

high-level

nets

posses

We

conjecture

that

they

would

not

differ

very

much

from

the

invariants

discussed

by

Reisig

and

Vautherin

-LSB-

-RSB-

as

our

nets

differ

only

slightly

from

those

of

Reisig

and

Vautherin

Neither

PrT-nets

nor

Coulured

nets

have

a

notion

of

morphism

This

should

not

be

taken

as

criticisms

against

these

formalisms

as

for

example

there

exists

a

large

number

of

equivalence

transformations

for

PrT-nets

that

achieve

some

of

the

aims

of

section

much

better

On

the

other

hand

the

lack

of

morphism

means

that

compositional

design

methods

have

to

be

based

on

other

ideas

For

Coloured

nets

there

exists

an

extension

called

Hierachical

Coloured

nets

-LSB-

-RSB-

It

is

not

clear

how

such

a

concept

could

be

integrated

into

our

formalism

through

categorical

methods

On

the

other

hand

by

defining

a

notion

of

morphism

for

PrT-nets

and

Coloured

nets

the

ideas

presented

here

should

transfer

easily

This

work

opens

up

several

paths

for

further

research

At

the

end

of

section

a

small

example

with

a

net-reduction

is

discussed

In

this

example

it

is

seen

that

the

notion

of

morphism

between

AHL-nets

is

not

strong

enough

to

express

more

complex

reductions

First

of

all

it

suffers

from

the

same

defi

ciency

as

its

low-level

counterpart

namely

it

can

not

express

synchronisation

of

transitions

Secondly

net-reductions

for

high-level

nets

achieve

the

reduction

by

folding

the

net

into

the

annotations

Thus

it

should

be

possible

to

map

terms

into

derived

terms

and

even

change

signatures

So

one

future

area

of

research

would

be

the

definition

of

a

more

complex

notion

of

morphism

of

AHL-nets

and

a

systematic

study

of

net-reductions

with

this

new

notion

of

morphism

In

section

the

interpretation

given

to

predicates

is

that

they

are

places

of

the

net

This

is

a

natural

interpretation

when

we

are

talking

about

unary

predicates

because

we

can

think

that

P

-LRB-

a

-RRB-

is

true

iff

token

a

is

in

place

P

But

what

do

non

unary

predicates

mean

Also

the

logic

as

such

is

rather

unexpressive

because

when

working

with

practical

applications

one

often

is

interested

in

sequences

of

transitions

These

are

not

expressible

in

the

logic

From

a

proof-theoretic

point

of

view

this

means

that

we

want

to

examine

the

proof

of

the

proposition

This

is

one

of

the

advantages

with

the

use

of

dynamic

logic

in

the

analysis

of

nets

as

proposed

by

Tuominen

-LSB-

-RSB-

References

-LSB-

-RSB-

Abadi

M.

and

Plotkin

G.

D

A

logical

view

of

composition

and

refinement

-LRB-

excerpt

-RRB-

Third

Workshop

on

Concurrency

and

Compositionality

Goslar

pp.

-LCB-

-LSB-

-RSB-

Abramsky

S.

Linear

process

logic

Notes

by

Steven

Vickers

-LSB-

-RSB-

Abramsky

S.

and

Vickers

S.

Quantales

observational

logic

and

process

semantics

Research

Report

DOC

Department

of

Computing

Imperial

College

London

England

-LSB-

-RSB-

Andreoli

J.-M

and

Pareschi

R.

Linear

objects

Logical

processes

with

built-in

inheritance

International

Conference

on

Logic

Programming

Jerusalem

May

-LSB-

-RSB-

Asperti

A.

Gorrieri

R.

and

Ferrari

G.

Implicative

formulae

in

the

state-as-proposition

analogy

Conference

on

Principles

of

Programming

Languages

-LSB-

-RSB-

Berthelot

G.

Transformations

and

decompositions

of

nets

Petri

Nets

Central

Models

and

Their

Properties

Lecture

Notes

in

Computer

Science

Springer-Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Best

E.

and

Devillers

R.

Sequential

and

concurrent

behaviour

in

Petri

net

theory

Theoretical

Computer

Science

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Brown

C.

Linear

logic

and

Petri

nets

Categories

algebra

and

proof

PhD

thesis

Department

of

Computer

Science

University

of

Edinburgh

Scotland

-LSB-

-RSB-

Brown

C.

Petri

nets

as

quantales

Technical

Report

Laboratory

for

Foundations

of

Computer

Science

University

of

Edinburgh

Scotland

-LSB-

-RSB-

Brown

C.

Relating

Petri

nets

to

formulae

of

linear

logic

Technical

Report

Laboratory

for

Foundations

of

Computer

Science

University

of

Edinburgh

Scotland

-LSB-

-RSB-

Brown

C.

and

Gurr

D

A

categorical

linear

framework

for

Petri

nets

Symposium

on

Logic

in

Computer

Science

IEEE

Computer

Press

-LSB-

-RSB-

Burstall

R.

and

Goguen

J.

A.

Putting

theories

together

to

make

specifications

International

Joint

Conference

on

Artificial

Intelligence

Department

of

Computer

Science

Carnegie-Mellon

University

USA

pp.

-LCB-

-LSB-

-RSB-

Burstall

R.

and

Goguen

J.

A

The

semantics

of

Clear

a

specification

language

Proceedings

of

Copenhagen

Winter

School

on

Abstract

Software

Specification

Lecture

Notes

in

Computer

Science

SpringerVerlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Cerrito

S

A

linear

semantics

for

allowed

logic

programs

IEEE

Symp

on

Logic

in

Computer

Science

IEEE

Press

-LSB-

-RSB-

de

Paiva

V.

C

The

dialectica

categories

AMS

Conference

on

Categories

in

Computer

Science

Boulder

Contemporary

Mathematics

American

Mathematical

Society

Providence

Rhode

Island

USA

-LSB-

-RSB-

de

Paiva

V.

C.

Dialectica-like

model

of

linear

logic

Category

Theory

and

Computer

Science

Lecture

Notes

in

Computer

Science

Springer

Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Degano

P.

Meseguer

J.

and

Montanari

U.

Axiomatizing

net

computations

and

processes

Symposium

on

Logic

in

Computer

Science

IEEE

Computer

Press

-LSB-

-RSB-

Dimitrovici

C.

Hummert

U.

and

P?etrucci

L

The

properties

of

algebraic

net

schemes

in

some

semantics

L.R.I

Rap

de

Recherce

Univeriste

de

Paris-Sud

-LSB-

-RSB-

Dimitrovici

C.

and

Hummert

U.

Compositionality

of

algebraic

high-level

nets

Technical

report

Institut

fur

Software

und

Theoretische

Informatik

Technische

Universitat

Berlin

-LSB-

-RSB-

Dimitrovici

C.

and

Hummert

U.

Kategorielle

konstruktionen

fur

algebraische

Petrinetze

Technical

Report

Fachbereich

Informatik

Technische

Universitat

Berlin

-LSB-

-RSB-

Dimitrovici

C.

and

Hummert

U.

Semantische

konstruktionen

und

kategorien

algebraischer

netschemata

Technical

Report

Fachbereich

Informatik

Technische

Universitat

Berlin

-LSB-

-RSB-

Ehrig

H.

and

Mahr

B.

Fundamentals

of

algebraic

specification

I

Equations

and

initial

semantics

Springer-Verlag

Berlin

-LSB-

-RSB-

Enderton

H.

B

A

mathematical

introduction

to

logic

Academic

Press

New

York

-LSB-

-RSB-

Engberg

U.

and

Winskel

G.

Petri

nets

as

models

of

linear

logic

Technical

Report

DAIMI

Computer

Science

Department

Aarhus

University

Denmark

-LSB-

-RSB-

Gallier

J.

H.

Logic

for

computer

science

John

Wiley

Sons

New

York

-LSB-

-RSB-

Genrich

H.

Predicate/transition

nets

Petri

Nets

Central

Models

and

Their

Properties

Lecture

Notes

in

Computer

Science

Springer

Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Genrich

H.

and

Stankiewicz-Wiechno

E

A

dictionary

of

some

basic

notions

of

net

theory

Net

Theory

and

Applications

Lecture

Notes

in

Computer

Science

Springer-Verlag

Berlin

pp

-LCB-

-LSB-

-RSB-

Girard

J.-Y

Linear

logic

Theoretical

Computer

Science

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Girard

J.-Y

Quantifiers

in

linear

logic

Proc

of

the

SILFS

Conference

Cesena

Italy

January

-LSB-

-RSB-

Girard

J.-Y

Geometry

of

interaction

I

Interpretation

of

system

F.

Logic

Colloquium

North-Holland

Amsterdam

-LSB-

-RSB-

Girard

J.-Y

Towards

a

geometry

of

interaction

AMS

Conference

on

Categories

in

Computer

Science

Contemporary

Mathematics

American

Mathematical

Society

Providence

Rhode

Island

USA

pp.

-LCB-

-LSB-

-RSB-

Girard

J.-Y

Geometry

of

interaction

II

Deadlock-free

algorithms

COLOG

Lecture

Notes

in

Computer

Science

Springer-Verlag

Berlin

-LSB-

-RSB-

Girard

J.-Y

La

logique

lin?eaire

Pour

La

Science

Edition

Francaise

de

Scientific

American

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Girard

J.-Y

and

Lafont

Y.

Linear

logic

and

lazy

computation

TAP

SOFT

Springer

LNCS

pp.

-LCB-

-LSB-

-RSB-

Girard

J.-Y

The

system

F

of

variable

types

fifteen

years

later

Theoretical

Computer

Science

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Girard

J.-Y.

Lafont

Y.

and

Taylor

P.

Proofs

and

types

Cambridge

University

Press

England

-LSB-

-RSB-

Godel

K.

Uber

eine

bisher

noch

nicht

benutzte

erweiterung

des

finiten

standpunktes

Dialectica

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Goguen

J.

A.

and

Burstall

R.

Institutions

Abstract

model

theory

for

specification

and

programming

Research

Report

Laboratory

for

Foundations

of

Computer

Science

University

of

Edinburgh

Scotland

-LSB-

-RSB-

Gunter

C.

and

Gehlot

V.

Nets

as

tensor

theories

International

Conference

on

Applications

and

Theory

of

Petri

Nets

Bonn

pp.

-LCB-

-LSB-

-RSB-

Harland

J.

and

Pym

D

The

uniform

proof-theoretic

foundation

of

linear

logic

programming

Technical

Report

Laboratory

for

Foundations

of

Computer

Science

University

of

Edinburgh

Scotland

-LSB-

-RSB-

Huber

P.

Jensen

K.

and

Shapiro

R.

M.

Hierarchies

in

coloured

petri

nets

International

Conference

on

Application

and

Theory

of

Petri

Nets

Bonn

pp.

-LCB-

-LSB-

-RSB-

Hummert

U.

Algebraische

theorie

von

high-level

netzen

PhD

thesis

Technische

Universitat

Berlin

-LSB-

-RSB-

Husberg

N.

Petri

nets

in

algebraic

theories

a

category

theory

approach

Technical

Report

Digital

Systems

Laboratory

Helsinki

University

of

Technology

Finland

-LSB-

-RSB-

Jensen

K.

Coloured

Petri

nets

Petri

Nets

Central

Models

and

Their

Properties

Lecture

Notes

in

Computer

Science

Springer

Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Johnstone

P.

T.

Stone

spaces

Cambridge

University

Press

England

-LSB-

-RSB-

Kelly

G.

M.

and

Street

R.

Review

of

the

elements

of

Category

Seminar

Lecture

Notes

in

Mathematics

Springer

Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Lafont

Y

The

linear

abstract

machine

Theoretical

Computer

Science

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

MacLane

S.

Categories

for

the

working

mathematician

Springer

Verlag

Berlin

-LSB-

-RSB-

Marti-Oliet

N.

and

Meseguer

J.

From

Petri

nets

to

linear

logic

Category

Theory

and

Computer

Science

Lecture

Notes

in

Computer

Science

Springer

Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Masseron

M.

Tollu

C.

and

Vauzeilles

J.

Generating

plans

in

linear

logic

Foundations

of

Software

Technology

and

Theoretical

Computer

Science

Lecture

Notes

in

Computer

Science

Springer-Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Meseguer

J.

Private

Communication

-LSB-

-RSB-

Meseguer

J.

and

Montanari

U.

Petri

nets

are

monoids

Information

and

Control

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Milner

R.

Communication

and

concurrency

Prentice

Hall

London

-LSB-

-RSB-

Mulvey

C.

J.

Rendiconti

del

Circolo

Matematico

di

Palermo

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Niefield

S.

B.

and

Rosenthal

K.

I.

Constructing

locales

from

quantales

Mathematical

Proceedings

of

the

Cambridge

Philosophical

Society

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Reisig

W.

and

Vautherin

J

An

algebraic

approach

to

high

level

Petri

nets

Workshop

on

Applications

and

Theory

of

Petri

Nets

Zaragoza

Spain

pp.

-LCB-

-LSB-

-RSB-

Reisig

W.

Petri

nets

and

algebraic

specifications

Theoretical

Computer

Science

-LRB-

-RRB-

pp.

-LCB-

-LSB-

-RSB-

Scedrov

A

A

brief

guide

to

linear

logic

Bulletin

of

the

European

Assoc.

for

Theoretical

Computer

Science

-LRB-

-RRB-

pp

-LCB-

-LSB-

-RSB-

Tuominen

H.

Logic

in

Petri

net

analysis

Research

Report

Digital

Systems

Laboratory

Helsinki

University

of

Technology

Finland

-LSB-

-RSB-

van

Glabbeek

R.

Comparative

concurrency

semantics

and

refinement

of

actions

PhD

thesis

Vrije

Universiteit

te

Amsterdam

-LSB-

-RSB-

Vautherin

J.

Un

modele

algebrique

base

sur

les

reseaux

de

petr

pour

l'etude

des

systemes

paralleles

PhD

thesis

Universite

de

Paris-Sud

-LSB-

-RSB-

Vickers

S.

Topology

via

logic

Cambridge

University

Press

England

-LSB-

-RSB-

Wadler

P.

Linear

types

can

change

the

world

Programming

Concepts

and

Methods

Elsevier

Science

Publisher

B.V.

-LRB-

North-Holland

-RRB-

Amsterdam

pp.

-LCB-

-LSB-

-RSB-

Winskel

G.

Categories

of

models

of

concurrency

Seminar

on

Concurrency

Lecture

Notes

in

Computer

Science

Springer

Verlag

Berlin

pp.

-LCB-

-LSB-

-RSB-

Winskel

G

A

new

definition

of

morphism

on

Petri

nets

STACS

Lecture

Notes

in

Computer

Science

Springer-Verlag

Berlin

-LSB-

-RSB-

Winskel

G.

Petri

nets

algebras

and

morphisms

Technical

Report

Computer

Laboratory

University

of

Cambridge

England

-LSB-

-RSB-

Winskel

G

A

category

of

labelled

petri

nets

and

compositional

proof

systems

Symposium

on

Logic

in

Computer

Science

IEEE

Computer

Press

pp.

-LCB-

-LSB-

-RSB-

Winskel

G.

Private

Communication

-LSB-

-RSB-

Yetter

D.

N.

Quantales

and

-LRB-

noncommutative

-RRB-

linear

logic

Journal

of

Symbolic

Logic

-LRB-

-RRB-

pp.

-LCB-

A

Appendix

Introduction

to

Category

Theory

The

basic

idea

underlying

category

theory

is

that

the

crucial

mathematical

properties

of

a

given

subject

do

not

reside

within

the

structures

in

question

and

even

less

in

the

particular

representation

chosen

for

them

but

rather

in

the

mappings

that

preserve

those

structures

Thus

category

theory

emphasises

mappings

before

objects

Indeed

most

of

category

theory

could

be

written

without

direct

reference

to

objects

An

other

equivalent

way

to

characterise

category

theory

is

as

a

diagrammatic

language

of

arrows

In

this

language

mappings

are

represented

by

arrows

-LRB-

a

mapping

f

a

b

is

a

f

b

-RRB-

Most

theorems

then

are

theorems

that

state

equality

of

arrows

under

certain

conditions

These

are

represented

by

commutativity

diagrams

E.g.

if

we

require

that

f

g

h

k

with

f

a

b

g

b

c

h

a

j

c

we

state

that

the

diagram

below

a

f

b

h

g

j

c

commutes

In

this

appendix

we

give

a

short

introduction

to

the

basic

concepts

in

category

theory

The

main

emphasis

is

on

the

intuition

behind

the

definitions

Most

examples

will

be

with

sets

and

functions

but

some

knowledge

of

algebra

is

required

This

appendix

only

discusses

concepts

relevant

to

this

work

The

appendix

is

structured

as

follows

We

first

define

the

notions

of

category

functor

and

natural

transformation

The

we

discuss

limits

and

colimits

which

are

ways

of

expressing

combinations

of

objects

Finally

we

define

the

notion

of

adjunction

For

missing

proofs

we

refer

to

-LSB-

-RSB-

A.

Basic

category

theory

The

aim

of

category

theory

is

to

study

the

mappings

between

mathematical

objects

We

start

this

introduction

by

defining

a

category

Definition

A

category

C

is

a

collection

of

objects

jCj

such

that

ffl

For

each

pair

of

objects

-LRB-

a

b

-RRB-

of

C

a

set

MorC

-LRB-

a

b

-RRB-

called

the

set

of

morphisms

from

a

to

b

with

MorC

-LRB-

a

b

-RRB-

and

MorC

-LRB-

-RRB-

disjoint

unless

a

and

b

in

which

case

they

coincide

We

shall

take

the

naive

view

that

all

sets

are

proper

sets

We

will

not

encounter

any

foundational

problems

with

this

ffl

For

any

three

objects

a

b

c

of

jCj

there

is

a

mapping

-LRB-

composition

-RRB-

MorC

-LRB-

a

b

-RRB-

MorC

-LRB-

b

c

-RRB-

MorC

-LRB-

a

c

-RRB-

described

by

-LRB-

f

g

-RRB-

f

g

-LRB-

notice

that

the

order

of

the

composition

is

written

in

the

order

of

the

arrows

-RRB-

with

the

following

properties

-LCB-

For

each

object

a

there

is

a

morphism

ida

MorC

-LRB-

a

a

-RRB-

which

is

right

identity

under

for

the

elements

of

MorC

-LRB-

a

b

-RRB-

and

left

identity

under

for

the

elements

MorC

-LRB-

b

a

-RRB-

-LCB-

is

associative

in

the

sense

that

when

the

composites

f

-LRB-

g

h

-RRB-

and

-LRB-

f

g

-RRB-

h

are

defined

they

are

equal

We

will

often

use

the

notation

f

a

b

and

a

f

b

for

the

morphism

sets

and

call

them

arrows

The

use

of

small

letters

for

both

objects

and

arrows

is

to

emphasise

the

fact

that

due

to

the

identity

morphisms

objects

can

be

manipulated

as

arrows

Thus

ordinary

function

application

f

-LRB-

x

-RRB-

can

and

will

sometimes

be

written

x

f

To

make

the

above

abstract

definition

clear

and

to

convince

the

reader

about

its

generality

we

give

some

examples

Example

-LRB-

The

category

of

sets

-RRB-

The

category

of

sets

Set

and

their

mappings

The

objects

are

ordinary

sets

and

the

morphisms

are

ordinary

mappings

between

sets

Composition

is

the

usual

composition

of

mappings

Example

-LRB-

Preorder

-RRB-

Let

-LRB-

E

-RRB-

be

a

preordered

set

We

can

view

this

preordered

set

as

a

category

E

as

follows

take

as

objects

of

E

the

elements

of

E

and

for

a

b

E

define

MorE

-LRB-

a

b

-RRB-

-LRB-

f

-LRB-

a

b

-RRB-

g

if

a

b

OE

otherwise

Composition

is

defined

by

the

transitivity

of

and

the

identity

morphisms

by

the

reflexivity

of

Example

-LRB-

Monoid

-RRB-

A

monoid

is

a

set

X

equipped

with

a

function

ffl

X

X

X

-LRB-

monoid

multiplication

-RRB-

and

a

distinguished

element

I

-LRB-

monoid

identity

-RRB-

subject

to

the

two

laws

x

ffl

-LRB-

y

ffl

z

-RRB-

-LRB-

x

ffl

y

-RRB-

ffl

z

for

all

x

y

z

x

ffl

I

x

I

ffl

x

for

all

x

Now

a

monoid

is

a

category

with

one

object

To

see

this

call

the

object

A

then

let

X

Mor

-LRB-

A

A

-RRB-

where

ffl

is

composition

and

I

is

the

identity

morphism

Monoids

and

preorders

viewed

as

categories

are

at

opposite

extremes

A

monoid

has

one

object

and

many

morphisms

while

a

preorder

has

at

most

one

morphism

between

objects

Category

theory

tries

to

express

every

mathematical

statement

as

a

statement

about

arrows

This

has

the

advantage

that

a

proof

of

the

statement

also

gives

a

proof

of

the

statement

obtained

by

reversing

the

arrows

Usually

we

will

dualise

every

statement

and

definition

immediately

We

do

this

for

the

definition

of

a

category

Definition

The

opposite

category

Cop

is

formed

by

turning

around

all

the

arrows

in

C.

The

fundamental

concept

in

standard

mathematics

is

the

epsilon

or

We

will

now

show

how

some

useful

set-theoretical

constructions

can

be

reformulated

in

the

language

of

arrows

The

main

idea

is

to

transform

concepts

defined

by

reference

to

the

internal

membership

structure

of

a

set

into

an

external

characterization

by

reference

to

other

sets

As

our

first

concept

we

will

transform

the

set-theoretic

definition

of

an

injective

function

into

the

language

of

arrows

A

function

f

a

b

is

said

to

be

injective

when

for

all

x

y

a

if

f

-LRB-

x

-RRB-

f

-LRB-

y

-RRB-

then

x

y

To

transform

this

into

a

statement

about

arrows

we

introduce

two

parallel

arrows

g

h

c

a

If

we

compose

g

and

h

with

f

we

get

the

following

diagram

c

g

a

h

f

a

f

b

which

commutes

if

g

f

h

f

Now

for

an

x

c

we

have

g

-LRB-

x

-RRB-

f

h

-LRB-

x

-RRB-

f

or

f

-LRB-

g

-LRB-

x

-RRB-

-RRB-

f

-LRB-

h

-LRB-

x

-RRB-

-RRB-

But

as

f

is

injective

this

means

that

g

-LRB-

x

-RRB-

h

-LRB-

x

-RRB-

Thus

we

have

for

an

injective

f

whenever

g

f

h

f

then

g

h

We

can

naturally

dualise

the

above

discussion

in

which

case

we

get

a

characterization

of

a

surjective

function

Now

we

drop

the

requirement

that

f

be

a

function

and

define

monics

and

epics

as

follows

Definition

Let

C

be

a

category

and

g

h

c

a

C-morphisms

A

C-morphism

f

a

b

is

monic

iff

g

f

h

f

-RRB-

g

h

Definition

Let

C

be

a

category

and

g

h

b

c

C-morphisms

A

C-morphism

f

a

b

is

epic

iff

f

g

f

h

-RRB-

g

h

Another

important

morphism

type

is

an

isomorphism

Definition

Let

C

be

a

category

Then

a

morphism

f

a

b

is

an

isomorphism

iff

there

exists

a

morphism

k

b

a

such

that

f

k

ida

and

k

f

idb

Example

In

Set

monic

morphisms

are

injections

and

epics

are

surjections

As

we

are

interested

in

studying

structure

preserving

mappings

between

objects

it

seems

natural

to

define

mappings

between

categories

These

are

called

functors

Definition

-LRB-

Functor

-RRB-

A

-LRB-

covariant

-RRB-

functor

from

a

category

A

to

a

category

B

is

a

pair

of

mappings

that

assign

to

every

object

a

jAj

an

object

F

-LRB-

a

-RRB-

jBj

and

to

every

morphism

f

a

b

MorA

a

morphism

F

-LRB-

f

-RRB-

F

-LRB-

a

-RRB-

F

-LRB-

b

-RRB-

MorB

such

that

ffl

F

-LRB-

ida

-RRB-

idF

-LRB-

a

-RRB-

for

all

a

jAj

ffl

if

f

g

is

defined

in

A

then

F

-LRB-

f

-RRB-

F

-LRB-

g

-RRB-

is

defined

in

B

and

F

-LRB-

f

-RRB-

F

-LRB-

g

-RRB-

F

-LRB-

f

g

-RRB-

We

use

the

notation

F

A

B

for

a

functor

F

from

A

to

B

A

contravariant

functor

F

A

B

is

a

covariant

functor

F

A

Bop

Thus

a

functor

is

a

mapping

that

respects

compositions

and

identities

Two

special

kinds

of

functors

deserve

mentioning

A

bifunctor

is

a

functor

F

A

B

C

An

endofunctor

is

a

functor

F

A

A.

Example

-LRB-

Monoid

homomorphisms

-RRB-

Let

M

and

N

be

monoids

viewed

as

categories

Then

a

monoid

homomorphism

f

-LRB-

M

fflM

M

-RRB-

-LRB-

N

fflN

N

-RRB-

is

a

functor

H

M

N.

Example

-LRB-

Monotonic

functions

-RRB-

Let

-LRB-

A

A

-RRB-

and

-LRB-

B

B

-RRB-

be

two

preorders

Then

a

monotonic

function

f

A

B

defines

a

functor

as

the

reader

easily

can

check

There

is

one

functor

that

we

will

use

in

the

discussion

of

the

adjunction

It

is

the

functor

that

maps

the

morphisms

of

a

category

into

sets

in

Set

Intuitively

it

takes

two

objects

a

and

b

and

returns

the

set

of

morphisms

from

a

to

b

This

is

one

of

the

few

times

when

we

have

to

take

into

account

the

possibility

of

foundational

problems

because

we

have

to

make

sure

our

morphism

sets

are

proper

sets

This

is

an

assumption

that

will

be

true

henceforth

and

will

not

be

explicitely

mentioned

Proposition

Let

C

be

a

category

Then

there

is

a

functor

homC

Cop

C

Set

where

homC

-LRB-

a

b

-RRB-

MorC

-LRB-

a

b

-RRB-

is

the

set

of

C-morphisms

from

a

to

b

and

homC

-LRB-

f

g

-RRB-

-LRB-

k

-RRB-

fkg

with

f

a

MorCop

g

b

MorC

subject

to

the

commutativity

of

a

k

b

f

g

f

k

g

and

homC

-LRB-

a

b

-RRB-

homC

-LRB-

f

g

-RRB-

homC

-LRB-

-RRB-

Proof

It

is

easy

to

check

that

hom

preserves

identities

and

compositions

This

proposition

allows

us

now

to

define

Definition

-LRB-

hom-functor

or

representable

functor

-RRB-

The

functor

homC

Cop

C

Set

is

called

the

hom-functor

for

the

category

C.

Usually

C

is

clear

from

the

context

and

we

drop

the

subscript

By

fixing

a

specific

object

a

we

can

define

two

functors

ffl

a

covariant

hom-functor

hom

-LRB-

a

-RRB-

C

Set

ffl

and

a

contravariant

hom-functor

hom

-LRB-

a

-RRB-

Cop

Set

-LRB-

-RRB-

Having

defined

mappings

between

categories

-LRB-

i.

e.

functors

-RRB-

it

is

natural

to

ask

whether

we

could

also

define

mappings

between

functors

This

is

indeed

so

and

these

maps

are

called

natural

transformations

Definition

-LRB-

Natural

transformation

-RRB-

If

F

G

A

B

are

functors

then

a

natural

transformation

from

F

to

G

is

a

rule

that

assigns

to

each

object

a

jAj

a

morphism

a

F

-LRB-

a

-RRB-

G

-LRB-

a

-RRB-

MorB

in

such

a

way

that

associated

with

every

morphism

f

a

b

MorA

there

is

a

commutative

diagram

F

-LRB-

a

-RRB-

a

G

-LRB-

a

-RRB-

F

-LRB-

f

-RRB-

G

-LRB-

f

-RRB-

F

-LRB-

b

-RRB-

b

G

-LRB-

b

-RRB-

Example

A

good

example

of

a

natural

transformation

is

the

evaluation

of

a

function

at

an

argument

-LRB-

we

will

return

to

this

example

from

a

different

point

of

view

in

the

next

section

-RRB-

Let

BA

denote

the

set

of

all

functions

from

set

A

to

set

B

Now

define

eval

BA

A

B

as

eval

-LRB-

f

a

-RRB-

f

-LRB-

a

-RRB-

Fix

a

specific

A

The

map

B

BA

A

extends

to

a

functor

F

Set

Set

So

for

this

specific

A

eval

F

ISet

This

is

equivalent

to

the

following

diagram

BA

A

evala

B

F

-LRB-

f

-RRB-

I

-LRB-

f

-RRB-

CA

A

evalb

C

So

we

see

that

eval

is

a

natural

transformation

This

process

of

defining

mappings

between

objects

and

then

taking

these

mappings

as

objects

and

defining

new

mappings

between

these

could

be

continued

ad

nauseaum

In

practice

the

usefulness

of

mappings

between

natural

transformations

-LRB-

or

higher

order

mappings

-RRB-

is

very

limited

and

we

shall

not

encounter

them

in

this

work

Instead

we

turn

to

another

important

issue

in

category

theory

A.

Limits

In

the

previous

paragraphs

we

have

discussed

many

different

kinds

of

mappings

as

the

basic

ingredient

of

category

theory

Category

theory

is

also

concerned

with

characterizing

mathematical

constructions

in

the

arrow-theoretic

language

As

it

turns

out

the

categorial

notion

of

universality

is

disguised

in

many

mathematical

constructions

equivalence

relations

complete

metric

spaces

etc.

The

concept

of

a

universal

construction

allows

us

to

describe

these

constructions

in

an

uniform

manner

as

universal

objects

or

universal

arrows

Universal

arrows

are

usually

described

by

statements

like

for

every

f

there

exists

a

unique

f

such

that

uf

f

The

arrow

u

is

then

an

universal

arrow

We

will

here

concern

ourselves

with

a

special

kind

of

universal

constructions

namely

limits

and

their

duals

colimits

Below

when

we

use

the

word

limit

we

usually

mean

both

limits

and

colimits

Our

first

example

of

a

limit

is

the

categorial

product

a

generalization

of

a

cartesian

product

of

two

sets

Definition

-LRB-

Product

-RRB-

Let

a

b

be

objects

in

C

A

product

of

a

and

b

in

C

is

an

object

a?b

with

two

morphisms

a

b

a

a

b

b

called

the

projections

-LRB-

left

and

right

-RRB-

if

for

every

other

object

c

in

C

and

every

pair

of

morphisms

-LRB-

f

g

-RRB-

with

f

c

a

g

c

b

there

exists

a

unique

morphism

h

c

a

b

such

that

the

following

diagram

commutes

a

a

b

b

I@@@

f

h

g

c

Again

we

dualise

Definition

-LRB-

Coproduct

-RRB-

Let

a

b

be

objects

in

C

A

coproduct

of

a

and

b

in

C

is

an

object

a

b

with

two

morhpisms

a

a

b

b

a

b

called

the

injections

-LRB-

left

and

right

-RRB-

if

for

every

other

object

c

in

C

and

every

pair

of

morphisms

-LRB-

f

g

-RRB-

with

f

a

c

g

b

c

there

exists

a

unique

morphism

h

a

b

c

such

that

the

following

diagram

commutes

a

a

b

b

f

R

h

g

c

Example

In

Set

a

product

is

simply

the

cartesian

product

of

two

sets

A

coproduct

is

the

disjoint

union

of

two

sets

In

a

preorder

viewed

as

a

category

products

and

coproducts

correspond

to

join

and

meet

respectively

Products

were

historically

the

first

example

of

categorial

limits

The

characterization

of

a

cartesian

product

by

an

universal

arrow

then

helped

consolidate

the

concept

A

simpler

kind

of

limit

is

obtained

by

constructing

an

empty

coproduct

In

Set

an

empty

coproduct

consists

of

an

empty

set

The

two

injections

are

identical

to

the

identity

morphism

So

the

only

interesting

thing

left

is

the

univeral

arrow

Formally

Definition

-LRB-

Initial

object

-RRB-

An

object

i

of

C

is

said

to

be

an

initial

object

if

for

every

other

object

x

in

C

there

is

only

one

arrow

from

i

to

x.

Again

dually

we

can

ask

what

an

empty

product

is

and

end

up

with

the

following

Definition

-LRB-

Terminal

object

-RRB-

An

object

t

in

C

is

said

to

be

a

terminal

object

if

for

every

other

object

x

in

C

there

is

only

one

arrow

from

x

to

t

Example

In

Set

the

empty

set

OE

is

initial

and

fOEg

or

any

other

singleton

set

is

terminal

Because

of

isomorphism

it

does

not

matter

which

singleton

we

choose

It

is

an

easy

exercise

to

prove

that

all

initial

-LRB-

terminal

-RRB-

objects

in

a

category

are

isomorphic

This

can

be

generalised

to

all

limits

Proposition

All

limits

of

the

same

type

are

isomorphic

Corollary

a

b

b

a

a

b

b

a

A

third

kind

of

limit

that

we

will

need

is

called

an

equaliser

It

is

a

generalization

of

the

following

set-theoretical

construction

For

a

parallel

pair

of

functions

f

g

A

B

in

Set

let

E

be

the

subset

of

A

on

which

f

and

g

agree

i.e.

E

fxjx

A

and

f

-LRB-

x

-RRB-

g

-LRB-

x

-RRB-

g

The

inclusion

function

i

E

A

is

called

the

equaliser

of

f

and

g

The

intuitive

meaning

of

the

name

is

that

i

equalises

f

and

g

i.e

i

f

i

g.

By

rewriting

the

above

discussion

into

category

theory

we

get

the

following

two

definitions

Definition

Given

in

C

a

pair

of

arrows

f

g

a

b

with

the

same

domain

a

and

codomain

b

an

equaliser

of

hf

gi

is

an

arrow

u

e

a

-LRB-

or

a

pair

he

ui

-RRB-

such

that

ffl

u

f

u

g

ffl

if

h

c

a

has

h

f

h

g

then

there

exists

an

unique

arrow

c

e

such

that

u

h

This

is

displayed

in

the

commutativity

requirement

of

the

diagram

below

e

u

a

f

g

b

h

c

Definition

Given

in

C

a

pair

of

arrows

f

g

a

b

with

the

same

domain

a

and

codomain

b

a

coequaliser

of

hf

gi

is

an

arrow

u

b

e

-LRB-

or

a

pair

he

ui

-RRB-

such

that

ffl

f

u

g

u

ffl

if

h

b

c

has

f

h

g

h

then

there

exists

an

unique

arrow

e

c

such

that

h

u

This

is

displayed

in

the

commutativity

requirement

of

the

diagram

below

a

f

g

b

u

e

h

R

c

The

coequaliser

corresponds

to

an

equivalence

relation

In

set-theoretical

terms

the

coequaliser

identifies

those

elements

of

b

that

are

the

image

of

the

same

x

of

a

under

the

functions

f

and

g

An

other

important

type

of

limit

is

the

pullback

and

its

dual

the

pushout

As

this

work

contains

applications

of

the

pushout

we

will

only

define

it

and

leave

the

definition

the

pullback

to

the

interested

reader

Definition

Given

in

C

a

pair

of

arrows

f

a

b

and

g

a

c

with

the

same

domain

a

a

pushout

is

given

by

an

object

d

and

arrows

b

d

c

d

such

that

ffl

f

g

and

ffl

given

any

other

object

and

maps

k

b

l

c

there

exists

an

unique

map

h

d

such

that

the

following

diagram

commutes

a

f

b

g

AAAAAA

k

AAAAAAU

c

d

HHHHH

l

HHHHHj

h

R

Intuitively

what

a

pushout

does

is

that

it

patches

together

the

objects

c

and

d

at

the

points

specified

by

the

maps

g

and

f

Thus

when

talking

about

nets

the

pushout

will

consist

of

the

gluing

together

of

nets

to

compound

nets

The

above

limits

and

colimits

are

instances

of

a

general

limit

construction

and

colimit

construction

respectively

We

shall

not

delve

into

this

because

the

limit

and

colimits

that

are

interesting

from

our

point

of

view

have

been

presented

above

A.

Adjunctions

One

could

boldly

state

that

an

adjunction

is

the

most

fundamental

concept

in

category

theory

Concepts

that

can

be

viewed

as

special

cases

of

adjunctions

were

known

long

before

the

advent

of

category

theory

One

of

the

more

classical

examples

is

that

of

a

Galois

connection

between

two

preordered

sets

Definition

Let

A

f

B

and

B

g

A

be

monotonic

functions

between

two

preorders

A

hA

Ai

B

hB

Bi

The

pair

hf

gi

is

an

adjunction

-LRB-

Galois

connection

-RRB-

iff

f

and

g

are

monotonic

and

the

relations

f

-LRB-

a

-RRB-

B

b

a

A

g

-LRB-

b

-RRB-

are

equivalent

for

all

pairs

of

elements

-LRB-

a

b

-RRB-

A?B

By

regarding

a

preorder

A

as

a

category

A

with

jMorA

-LRB-

a

b

-RRB-

j

-LRB-

as

in

the

example

on

page

-RRB-

when

a

A

b

-LRB-

transitivity

and

reflexivity

define

composition

and

identities

-RRB-

and

taking

f

and

g

as

functors

F

A

B

and

G

B

A

the

above

definition

transfers

immediately

into

a

category

theoretical

setting

allowing

us

to

generalise

the

notion

of

a

Galois

connection

to

an

adjunction

as

follows

Definition

An

adjunction

between

categories

A

and

B

is

a

quadruple

-LRB-

F

G

-RRB-

where

F

A

B

and

G

B

A

are

functors

the

left

and

right

adjoint

respectively

and

FG

and

GF

are

natural

transformations

-LRB-

unit

and

co-unit

-RRB-

such

that

-LRB-

G

-RRB-

-LRB-

G

-RRB-

-LRB-

F

-RRB-

-LRB-

F

-RRB-

The

classical

example

of

an

adjunction

can

be

found

in

a

Cartesian

Closed

Category

-LRB-

CCC

-RRB-

Definition

A

category

C

is

cartesian

closed

iff

ffl

It

has

all

finite

products

ffl

Fix

an

arbitrary

c

jCj

Every

functor

F

C

C

b

b

c

has

a

right

adjoint

G

C

C

a

MorC

-LRB-

a

c

-RRB-

such

that

the

diagram

below

commutes

cb

b

b

c

c

f

idb

f

a

b

The

two

adjoints

define

the

adjunction

-LRB-

F

G

-RRB-

C

C

where

b

MorC

-LRB-

b

MorC

-LRB-

c

b

c

-RRB-

-RRB-

a

MorC

-LRB-

MorC

-LRB-

c

a

-RRB-

c

a

-RRB-

and

F

G

are

as

defined

before

Cartesian

closed

categories

also

suggest

an

equivalent

definition

of

an

adjunction

as

an

isomorphism

between

hom-functors

Proposition

An

adjunction

-LRB-

F

G

-RRB-

between

locally

small

categories

A

B

gives

rise

to

and

is

determined

by

a

natural

isomorphism

homA

-LRB-

F

-LRB-

a

-RRB-

b

-RRB-

homB

-LRB-

a

G

-LRB-

b

-RRB-

-RRB-

for

all

a

jAj

b

jBj

This

also

gives

us

a

second

-LRB-

maybe

more

natural

-RRB-

definition

of

a

cartesian

closed

category

Definition

A

category

C

is

cartesian

closed

iff

ffl

It

has

all

finite

products

ffl

For

all

objects

a

b

c

jCj

there

exists

an

object

cb

called

the

power

object

of

b

w.r.t.

c

such

that

homC

-LRB-

a

b

c

-RRB-

homC

-LRB-

a

cb

-RRB-

The

isomorphism

is

the

categorial

equivalent

to

the

operation

of

currying

where

a

function

f

a

b

c

is

viewed

as

a

higher

order

function

-LRB-

f

-RRB-

a

-LRB-

b

c

-RRB-

taking

one

argument

and

returning

a

function

taking

the

other

argument

The

most

important

property

of

an

adjunction

is

expressed

by

the

following

fact

Theorem

Let

F

A

B

and

G

B

A

be

functors

such

that

F

is

left

adjoint

to

G

Then

F

preserves

colimits

and

G

preserves

limits

algebraic specification
category theory
compositionality
linear logic
net theory
petri nets