Girard. Linear Logic and Parallelism, 1987

18
LINEAR LOGIC AND PARALLELISM Jean-Yves Girard Equipe de logique (UA 753 CNRS) D~partement de math~matiques T 45-55, 5 ° ~tage, Universit~ PARIS VII, 2 Place Jussieu 75251 PARIS CEDEX 05 Abstract : the paper discusses:the relevance of a new logic called linear logic (Girard 1986) to computer science, and in particular to parallel computations. These general remarks wil} be detailed in a paper in preparation with Gianfranco Mascari. I. Intuitionistic logic and its relevance to sequential computations I.i. specifications and types In the recent years, more and more attention has been paid to questions of modularity in programming languages : in the handling of very big units, one would like to be able to make local corrections (debugging, improvement of some part of the algorithm) without having to check again the complete structure. For this it is natural to conceive a program as a juxtaposition of modules, which are branched together; what is inside the module is irrelevant to the branching, and in doing the branching, we have only been using specifications, which tell us

Transcript of Girard. Linear Logic and Parallelism, 1987

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 1/17

LINEAR LOGIC AND PARALLELISM

Jean-Yves Girard

Equipe de logique (UA 753 CNRS)

D~partement de math~matiques

T 45-55, 5 ° ~tage, Univ ersi t~

PARIS VII, 2 Place Jussie u

75251 PARIS CEDEX 05

Abstract : the paper dis cusses:the relevance of a new logic called

linear logic (Girard 1986) to computer science, and in particul ar to

parallel computations. These general remarks wil} be detailed in a

paper in prepar ation with Gianfr anco Mascari.

I. Intuiti onistic logic and its relevan ce to sequential co mputations

I.i. specificat ions and types

In the recent years, more and more attention has been paid to questions

of modular ity in progr ammin g languages : in the handli ng of very big

units, one would like to be able to make local correct ions (debugging,

improv ement of some part of the algorithm) witho ut havi ng to check

again the complete structure. For this it is natural to conceive a

progra m as a juxtap ositio n of modules, which are branched together;

what is inside the module is irrelevant to the branching, and in doing

the branching, we have only been using specific ations, which tell us

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 2/17

167

g e n e r a l f a c t s a b o u t t h e m o d u l e , f o r i n s t a n c e : t h e m o d u l e t a k e s t w o

i n t e g e r s a s i n p ut s a n d g i v e s u s b a c k a n i n t e g e r a s ou t p u t . S u c h s p e c i f i -

c a t i o n s a r e u s u a l l y r e p r e s e n t e d b y t y p es , f o r i n s t a n c e i n t h e c a s e

j u s t c o n s i d e r e d i n t X in t = ~ i n t w h i c h i s t h e t y p e o f b i n a r y f u n c t i o n s

f r o m i n t e g e r s t o i n t e g e r s . N o w , i f t h e b r a n c h i n g i s d o n e a c c o r d i n g

t o t h e s p e c i f i c a t i o n s , t h e n th e c o r r e c t n e s s o f t h e f u l l p r o g r a m o n l y

d e p e n d s o n t h e c o r r e c t n e s s o f i t s m o d u l e s , a n d w e ar e d o ne .

1 . 2. t h e C u r r y - H o w a r d i s o m o r p h i s m

I n o r d e r t o p r o v e t h a t t he r e s p e c t o f s p e c i f i c a t i o n s i m p l i e s c o r r e c t n e s s ,

w e h a v e t o u s e s o m e l o g i c, a n d w e a r e f a c e d w i t h a n a l t e r n a t i v e :

i ) e x t e r n a l l o g i c : a l o g i c a l c o m m e n t e x t e r n a l t o t h e p r o g r a m

i i) i n t e g r a t e d l o g i c : t h e p r o g r a m , t h e b r a n c h i n g s e t c. a r e t h o u g h t

o f i n l o g i c a l t e r m s ; i n f a c t, o n l y t h i s a p p r o a c h h a s a t h e o r e t i c a l

i n t e re s t . W i t h t h i s m e t h o d , w h i c h d a t e s b a c k t o H e y t i n g ' s s e m a n t i c s

o f p r o o f s , a n d f o u n d i t s c o r r e c t e x p r e s s i o n t h r o u g h t h e C u r r y - H o w a r d

i s o m o r p h i s m b e t w e e n p r o o f s a n d f u n c t i o n a l e x p r e s s i o n s , a p r o g r a m e n j o y i n g

s p e c i f i c a t i o n S i s n o t h i n g b u t a p r o o f o f th e f o r m u l a S i n a n a p p r o p r i a t e

s y s t e m o f c o n s t r u c t i v e l o g ic , t y p i c a l l y i n t u i t i o n i s t £ ¢ l o g ic .

T h e t y p e d o b j e c t s t h a t a r e b u i l t t o m e e t t h e l o g ic a l r e q u i r e m e n t s c a n

i n d i f f e r e n t l y b e w r i t t e n a s f u n c t i o n a l e x p r e s s i o n s ( f or i n s t a n ce , u s i n g

t y p e d l a m b d a - a b s t r a c t i o n ) o r a s p r o o f s i n n a t u r a l d e d u c t i o n ( i n w h i c h

l a m b d a - a b s t r a c t i o n c o r r e s p o n d s e x a c t l y t o t h e = > - ~ n t r o d u c t i o n r u l e) .

A l t h o u g h t h e t w o w a y s a r e a b s o l u t e l y e q u i v a l e n t , t h e f u n c t i o n a l f o r m a l i s m

i s m o r e p o p u l a r b e c a u s e i t s t i c k s m o r e t o a f u n c t i o n a l ( a n d h e n c e

s e q u e n t i a l ) i n t u i t io n ; o n t h e o t h e r h a n d t h e u s e o f p r o o f s i s m o r e

i n t e r e s t i n g p r e c i s e l y b e c a u s e t h e y a r e n o t a b s o l u t e l y l i n k e d t o s u c h

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 3/17

