Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Alexis Saurin- Ludics Programming I: Interactive Proof Search

Alexis Saurin- Ludics Programming I: Interactive Proof Search

Ratings: (0)|Views: 0|Likes:
Published by Gholsas

More info:

Published by: Gholsas on Dec 02, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/02/2011

pdf

text

original

 
DRAFT – Do Not Distribute
Ludics Programming I:
Interactive Proof Search
Alexis Saurin
INRIA Futurs´Ecole Polytechnique
saurin@lix.polytechnique.fr
Abstract
Proof theory and Computation are research areas which have verystrong relationships: new concepts in logic and proof theory oftenapply to the theory of programming languages. The use of proofs tomodel computation led to the modelling of two main programmingparadigms which are functional programming and logic program-ming. While functional programming is based on proof normaliza-tion, logic programming is based on proof search. This approachhas shown to be very successful by being able to capture manyprogramming primitives logically. Nevertheless, important parts of real logic programming languages are still hardly understood fromthe logical point of view and it has been found very difficult to givea logical semantics to control primitives.Girard introduced Ludics [12] as a new theory to study interac-tion. In Ludics, everything is built on interaction or in an interactiveway.In this paper, which is the first of a series investigating a newcomputational model for logic programming based on Ludics,namely computation as interactive proof search, we introduce theinteractiveproof search procedure and study some of its properties.
 Keywords
Ludics, Game Semantics, Logic Programming, Proof Search, Interaction, Proof Normalization.
1. Introduction.
 Proof Theory and Computation.
Recent developments in proof theory have led to major advances in the theory of programminglanguages. The modelling of computation using proofs impacteddeeply the foundational studies of programming languages as wellas many of their practical issues. Declarative programming lan-guages have been related mainly in two ways to the mathemati-cal theory of proofs: on the one hand, the ”computation as proof normalization” paradigm provided a foundation to functional pro-gramming languages through the use of the well-known Curry-Howard isomorphism relating simply typed
λ
-calculus with intu-itionistic natural deduction proofs and reductions of a
λ
-term withcut-elimination in NJ. On the other hand the ”computation as proof search” paradigm stands as a foundation for logic programming.While functional programming found strong theoretical foun-dations and very powerful formal analysis tools thanks to the study
[Copyright notice will appear here once ’preprint’ option is removed.]
of cut-elimination procedures in proof systems such as natural de-duction or sequent calculus and the development of type theoryand its relationships with functional programming languages, logicprogramming has been built on the paradigm of proof search wherethe computation of a program is viewed as the search for a proof insome deductive system.
Computation as proof search.
The proof search paradigm was atfirst founded on the resolution method: computation correspondedto the search for a resolution for first-order Horn clauses. But thisapproach was uneasy to extend to larger fragments or richer logics.Later, the use of sequent calculus allowed to overcome this limit:the introduction of Uniform Proofs and Abstract Logic Program-ming Languages [16] and the discovery of the Focalization Prop-erty [2] in Linear Logic [11] allowed to extend the proof searchparadigm to larger fragments (Hereditary Harrop formulas for in-stance) and to richer logics (higher-order logics, linear logic, ...)and to benefit from the geometrical properties of sequent calculus.Inthe uniform proofs model for instance, computation will be mod-elledas a search for aproof of a sequent
P
G
where
representsthe logic program and
G
the computation goal. The computationthen proceeds as a search for a proof directed by the goal
G
, thelogic program
being used through backchaining when the goalis an atomic formula.In addition to the interest from the fundamental point of view,this approach allowed to enrich logic programming languages withnumerous additional programming primitives while treating themlogically (higher-order programming, modules, resource manage-ment, concurrent primitives...). Nevertheless some essentials con-structions of logic programming languages could not be dealt withlogically, in particular when we are concerned with the controlof computation (backtracking, intelligent backtracking,
cut
predi-cate). As a consequence, some parts of the languages do not havea very well established semantics and they cannot be analyzed ina satisfactory way using the rich logical methods that proof searchparadigm provides.RecallingKowalski’s motto”Algorithm=Logic+Control”[15],one can notice that with the development of real implementationsof logic programming languages, the correspondence turned outto become much closer to: ”Algorithm = Logic + Control + I/O +Data Abstraction + Modules + ...” since those useful programmingprimitives are needed. The extension of the proof search paradigmto broader settings allowed to capture some of these componentsin the logical component (modules, data abstraction, ...) but thecontrol part is still there.One of the long-standing research directions on proof search isto treat the extra-logical primitive in a logical way in order to getcloser to the ”ideal” correspondence: ”Algorithm = Logic”. We candraw a useful and enlightening comparison with functional pro-gramming: the extension of the Curry-Howard correspondence toclassical logicallowedtocapturelogically several control operators
Version du 17 juillet 2007.
1
2007/7/19
 
