• Nenhum resultado encontrado

Subexponential concurrent constraint programming

N/A
N/A
Protected

Academic year: 2021

Share "Subexponential concurrent constraint programming"

Copied!
23
0
0

Texto

(1)

Contents lists available atScienceDirect

Theoretical

Computer

Science

www.elsevier.com/locate/tcs

Subexponential

concurrent

constraint

programming

Carlos Olarte

a

,

,

Elaine Pimentel

a

,

,

Vivek Nigam

b

,

aUniversidadeFederaldoRioGrandedoNorte,Natal,Brazil

bUniversidadeFederaldaParaíba,João Pessoa,Brazil

a

r

t

i

c

l

e

i

n

f

o

a

b

s

t

r

a

c

t

Articlehistory:

Received8September2014

Receivedinrevisedform3March2015 Accepted15June2015

Availableonline19June2015

Keywords:

Linearlogic

Concurrentconstraintprogramming Proofsystems

In previous works we have shown that linear logic with subexponentials (SELL), a refinement of linear logic, can be used to specify emergent features of concurrent constraint programming (CCP) languages, such as preferences and spatial, epistemic and temporal modalities. In orderto do so, we introduced a number of extensions to SELL, such as subexponential quantifiers for the specification of modalities, and more elaborated subexponential structures for the specification of preferences. These results provided clear proof theoretic foundations to existing systems. This paper goes in the opposite direction, answering positively the question: can the proof theory of linear logicwith subexponentials contribute to the development of new CCP languages? We proposeaCCP language with the following powerfulfeatures: 1) computationalspaces whereagentscantellandaskpreferences(soft-constraints);2) systemswherespatialand temporalmodalities canbe combined;3) sharedspaces forcommunication thatcan be dynamically established; and 4) systems that can dynamically create nested spaces. In ordertoprovidetheprooftheoreticfoundationsforsuchalanguage,weproposeaunified logicalframework(SELLS)combiningtheextensionsoflinearlogicwithsubexponentials mentionedabove,andshowingthatthisnewframeworkhasinterestingprooftheoretical propertiessuchascut-eliminationandasoundandcompletefocusedproofsystem.

©2015ElsevierB.V.All rights reserved.

1. Introduction

Logicandprooftheoryplayan importantroleinthedesignofprogramminglanguages.Infact,newprogramming con-structshavebeenproposedbyfollowingtightconnectionsbetweenprogramminglanguagesandprooftheory.Forexample, weinvestigatedrecentlyin[1]aprooftheoreticspecificationoftheconcurrentconstraintprogramming(CCP[2])languages introduced in[3]thatmentionepistemic(eccp)andspatial (sccp)modalities.Weusedasunderlyinglogicalframework linear logic withsubexponentials (SELL) [4,5], together withnew quantifiers on subexponentials:



and



, allowing, re-spectively, the universal andexistentialquantification ofsubexponentials.The focusing discipline [12] then enforcedthat theobtainedencodingsfor

eccp

and

sccp

arefaithful w.r.t.CCP’soperationalsemanticsinastrongsense:oneoperational stepmatchesexactlyonelogicalphase.Thisisthestrongestlevelofadequacycalledadequacyonthelevelofderivations[6]. Thestudydonein[1]allowedthedevelopmentofextensionsof

eccp

and

sccp

withfeaturesnotavailablein[3].For example,wewereabletospecifysystemswithanunboundednumberofagentsfor

eccp

orspacesfor

sccp

aswellasto specifynewconstructsthatallowthecommunicationoflocationnames[7].

*

Correspondingauthors.

E-mailaddresses:[email protected](C. Olarte),[email protected](E. Pimentel),[email protected](V. Nigam).

http://dx.doi.org/10.1016/j.tcs.2015.06.031

(2)

Morerecently, in[8],we haveshownthat SELL (withoutthesubexponential quantifiers)canbe configuredto capture CCP languagesmanipulatingsoft-constraints [9].The underlying(soft) constraint systemintheseCCP calculiisbased on semiringsstructuresandhasbeenusedforthespecificationofsystemsthatmentionpreferences,e.g.,costs,probabilities, levels of uncertainty(fuzzy information), etc. However, moving fromhard (crisp) constraintsto soft constraints was not followedbyacorrespondinglogical/prooftheoreticcharacterizationofthesesystems.Thisisunfortunatebecauseoneofthe keymotivationsoftheoriginalCCPwasitstightconnectiontologicandprooftheorywhichenabledtheproposalofmore advancedsystemssuch asitslinearversion

lcc

[10].Hence, themaincontributionof[8]wasto recoverthisconnection bystudyingtheprooftheoryofsoftconstraintsystemsintheformofSELL theories.

It isworthy sayingthat it is not possibleto specifyin SELL some notions ofsoft-constraints, namely thosebased on non-idempotentsemirings.Forthis, weintroduced in[8]anewproof system,calledSELLS,forwhichthe subexponential promotionrulebehavesdifferently.ThisnewruleisquiteinterestingsinceitcoincideswiththeusualoneinSELL inthecase ofidempotentsemirings.Moreover,itfaithfullycapturesnotionssuchasprobabilitiesandcoststhatrequirenon-idempotent semiringsastheunderlyingalgebraicstructure.

Thistightcorrespondencebetweensoftconstraintsandprooftheoryallowsusnowtoextend

eccp

and

sccp

withsoft constraints,thusstrengtheningthemainresultsin[1]and[8].Hence,SELL canberegardedasauniformunderlyinglogical frameworkforanumberofprogramminglanguages.

Buildingthefoundationsofprogramminglanguages,such asCCP,onsolid prooftheoryreducestheprinciplesusedfor designing a programminglanguage to the foundations oflogic. The comparisonof differentprogrammingprinciples and languagescan then beestablished by soundnessandcompleteness results.Incontrast,while model-theoreticapproaches have also played an important role in the development of programming languages,including CCP, they allow for many specifications,whicharemanytimeshardtobecompared.

This paper continues our research program of using extensions of linear logic with subexponentials to provide solid proof-theoreticalfoundationsto differentCCP languagesaswell asforthe development ofnewprogrammingconstructs. Ourmaingoalisto proposea unifiedgenerallogicalframeworkwheremanyvariants ofCCPmaybespecified,including newones,allwithclearproof-theoreticalfoundations.

Wesummarizeourmaincontributionsbelow:

– Wepropose newsubexponentialquantifierswhich areconsiderablymoreexpressive thanthe onesintroduced inour previous work [1]. Subexponentialsare organized into a pre-orderspecifying the provabilityrelation betweenthem. While in our previous work we allowed only the quantificationof subexponentials that are in the ideal ofa single subexponential, our newquantifiers allow for the quantification of subexponentials that appear in the ideal of any subexponentialofagivennon-empty setofsubexponentials,orbetweentwo subexponentials.Weprovethat the re-sultingsystem,calledSELLS,admitscut-elimination;