168

a f u n c t i o n a l i n t u i ti o n , w h i c h b e c o m e s s u r e l y a l i m i t a t i o n i f w e w a n t

t o g e t o u t o f t he r e a l m o f s e q u e n t i a l p r o g r a m m i n g . T h i s i s w h y w e s h a l l

l a t e r o n l y d i s c u s s p r o o f s.

1 . 3. s e c o n d o r d e r ! a m b d a - c a l c u l u s

T h i s s y s t e m - c a l l e d [ b y t h e a u t h o r - w a s i n t r o d u c e d i n ( G i r a r d 1 9 7 0 )

a n d c o r r e s p o n d s e x a c t l y t o t h e n a t u r a l d e d u c t i o n o f s e c o n d - o r d e r

p r o p o s i t i o n a l c a l c u l u s : t h e s y s t e m c o n t a i n s t y p e v a r i a b l e s ~ , ~ , . .. ,

a b i n a r y c o n n e c t i v e = > ( i m p l i c at i o n ) a n d t h e u n i v e r s a l q u a n t i f i e r A ~ .

T h e r u l e s o f i n f e r e n c e a r e t he u s u a l s e c o n d o r d e r i n t r o d u c t i o n a n d

e l i m i n a t i o n r u l e s . T h e i n t e r e s t o f t h e s y s t e m r e l i e s o n t he f o l l o w i n g

f e a t u r e s :

i) m o s t c u r r e n t d a t a t y p e s a r e d e f i n a b l e i n t h e s y s t e m : o n e c a n d e f i n e

t y p e s f o r b o o l e a n s , i n t e g e r s , t r e e s , l i s t s e t c . , t y p i c a l l y

i n t = A ~ . ~ ~ ( ( ~ ~ ) ~ )d

i i) t h e r e i s a p r o o f o f t e r m i n a t i o n o f t he p r o g r a m s , t h r o u g h t h e

n o r m a l i z a t i o n t h e o r e m ( G i r a r d 1 9 70 ) ; f o r i n s t a nc e , a c l o s e d d e d u c t i o n

o f i n t c a n b e r e w r i t t e n i n t o a n i n t e g er , t h r o u g h t h i s p r o c e s s , t h i s

i n t e g e r b e i n g i n d e p e n d a n t o f t h e o r d e r o f t h e r u l e s u s e d.

i i i) t h e c l a s s o f f u n c t i o n s t h a t c a n b e e x p r e s s e d b y m e a n s o f p r o o f s

o f i n t = ~ i n t i s v e r y g e n e r a l : i n ( G i r a r d 1 9 7 0 ) i t w a s s h o w n t h a t t h i s

c l a s s i s e q u a l t o t h e s e t o f a l l p r o v a b l y t e r m i n a t i n g a l g o r i t h m s s e n d i n g

i n t e g e r s i n t o in t e g e r s , t h e p r o o f b e i n g c a r r i e d o u t i n s e c o n d - o r d e r

a r i t h m e t i c P A . I n p a r t i c u l a r , a n y a l g o r i t h m t h a t c a n b e p r o v e d t o

c o n v e r g e i n u s u a l m a t h e m a t i c s c a n b e r e p r e s e n t e d i n F .

T h e e x i s t e n c e o f s y s t e m s l i k e F s h o w s t h e a d e q u a t i o n o f t h e i n t e g r a t e d

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 4/17

169

l o g i c a l a p p r o a c h w . r . t , s e q u e n t i a l c o m p u t a t i o n . O u r g o a l w i l l b e t o

p r o p o s e a n e x t e n s i o n o f t h i s m e t h o d o l o g y t o p a r a l l e l i s m . F o r t h is

p u r p o s e , s o m e d r a s t i c m o d i f i c a t i o n s o f u s u a l l o g i c , l e a d i n g t o l i n e a r

l o g i c , w i l l b e n e c e s s a r y .

2 I n p u t s a n d o u t p u t s

2 . 1. i n t u i t i o n i s t i c c a s e

I n t u i t i o n i s t i c l o g i c is b a s e d o n a d e e p a s y m m e t r y b e t w e e n

- i n p u t s ( h y p o t h e s e s , f r e e v a r i a b l e s i n t h e f u n c t i o n a l n o t a t i o n )

- o u t p u t s ( c o n c l u s i o n s , t h e t e r m i t s e l f i n t h e f u n c t i o n a l n o t a t i o n )

T h e a s y m m e t r y c o m e s f r o m t he f a c t t ha t a d e d u c t i o n i s, r o u g h l y s p e a k i n g ,

a t r e e, w i t h ( s o m e o f) i t s s u m m i t s o c c u p i e d b y h y p o t h e s e s , b u t o n l y

o n e c o n c l u s i o n ( t h e r o o t o f t h e t r e e) . T h e s i t u a t i o n i s d e p i c t e d b y

]D

a d i a g r a m :

H 1 ..... H

C

e a c h h y p o t h e s i s H. d e n o t i n g i n f a c t a b l o c k o f s e v e r a l o c c u r e n c e s o f1

t h e s a m e f o r m u l a ( t yp e ).

T h e H . ' s a r e v i e w e d a s i n p u t s ( q u e s t i o n s ) w h i l e C is v i e w e d a s a n o u t p u t1

( a n s w er ) . S u p e r f i c i a l l y , t h e d i a g r a m c a n b e s e e n a s a c o m m u n i c a t i o n

ne__~t, e n a b l i n g u s t o t r a n s f o r m a n s w e r s t o t h e q u e s t i o n s H i i n t o a n o u t p u t

o f t y p e C . S o t h e c o m m u n i c a t i o n s e e m s t o w o r k f r o m t h e h y p o t h e s e s

t o t h e c o n c l u s i o n . B u t t h e s i t u a t i o n i s i n d e e d m o r e c o m p l e x , a s w e