that were used in practice (like
call/cc
) thanks to typing rules forthose operators [13] or thanks to extensions of 
λ
-calculus such as
λµ
-calculus [17].
Why is it so difficult to have a satisfactory logical treatment of  control?
There is certainly a question of point of view whichstands there. For instance, we can notice that there is a mismatchbetween sequent calculus proof theory and logic programming:while in sequent calculus, the objects we manipulate are proofs(and the theorems which are proved deal with proofs), the processof searching for and constructing proofs does not deal with proofsuntil the computation is completed. Instead, the objects of proof search are partial proofs (or open proofs) which may end up notleading to a proof at all but to a failure. Such failed proofs arenot part of the proof theory of sequent calculus. Thus, the verydynamics of computation stands outside the theory we work with.Moreover, while one often considers that the state of the com-putation is represented by a sequent the essential element for proof search does not lie in the sequents themselves but in the proof ruleswhich are applied to sequents: the sequent should rather be consid-ered as a constraint on the action that can be performed to progresstowards completing the search.
 Ludics and Interaction.
We noticed earlier the strong relation-ship between logic and computation. We can thus expect that newdevelopments in proof theory will provide new tools, new meth-ods and maybe new paradigms on the computer science side. Suchimpacts can be expected in particular when these new results shedlight on concepts that had not been well understood before. Wethink that the recent work by Girard on Ludics [12] should be con-sidered in this way.Ludics is a logical theory that attempts to overcome the dis-tinction between syntax and semantics by considering that interac-tion comes first and by building syntax and semantics afterwards,thanks to interaction. Ludics objects, designs, can be seen as inter-mediate objects ”between” syntax and semantics since they are anabstraction of linear sequent calculus proofs and a concrete versionof strategiesinagamesemantics model. Ludics isfounded on manyconcepts of proof theory, especially of linear logic sequent calcu-lus [11] and especially the fundamental result of Focalization [2]that allows for synthetic connectives to be defined. Ludics has lotsof connections with game semantics [14, 1] as well since the inter-action process in Ludics can be seen as a play [9]. Many conceptshave been inspired by proof search. We shall introduce the maindefinitions of Ludics in section 3 after we provided some more in-tuitions on Ludics concepts and technics.
Computation as Interaction.
In recent years, interaction has be-come a crucial concept of the theory of computation. The introduc-tionoflinear logic[11]surelyis partlyresponsible forthis butgametheoretical interpretations of logicand computation have been stud-ied prior to linear logic. One can for instance refer to Curien’s work on Concrete Data Structure, abstract and environment machinesand more recently Abstract B¨ohm Trees [3, 5, 6, 4]. Ludics cer-tainly goes further in this direction.We think that Ludics provides lots of tools that should be use-ful for logic programming especially in order to develop a studyof logic programming that would benefit from the concepts andtools from interactive theories, such as an explicit treatment of thecomputational environment which is uniform to the computationalobjects [7].This paper is the first of a series of works [19, 20, 21] in whichwe investigate the use of Ludics as a foundation for proof searchand logic programming by means of a model of interactive proof search. The present paper is concerned with the very milestone of this project, that is defining what would be an interactive proof search procedure in Ludics. In order to do so, we first draw thegeneral picture of this paradigm of ”computation as interaction” (ormore precisely ”computation as interactive proof search”), give aninformal account of Ludics together withintuitions and motivationsand illustrate it with examples from MALL sequent calculus inSection 2. To set the stage to the definitions of Interactive Proof Search in section 4, we then introduce the reader to the basicdefinition of Ludics in Section 3.The heart of the paper is Section 4 where we present an algo-rithm for IPS through the definition of an abstract machine, theSLAM, that is obtained by modifying Faggian’s Loci Abstract Ma-chine [8]. After running the interactive search process on an exam-ple, we define the SLAM firstly in a restricted case and later in thegeneral setting and we establish several properties of the IPS re-lated with correctness of this algorithm and then we illustrate ourmethod on a toy program for paths in a graph. We finally concludein Section 5 by outlining future works and relating our results withother works.
2. Logic programming, interactivity and Ludics
The aim of this section is to draw the general picture for InteractiveProof Search and to give an informal description of Ludics.
2.1 Computation as Interaction
We described Computation as Proof Search in the previous sectionas the search for a proof of 
P
G
in sequent calculus. The proof is required to satisfy certain conditions.While the whole dynamics of proof search is concerned withpartial proofs, sequent calculus proof theory is a theory of completeproofs. Thus it is very difficult to speak about failures, backtrack orchanges in the search strategy (such as what is done by the
cut
predicate) in this setting.Wepropose to consider another approach which considers proof search interactively.
Searching for proofs interactively
The sequent
P
G
is thestate of the computation but it is also a way to constrain the futureof the computation. In the same way, restrictions on the logicalrules that are allowed (like in linear logic) or proof strategies alsoimpose constraints on proof search. But all this is implicit and notdone explicitly. In particular, it is fairly difficult to analyze theseconstraints in proof theory itself. In some sense, the computationenvironment cannot really be dealt with explicitly.This is sad because some important programming primitivespreciselydealwiththeseconstraints, addingsomeof them,strength-ening others, etc...The interactive approach to proof search we are investigatingprecisely makes explicit the constraints on proof search. Instead of building a proof depending on a given sequent, we shall considerbuilding a proof that shall pass some tests, that shall be opposed toattempts to refute it. The tests will have the form of (para)proofsand thus will be built in the same system as the one in which weare searching for proofs.We propose a computational setting which would roughly corre-spond to the following (the terms will be made clear later on):
We are willing to search for a proof 
D
of 
A
.
Formula
A
is actually given as a set of tests: the tests thatshall be successfully passed by the proof we are constructing:
1
,...,
n
.
The proof construction shall proceed by consensus with thetests:
D
can be extended with rule
R
only if the extended objectinteracts well with the tests.
After some interaction, we may have an object that cannotbe extended any more. Either the construction is terminated
Version du 17 juillet 2007.
2
2007/7/19
 
