P. 1
Girard. Linear Logic and Parallelism, 1987

# Girard. Linear Logic and Parallelism, 1987

|Views: 10|Likes:

See more
See less

06/26/2014

pdf

text

original

# 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 and in particular to

linear logic (Girard 1986) to computer science, 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 (debugging,

units, one would like to be able to make local corrections

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, the branching, we have only been using specifications, and in doing

which tell us

in fact. of proofs. the Curry-Howard isomorphism implies correctness. cations are usually represented by types. to the specifications. and found its correct expression isomorphism between proofs and functional specification expressions. to the program ii) integrated logic the branchings etc. can using system of constructive The typed objects that are built to meet the logical requirements be written as functional expressions (for instance. With this method. for instance : the module takes two Such specifi- integers as inputs and gives us back an integer as output. only this approach has a theoretical which dates back to Heyting's semantics through the Curry-Howard a program enjoying interest. if the branching is done according then the correctness of the full program only of its modules. formalism corresponds exactly to the =>-~ntroduction equivalent. are thought of in logical terms . (and hence on the other hand the use of proofs is more they are not absolutely linked to such interesting precisely because . Although the two ways are absolutely the functional is more popular because it sticks more to a functional sequential) intuition. S is nothing but a proof of the formula S in an appropriate logic. and we are faced with an alternative i) external logic : a logical comment external : the program.2. : In order to prove that the respect of specifications we have to use some logic. typically intuitionist£¢ logic. Now. just considered int X int =~int for instance in the case which is the type of binary functions from integers to integers. depends on the correctness 1. indifferently typed lambda-abstraction) lambda-abstraction or as proofs in natural deduction (in which rule). and we are done.167 general facts about the module.

PA 2. for instance. through this process. if we want to get out of the realm of sequential later only discuss proofs. typically ~ ((~ ~ ) ii) there is a proof of termination normalization theorem (Girard 1970). integer being independant of the order of the rules used.168 a functional intuition. calculus a binary connective => (implication) quantifier A ~ . iii) the class of functions that can be expressed by means of proofs of int =~int is very general : in (Girard 1970) it was shown that this terminating algorithms sending class is equal to the set of all provably integers into integers. lists etc.~ ... second order !ambda-calculus This is why we shall This system -called [ by the author.. ~) trees.was introduced and corresponds propositional in (Girard 1970) exactly to the natural deduction of second-order : the system contains type variables ~ . The interest of the system relies on the following features : in the system : one can define i) most current data types are definable types for booleans. and The rules of inference are the usual second order introduction elimination rules. ~ and the universal . arithmetic converge the proof being carried out in second-order any algorithm that can be proved to can be represented in F. int = d A~. of the programs. in usual mathematics The existence of systems like F shows the adequation of the integrated .3. In particular. which becomes surely a limitation programming. 1.. ~ integers. through the a closed deduction this of int can be rewritten into an integer.

(conclusions. denoting in fact a block of several occurences 1 of the same formula (type). will be necessary. but only (some of) its summits occupied by hypotheses.r. the term itself in the functional The asymmetry comes from the fact that a deduction a tree. 2 Inputs and outputs 2. some drastic modifications to parallelism. Superficially. intuitionistic case Intuitionistic . (questions) while C is viewed as an output The H.. with is. So the communication seems to work from the hypotheses is indeed more complex. enabling us to transform answers to the questions H i into an output of type C. roughly speaking.. Our goal will be to For this to linear propose an extension of this methodology purpose. (the root of the tree).outputs logic is based on a deep asymmetry between free variables in the functional notation) notation) (hypotheses.t. sequential computation.inputs . the diagram can be seen as a communication ne__~t.'s are viewed as inputs 1 (answer).169 logical approach w. one conclusion a diagram : The situation is depicted by H1 ]D . But the situation shall make it clear by describing the process .. Hk C each hypothesis H..1.leading logic. in more details as we : to the conclusion. of usual logic.

up to now. and we are faced with another . for instance if H = H I A ~ 2 and ~ ' is H - - AI ID~ H then we replace our deduction by C . namely the term t ~ ' / x ] which is again of type C~. What we have just described is a small bit of the n o r m a l i z a t i o n procedure. the computation works by reducing certain c o n f i g u r a t i o n s which are created by the physical contact between D ' conclusion H with a hypothesis H written and • and ~]D. which is. and more. the c o m m u n i c a t i o n is established : by substituting a deduction ID' of H for the hypothesis H inlD ID' H C (functionally speaking. Let us come back to our point : the last : there is clearly an information w h i c h travels d o w n w s r ~ s rule of ~ ' ~' is used as a destroyer for the first rule of ~ . widely adopted as a model for sequential computation.170 it is enough to consider the case k ~.i.HI ]D* C problem of substitution etc. Now. But in fact the one will be able to go downer and downer in . the situation would be denoted by the substitution of a term t' of type H for a variable x of type H in a term t of type C.. where the only hypothesis H (= H I) occurs exactly once . hence using ~. by identifying a can be .