s h a l l m a k e i t c l e a r b y d e s c r i b i n g t h e p r o c e s s i n m o r e d e t a i l s :

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 5/17

170

i t i s e n o u g h t o c o n s i d e r t h e c a s e k ~- i , a n d m o r e , w h e r e t h e o n l y h y p o t h e -

s i s H ( = H I) o c c u r s e x a c t l y o n c e ; t h e c o m m u n i c a t i o n i s e s t a b l i s h e d

b y s u b s t i t u t i n g a d e d u c t i o n ID' o f H f o r t h e h y p o t h e s i s H i n l D :

ID'

H

C

( f u n c t i o n a l l y s p e a k i ng , t h e s i t u a t i o n w o u l d b e d e n o t e d b y t h e s u b s t i t u t i o n

o f a t e r m t ' o f t y p e H f o r a v a r i a b l e x o f t y p e H i n a t e r m t o f t y p e C ,

n a m e l y t h e t e r m t ~ ' / x ] w h i c h i s a g a i n o f t y p e C ~.

N ow , t h e c o m p u t a t i o n w o rk s b y r e d u c i n g c e r t a i n c o n f i g u r a t i o n s w h i c h a re

c r e a t e d b y t h e p h y s i c a l c o n t a c t b e t w e e n D ' a n d ~]D, b y i d e n t i f y i n g a

c o n c l u s i o n H w i t h a h y p o t h e s i s H ; f o r i n s t a n c e i f H = H I A ~ 2 a n d ~ ' c a n b e

w r i t t e n a n d • i s H

- - A I I D ~

H C

t h e n w e r e p l a c e o u r d e d u c t i o n b y , a n d we a r e f a c e d w i t h a n o t h e r

.HI

] D *

C

p r o b l e m o f s u b s t i t u t i o n e t c . . W h a t w e h a v e j u s t d e s c r i b e d i s a s m a l l b i t

o f t h e n o r m a l i z a t i o n p r o c e d u r e , w h i c h i s, u p t o n ow , w i d e l y a d o p t e d

a s a m o d e l f o r s e q u e n t i a l c o m p u t a t i o n . L e t us c o m e b a c k t o o u r p o i n t :

t h e r e i s c l e a r l y a n i n f o r m a t i o n w h i c h t r a v e l s d o w n w s r ~ s : t h e l a s t

r u l e o f ~ ' i s u s e d a s a d e s t r o y e r f o r t h e f i r s t r u l e o f ~ , h e n c e u s i n g

~ ' o n e w i l l b e a b l e t o g o d o w n e r a n d d o w n e r i n ~ . B u t i n f a c t t h e

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 6/17

171

c o m m u n i c a t i o n i s s y m m e t r i c : w h e n t h e l a s t r u l e o f ~ d e s t r o y s t h e

f i r s t r u l e o f ~ ' , t h e f i r s t r u l e o f ~ d i s a p p e a r s t o o in , t h i s e n c o u n t er ,

a n d w e c a n s e e t h e c o m m u n i c a t i o n a s r u n n i n g u p w a r d s t oo . I n f ac t , w e

a r e in p r e s e n c e o f a p h e n o m e n o n o f r e c i p r o c a l a n i h i l a t i o n , w h i c h

p r o d u c e s a d o u b l e c o m m u n i c a t i o n , d o w n a w r d s a n d u p w a r d s .

T h i s g e n e r a l i d e a c a n n o t b e e x p r e s s e d c o r r e c t l y i n t h e i n t u i t i o n i s t i c

f r a m e w o rk , b e c a u s e i t i s b u i l t o n a n a s y m e t r y i n p u t s / o u t p u t ( o r

h y p o t h e s e s / c o n c l u s i o n ) ; f o r i n s t a n ce , H m a y o c c u r s e v e r a l t i m e s

a s a h y p o t h e s i s o f ~ , i n w h i c h c a s e t h e l a s t ru l e o f ~ ' d e s t r o y s

s e v e r a l f i r s t r u l e s o f D .

2 . 2. l i n e a r n e g a t i o n

I n l i n e a r l o g ic , w e r e s t o r e t h e s y m m e t r y , b y i n t r o d u c i n g t h e c o n n e c t i v e

( . ) i (n il ) o f l i n e a r n e g a t io n , w h i c h e x c h a n g e s t h e r o l e s i n p u t / o u t p u t .

L i n e a r l o g i c w i l l t h e r e f o r e a p p e a r a s a m u l t i p l e c o n c l u s i o n l og i c ,

w i t h o n l y c o n c l u s i o n s . F o r in s t a n c e, i n s t e a d o f w r i t i n g D a s

w e di d , w e s h a l l w r i t e a p r o o f - n e t w i t h a s c o n c l u s i o n s C a n d H ;

t h e p r o o f - n e t w i l l b e i n d i f f e r e n t l y r e a d a s a p r e o f o f C u n d e r

t h e h y p o t h e s i s H , o r a s a p r o o f o f ~ u n d e r t h e h y p o t h e s i s C . T h e

t y p i c a l e x a m p l e o f s u c h a s i t u a t i o n i s t h e n e t

w h i c h c a n i n d i f f e r e n t l y b e se e n a s t h e i d e n t i t y f u n c t i o n f r o m A t o A

o r t h e i d e n t i t y f u n c t i o n f r o m A t o A ~ . O n c e f o r al l , t h i s i m p o s e s

t h e d u m p i n g o f an y f u n c t i o n a l n o t a t i o n , w h i c h h a s t he d i s a d v a n t a g e

o f m a k i n g a s y m m e t r i c w h a t i s i n d e e d s y m m e t r i c . T h e c o m m u n i c a t i o n i s

e s t a b l i s h e d b y m e a n s o f t h e ( u n h a p p i l y n a m e d ) c u t - r u l e , w h i c h i s t h e

e x a c t c o u n t e r p a r t o f t h e i d e n t i t y a x i o m w r i t t e n a b o v e

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 7/17