– We demonstratethat anumber of CCP languageswithdifferent modalities can be specified asSELLS theories. For that,wedefineagenerallanguagecalled

Mccp

wheretheprogrammercanexpress,andcombine,differentmodalities. Moreprecisely,weshowhowthenewquantifiersnaturallyinducenewCCPoperatorswhichallowforthesharingand exportingofinformationbetweenprocesses.Forinstance,we showhowtoformallyexpressthesituationwhensome informationcan be exported from an agent a toanother agent b,but itis confinedto these agentsonly. Thus, two agentsareabletoshareprivate spaces.Moreover,weallow thecombinationofspatial modalities,asproposed in[3], andpreferences (soft-constraints) [11].This means that agentsmay not only shareconstraints,but alsopreferences, allowingforthespecificationofsystemswithspatialmodalitiesconstrainedtolevelsofuncertainty.

– Finally,weproposeafocusedproofsystem[12]forSELLS.Focusingisadisciplineonproofsintroducedoriginallyfor linearlogicinordertoreducetheproofsearchnon-determinism.Weshowthatourfocusedproofsystemiscomplete withrespecttoSELLS.Moreover,theadequacyresultsrelatingtheoperationalsemanticsof

Mccp

andderivationsin SELLS relyonthefocusedproofsystem.

The remainder of the paper is organized as follows. In Section 2, we review linear logic with subexponentials and propose SELLS,whichincludesthenewsubexponentialquantifiers.Inthissection wealsoprovethatthe systemadmits cut-elimination.Section3proposesafocusedproof systemforSELLS andproveitssoundnessandcompleteness.Weuse SELLSasalogicalframework toproposenewCCPconstructsinSection 4demonstratingthatthey increaseconsiderably theexpressivenessofexisting CCPcalculi.Finally,inSection 5,weconcludeby commentingonrelatedworkandpointing outfuturework.

It shouldbe notedthat apreliminary attemptto usingSELL inorderto specifythebehaviorsdescribed in thispaper (see Section 4.4) was published in [7]. In thispaper we give manymore examples andexplanations. We refine several technicaldetailsandpresentmoredetailedproofs.Weaddmuchmoreproof-theoreticalmachineryinordertospecifynew CCP constructs and we also give severalexamples on the relationbetween CCP and the SELLS proof theory. The new contributionswithrespectto[7]are: (1)weshowhowtocombine, inauniquelogicalframework,spatial modalitiesand preferences. For that, (2) we develop the (focused) SELLS system; (3) the new type system for location introduced in Section2.2allowsustodefineinaneaterwaythegenerationofnewlocationstobesharedamongagents;finally,(4)we developthetheoryofagentsthatcanexportinformationtosublocations,afeatureconsideredneitherin[3]norin[7].

(3)

A−→A I 1−→F 2,F−→G 1, 2−→G Cut ,F,H−→G ,FH−→GL 1−→F 2−→H 1, 2−→FHR ,Fi−→G ,F1& F2−→G &Li −→F −→H −→F & H &R 1−→F 2,H−→G 1, 2,FH−→G  L , F−→H −→FH R ,F−→G ,H−→G ,FH−→GL −→Fi −→F1F2Ri −→G ,1−→G 1L −→1 1R ,0−→G 0L −→  R ,F[e/x] −→G ,x.F−→GL −→G[t/x] −→ ∃x.GR ,F[t/x] −→G ,x.F−→GL −→G[e/x] −→ ∀x.GR

Fig. 1. First-order fragment of intuitionistic linear logic. As usual, in theL and∀Rrules, e is fresh, i.e., it does not appear innor G.

2. Modalities in linear logic

In[1]and[8]wepresentedtwolinearlogicbasedsystemswithsubexponentials:SELL andSELLS respectively.Bothrely on a poset organization of the subexponentials: while SELL requires a simplepreorder structure, SELLS asks for a more involvedalgebraicsystem–ac-semiring(seeExample 2.2).

Inthisworkwewillcombinebothsystems,wheretheunderlyingalgebraicstructureisaposetwithsomeextra struc-ture, butnotasstrongasac-semiring.Inthisway,weareabletogivethemostgeneralpossibledefinitionforSELLS and enabledifferentkindsofmodalitiesinasinglelogicalframework.

2.1. Linearlogicwithsubexponentials

SELLS (LinearLogicwithSoftSubExponentials)shares withintuitionisticlinearlogic[13] all itsconnectivesexceptthe exponentials: insteadofhaving a single pairofexponentials

!

and?, SELLS maycontain asmanysubexponentials [4,5]as needed(see[14]foragentleintroductiontosubexponentials).Fig. 1presentstheintroductionrulesofintuitionisticlinear logicwithouttheexponentials.

Contraction andweakeningonformulasinlinearlogicarecontrolled byusingthe exponentials,whoseinference rules areshownbelow:

,

F

−→

G

,

!

F

−→

G

!

L

!  −→

G

!  −→ !

G

!

R

! ,

F

−→

?G

! ,

?F

−→

?G ?L



−→

G



−→

?G ?R



−→

G

,

!

F

−→

G W

,

!

F

,

!

F

−→

G

,

!

F

−→

G C

Noticethatwecanonlyintroducea

!

ontherightora? ontheleftifallformulasinthecontextareclassical,thatisall formulasontheleft-hand-sideofthesequentmustbemarkedwitha

!

andtheformulaonright-hand-sidemustbemarked witha?.Therules

!

R and?L arecalledpromotionrules,whiletherules

!

L and?R arecalledderelictionrules.

We now substitute the exponentials witha (possibly infinite) set of labeledones, calledsubexponentials.We start by definingtheiralgebraicstructure.

Definition 2.1 (

×

-Poset).Apartial-order onanonemptysetP isabinaryrelation

on P thatisreflexive,antisymmetricand transitive.Thepair

(

P

,

≤)

iscalledapartiallyorderedset,orposet.Aposethavingminimum(

)andmaximum(



)elements iscalledbounded.A

×

-poset

P

,

≤,

×

isaboundedpartial-ordertogetherwithabinaryoperation

×

(herecalledproduct) whichis(1)associative;(2)commutative;(3)



istheneutralelementof

×

,thatis,

a

A

,

a

× 

=

a;(4)monotone,i.e.,

a

,

b

,

c

,

d

P ifb

a

×

c anda

d,thenb

d

×

c;and(5)intensive:

a

,

b

P ,a

×

b

a.Moreover,ifglb

(

a

,

b

)

existsand a

×

b

=

glb

(

a

,

b

)

foralla

,

b

P ,thenthe

×

-posetiscalledidempotent.

Observe that

(

P

,

≤,

×,

)

isan abelianordered monoid, withthe extraproperties ofmonotonicity andintensiveness. Notealsothat

is

×

-absorbing,i.e.,a

× ⊥ = ⊥

.Finally,if P isthereal

[

0

,

1

]

interval,thena

×

-posetisat-norm.Inthis case,themonotonicityguaranteesthatthedegreeofpreference (see[8])doesnotdecreaseifthetruthvaluesoftheproduct increase.