because
D
cannot pass every test or because all the test aresatisfied and no more constraint applies to
D
so that there isno need to extend it further. In the first case, we have a failurewhile in the later case we have a win.
The interesting point with this interactive approach lies in thefact that the setting if symmetrical:
D
is tested by
i
but it isalso a test for the
i
s. In particular, even failures are interestingand useful objects.
if a failure
D
has been reached, we may be willing to tryanother search. Indeed, maybe at some point we chose a wrongway to extend
D
and that caused the failure. There is a standardway to backtrack, that is erase some part of 
D
and try someother construction. But since we are in an interactive setting,there is another option: wecan try touse
D
in order toprovidenew tests:
D
i
that will constrain the search to look for a proof that shall be different from the failure
D
.
the use of previous computations in order to enrich the com-putational behaviour has actually no reason to be restricted tofailures...Basically, this is the research program we are willing to inves-tigate. The present paper will only be concerned with defining theinteractive search. The treatment of past computations will be post-pone to a future paper.
2.2 Motivations and intuitions for Ludics
Ludics has recently been introduced by Girard [12] as an interac-tive theory that aims at overcoming the traditional distinction be-tween syntax and semantics by saying that neither syntax nor se-mantics should come first as a foundational stone for logic: inter-action should come first and logic shall be reconstructed from thisinteractive approach.The whole theory of Ludics is built on the notion of interactionof designs which are intermediate objects between syntax and se-mantics (they can be viewed as an abstraction of MALL sequentproofs or as a concrete presentation of game semantics strategies).Thus in Ludics, things are not built from syntactic objects towhich is assigned a semantic interpretation, they do not comefrom a semantic space for which we need an adequate language.There are objects interacting with each other and their propertiesare defined interactively. Even Ludics’ behaviours which are theanalogous of types or formulas will be defined interactively.Of course, Ludics in not built by forgetting every thing thatexists. On the contrary one can argue that Ludics comes from acareful analysis of logic and from a clever synthesis in order toobtain the right notion of interaction. In particular, Ludics has beeninspired by many fundamental properties from proof theory thatwe are going to present in order to provide the reader with intuitionbefore exposing the formal definitions of Ludics.We now introduce informally and discuss some key notions of Ludics in a way that we hope will emphasize connections towardslogic programming and proof search.
 Focalization.