I7 2

A A ICU T

t h e s y m b o l C U T b e i n g j u s t a w a y t o i n d i c a t e a p h e n o m e n o n o f a n i h i t a -

t i o n . T y p i c a l l y , t h e s u b s t i t u t i o n o f 1D f o r H i n 1 13 ' w o u l d n o w b e c o m e

H H C

C U T

w h e r e ]P a n d ]P ' " a r e t h e p r o o f - n e t s r e p r e s e n t i n g l D " a n d iD' i n l i n e a r

l o g i c . T h e s y n t a x i s o r g a n i z e d i n s u c h a w a y t h a t H l i s H , i . e . t h e

n e g a t i o n i s o n l y u s e d o n a t o ms , a n d t h e n d e f i n e d b y D e M o r g a n l a ws ,

w h i c h w i l l f o r c e u s t o i n t r o d u c e o u r c o n n e c t i v e s a n d q u a n t i f i e r s b y

p a i r s. T h e c o n n e c t i v e o f l i n e a r n e g a t i o n ( w h i c h is a d e f i n e d o n e ) i s

t h e f i r s t a n d m o s t i m p o r t a n t l e v e l o f l i n e a r l o g i c : t h e l e v e l o f

c o m m u n i c a t i o n , w h i c h c o n s i s t s e s s e n t i a l l y i n o p p o s i n g i n p u t s a n d

o u t p u t s i n t w o d u a l w a y s , n a m e l y t h e i d e n t i t y a x i o m s a n d t h e c u t r ul e .

3 . C o o p e r a t i o n

3 . 1 . m u l t i p l i c a t i v e s

W e o n l y d i s c u s s h e r e t h e i d e a o f a b i n a r y c o o p e r a t i o n ; t h e g e n e r a l

c o n c e p t o f a m u l t i p l i c a t i v e c o n n e c t i v e o f a r i ty n , y i e l d i n g m o r e

c o m p l e x k i n d s o f c o o p e r a t i o n , w i l l b e a n a l y s e d i n a f o r t h c o m i n g p a p e r .

B y c o o p e r a t i o n , I m e a n a s i t u a t i o n w i t h t w o o u t p u t s , o n e o f t y p e A

a n d o n e o f t y p e B . T h e f a c t t h a t w e h a v e t h e s e t w o o u t p u t s w i l l b e

i n d i c a t e d b y r e p l a c i n g t h e m b y a t h i r d o m e A m B, w h e r e m i s a

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 8/17

173

m u l t i p l i c a t i v e c o n n e c t i v e , w h i c h i n d i c a t e s i n w h i c h w a y A a n d B c o o -

p e r a t e. T h e r e a r e o n l y t w o p o s s i b l e w a y s o f c o o p e r a t i n g , w h i c h c o r r e s -

p o n d t o th e D e M o r g a n d u a l c o n n e c t i v e s m a n d 9 .

i ) i n d e p e n d a n c e : A a n d B a r e o b t a i n e d w i t h o u t c o m m u n i c a t i o n . T h e

s i t u a t i o n i s d e n o t e d b y t h e c o n n e c t i v e m ( ti m e s) , t h e t e n s o = p r o du c t .

i i) d e p e n d a n c e , i . e. A a n d B a r e f o r c e d t o c o m m u n i c a t e . T h e s i t u a t i o n

c o r r e s p o n d s t o t h e d u a l c o n n e c t i v e 9 ( pa r) , t h e p a r a l l e l c o n n e c t i v e .

A t y p i c a l e x a m p l e o f d e p e n d a n c M i s th e d e p e n d a n c e o f a c o n c l u s i o n

f r o m a h y p o t h e s i s , w h i c h i s w r i t t e n , i n t h e s y m m e t r i c a l f r a m e w o r k o f

l i n e a r l og i c, a s a m u t u a l d e p e n d a n c e b e t w e e n t h e o u t p u t s ~ a n d C .

3 . 2 . t r i p s

T h e t w o m u l t i p l i c a t i v e s a r e h a n d l e d b y m e a n s o f t w o b i n a r y r u l e s

A B A B

A ® B A ~ B

w h i c h l o o k t h e s a m e, a l t h o u g h t h e y ar e d e e p l y d i f f e r e n t . T h e s e t w o

r u l e s, t o g e t h e r w i t h t h e a x i o m s o f i d e n t i t y a n d t h e c u t r u l e , f o r m

t h e m u l t i p l i c a t i v e f r a g m e n t o f l i n e a r l o g i c , b y f a r t h e b e s t u n d e r s t o o d .

U s i n g t h e s e f o u r p r i n c i p l e s , w e c a n b u i l d p r o o f - s t r u c t u r e s , w h i c h

a r e j u s t p r o o f s w i t h s e v e r a l c o n c l u s i o n s a n d n o h y p o t h e s i s . F o r

i n s t a n c e

b u t a l s o

, , I A 1B

A l i B

, L ' IA B

A . B A L .

T h e f i r s t p r o o f - s t r u c t u r e i s s o u n d ( i . e. t h e n o r m a l i z a t i o n p r o c e d u r e

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 9/17

174

w o r k s w e l l , w h e n w e r e l a t e t h i s p r o o f - n e t t o o t h e r o n e s b y c u t s) ; t h e

s e c o n d o n e d o e s n o t w o r k w e l l i n r e l a t i o n t o th e c u t -r u l e , a n d w i l l

t h e r e f o r e n o t b e a c c e p t e d a s a p r o o f - n e t .

I n o r d e r t o d e t e r m i n e w h i c h , a m o n g p r o o f - s t r u c t u r e s , w i l l b e a c k n o w -

l e d g e d a s p r o o f - n e t s , w e i n t r o d u c e t h e c o n e e p t o f a t r i p : s t a r t i n g

w i t h a n a r b i t r a r y f o r m u l a o f t he s t r uc t u r e , a n d a n i n i t i a l d i r e c t i o n