Example 2.1. Everyboundeddistributivelattice

L

,

∨,

∧,

0

,

1

isanidempotent

×

-poset,wherea

b ifandonlyifa

b

=

b and

×

= ∧

.Infact:

– ifa

d thena

d

=

d.Hence,d

c

= (

a

d

)

c

= (

a

c

)

∨ (

d

c

)

,thusa

c

d

c;

– sinceb

1

=

1 and a

1

=

a,wehavethata

=

a

∧ (

b

1

)

= (

a

b

)

∨ (

a

1

)

= (

a

b

)

a.Hencea

b

a.

Example 2.2 (C-semiring).(See[9].) Ac-semiring(see Section4.1forsomeexamples)isatuple

A,

+,

×,

⊥,



satisfying: (S1)

A

isa setand

⊥,

 ∈

A

;(S2)

+

is abinary,commutative, associativeandidempotentoperator on

A

,

is itsunit

(4)

elementand



itsabsorbingelement;(S3)

×

isabinary,associativeandcommutativeoperatoron

A

withunitelement



andabsorbingelement

.Moreover,

×

distributesover

+

.

Let

bedefinedasa

b iffa

+

b

=

b.Then,

A,

isacompletelatticewhere:(S4)

+

and

×

aremonotoneon

;(S5)

×

isintensiveon

;(S6)

(resp.



)isthebottom(resp.top)of

A

;(S7)

+

isthelub operator.

If

×

is idempotent, then: (S8)

+

distributes over

×

; (S9)

A,

is a complete distribute lattice and

×

is its glb. A c-semiring isidempotentifits

×

operatorisidempotent,andnon-idempotentotherwise.

Clearly,

A,

≤,

×

isa

×

-posetand,if

×

isidempotent,

A,

≤,

×

isanidempotent

×

-poset.

Example 2.3. Let

(

P

,

≤)

be a bounded posetanddefine

×

as:a

×

b

= (↓

a

)

∩ (↓

b

)

where

a is the idealofa, that is,

a

= {

x

A

|

x

a

}

. Observethat theintersectionof idealsisan ideal anditis notempty since

⊥ ∈ (↓

a

)

forall a

A. Moreover,a

b ifandonlyif

(

a

)

⊆ (↓

b

)

.Hencemonotonicityandintensivenessholdtriviallyand

P

,

≤,

×

isa

×

-poset. A SELLS system isspecified by a subexponentialsignature



=

A

,

,

U

,where A is a set oflabels,

A

,

,

×



isa

×

-posethavingminimum,maximum

⊥,

 ∈

A andaproduct

×

,andU

A specifies whichsubexponentialsallowboth

weakening andcontraction.We shall usea

,

a1

,

. . .

to rangeover elements in A and we will assume that



is upwardly closedwithrespecttoU ,i.e.,ifa

U anda



a1,thena1

U .

Foragivensubexponentialsignature,SELLS isthesystemobtainedbysubstitutingthelinearlogicexponentials

!,

? by

thesubexponentials

!

a

,

?aforeacha

A,andbyaddingtotherulesinFig. 1thefollowinginferencerules: – foreacha

A (derelictionandthepromotionrules):

,

F

−→

G

,

!

aF

−→

G

!

a L

!

a1F 1

, . . . ,

!

anFn

−→

F

!

a1F 1

, . . . ,

!

anFn

−→ !

aF

!

a R, provided a



a1

×



. . .

×

an

,



−→

G



−→

?aG ? a R

!

a1F 1

, . . . ,

!

anFn

,

F

−→

?an+1G

!

a1F 1

, . . . ,

!

anFn

,

?aF

−→

?an+1G ?aL, provided a



a1

×



. . .

×

an+1

;

– foreachb

U (structuralrules):



−→

G

,

!

bF

−→

G W

,

!

bF

,

!

bF

−→

G

,

!

bF

−→

G C

Observe that provability is preserveddownwards i.e., if the sequent



−→ !

aP is provable in SELLS, so is the sequent



−→ !

a1P foralla1



a.Weshallelidethesignature



wheneveritisnotimportantorclearfromthecontext.

In[1],weshowedthatbyusingdifferentprefixesitispossibletointerpretsubexponentialsininterestingways,suchas temporalunits orspatial andepistemicmodalities.Moreover, in[8]we showedhow tocapturethe notionofpreferences (soft-constraints)usingsubexponentials.Inthispaper,wewillshowhowtocombinethesemodalitiesinasinglesystem.In ordertodoso,weneedthenotionofquantificationoversubexponentials,tobepresentednext.

2.2. SELLSsystem

We will now enhance the notion of quantification over subexponentials presented in [1]. We will call the resulting systemSELLS.

TheinitialsubexponentialsignatureofSELLSistheSELLS signaturepresentedinlastsection,

A

,

,

U

.

We willcall theelements in A subexponentialconstants.SELLS willalso allowforsubexponentialvariables. Intuitively, these variables will be introduced by the subexponential quantifiers in a similar fashion as the usual eigenvariables in first-ordersystems.Beforepresentingthesubexponentialquantifiers,wewilladdsomemachineryandsetthenotation.

Westart bygeneralizing thequantificationpresentedin [1],addingabroader notionoftypingto subexponential con-stantsandvariables.Weusethreekindsoftyping:oneforsubexponentialconstants,andtwoforsubexponentialvariables. Herel isasubexponentialvariable,i.e.,l

/

A,a a subexponentialconstant,i.e.,a

A, s denotesboth subexponential con-stantsandvariablesandi

∈ {

b

,

u

}

indicateswhetherthesubexponentialisboundedorunbounded:

a

: {

a

}

i l

: {

s1

, . . . ,

sn

}

i and l

: {

s1

/

s2

}

i

,

wheren

1 and s2

s1.Thetyping l

: {

s1

,

. . . ,

sn

}

i specifies that

l and thesubexponentiall is intheidealofallthe

subexponentialsin

{

s1

,

. . . ,

sn

}

,thatis,l



sjforall 1

j

n.Thetypingl

: {

s1

/

s2}ispecifiesthats2



l



s1.Ifboths1 and s2 areunbounded(resp.bounded),soitwillbel,hencei

=

u (resp.i

=

b).Forsubexponentialconstantswejusthavea

: {

a

}

i

specifyingthata isinitsownideal.Here,i

=

u ifa

U andi

=

b otherwise.Wenotethatwecould havesimplyremoved thetypingofsubexponentialconstants,butthedefinitionoftheproofsystemisconsiderablysimplifiedbyusingthemore uniformandrathertrivialtypinga

: {

a

}

i.

In thefollowing, we shall omitthe subscript i when it can be inferred fromthe context orit is not relevant. More-over,weshallusethelettersl

,

l1

,

l2

,

. . .

forsubexponentialvariables,a

,

a1

,

a2

,

. . .

forsubexponentialconstants,s

,

s1

,

s2