as . conclusio n logic. The typical example of such a situation is the net which can indifferently be seen as the identity function from A to A or the identity function from Al to A ~. for instance. we restore the symmetry. Once for all. Linear logic will therefore with only conclusions. the first rule o f ~ too in. which has the disadvantage The communication is of making asymmetric what is indeed symmetric. This general framework. we anihilation.)i (nil) of linear negation. instead of writing D we did. and we can see the communication as running upwards too. this imposes the dumping of any functional notation. this encounter. H may occur several times destroys in which case the last rule o f ~ ' first rules of D. appear as a multiple For instance.2. downawrds and upwards. which are in presence of a phenomenon of reciprocal produces a double communication. inputs/output hypotheses/conclusion) as a hypothesis several of ~. In fact.171 communication is symmetric : when the last rule of ~ disappears destroys the first rule of ~'. or as a proof of ~ C and Hi read as a preof of C under under the hypothesis CI. established by means of the (unhappily named) cut-rule. in the intuitionistic (or idea cannot be expressed correctly because it is built on an asymetry . (. 2. exact counterpart of the identity axiom written above which is the . by introducing the connective which exchanges the roles input/output. linear negation In linear logic. we shall write a proof-net with as conclusions the proof-net will be indifferently the hypothesis H.

yielding more complex kinds of cooperation. where m is a . Cooperation 3. 3. The fact that we have these two outputs will be indicated by replacing them by a third ome A m B. multiplicatives We only discuss here the idea of a binary cooperation . substitution now b e c o m e H CUT Hi C where ]P and]P' "are the proof-nets representinglD" and iD' in linear logic. I mean a situation with two outputs. will be analysed in a forthcoming paper. symbol CUT b e i n g the just a way t o Typically. which will force us to introduce our connectives and quantifiers by pairs. The connective of linear negation (which is a defined one) is the first and most important level of linear logic : the level of communication.e. The syntax is organized in such a way that H il is H. which consists essentially in opposing inputs and outputs in two dual ways.1. the negation is only used on atoms.I72 A AI CUT indicate o f 1D f o r a phenomenon H i n 113' w o u l d of anihita- the tion. and then defined by De Morgan laws. By cooperation. namely the identity axioms and the cut rule. the general concept of a multiplicative connective of arity n. i. one of type A and one of type B.

procedure A. The situation connective. B L 'I AL. are just proofs with several conclusions instance . to the dual connective 9 (par). which For the multiplicative Using these four principles. IA1 but also A . as a mutual dependance 3. which is written. in the symmetrical linear logic. although they are deeply different. corresponds the tenso= product. A AliB B. rules. the parallel is the dependance A typical example of dependancM from a hypothesis. trips The two multiplicatives A A®B B between the outputs ~ are handled by means of two binary rules A A~ B B These two which look the same. together with the axioms of identity and the cut rule. pond to the De Morgan dual connectives i) independance m and 9. we can build proof-structures.e.B The first proof-structure is sound (i. and no hypothesis. which indicates in which way A and B coowhich corres- perate. A and B are forced to communicate. form fragment of linear logic.e.173 multiplicative connective. : A and B are obtained without communication.2. the normalization . of a conclusion framework of and C. There are only two possible ways of cooperating. The situation is denoted by the connective m (times). i. by far the best understood. ii) dependance.