( u p w a r d s o r d o w n w a r d s ) w e s t a r t to t r a v e l t h r o u g h t h e s t r u c t u r e , b y

f o l l o w i n g t r a v e l i n s t r u c t i o n s ; i n t h e c a s e o f t h e t w o b i n a r y r Q ~ e s

f o r p a r a n d t i m e s, w e h a v e t o p r e s e t s o m e s w i t c h e s b e c a u s e t h e s e

l i n k s m a y b e c r o s s e d i n v a r i o u s w a y s ; i n f a c t t h e w a y s o f p a s s i n g

t h r o u g h t h e s e r u l e s a r e j u s t t h e e x p r e s s i o n o f t he a b s e n c e o r p r e s e n c e

o f c o m m u n i c a t i o n . T h e t r a v e l i n s t r u c t i o n s a r e b i d e t e r m i n i s t i c , i .e .

f r o m a f o r m u l a a n d a d i r e c t i o n w e c a n p r e d i c t t h e n e x t f o rm u l a , t h e

n e x t d i r e c t i o n , b u t w e c a n o n l y r e c o n s t r u c t t h e p r e v i o u s p o s i t i o n .

A s a c o r o l l a r y t o b i d e t e r m i n i s m , w e s h a l l b e a b l e t o c o n s t r u c t

a c e r t a i n n u m b e r o f l oo p s . W h e n t h e r e a r e s e v e r a l l o o p s ( c o r r e s p o n d i n g

t o a p a r t i c u l a r s w i t c h i n g ) , w e s p e a k o f s h o r t r i p ; i n c a s e o f a s i n g l e

l o o p , w e s p e a k o f l o n g t r i p .

D e f i n i t i o n

A p r o o f - s t r u c t u r e g i s s a i d t o b e a p r o o f - n e t w h e n , f o r a n y p o s i t i o n i n g

o f i t s s w i t c h e s , t h e r e i s n o s h o r t r i p ; i n o t h e r t e r m s , a l l t r i p s

a r e l o n g t r i p s , w h i c h m e a n s t h a t s t a r t i n g f r o m a n y w h e r e , e v e r y f o r m u l a

i s v i s i t e d t w i c e , o n c e u p w a r ds , o n c e d o w n w a r d s .

T h e r e i s a n o b v i o u s n o r m a l i z a t i o n p r o c e d u r e f o r p r o o f - ne t s ,

w h i c h i s a w a y o f m a k i n g e x p l i c i t t h e c o m m u n i c a t i o n e s t a b l i s h e d b y

t h e c u t - r u l e :

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 10/17

175

f o r i n s t a n c e t h e c o n f i g u r a t i o n

A B A B

A ~ B A

C U T

i s r e p l a c e d b y t h e s i m p l e r :

A A I B B i

CUT CUT

S i m p l e c o n s i d e r a t i o n s o n t r i p s s h o w t h a t w h e n w e n o r m a l i z e a p r o o f - n e t

t h e r e s u l t i s s t ~ l l a p r o o f - n e t ; i n p a r t i c u l a z , t h e p r o o f - s t r u c t u r e

CUT

which means an ou tpu t used as i t s own inpu t , and tha t cann o t be norma l ize d ,

i s e x c l u d e d . A l l t h e c o m p l i c a t i o ns r e l a t e d t o g e n e r a l t r i p s a r e i n d e e d

t o a v o i d t h a t t h i s p a t t e r n o f ' r t he s n a k e e a ~ n g i t s own t a i l " m i g h t

o c c u r t h r o u g h n o r m a l i z a t i o n .

N o r m a l i z a t i o n i n t h e m u l t i p l i c a t i v e f r a g m e n t i s v e r y q u i c k (w he n we

n o r m a l i z e , t h e n u mb e r o f f o r m u l a s d e c r e a s e s s t r i c t l y ) a n d a s y n c h n o n o u s ,

i .e . w e c a n w o r k w i t h s e v e r a l c u t s a t t h e s a m e t i m e . I n t h e p a p e r o n

m u l t i p l i c a t i v e s , w e s h a l l g i v e a s t r i k i n g g e o m e t r i c a l d e s c r i p t i o n o f

t h e c u t - e l i m i n a t i o n p r o ce s s .

3 .3 . s e q u e n t i a l i z a t i o n

T h e g e n e r a l c o n d i t i o n f o r b e i n g a p r o o f - n e t i s o f e x p o n e n t i a l n a t u r e :

i f t h e r e e a r e n m u l t i p l i c a t i v e l i n k s i n 8 , t h e r e a r e 2 p o s s i b l e

s w i t c h i n g s , a n d t h e i d e a i s t h e r e f o r e n o t t o a s k a c o m p u t e r t o d e c i d e

w h e t h e r o r n o t a g i v e n p r o o f - s t r u c t u r e i s s o u n d . T h e i d e a w i l l b e

t h a t t he c o m p u t e r w i l l c o m p i l e p r o o f - n e t s , a n d t h a t w e s h a l l f e e d

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 11/17

176

i t w i t h a p r o o f w r i t t e n i n a m o r e t r a d i t i o n a l w a y.

T h i s m o r e t r a d i t i o n a l w a y i s l i n e a r s e q u e n t c a l c u l u s , w h i c h h a s t h e

s a m e e x p r e s s i v e p o w e r a s p r o o f - n e t s , b u t w h i c h i s w r i t t e n i n t h e

f a m i l i a r t r e e - l i k e s u c c e s s i o n o f a x i o m s a n d r u l e s . T o e a c h p r o o f p

o f l i n e a r s e q u e n t c a l c u l u s c o r r e s p o n d s m e c h a n i c a l l y a u n i q u e p r o o f -

n e t p -. C o n v e r s e l y , e v e r y p r o o f - n e t g c a n b e s e q u e n t i a l i z e d : t h e r e

e x i s t s a t l e a s t o n e p r o o f p i n l i n e a r s e q u e n t c a l c u l u s s u c h t h a t