, . . . ,

d

,

d1

,

d2

,

. . .

forbothsubexponentialvariablesandconstantsand

τ

foranyofthethreetypingexpressionsabove.

(5)

Fig. 2. Creating subexponential variables in a×-poset.

Example 2.4. Considerthesubexponentialsignature



=

A

,

,

A

presentedinFig. 2(a),where

×

 isaproductdefinedas

ai

×

aj

=

glb

(

ai

,

aj

)

ifglb

(

ai

,

aj

)

existsandai

×

aj

= ⊥

otherwise.Ifthesubexponentialvariablel1

: {

a1

/

a3}isadded,we obtainFig. 2(b).The

×-poset

obtainedbyfurtheraddingl2

: {

a1

,

a2}isshowninFig. 2(c).

SELLSsequentshavetheform

S;



−→

G,where

S = A

∪ {

l1

:

τ

1

,

. . . ,

ln

:

τ

n

}

,with

{

l1

,

. . . ,

ln

}

adisjointsetof

subex-ponentialvariablesand

A

= {

a

: {

a

}

i

|

a

A

}

.Formally,onlythesesubexponentialconstantsandvariablesmayappearfree

inanindexofsubexponentialbangsandquestionmarks.

Let S

= {

l

| (

l

:

τ

)

S}

.Thesequentpre-order



S isdefinedin S asthetransitiveandreflexiveclosureoftheset:

 ∪ {(

l

,

), (⊥,

l

)

|

l

S

}

∪ {(

l

,

s

)

| (

l

: {

s1

, . . . ,

sn

}), (

s

:

τ)

S

,

and

(

sj

,

s

)

for some 1

j

n

}

∪ {(

l

,

s1

), (

s2

,

l

)

| (

l

: {

s1

/

s2

}) ∈

S

}

Observethat

⊥,



remaintheminimumandmaximumelementswrt



S.

The grammar ofthe formulas of SELLS extends the formulas of SELLS by adding the subexponential quantifiers as follows:

F

::=

0

|

1

|  |

A

| · · · | !

sF

|

?sF

| 

l

:

τ

.

F

| 

l

:

τ

.

F

Theintroductionrulesforthesubexponentialquantifierslooksimilartothoseintroducingthefirst-orderquantifiers,but insteadofmanipulatingthecontext

L

,theymanipulatethecontext

S

:

S

; ,

F

[

s

/

l

] −→

G

S

; , 

l

: {

s1

, . . . ,

sn

}

i

.

F

−→

G



L1

(

1

)

S

; ,

F

[

s

/

l

] −→

G

S

; , 

l

: {

s1

/

s2

}

i

.

F

−→

G



L2

(

2

)

S

;  −→

G

[

s

/

l

]

S

;  −→ 

l

: {

s1

, . . . ,

sn

}

i

.

G



R1

(

1

)

S

;  −→

G

[

s

/

l

]

S

;  −→ 

l

: {

s1

/

s2

}

i

.

G



R2

(

2

)

S

,

le

:

τ

; ,

F

[

le

/

l

] −→

G

S

; , 

l

:

τ

.

F

−→

G



L

(

3

)

S

,

le

:

τ

;  −→

G

[

le

/

l

]

S

;  −→ 

l

:

τ

.

G



R

(

3

)

Inrules



L

,



R,le isfresh,i.e.,itdoesnotoccurin

S

.Thesideconditionsaredefinedasfollows

(



1) s

:

τ

S

issuchthats



Ssjforall1

j

n andifi

=

b thens isboundedotherwiseitisunbounded;

(



2) s

:

τ

S

issuchthats1



Ss



Ss2andifi

=

b thens isboundedotherwiseitisunbounded;

(



3) provided the relation



S is a pre-order, upward closed with respect to the set US, where

S



=

S ∪ {

le

:

τ

}

and US

= {

s

| (

s

: {

τ

}

u

)

S



}

.

Inordertocompletetheposetw.r.t.the

×

-operator,wedefinethe

×

operatorusingthepre-order



S foragivenset

oftypedsubexponentials

S

,as:

s1

×

s2

=

s1

×

s2 if

{

s1

,

s2

} ⊆

A

;

glb

(

s1

,

s2

)

if

{

s1

,

s2

} 

A and if glb

(

s1

,

s2

)

exists in



S

;

if

{

s1

,

s2

} 

A and if glb

(

s1

,

s2

)

does not exist in



S

.

Observethat, duetothe definitionof



S,

is

×

-absorbing and



is theneutralelement of

×

. Moreover,itis trivialto

check that

×

is associative, commutative, monotone andintensive. Hence,

S

,



S

,

×

is a

×

-poset, calledthe underlying

(6)

Theordering



S isusedintheright-introductionofbangsandtheleft-introductionofquestion-marksinasimilarway asbeforeinSELLS:

S

; !

s1F 1

, . . . ,

!

snFn

−→

G

S

; !

s1F 1

, . . . ,

!

snFn

−→ !

sG

!

s R

,

s



Ss1

× · · · ×

sn

S

; !

s1F 1

, . . .

!

snFn

,

P

−→

?sn+1G

S

; !

s1F 1

, . . . ,

!

snFn

,

?sP

−→

?sn+1G ?sL

,

s



Ss1

× · · · ×

sn

×

sn+1 2.3. Cut-elimination

ForprovingthatSELLSadmitsthecutrule,westartbystatingthestraightforwardresultofadmissibilityofweakening forunboundedsubexponentials.

Lemma 2.1 (Weakening).Letu beanunboundedsubexponential.Ifthesequent

S;



−→

C isprovableinSELLSthen

S;

,

!

uF

−→

C isprovableinSELLS.

Itiswellknownthatcut-eliminationholdsforSELL[4].AnimportantobservationforguaranteeingthatSELLShavethe samepropertyisinorder:whensubstitutinga subexponentialvariablele by asubexponentials of thesametype,allthe

relations andpropertiesvalidforle are“inherited”by s. Thisintuitive ideais formallydescribed inAppendix B,together

withtheproofofthefollowingtheorem.

Theorem 2.2. ThecutrulebelowisadmissibleinSELLS.

S

; 

1

−→

G

S

; 

2

,

G

−→

F

S

; 

1

, 

2

−→

F Cut

3. SELLFS– a focused proof system for SELLS

Focusing is a discipline on proofs [12] first proposed by Andreoli for Linear Logic[13]. Although initially developed forreducing proof search space, focused proof systemshave beensuccessfully usedas logicalframeworks forspecifying deductivesystems,suchasproofsystems[6,14]andprogramminglanguages[5,1,15].Focusingplaysanimportanttechnical role in this paper asit provides the proof theoretic means to establish the adequacy of the logical specification ofour calculus(seeTheorem 4.1).

WeproposetwofocusedproofsystemsforSELLS.Thefirstonedealswiththecasewhentheunderlyingsubexponential

×

-poset

S

,



S

,

×

isidempotentandtheanotherwhen

S