in the case of the two binary rQ~es for par and times. which is a way of making explicit the communication the cut-rule : established by . when we relate this proof-net to other ones by cuts). procedure is visited twice. therefore not be accepted as a proof-net.174 works well. which means that starting from anywhere. In order to determine which. with an arbitrary among proof-structures.e. ledged as proof-nets. the previous position. we speak of longtrip. g is said to be a proof-net when. Definition A proof-structure of its switches. we speak of shortrip . instructions . there is no shortrip for any positioning all trips every formula . next direction. once upwards. and an initial direction by (upwards or downwards) following travel we start to travel through the structure. we have to preset some switches because these . When there are several to a particular switching). in case of a single loop. As a corollary but we can only reconstruct to bideterminism. the from a formula and a direction we can predict the next formula. in other terms. in fact the ways of passing links may be crossed in various ways through these rules are just the expression of the absence or presence of communication. The travel instructions are bideterministic. we shall be able to construct loops (corresponding a certain number of loops. second one does not work well in relation to the cut-rule. are longtrips. i. There is an obvious normalization for proof-nets. once downwards. will be acknow: starting the and will we introduce the coneept of a trip formula of the structure.

related and that to general its c a n n o t be n o r m a l i z e d . the cut-elimination 3. we can work with several cuts at the same time. . there are 2n possible : and the idea is therefore not to ask a computer to decide is sound.e. trips are indeed might All the complications this pattern of 'rthe snake ea~ng own t a i l " occur through normalization. sequentialization The general condition for being a proof-net is of exponential nature if thereeare n multiplicative switchings. Normalization normalize. the proof-structure the result is st~ll a proof-net CUT which means an o u t p u t is excluded. multiplicatives. In the paper on description of i. we shall give a striking geometrical process.3.175 for instance the configuration A B AI Ai CUT BI A ~ B is replaced by the simpler : A AI B CUT Bi CUT Simple considerations on trips show that when we normalize a proof-net . to avoid that used as its own i n p u t . links in 8. in the multiplicative fragment is very quick strictly) (when we the number of formulas decreases and asynchnonous. The idea will be and that we shall feed whether or not a given proof-structure that the computer will compile proof-nets. in particulaz.

and we can even imagine other derived rules enabling us to describe proof-nets manners in a simple. same expressive power as proof-nets. one of type B. the machine being made of (something very close to) proof-nets. This more traditional way is linear sequent calculus. I only discuss binary sharing. of linear sequent calculus corresponds mechanically net p-. I mean a situation among two possible outputs. 4. A typical . in which sense the only output will be effective. This fact will be indicated by introducing third output A a B. By sharing. exactly a one will be effective. where a is an additive connective. Conversely.176 it with a proof written in a more traditional way. i) open sharing outputs. appear as particular such that therefore The rules of sequent calculus derived rules sending proof-nets into proof-nets. which has the in the but which is written familiar tree-like succession of axioms and rules. Sharing 4.1. addit£ves Here again~ where. which indicates There are only two • and & : expressed by the De Morgan dual connectives : this is the situation where we can produce both example is definition but we don't know which one. ways of sharing. useful~ but non intrinsic way : all these language should be put into a high level language. in general many ones. one of type A. To each proof p a unique proof: there every proof-net g can be sequentialized exists at least one proof p in linear sequent calculus B = p-.

are exactly and it is therefore possible to introduce box-switches which depict the arbitrary behaviour of a p r o o f . . where exactly one is ii) closed sharing : this is the dual situation. of A and B is actually produced. The connective for open sharing is & (with).An. . .. The linkage must be correct independantly of what is actually inside the box. i. I can replace • by any other ~ will box with the same conclusions. The rule for & is the following : . 4. . .. .. ..n e t whose conclusions are AI. We have in mind~that eventually be replaced by an arbitrary proof-net whose conclusions AI. the direct product. where two alternative possibilities are considered. An.. . but we don't know which one (we need to know in which case we are).. boxes the direct sum. and so boxes can be inserted in the multiplicative framework.177 by cases. e (plus)..e..2 ~ AeB but the connective formalism) "with" needs AeB (at least in the present state of the : a:proof-box ~ isddepicted by a the use of proof-boxes square with several conclusions j -- AI . The corresponding connective The sum is handled by means of the unary rules A le et B .2. An and the box will be linked to other boxes and formulas by means of the rules of the system.

A and C. whereas the formu%as C are its auxiliary doors. in sharp contrast .B (C is a sequence of formulas). we produce a phenomenon of synchronization. and this is why it reasonable to wait for the opening of~the main door. It is not problematic to normalize cuts when one of the premises is the main door of a &-box . A whole is destroyed. CUT This kind of situation is typical of IF THEN ELSE instructions. the case. In doing so. Which reduce cuts arising through one of the auxiliary doors ~.178 given two proof-nets B and B' whose respective conclusions are C. form a box ~ whose oonclusions are C and A & B . but in that case part of what we are doing may be eventually cancelled. the formu&a A & B is the main door of the box. to the asynchronous multiplicative level. namely B' in the example given. part of the structure.. hence it is more reasonable to wait in this case until a cut arriving through the main door arises. The commutative reductions. Such a cut is normalized as follows : BBI c CUT v~ AI B1 le A~ • becomes (symmetric solution for 2Q) CvA 4'. produce a duplication of the work. where one of the premises is an auxiliary door can be handled too.