B = p -, i n g e n e r a l m a n y o n es . T h e r u l e s o f s e q u e n t c a l c u l u s t h e r e f o r e

a p p e a r a s p a r t i c u l a r d e r i v e d r u l e s s e n d i n g p r o o f - n e t s i n t o p r o o f - n e t s,

a n d w e c a n e v e n i m a g i n e o t h e r d e r i v e d r u l e s e n a b l i n g u s to d e s c r i b e

p r o o f - n e t s i n a s i m p le , u s e f u l ~ b u t n o n i n t r i n s i c w a y : a l l t h e s e

m a n n e r s s h o u l d b e p u t i n to a h i g h l e v e l l a n g u a g e , t h e m a c h i n e l a n g u a g e

b e i n g m a d e o f ( s o m e t h i n g v e r y c l o s e t o ) p r o o f - n e t s .

4 . S h a r i n g

4 . 1. a d d i t £ v e s

H e r e a g a i n ~ I o n l y d i s c u s s b i n a r y s h a r i n g . B y s h a r i n g , I m e a n a s i t u a t i o n

w h e r e , a m o n g t w o p o s s i b l e o u t p u t s , o n e o f t y p e A , o n e o f t y p e B , e x a c t l y

o n e w i l l b e e f f e c t i v e . T h i s f a c t w i l l b e i n d i c a t e d b y i n t r o d u c i n g a

t h i r d o u t p u t A a B , w h e r e a i s a n a d d i t i v e c o n n e c t i v e , w h i c h i n d i c a t e s

i n w h i c h s e n s e t h e o n l y o u t p u t w i l l b e e f f e c t i v e . T h e r e a r e o n l y t w o

w a y s o f s h a r i n g , e x p r e s s e d b y t he D e M o r g a n d u a l c o n n e c t i v e s • a n d & :

i) o p e n s h a r i n g : t h i s i s t h e s i t u a t i o n w h e r e w e c a n p r o d u c e b o t h

o u t p u t s , b u t w e d o n ' t k n o w w h i c h o n e . A t y p i c a l e x a m p l e i s d e f i n i t i o n

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 12/17

177

b y c a s e s , w h e r e t w o a l t e r n a t i v e p o s s i b i l i t i e s a r e c o n s i d e r e d , b u t w e

d o n ' t k n o w w h i c h o n e ( we n e e d t o k n o w i n w h i c h c a s e w e a r e ) . T h e c o n -

n e c t i v e f o r o p e n s h a r i n g i s & ( w i th ) , t h e d i r e c t p r o d u c t .

i i) c l o s e d s h a r i n g : t h i s i s t h e du a l s i t u a t i o n , w h e r e e x a c t l y o n e

o f A a n d B i s a c t u a l l y p r o d u c e d . T h e c o r r e s p o n d i n g c o n n e c t i v e i s

e ( p lu s ) , t h e d i r e c t s u m .

4 . 2 . b o x e s

T h e s u m i s h a n d l e d b y m e a n s o f t h e u n a r y r u l e s A e t B

l e - - 2 ~

A e B A e B

b u t t h e c o n n e c t i v e " w i t h " n e e d s ( a t l e a s t i n t h e p r e s e n t s t a t e o f t h e

f o r m a l i s m ) t h e u s e o f p r o o f - b o x e s : a : p r o o f - b o x ~ i s d d e p i c t e d b y a

s q u a r e w i t h s e v er a l c o n c l u s i o n s

j- - A . . . . . . . . A n

a n d t h e b o x w i l l b e l i n k e d t o o t h e r b o x e s a n d f o r m u l a s b y m e a n s o f

t h e r u l e s o f th e s y s te m . T h e l i n k a g e m u s t b e c o r r e c t i n d e p e n d a n t l y

o f w h a t i s a c t u a l l y i n s i d e t h e b o x , i .e . I c a n r e p l a c e • b y a n y o t h e r

b o x w i t h t h e s a m e c o n c l u s i o n s . W e h a v e i n m i n d ~ t h a t e v e n t u a l l y ~ w i l l

b e r e p l a c e d b y an a r b i t r a r y p r o o f - n e t w h o s e c o n c l u s i o n s a r e e x a c t l y

A I , . . ., A n , a n d it is t h e r e f o r e p o s s i b l e t o i n tr o d u c e b o x - s w i t c h e s

w h i c h d e p i c t t h e a r b i t r a r y b e h a v i o u r o f a p r o o f - n e t w h o s e c o n c l u s i o n s

a r e A I , . .. . A n, a n d s o b o x e s c a n b e i n s e r t e d i n t h e m u l t i p l i c a t i v e

f r a m e w o r k .

T h e r u l e f o r & is th e f o l l o w i n g :

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 13/17

178

g i v e n t w o p r o o f - n e t s B a n d B' w h o s e r e s p e c t i v e c o n c l u s i o n s a r e C , A

a n d C , B ( C i s a s e q u e n c e o f f or m u l a s) , f o r m a b o x ~ w h o s e o o n c l u s i o n s

a r e C a n d A & B ; t h e f o r m u & a A & B i s t h e m a i n d o o r o f t h e b o x, w h e r e a s

t h e f o r m u % a s C a r e i ts a u x i l i a r y d o o r s. I t i s n o t p r o b l e m a t i c t o n o r -

m a l i z e c u t s w h e n o n e o f t h e p r e m i s e s i s t h e m a i n d o o r o f a & - b o x ;

t h e ca se. w h e r e o n e o f t h e p r e m i s e s i s a n a u x i l i a r y d o o r c a n b e h a n d l e d

t oo , b u t i n t h a t c a s e p a r t o f w h a t w e a r e d o i n g m a y b e e v e n t u a l l y

c a n c e l l e d , h e n c e i t is m o r e r e a s o n a b l e t o w a i t i n t h i s c a s e u n t i l