,



S

,

×

isnotidempotent(seeDefinition 2.1).Asweshallsee,

thelatterisageneralizationoftheformeranditiscompletewithrespecttoSELLS.

ThemainchallengehereistohandlethenewexponentialsdescribedinSection2.2,sincetheintroductionrulesforthese connectivesapplyifthesequentcontextsatisfiesspecificconditions.Itisnotatallobvious,forexample,howtohandlethe structuralruleswhilefocusingon abangedformulaontheright. Infact,givenanon-idempotentsignature

A

,

,

U

and a

U ,thesequent

!

ac

,

!

ac

−→ !

ac isprovablebut, inanyminimal proof

π

forthissequent,thelast ruleappliedin

π

has necessarily tobeweakening(W )sincea



a

×

a.Thismeansthatafocusedversionoftherule

!

sR hastotakeintoaccount

notonlythesubexponentialsappearinginthecontext,butalsotheirmultiplicities.

Hence, although the approach we use is similar to the one presented in [12], that is,define first dyadic versions of SELLS andthen introduce thefocused proof systems, we need an extra care onhandling weakening andfocusing. We leavethetechnicaldetailstoAppendix A.

3.1. ThedyadicsystemSELLSd

ThedyadicsystemSELLSdisgiveninFig. 3withtheexceptionoftherightbangandleftquestionmarkintroductionrules andthe rules introducing thesubexponentialquantifiers, which willbe introduced later. Its sequentshavethe following form1:

S

;

K

:

L

:  −→

C

LetUS

= {

s

|

s

:

τ

u

S}

be thesetofunbounded subexponentialsin

S

and IS

= {

s

|

s

:

τ

i

S,

i

∈ {

u

,

b

}}

bethe setofall

subexponential in

S

. In the sequent above,



is a multiset of linear logic formulas, C is a linear logic formula,

K

is a

1 Insteadofusingasinglecontextforbothboundedandunboundedsubexponentials,weusetwocontexts,oneforunboundedandanotherforbounded.

(7)

K : L :  −→A I,provided{A} =L  or AKand(L  ) = ∅ K : L : ,F,G−→H K : L : ,FG−→HL K : L1: 1−→F K : L2: 2−→G K : L1⊗L2: 1, 2−→FGR K : L : ,Fi−→H K : L : ,F1& F2−→H &Li K : L :  −→ F K : L :  −→G K : L :  −→F & G &R K : L1: 1−→F K : L2: 2,G−→H K : L1⊗L2: 1, 2,FG−→H  L K : L : , F−→G K : L :  −→FG R K : L : ,F−→H K : L : ,G−→H K : L : ,FG−→HL K : L :  −→Fi K : L :  −→F1⊕F2 ⊕Ri K : L : ,0−→H 0L K : L :  −→H K : L : ,1−→H 1L K : L : · −→1 1R,provided,L = ∅ K : L :  −→  R K : L : , F[e/x] −→H K : L : ,∃x.F−→HL K : L :  −→F[t/x] K : L :  −→ ∃x.FR K : L : ,F[t/x] −→H K : L : ,∀x.F−→HL K : L :  −→F[e/x] K : L :  −→ ∀x.FR K +uF:L :  −→H K : L : ,!uF−→H !L1 K : L +bF:  −→H K : L : ,!bF−→H !L2 K +uF:L : ,F−→H K +uF:L :  −→H DL1 K : L : , F−→H K : L +bF:  −→H DL2

Fig. 3. Fragmentofthedyadicsystemwithoutthecut-ruleandtherightintroductionrulesforthebang.HereuU isanunboundedsubexponentialand

bI\U isaboundedsubexp.

function fromUS to sets oflinearlogic formulas,and

L

isa function from IS

\

US to multisets oflinear logicformulas. We call

K

theunboundedcontextand

L

thelinearone.Intuitively,

K[

u

]

= {

F1

,

. . . ,

Fn

}

and

L[

b

]

= {

F1

,

. . . ,

Fn

}

shouldbe

interpretedas

!

sF1

,

. . . ,

!

sFn,fors

=

u ors

=

b,respectively.Wewillnormallyelidethetypingcontext

S

wheneveritisnot

important.

In ordertointroduce theproof systemforSELLSd,we needsome operationsoncontexts. Here

B

isa setofbounded subexponentials,

U

asetofunboundedsubexponentials:

L

[

B

] =



b∈B

L

[

b

]

K

[

U

] =



u∈U

K

[

u

]

(

L

+

bF

)

[

b

] =



L

[

b

]  {

F

}

if b

=

b

L

[

b

]

otherwise

(

K

+

uF

)

[

u

] =



K

[

u

] ∪ {

F

}

if u

=

u

K

[

u

]

otherwise

(

L

1

L

2

)

[

b

] =

L

1

[

b

] 

L

2

[

b

]

for all b

I

\

U

Wewillsometimesabuseofthenotationandwrite

L

for

L[

IS

\

US

]

and

K

for

K[

US

]

foragiventypingcontext

S

. Notice that thedyadic systemdoesnot contain explicit contractionnor weakening rules.These are incorporated into the introductionrules. Forexample,inthe

R and



L rules,the unboundedcontext,

K

,iscopied amongthepremises,

while theboundedcontextis splitamongthem.Since unboundedformulasare allowed tocontractandalsoweaken, we donotloseprovabilityby doingso.Ontheotherhand,theinitialrule,1R and

!

R rulesincorporatetheweakeningrule.In

particular,formulasintheunboundedcontextareweakened.

Thenoveltyisontherightintroductionruleforbang.Letusfirstdefinethefollowingtwooperationsoncontexts:

(

K

u

)

[

u

] =



K

[

u

]

if u

u

otherwise

(

K

[

S

]) =

u∈Sun

,

where n

= |

K

[

u

]|

(

L

[

S

]) =

b∈Sbn

,

where n

= |

L

[

b

]|

(8)

Heresn denotes s

× · · · ×

s n times

.Forexample,if

K[

s1]

= {

F1

,

F2}and

K[

s2]

= {

G1

,

G2

,

G3},then

(K[{

s1

,

s2}])

=

s1

×

s1

×

s2

×

s2

×

s2.Wewrite

(K)

and

(L)

for

(K[

U

])

and

(L[

I

\

U

])

,respectively.

Thedyadicproofsystemwillhavethecorrespondingpromotionrule,

!

sR and

!

sRS,dependingonwhethertheunderlying

×

-posetisidempotentornot.

Idempotent

×

-poset

S

;

K

s

:

L

: · −→

F

S

;

K

:

L

: · −→ !

sF

!

s

R

,

provided

L

[

s

] = ∅

for all s



Ss

S

;

K

s

:

L

:

F

−→

?s



H

S

;

K

:

L

:

?sF

−→

?sH ? s

L

,

provided

L

[

s

] = ∅

for all s



Ssand s



Ss

Non-idempotent

×

-poset

S

;

K



:

L

: · −→

F

S

;

K