Andr´eoli showed a fundamental property of linearlogic proofs which has great impact on proof search. Focalizationis also very important because it is the root of a polarized approachto logic and polarization is the first step towards a game theoreticinterpretation of proofs. Indeed polarization tells you whose turn itis to play.Probably the most important outcome of Focalization is thepossibility of defining synthetic connectives and synthetic rules inMALL and a hypersequentialized calculus (that is, a calculus us-ing the synthetic rules). MALL connectives can be decomposedin two sets: the positive connectives (
,
,
1
,
0
) and the nega-tive connectives (
,
,
,
). When searching for a proof, one al-ternates between two phases, a synchronous phase and an asyn-chronous phase. During the asynchronous phase, we are certainnot to lose provability, while during the synchronous phase we canmake the wrong choice and end up not finding a proof even if thesequent we started with was provable. Thus there is clearly an ac-tive phase (positive, synchronous) and a passive phase (negative,asynchronous) and the two phases alternate. This is the first steptowards a game theoretic interpretation of sequent proofs:
the negative phase is the opponents turns to play (and theasynchronous rule gather all information that is needed to reactto this move)
the positive phase is the player’s turn: after a move of theopponent, the player decides what she will play following whather strategy (that is her proof rules) tells her to play.An interesting invariant with proofs in the hypersequentializedcalculus for MALL is that there is at most one negative formulain a sequent.
 Proof Normalization.
The cut elimination process reflects thisgame interpretation: a conversion step corresponds to the selection,by the positive rule, of a continuation for the normalization (for theplay): think of the selection of a
-premise by a
-rule.But thereis stillaproblem for aninteractive interpretation: thereare not enough proofs! If the system is consistent, we cannot everfind both a proof for
A
and a proof for
A
. Notice that if therecannot be proofs for both a formula and its negation, it is perfectlylegal to attempt to prove both
A
and
A
. The only thing is that atmost one of the two formulas can be proved (and maybe none...).However, if the proof search fails, the partial object that we haveobtained can be used in an interaction with proof attempts of thenegation... except for the point where the failure was encountered(here normalization is undefined... for the moment).A failed(or interrupted) attempt toprove
A
is a proof treewheresome branches are still open. Let us add a new rule to mark thefact that the search for a proof has been stopped, that we gave up:
Γ
. What is this sequent
Γ
where we stopped? It would beunfair tostopif 
Γ
contains anegative formulasince decomposingthis formula costs nothing (remember: it is asynchronous). Thuswe restrict the application of 
to sequents that are made only of positive formulas (positive sequents). We thus have paraproofs forany sequents, even for the empty one
.
Winning and loosing.
The normalization between two para-proofs is clearly a process through which they test each other. Theone that is caught using
is considered as the loser of the play andsince he lost, the play ends there. Notice that this normalizationprocess is an exploration of the two paraproofs: the cut visits someparts of the paraproofs. In the case the normalization ends with
the paraproofs are said to be orthogonal.
 Locations.
Whereas in functional programming it is important toknow if the types of a function and its argument are identical, itis not relevant for proof search to know the complete structure of the proof from the beginning. We only need to know enough tochoose a rule to apply. This idea is reflected in Ludics by the useof addresses or locations (or loci). A formula is only manipulatedthrough its address
ξ
. When we apply a rule on
ξ
we come toknow
where
its subformulas are (not
what 
they are...):
ξi,ξj,...
the subaddresses of 
ξ
.Let us say a word about proof normalization: what happens if we cut
A
B
with
A
? Clearly, things may go wrong if the
R
rule is applied to
A
. But on the other hand if 
L
is applied, the normalization goes perfectly well... the problem we
Version du 17 juillet 2007.
3
2007/7/19

You're Reading a Free Preview

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