a c u t a r r i v i n g t h r o u g h t h e m a i n d o o r a r i s e s. S u c h a c u t i s n o r m a l i z e d

a s f o l l o w s :

b e c o m e s

cB I

C v A

4',.

C U T

v ~A IA ~ • B 1 l e

C U T

( s y m m e t r i c s o l u t i o n f o r 2 Q)

T h i s k i n d o f s i t u a t i o n i s t y p i c a l o f I F T H E N E L S E i n s t r u c t i o n s . A w h o l e

p a r t o f t h e s t ru c t u r e , n a m e l y B ' i n t h e e x a m p l e g i v e n , i s d e s t r o y e d .

T h e c o m m u t a t i v e r e d u c ti o n s , W h i c h r e d u c e c u t s a r i s i n g t h r o u g h o n e o f

t h e a u x i l i a r y d o o r s ~ , p r o d u c e a d u p l i c a t i o n o f t h e w o r k, a n d t h i s

i s w h y i t r e a s o n a b l e t o w a i t f o r t h e o p e n i n g o f ~ t h e m a i n d o or . I n

d o i n g so , w e p r o d u c e a p h e n o m e n o n o f s y n c h r o n i z a t i o n , i n s h a r p c o n t r a s t

t o t h e a s y n c h r o n o u s m u l t i p l i c a t i v e l e v el .

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 14/17

179

5. S t o r a g e

5 .1 . e x p o n e n t i a l s

T h e s t o r a g e o p e r a t i o n s a r e a l l t h o s e c o n n e c t e d w i t h t h e u s e o f m e m o r y .

T h e u s e o f a m e m o r y i n s t r u c t i o n i n r e l a t i o n w i t h a n i n p u t o f t y p e A

w i l l b e i n d i c a t e d b y r e p l a c i n g A b y eA , w h e r e e i s a n e x p o n e n t i a l

c o n n e c t i v e , w h i c h i n d i c a t e s w h i c h k i n d o f m e m o r y o p e r a t i o n h g s b e e n

p e rf o r me d ., T h e b a s i c c h o i c e i s b e t w e e n t h e D e M o r g a n d u a l c o n n e c t i v e s

! a n d ? :

i ) s t o r a g e : t h e o u t p u t A is f r o z e n i n a m e m o r y . T h e s i t u a t i o n i s i n -

d i c a t e d b y th e c o n n e c t i v e ! ( o f c o u r s e ) , o f r e a f f i r m a t i o n .

i i) m a i n t e n a n c e o f m e m o r y : t h r e e b a s i c p o s s i b i l i t i e s a r e d i s c u s s e d

h e re , n a m e l y d u p l i c a t i o n , e r a s i n g , a n d r e a d i n g ( w i th a s i m u l t a n e o u s

e r a si n g ) ; o t h e r i n t e r e s t i n g p o s s i b i l i t i e s a r e n ot c o n s i d e r e d h e r e

a s p r i m i t i v e . A l l t h e s e f e a t u r e s b e l o n g t o t h e c o n n e c t i v e ? ( w h y n o t )

o f c o n s i d e r a t i o n .

5 .2 . t he e x p o n e n t i a l r u & ~ s

! i s h a n d l e d b y m e a n s o f a b o x, n a m e l y , f r o m a p r o o f - n e t e n d i n g w i t h

A a n d a u x i l i a r y c o n c l u s i o n s ?__q, f o r m a p r o o f - n e t e n d i n g w i t h ! A a n d

? C .

? i s h a n d l e d b y m e a n s o f t h r e e ru le s, , n a m e l y

i) c o n t r a c t i o n ? A 2 A w h i c h h a s t h e s a m e f e a t u r e s a s a " p a r "

- - c ?

? A

l i nk , a n d w h i c h t a k e s c a r e o f d u p l i c a t i o n .

i i) w e a k e n i n g , w h i c h s o n s i s t s i n f o r m i n g f r o m p r o o f - n e t , a b o x w i t h

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 15/17

180

a n a d d i t i o n a l c o n c l u s i o n ? A, a n d w h i c h t a k e s c a r e o f e r a s i n g.

i ii ) d e r e l i c t i o n A , w h i c h c o r r e s p o n d s t o r e a d i n g / e ~ a s i n g .

d?

? A

T h e e x p o n e n t i a l l e v e l is p a r t i c u l a r i l y i n p o r t an t , b e c a u s e i t i s

r e s p o n s i b l e f o r t h e e x p r e s s i v e p o w e r o f t h e l a n g u ag e . W i t h o u t

s t o r a g e o p e r a t i o n s , i t w o u l d b e i m p o s s i b l e t o m a k e u s e o f a m e m o r y

i n a c o m p u t a t i o n . T h e f o r m a t i o n o f t h e [ - bo x i s a n e s s e n t i a l m o m e n t

o f s y n c h r o n i z a t i o n .

6 . a b s t r a c t i o n

6 . 1 . q u a n t i f i e r s

W h e n w e w a n t t o a b s t r a c t a g i v e n o u t p u t f r o m c e r t a i n t y p e c o n t i n g e n c i e s ,

t h e n w e a r e l e a d t o r e p l a c e A b y Q . A, w h e r e ~ i s a v a r i a b l e o f t y p e ,

a n d t h e q u a n t i f i e r Q d e n o t e s w h i c h k i n d . o f a b s t r a c t i o n h a s b e e n p e r -

f o r m e d ; t h e r e a r e t w o D e M o r g a n d u a l q u a n t i f i e r s , A a a n d V ~ -

i) u n i v e r s a l a b s t r a c t i o n : t h i s i s w h e n t h e c h o i c e o f a p a r a m e t e r ~ i n

A d o e s n o t m a t t e r . T h e s i t u a t i o n i s i n d i c a t e d b y A ~ . A ( a ny ) , t h e

u n i v e r s a l ( s e c o n d o r d e r ) q u a n t i f i e r .