:

L

: · −→ !

sF

!

sRS

,

provided

K



K

and s



S

(

K



)

×

(

L

)

S

;

K



:

L

:

F

−→

?sH

S

;

K

:

L

:

?sF

−→

?sH ? s LS

,

provided

K



K

and s



S

(

K



)

×

(

L

)

×

s

There isan important differenceon proof search betweentheserules. Thefirst pairof rules, ?s

L

,

!

sR,has a don’tcare non-determinism:onesimplyweakensallformulasthataremarkedwithsubexponentialssmallerthans.Thesecondpairof rules,?sLS

,

!

sRS,hasa don’tknownon-determinism:one needstochoosesubsetsofformulasinthecontext

K

obtaining

K



suchthatitsside-conditionissatisfied.

One commentisin order:if sj

×

sk

=

glb

(

sj

,

sk

)

forall sj

,

sk,then thesignature isan idempotent

×

-poset.Thus, the

conditions



Ss1

×. . . ×

snisequivalenttotheconditions



Ssiforalli

1

..

n.Therefore,thetworulesaboveareequivalent

inthiscase.

Weshall thencall SELLS the systemwiththe rules

!

sRS and?sLS,understanding thatthey are moregeneralthan

!

sR

and?sL.The presentationofboth pairs ofrules hasproof-theoreticalpurposes only, andcould serveasinspiration fora

moreefficientimplementation.

Finally,by addingthe rules forsubexponentialquantifiers, we obtain SELLSd,a dyadic systemforSELLS. Belowwe

showonlysomeoftheserules:

S

;

K

:

L

: ,

F

[

s

/

l

] −→

G

S

;

K

:

L

: , 

l

: {

s1

, . . . ,

sn

}

i

.

F

−→

G



L1

(

1

)

S

,

le

:

τ

;

S

;

K

:

L

:  −→

G

[

le

/

l

]

S

;

K

:

L

:  −→ 

l

:

τ.

G



R

(

3

)

Theotherrulesandtheconditions

(

1

),

(

3

)

aresimilartotheonesshowninSection2.2.

ItisnothardtoprovethesoundnessandcompletenessofSELLSdwithrespecttoSELLS(seedetailsinAppendix A).

Theorem 3.1. SELLSdissoundandcompletewithrespecttoSELLS.

3.2. ThefocusedsystemSELLFS

Thefocusedproof systemwithoutthepromotion rulesandtherulesforthesubexponentialquantifiers aredepictedin

Fig. 4.ThepromotionrulesforSELLFSareshownbelow:

Idempotent

×

-poset

S

;

K

s

:

L

: · −→

F

S

;

K

:

L

: ·−

!sF

!

s

R

,

provided

L

[

s

] = ∅

for all s



Ss

S

;

K

s

:

L

:

F

−→ [

?sH

]

S

;

K

:

L

: ·

?sF

−−→ [

?sH

]

? s

(9)

NegativePhase [K : L : ],  −→  R [K : L : ], , F,G−→ R [K : L : ], ,FG−→ RL [K : L : ], , F−→G [K : L : ],  −→FG R [K : L : ],  −→G[e/x] [K : L : ],  −→ ∀x.GR [K : L : ], ,G[xe/x] −→ R [K : L : ], , ∃x.G−→ RL [K : L : ],  −→ R [K : L : ], ,1−→ R 1L [K : L : ], ,0−→ R 0L [K : L : ],  −→F [K : L : ],  −→G [K : L : ],  −→F & G &R [K : L : ], ,F−→ R [K : L : ], ,H−→ R [K : L : ], ,FH−→ RL [K : L +bF: ],  −→ R [K : L : ], , !bF−→ R ! b L, b/U [K + uF: L : ],  −→ R [K : L : ], , !uF−→ R ! u L, uU PositivePhase [K : L1: 1]−F→ [K : L2: 2]−G[K : L1⊗ L2: 1, 2]−FG→ ⊗ R [K : L1: 1]−F→ [K : L2: 2]−→ [H G] [K : L1⊗ L2: 1, 2]−−−−→ [FH G] L [K : L : ]−Gi[K : L : ]−G1⊕G2→ ⊕Ri [K : L : ] Fi −−→ [G] [K : L : ]−−−−−→ [F1&F2 G] &Li [K : L : ]−1→ 1R,provided,L= ∅ [K : L : ]−G[t/x]→ [K : L : ]−x.G→ ∃R [K : L : ] F[t/x] −−−−→ [G] [K : L : ]−−−→ [x.F G] ∀L [K : L : ]−AIR, provided{A} = L  or A∈ Kand(L ) = ∅ StructuralRules [K : ,Na],  −→ R [K : ], ,Na−→ R []L [K : ],  −→ [Pa] [K : ],  −→Pa []R [K : ],Pa−→ [F] [K : ] Pa −−→ [F] RL [K : ] −→N [K : ]−NRR [K : L : ],  −→ [?bH] [K : L : ],  −→?bH [] ? R [K : L : ] F −→ [G] [K : L : ,F] −→ [G] DL1 [K : L : ]−G[K : L : ] −→ [G] DR [K +uNA: L : ]−−→ [NA G] [K +uNA: L : ] −→ [G] DL2 [K : L : ] NA −−→ [G] [K : L +bNA: ] −→ [G] DL3

Fig. 4. FocusedProofSystemforIntuitionisticLinear LogicwithSubexponentials(SELLFS).Here,R standsforeitherabracketedcontext,[F],oran unbracketedcontext.A isanatomicformula;Paisapositiveoratomicformula;N isanegativeformula;NA isanon-atomicformula;andNaisanegative

oratomicformula. Non-idempotent

×

-poset

S

;

K



:

L

: · −→

F

S

;

K

:

L

: ·−

!sF

→ !

s RS

,

provided

K



K

and s



S

(

K



)

×

(

L

)

S

;

K



:

L

:

F

−→ [

?sH

]

S

;

K

:

L

: ·

−−→ [

?sF ?sH

]

? s LS

,

provided

K



K

and s



S

(

K



)

×

(

L

)

×

s

Again,weonlyconsider

!

sRS and?sLSaspartofoursystem.

Inordertointroducetheproofsystem,weneedsomemoreterminology.Weclassifyasnegative allformulaswhosemain connectiveis&

,

,

∀,

?sandtheunit



,andclassifytheremainingformulas(bothnon-atomicandatomic)aspositive. Sim-ilarly, positive rulesare thosethatintroducepositiveformulastotheright-hand-sideofsequentsandnegative formulasto theleft-hand-sideofsequents,e.g.,

R

,



L.Negative rulesarethosethatintroducenegativeformulastotheright-hand-side

ofsequentsandpositiveformulastotheleft-hand-sideofsequents,e.g.,

R

,

L.

Thisdistinction betweenpositive andnegative phasesisnaturalasall negativerules areinvertiblerules, thatis, prov-ability isnot affectedwhen applyingsuch arule (looking bottom-up).Forexample,therule &R belongsto thenegative