are discussed : three basic possibilities erasing. conclusions ?__q. where e is an exponential hgs been by replacing which indicates which kind of memory operation is between the De Morgan performed. form a proof-net ending with ? is handled by means of three rules. in forming from proof-net.2. exponentials The storage operations are all those connected with the use of memory. The situation is in- dicated by the connective ii) maintenance here. The basic choice ! and ? : i) storage dual connectives : the output A is frozen in a memory.c ? ?A which has the same features as a "par" link. the exponential ru&~s from a proof-net ending with !A and ! is handled by means of a box. and reading namely duplication.179 5. namely. The use of a memory will be indicated connective.. a box with which sonsists . All these features belong to the connective ? (why not) of consideration.1. namely i) contraction ?A 2A .. care of duplication. ! (of course). A and auxiliary ?C. and which takes ii) weakening. instruction in relation with an input of type A A by eA.. Storage 5. other interesting possibilities are not considered as primitive. (with a simultaneous here erasing) . of memory of reaffirmation. 5.

because it is for the expressive power of the language.1. A a abstraction and V ~ in i) universal : this is when the choice of a p a r a m e t e r ~ (any). universal The situation is indicated b y A ~ . it would be impossible to make use of a memory The formation of the [-box is an essential moment 6. 6. abstraction : this is when we have obtained A by . then we are lead to replace A by Q . and which takes care of erasing.of abstraction has been performed . there are two De Morgan dual quantifiers. ?A The exponential responsible level is particularily inportant. A (second order) quantifier. which corresponds to reading/e~asing. where ~ is a variable of type.A. then we can .180 an additional conclusion ?A. of synchronization. Without storage operations.2. quantifiers When we want to abstract a given output from certain type contingencies. A (some). in a computation. the existential (second order) quantifier. abstraction 6. the quantifier rules A i is handled by means of a box : from a proof-net ending with A and auxiliary conclusions C not containing ~ free. The situation is ii) existential means of a spemific choice of the parameter indicated by V ~ . A d? iii) dereliction . the A does not matter. and the quantifier Q denotes which kind.

execution of a program 7. etc. introduce some synchronization. operational i. A AB. the boxes are responsible for a the normalization for an independant processor phenomenon of waiting. ii) it will enable us to use operations. which somehow simplify the original There is therefore a way of executing a program by applying procedure. semmntics is the written trace of a In other One should consider that cut-elimination deeper procedure which is performed at a semantic level.1.e.181 form a box ending with A~. because programs.A and C. a lot of syntax will be dumped at the ground level. each symbol CUT being an indication . normalization The methods of 6G~rard 1970) can be extended here to provide a strong normalization described. theorem (cut-elimination) for the full system PN2 just are added To the idea of "candidat de r~ductibilit~" considerations. terms there should be somewhere an operational logic.g. ] 7.2. ~is handled by means of the unary rule ~ V ~. orthogonality proof. for the multiplicatives. This operational semantics semantics of linear cases is only known in particular e. which are . 7. semantics The generalization issue : of the operational to PN2 is a an essential i) it will certainly shorten the execotion of programs.

ed Fenstad. by means of intuitionistic logic.C. North Holland Pub. one can consult (Girard & Lafont 1986) Linear logic & lazy evaluation. to appear in . (Girard 1986) Linear Logic. due to the exponential level. Proc. the is hard to get. to appear in T. . C ° . Amsterdam 1971. Pisa. BIBLIOGRAPHY (Girard 1970) Une extension de l'interpr~tation de G~del & l'analyse et ~ la th@orie des types etc. on the operational semantics particularily simple. this semantics has to be kept if we want not to be ridiculous. in this direction.. in relation to linear Log. the Proceedings of TAPSOFT'87..182 not definable in PN2 (or by any other current logical system). Symp. of course. of the main problems is to combine the advantages of semantics syntactical byzantinism) with those of the syntax (finitism) last point (finitism) One (no . one can dream of a new kind of machine. memory allocation and laziness. based but there are positive~indications iii) at a later stage. For a discussion of the sequential case.S. 2nd Scand.

scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->