i i) e x i s t e n t i a l a b s t r a c t i o n : t h i s i s w h e n w e h a v e o b t a i n e d A by

m e a n s o f a s p e m i f i c c h o i c e o f t h e p a r a m e t e r . T h e s i t u a t i o n i s

i n d i c a t e d b y V ~ . A ( s om e ), t h e e x i s t e n t i a l ( s e c o n d o r d e r ) q u a n t i f i e r .

6 . 2. t h e q u a n t i f i e r r u l e s

A i i s h a n d l e d b y m e a n s o f a b o x : f r o m a p r o o f - n e t e n d i n g w i t h A

a n d a u x i l i a r y c o n c l u s i o n s C n o t c o n t a i n i n g ~ fr e e, t h e n w e c a n

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 16/17

181

f o r m a b o x e n d i n g w i t h A ~ . A a n d C.

~ i s h a n d l e d b y m e a n s o f t h e u n a r y r u l e A B , ]

~ . A

~ V

7. e x e c u t i o n o f a p r o g r a m

7 . 1. n o r m a l i z a t i o n

T h e m e t h o d s o f 6 G ~ r a r d 1 9 70 ) c a n b e e x t e n d e d h e r e t o p r o v i d e a s t r o n g

n o r m a l i z a t i o n t h e o r e m ( c u t - e l i m i n a t i o n ) f o r t h e f u l l s y s t e m P N 2 j u s t

d e s c r i b ed . T o th e i d e a o f " c a n d i d a t d e r ~ d u c t i b i l i t ~ " a r e a d d e d

o r t h o g o n a l i t y c o n s i d e r a t i o n s , w h i c h s o m e h o w s i m p l i f y t h e o r i g i n a l

p r o of . T h e r e i s t h e r e f o r e a w a y o f e x e c u t i n g a p r o g r a m b y a p p l y i n g

t h e n o r m a l i z a t i o n p r o c e d u r e , e a c h s y m b o l C U T b e i n g a n i n d i c a t i o n

f o r a n i n d e p e n d a n t p r o c e s s o r ; t h e b o x e s a r e r e s p o n s i b l e f o r a

p h e n o m e n o n o f w a i t i n g , i .e . i n t r o d u c e s o m e s y n c h r o n i z a t i o n .

7 .2 . o p e r a t i o n a l s e m m n t i c s

O n e sh o u l d c o n s i d e r t h a t c u t - e l i m i n a t i o n i s t h e w r i t t e n t r a c e o f a

d e e p e r p r o c e d u r e w h i c h i s p e r f o r m e d a t a s e m a n t i c l e v e l. I n o t h e r

t e r m s t h e r e s h o u l d b e s o m e w h e r e a n o p e r a t i o n a l s e m a n t i c s o f l i n e a r

l o gi c . T h i s o p e r a t i o n a l s e m a n t i c s i s o n l y k n o w n i n p a r t i c u l a r c a s e s

e . g. f o r t h e m u l t i p l i c a t i v e s . T h e g e n e r a l i z a t i o n o f t h e o p e r a t i o n a l

s e m a n t i c s t o P N 2 i s a a n e s s e n t i a l i s s u e :

i) i t w i l l c e r t a i n l y s h o r t e n t h e e x e c o t i o n o f p r o g r a m s , b e c a u s e

a lo t o f s y n t a x w i l l b e d u m p e d a t t h e g r o u n d l e v e l .

i i) i t w i l l e n a b l e u s t o u s e o p e r a t i o n s , p r o g r a m s , e t c . w h i c h a r e

8/3/2019 Girard. Linear Logic and Parallelism, 1987

http://slidepdf.com/reader/full/girard-linear-logic-and-parallelism-1987 17/17

18 2

n o t d e f i n a b l e i n P N 2 ( or b y a n y o t h e r c u r r e n t l o g i c a l s y s t e m ) . O n e

o f th e m a i n p r o b l e m s i s t o c o m b i n e t h e a d v a n t a g e s o f s e m a n t i c s ( n o

s y n t a c t i c a l b y z a n t i n i s m ) w i t h t h o s e o f t h e s y n t a x ( f i n i ti s m ) ; t h e

l a s t p o i n t ( f i n i ti s m ) i s h a r d t o g e t, d u e t o t he e x p o n e n t i a l l e v el ,

b u t t h e r e a r e p o s i t i v e ~ i n d i c a t i o n s i n t h i s d i r e c t i o n .

i i i) a t a l a t e r s ta g e, o n e c a n d r e a m o f a n e w k i n d o f m a c h i n e, b a s e d

o n t h e o p e r a t i o n a l s e m a n t i c s ; o f c o u r s e, t h i s s e m a n t i c s h a s t o b e k e p t

p a r t i c u l a r i l y s i m p l e , i f w e w a n t n o t t o b e r i d i c u l o u s .

B I B L I O G R A P H Y

( G i r a r d 1 97 0 ) U n e e x t e n s i o n d e l ' i n t e r p r ~ t a t i o n d e G ~ d e l & l ' a n a l y s e

e t ~ l a t h @ o r i e d e s t y p e s e t c . , P r o c . 2 n d S c an d . L o g. S y m p . , e d F e n s t a d ,

N o r t h H o l l a n d P u b . C ° , A m s t e r d a m 1 9 7 1.

( G i r a r d 1 9 8 6 ) L i n e a r L o g ic , t o a p p e a r i n T . C . S .

F o r a d i s c u s s i o n o f t h e s e q u e n t i a l c a se , i n r e l a t i o n t o

m e m o r y a l l o c a t i o n a n d l a z i n es s , b y m e a n s o f i n t u i t i o n i s t i c l i n e a r

l o g i c , o n e c a n c o n s u l t

( G i r a r d & L a f o n t 1 9 8 6 ) L i n e a r l o g i c & l az y e v a l u a t i o n , t o a p p e a r i n

t h e P r o c e e d i n g s o f T A P S O F T ' 8 7 , P i s a.