phaseasprovabilityisnotlostwhenapplyingthisrule.Apositiverule,ontheotherhand,isnon-invertibleingeneraland thereforeprovabilitymaybelost.Forexample,therule

R belongstothe positivephasebecauseprovabilitydependson

howthelinearformulasin

L

1

L

2andin



1

,



2 aresplitamongthepremises. SELLFShasfourkindsofsequents.

• [

K : L

: ],



−→

R

isanunfocusedsequent,where

R

iseitherabracketedformula

[

F

]

oranunbracketed one.Here

(10)

• [

K : L

: ]

−→ [

F

]

isasequentrepresentingtheendofthenegativephase.

• [

K : L

: ]−

F

isasequentfocusedontheright.

• [

K : L

: ]

−→ [

F

H

]

isasequentfocusedontheleft.

As onecan seefrominspecting theproof systeminFig. 4,proofsare composedoftwo alternating phases:a negative phase,containing sequentofthefirstformaboveandwhereallthenegative non-atomicformulasto therightandallthe positive non-atomicformulas tothe left are introduced.Atomic orpositive formulas tothe rightandatomicornegative formulastotheleftarebracketedbythe

[]

L and

[]

R rules,whileformulaswhosemainconnectiveisa

!

s areaddedtothe

indexedcontext

K

byrule

!

sL.Thesecondtypeofsequentabovemarkstheendofthenegativephase.Apositivephase starts

byusingthedeciderulestofocuseitheronaformulaontherightorontheleft,resultingonthethirdandfourthsequents above.Thenoneintroducesallthepositiveformulastotherightandthenegativeformulastotheleft,untiloneisfocused eitheronanegative formulaontherightorapositiveformulaontheleft.Thispointmarkstheendofthepositivephase byusingthe RL andRR rulesandstartinganothernegativephase.

Alsotherulesofthesubexponentialquantifiershavethesamebehaviorofastheusualfirst-orderquantifier,thatis,



R

and



L belongtothenegativephase,whiletheremainingrulestothepositivephase.Weshowsomeoftheserules:

S

; [

K

:

L

: ]

−−−→ [

F[s/l] G

]

S

; [

K

:

L

: ]

−−−−−−−−−→ [

l:{s1,...,sn}i.F G

]



L1

(

1

)

S

,

le

:

τ

;

S

; [

K

:

L

: ],  −→

G

[

le

/

l

]

S

; [

K

:

L

: ],  −→ 

l

:

τ

.

G



R

(

3

)

GiventhedyadicsystemSELLSdandTheorem 3.1,thecompletenessproofforSELLFSfollowsthesamelinesasinthe completenessproofgivenin[16].

Theorem 3.2. SELLFSissoundandcompletewithrespecttoSELLS. 4. Modalities in concurrent constraint programming

ConcurrentConstraint Programming (CCP)[2](see a survey in[17]) isa modelfor concurrency(see e.g., [18]) where processes interact with each other by telling andasking constraints (piecesof information) ina common store ofpartial information.CCPcombines thetraditionaloperationalview ofprocess calculiwithadeclarative view basedonlogic. This salientfeaturehasdistinguished CCP fromother modelsofconcurrency fromitsinception: processescanbe seen,atthe sametime,ascomputingagentsandasformulasinagivenlogic.ThisallowsCCPtobenefitfromthelargesetofreasoning techniquesofbothprocesscalculiandlogic.Inthissection,weshowthatSELLSprovidestheproof-theoreticalfoundations for differentCCP-based languages.Hence, SELLS can be regarded as a uniform underlying logicalframework to reason aboutCCPcalculi.Moreinterestingly,weputinthehandsofCCPprogrammersandmodelersnewprogrammingconstructs inspired inSELLS underlying theory.Ourextensionsto thelanguage thusadheres toits original conception:amodel of concurrencywherelogicandbehavioraltechniquescoexistcoherently.

WestartwiththedefinitionofConstraintSystemthatmakesCCP calculiparametricandhence,versatiletobeusedin differentcontexts.FollowingthedevelopmentsofSELL,weshowhowdifferentmodalitiesintheconstraintsystemcanbe integratedina coherentway.Next,weintroduce thelanguage ofprocessesandwe provideseveralexamplesofthe new featuresavailableintheproposedextensionsofCCP.Finally,weshowthatbothconstraintsandprocessescanbeinterpreted asformulasinSELLSwhereoperationalstepshaveaone-to-onecorrespondencewith(focused)proofsinSELLFS. 4.1. Subexponentialconstraintsystem

ThetypeofconstraintsinCCPisnotfixedbutparametricinaconstraintsystem(CS).Intuitively,aCSprovidesasignature fromwhichconstraintscan bebuiltfrombasictokens (e.g.,predicatesymbols),andtwo basicoperations:conjunctionto addnewinformationandvariablehidingtodefinelocalvariables.TheCSdefinesalsoanentailment relation(



)specifying inter-dependenciesbetweenconstraints:c



d meansthattheinformationd canbededucedfromtheinformationc.Such systemscanbe formalized asa Scottinformationsystemasin[2],ortheycan bebuiltupon asuitable fragmentoflogic e.g.,asin[10,19].Forinstance,thefinitedomainconstraintsystem(FD)[20]assumesvariablestorangeoverfinitedomains and,inaddition toequality,onemayhavepredicatesthatrestrict thepossiblevaluesofavariabletosome finiteset,e.g. x

<

42.TheHerbrandconstraintsystem[21]consistsofafirst-orderlanguagewithequality.Theentailmentrelationisthe oneweexpectfromequality,e.g., f

(

x

,

y

)

=

f

(

g

(

a

),

z

)

mustentailx

=

g

(

a

)

and y

=

z.

Hereweshallconsiderageneralnotionofconstraintsystemthat allowsustocapturedeclarativelydifferentbehaviors andmodalities in CCP. Forinstance, the constraintsystem will allow usto confine information to a givenlocation or to marksomeinformationwithagivenpreference.Locationscanbethoughtofasspaces,distributedagentsoreventemporal modalities.Asforpreferences,wecaninterpretsuchmodalitiesasprobabilities,fuzzyinformation,costs,etc.

(11)

Locations ForthespatialinformationweshallneedaposetS withtypicalelementss

,

s

,

si

,

. . .

.Locationscanbeunrelated

oritispossibletodefinesystemswheretwospacess andsbelongtoahierarchywheres hastherighttoexport (orshare) informationto siftherelations



s holdsin S.Some locationsare resourceaware,i.e., agentscan consumeinformation fromthemwhilesomeothersareunbounded,i.e.,informationispersistentonthemandtheybelongtothesubset SU ofS.

As neededby thesubexponentialstructureinSELLS,thepartialorder



isassumedtobe upwardlyclosedwithrespect to SU,i.e.,ifs

SU ands



s,thens

SU.

Foramoreinterestingexample,considerasetofagents

A

= {a

1

,

. . . ,

a

n

}

andagivenposet S asabove.Wecandefine a newposet S

(A)

where sa

i



sai iffs





s in S.Thatis, S

(A)

isa disjointcopyofthe structure S foreach agent in

A.

Hence, sa canbeinterpretedasthespatiallocations pertainingtotheagent

a

whichisunrelatedtoanyotherlocationof adifferentagent

b.

Preferences Itiswell knownthatcrisp(hard)constraintsfail torepresentaccuratelysituationswheresoftconstraints,i.e., preferences, probabilities, uncertaintyor fuzziness,are present. In constraintprogramming[22],two general frameworks have been proposed to deal withsoft constraints: semiring based constraints [23] and valued constraints [24]. Roughly speaking,inbothframeworksanalgebraicstructuredefinestheoperationsneededtocombine softconstraintsandchoosing whenaconstraint(orsolution)isbetter thananother.In[25],itisshownthatbothframeworksareequallyexpressiveand they are generalenough to represent differentkinds of softconstraints including, e.g., fuzzy,probabilistic andweighted constraints.Hence,weshallusec-semiringbasedconstraintsinordertointegratepreferencesintotheconstraintsystem.

Recallthatac-semiringisatuple

A,

+,

×,

⊥,



satisfyingthepropertiesinExample 2.2(seeSection2.1).Elementsin theset

A

(c-semiringvalues)areusedtodenotetheupperboundofpreferencedegrees,orsimplypreferencelevel,wherethe “preference”couldbeaprobability,cost,etc.The

×

operatorisusedtocombinevalueswhile

+

isusedtoselectwhichis the“best”valueinthesensethata

+

a

=

aiffa

Aaiffa is“better”thana.

Instancesofc-semirings Thec-semiringSc

= {true,

false

},

∨,

∧,

false

,

true

modelscrispconstraints.The fuzzy c-semiring SF

= [

0

,

1

],

max

,

min

,

0

,

1

allows forfuzzyconstraints that have an associate preferencelevel in the realinterval

[

0

,

1

]

where 1representsthebestvalue. Ina probabilistic setting[26],aconstraintc isannotatedwithits probabilityof exis-tencewhereprobabilitiesaresupposedtobeindependent(i.e.,noconditionalprobabilities).Thiscanbemodeledwiththe c-semiring SP

= [

0

,

1

],

max

,

×,

0

,

1

. In weighted constraintsthereisan accumulatecost thatcanbe computedwiththe

c-semiring Sw

=

R

,

max

,

+,

−∞,

0

,where0 meansnocost.

Now we are readytoformally introduce ourconstraintsystemwithspatial andpreferencesmodalities.The definition belowisbasedontheideaofconstraintsystemsasafragmentofintuitionisticlinearlogicin[10].Infact,formodelingthe modalities,weshalluse(afragmentof)SELLSasin[1].

Definition 4.1 (Modalconstraintsystem). Amodal constraintsystem(mcs for short) isa tuple (S

,

A,

C,



) where S is a

posetdefiningspatial modalities,

A

isac-semiringwithonlyunboundedelements,

C

isasetofformulas(constraints)built fromafirst-ordersignatureandthegrammar

PC

:=

1

|

A

|

PC

PC

pre-constraints

C

:=

PC

|

C

C

| ∃

x

.

C

| (|

PC

|)

a

| [

C

]

ss

constraints

where A isanatomicformula,a

A

,s

,

s

S ands



s.Weshallusec

,

c

,

d

,

d,etc.,todenoteelementsof

C

.Moreover,let



beasetofnon-logicalaxiomsoftheform

x

[

c

−◦

c

]

whereallfreevariablesinc andcareinx.Wesaythatd entails d, writtenasd



d,iffthesequent

C[

[]

],

C[

[

d

]

] −→

C[

[

d

]

]

isprovableinSELLS(

C[

[·]

]

andtheSELLSsignature



arelater

introducedinDefinition 4.7).Weshallomitthe“



”in



 whenitisunimportantoritcanbeinferredfromthecontext.

Letusgivesomeintuition.Pre-constraints(PC)arejustatomsorconjunctionsofatoms.Theconstraint1 correspondsto theemptystore,i.e.,theinitialstateofcomputation.Theconnective

inC

C allowsprocessestoaddmoreinformation tothestore.Theexistentialquantifierhidesvariablesfromconstraints.Theconstraint

(

|

PC

|

)

ameansthatthepre-constraint PC was added to the store with an upper bound preference degree a

A

. Finally, the constraint

[

c

]

ss means that the

informationc islocated andconfined tothespace-locations.Moreover, suchinformationcanbeexported (ormoved)until theinner(or weaker)locations



s.Weshallwrite

[

c

]

sinsteadof

[

c

]

ss.

As we shallsee later, constraints ofthe form

(

|

PC

|

)

s (resp.

[

c

]

ss) are justformulas ofthe shape

!

a

(

F

)

(resp.

!

s?s 

F ) in SELLS,wherea isan unboundedsubexponential(seetheencoding inDefinition 4.7).Forthemoment,we shallcontinue usingthenotationinDefinition 4.1 whichissimplerandmoreintuitivefromaprogramminglanguageperspective.

Letusshowsomeinterestingpropertiesofconstraintsina mcs.

Proposition 4.1 (Propertiesof mcs).Let

(

S

,

A,

C,



)bea mcs andassumeanon-logicalaxiomin



oftheformc

d

−→

0 (0 is

theILLunitydenotingfalsity).Then,

– Falseconfinement.Lets

,

s

S betwodifferentandpossiblyrelatedlocations: 1.

[

0

]

s





[

c

]

s(anyc canbededucedinthespaces ifitslocalstoreisinconsistent);

Referências

Documentos relacionados

Tendo em vista ser a adolescência um período de importantes alterações ligadas ao desenvolvimento biopsicosocial, as(os) jovens dessa faixa etária devem ser incluídas(os) em

Existem três subespécies que ocupam grande parte da região Neotropical, ocorrendo do sul do México à Nicarágua (T. Embora o gênero tenha origem antiga, ca. 17 milhões de

A droga vegetal foi submetida a ensaios físicos (índice de intumescência, substâncias extraíveis por álcool e determinação de umidade) e químicos (prospecção

Basta utilizar o lema anterior (4.6.3): dados dois pontos em X a distˆ ancia entre eles ´ e a mesma que a distˆ ancia entre os que lhes correspondem no semi-eixo positivo dos yy, o

Foi realizada uma pesquisa bibliográfica sobre empreendedorismo social, negócios sociais na Engenharia Civil e o mercado de cálculo estrutural para obras de

Na segunda etapa trabalhou-se com soluções de corantes, materiais sorventes e método para determinação quantitativa dos corantes (espectrofotômetro UV –

Doutor e Mestre em Ciência Animal pela Uni- versidade Federal do Piauí (UFPI) com ênfase em Exigências Nutricionais e Produção de Ani- mais Ruminantes.. Atualmente é docente em