• Nenhum resultado encontrado

An exercise on the generation of many-valued dynamic logics Programming Journal of Logical and Algebraic Methods in

N/A
N/A
Protected

Academic year: 2023

Share "An exercise on the generation of many-valued dynamic logics Programming Journal of Logical and Algebraic Methods in"

Copied!
27
0
0

Texto

(1)

Contents lists available atScienceDirect

Journal of Logical and Algebraic Methods in Programming

www.elsevier.com/locate/jlamp

An exercise on the generation of many-valued dynamic logics

Alexandre Madeira

a,

, Renato Neves

a

, Manuel A. Martins

b

aINESCTEC(HASLab)&MinhoUniversity,Portugal

bCIDMADep.ofMathematics,AveiroUniversity,Portugal

a r t i c l e i n f o a b s t r a c t

Articlehistory:

Received7July2015

Receivedinrevisedform24March2016 Accepted30March2016

Availableonlinexxxx Keywords:

Dynamiclogic Many-valuedlogic Kleenealgebra Actionlattice

In the last decades, dynamic logics have been used in different domains as a suitable formalism to reason about and specify a wide range of systems. On the other hand, logics withmany-valuedsemantics areemergingas aninterestingtooltohandle devices and scenarioswhere uncertaintyis aprime concern. This paper contributestowards the combinationofthesetwoaspectsthroughthedevelopmentofamethodforthesystematic construction of many-valued dynamic logics. Technically, the method is parameterised by an action lattice that defines both the computational paradigm and the truth space (correspondingtotheunderlyingKleenealgebraandresiduatedlattices,respectively).

©2016ElsevierInc.All rights reserved.

1. Introduction

1.1. Context

Propositions,capturingstatic propertiesof programstates,and events,oractions, standingfor statetransitions, arethe keyingredientsinmodellingandanalysingaboutstate-basedsoftware systems.Programsaretypicallycombinedthrougha Kleenealgebratoexpresssequential,nondeterministic, iterativebehaviours, whilepropositions bringto thescenealogical structure.

Dynamic logic [17], a generalisation of the logic of Floyd–Hoare, is a well known and particularly powerful way of combiningthesetwo dimensionsintoaformalframeworktoreasonaboutcomputationalsystems.Itspotentialstemsfrom blendingtogetherclassicallogic,enrichedwithamodaldimensiontoexpress system’sdynamics,anda(Kleene)algebraof actionstostructureprograms.

Over time dynamic logic grew to an entire family of logics increasingly popular in the verification of computational systems, and able to evolve and adapt to new, and complex validation challenges. One could mention its role in model validation(as ine.g.[26]),orthewhole familyofvariantstailored tospecificprogramminglanguages(as ine.g. [32,2]),or itsimportantextensionstonewcomputingdomains,namelyprobabilistic[20]orcontinuous[38,39].

The latter is particularly relevant from an Engineering point of view: Actually, Platzer’s hybrid dynamic logic, and its associated tool, KeYmaera, combiningan algebraofactions basedon realnumbersassignments, withthestandard Kleene operators and differentialequationstospecify continuous transitionsfrom the“real”(physical)world, providesapowerful frameworkwithincreasedindustrialrelevanceforthedesignandvalidationofhybridsystems.

If hybrid systems entail the need to handle continuous state spaces, in a number of other cases dealing with some form of “quantitative” transitions (weighted, costed, probabilistic, certainty degrees etc.) is also a must. This motivates

*

Correspondingauthor.

E-mailaddresses:[email protected](A. Madeira),[email protected](R. Neves),[email protected](M.A. Martins).

http://dx.doi.org/10.1016/j.jlamp.2016.03.004 2352-2208/©2016ElsevierInc.All rights reserved.

(2)

research to define dynamic logics over structures able to model weighted computations. On the logical side, expressing the validity of a formula through a Boolean outcome can be also bequite restrictivewhen dealing with complex, often unpredictable,systems. Thismotivatestheadoptionoflogicswithmany-valuedsemantics,e.g.fuzzy [15],probabilistic[33]

orweighted[10].

Insuchacontext, thiswork attemptstocombinedynamic logicandmany-valuedsemantics to capturesmoothly these kind ofphenomena. The firststeps in thisdirection appeared in aprevious conferencepaper [29] wherea generic, para- metric, methodtoconstruct(propositional) many-valueddynamiclogics was discussed.Technically, thedefinitionofthese logics isparameterised by anaction lattice [21]which combinesaKleene algebrawith aresiduatedlattice structure. This algebraicstructurefitswellourgoal.Ontheonehand,asaresiduatedlattice,itprovidesanabstractstructureforthetruth spaces –most of the semantic structuresused as truth spaces, such as Booleanalgebras, Heytingalgebras, MValgebras or Łukasiewiczarithmeticlattices,are residuatedlattices (e.g.,[14,19]).Here,the residuestaketherole oflogicimplication. On theother handasaKleenealgebra,itprovidesanabstract,generic,modelforcomputations(e.g.,probabilistic,weighted,...).

MoreovertheextensionofKleenealgebraswitharesiduatedoperator,providingaleftinversetosequentialcompositionas in [40], as well aswith a lattice structure, leads to afinitely-based equational varietywhich, as plain Kleene algebras, is closedundertheformationofsquarematrices[22].Therelevanceofthisclosurepropertyliesinthefactthatseveralprob- lemsmodelledas(weighted)transitionsystemscanbeformulatedasmatricesoveraKleenealgebraorarelatedstructure.

Following suchatrend, werepresent programs asmatrices supporting theinformationabout their effects when executed fromeachstateinthestatespace.

1.2. Contributions

Thispaperispartofaresearchagendaonasystematicdevelopmentofdynamiclogics.1Inparticular,itextendsprelimi- naryresultsdocumentedin[29]inseveraldirections.Ontheonehand,thescopeoftheparametersisgeneralisedbytaking arbitrary action lattices insteadof just theintegral ones. The expressiveness of the dynamisation process is also strongly enriched, throughthe considerationof negations,[_]-modalitiesand tests. On theother hand, wetook thechallenge here tocharacterise,insome sense,“howdynamicdynamisationsare?”.The issueisaddressedthroughanexercise: assumingthe axiomatics ofpropositional dynamic logic(PDL) asa reference, wecarry on a systematic study ofthe validityof some of itsparticularfragmentswithrespecttoparticulardynamisation classes.Note, thatthiscriteriaisnot anabsolutereference tojudge whatis,and whatisnot,adynamiclogic.AlthoughPDL isprobablythemostpopular dynamiclogic,othersexist whichdonotsatisfysuchaxiomatics.Suchisthecase,forexample,ofgamelogic[37].

To the best of our knowledge, beyond our preliminary work [29], the approaches reported in [18,25] are the unique references intheliterature addressingmany-valueddynamic logic.Inthefirst paperJ. Hughes etal.introduced aproposi- tionaldynamiclogicoverthecontinuumtruth(0,1)-latticewiththestandardfuzzyresidues(actually theones adoptedin Example 4). In particular, this logiccan be achieved byweakening aspecific instance built with the general construction introducedinthepresentpaper.However,fromtheperspectiveofdynamiclogic,thisformalismisquiterestrictive,sinceit leftsbehindbothtransitiveclosureandnon-deterministic choice.

Inthecontextofrationaldecisiontheory,C.Liau[25]introducedamany-valueddynamiclogicw.r.t. thespecificcontin- uumtruth(0,1)-lattice.Admittingsome levelofparametricityon theimplicationadopted(throughanotionofimplication function,ofwhich theimplicationsofŁukasiewicz andGödel areexamples),thesemantics of[_]-modalitiesbecomesquite different fromwhat weget.By thisreason, differentlyfrom whathappens withthe oneintroduced in[18], thislogiccan notbecaptured withourgenericformalism.

More extensive work exist in the related field of many-valued modal logics. Two approaches are usually considered.

The first one is clearly conservative, in the sense that the many-valued semantics only affects the modal valuation of propositions. In thiscase the accessibilityrelations are crispy (classic). The second one, closerto our own, considers that accessibility relationscan themselvesbemany-valued. Thisapproach was introduced byM. Fitting in[11,12], withmany- valuenessevaluatedinfiniteHeyting algebras.LateritwasdeeplyinvestigatedbyF. Bouetal.in[6],whoadoptedthemore generic truth support of finite integral commutative residuated lattices. A middle-term between crispy and many-valued accessibilityrelations,appearsinsomeworks(e.g.[5,31])throughmulti-modalities:for thecaseswherethetruthlattice is achain,anymulti-valuedrelationcanbeequivalentlyexpressedusingadecreasingfamilyofcrispymodalrelations,indexed bythesupportoftherespectivelattice.

1.3. AtributetoJoséNunoOliveira

The interplay between logic and computation, lying at the very heart of dynamic logic, is pervasive in the scientific workofJosé NunoOliveira.Fromhisperspective,any computationalphenomenonisanarrowinasuitableuniverse whose source and target are logic expressions. Thus, we find computations typed by invariants, as in a calculus of conductive programs [1], functions, in a calculus of data dependencies used for type checking database operations and query opti- misation [36], or program assertions,in the form of coreflexive relations, as in a Hoare logic like calculus [34] targeting correct-by-constructionprogramdesign,ratherthanverification.

1 http://wiki.di.uminho.pt/twiki/bin/view/Research/Dali/WebHome.

(3)

a+(b+c)=(a+b)+c (1)

a+b=b+a (2)

a+a=a (3)

a+0=0+a=a (4)

a;(b;c)=(a;b);c (5)

a;1=1;a=a (6)

a;(b+c)=(a;b)+(a;c) (7) (a+b);c=(a;c)+(b;c) (8)

a;0=0;a=0 (9)

1+a+(a;a)≤a (10) a;xxa;xx (11)

x;axx;ax (12)

a;xbxab (13)

aba→(b+c) (14)

(xx)=xx (15)

xa→(a;x) (16)

a·(b·c)=(a·bc (17)

a·b=b·a (18)

a·a=a (19)

a+(a·b)=a (20)

a·(a+b)=a (21)

a;(ab)≤b (22)

Fig. 1.Axiomatisation of action lattices (from[21]).

Insuchcalculi,universal coalgebra,thetheoryof functionaldependenciesor (generalised)Hoarelogics, allrenderedin aTarskian, point-freestyle amenableto algebraicmanipulation, play therole oftypesystems whose ruleshelpinreason- ing about computations withoutdiving intotheir semanticintricacies. Moreover, they providethe basisof extended type checkingmechanismstodischarge therelevantproofobligations.

José’sworkexploresthepowerofabstractalgebraicstructuresasawaytopromote calculationinsoftware design.Such structures, ofwhich Kleene algebras are aprime example, endow techniques which have been shown to be amenable to automation.Moreover,theyhavethepower tounifyseeminglydisparatedomainsandtheoriesonce thelatterareencoded intothesameabstractterms.

Webelievethepieceofresearchreportedinthispaper,seekingtoformulate dynamiclogicsforweighted, multi-valued computations,goesinasimilardirection.Inparticular,itmaycontributetosetthecontextforthechallengeJoséidentified inalandmarktutorial[34]:

TheideathattheproposedcalculusbridgesHoarelogicandtypetheoryneedstobebetterexploited,inparticularconcern- ingtheworkbyKozenonsubsumingpropositionalHoarelogicunderKleenealgebrawithtests(ofwhichtherelational calculusisawellknowninstance).

Thegenericnature oftheapproachtaken here,inwhichlogics areparameterised byspecifickindsofactionlattices, as wellasthepossiblerelevanceofourresultstothestudyofweightedtransitionsystems(anotherofJosé’sresearchinterests [35]),arealsoatributetohiswork.Soistheformofthispaper,setasanexercise,which,aswehavelearnedfromJosé, is themosteffectivesource ofallgenerality.

1.4. Outlineofthepaper

Thepaperisorganisedasfollows.Section2,recallswhatanactionlatticeis.Thewholecatalogueoftechnical properties used in the paper are proven. Then, an hierarchy of three classes of action lattices is introduced and characterised in detail. The parametric construction of many-valued dynamic logics is presented in Section 3. Both the generality of the computationalmodelsandsemanticsare illustratedinthissection.Thequestion“howdynamicaredynamisations?”isthen addressed,leadingtoasystematicstudyonthevalidityofPDLfragmentswithrespecttoparticularclassesofactionlattices.

Finally,Section4concludesandenumerateselementsforfuturework.

2. Actionlattices

2.1. Definitionandproperties

Letusstartbyrecallingfrom[21]thefollowingdefinition:

Definition1.Anactionlatticeisatuple A

= (

A

, + , ; ,

0

,

1

, ∗ , → , · )

where A isaset,0 and 1 areconstantsand +,;,∗,→and ·arebinaryoperations in A satisfyingtheaxioms enumerated inFig. 1,wheretherelation≤isinducedby+:abiffa+b=b.

(4)

Note that, by (20) and (21), the natural order ≤ can be equivalently defined by ab iff a·b=a. Observe that by restrictingthedefinitionofAtothestructure(A,+,;,0,1,∗) axiomatisedby(1)–(12)weobtain thedefinitionofaKleene algebra[8,22].Inthecontextofthiswork,thiswillbecalledtheunderlyingKleenealgebra ofA.Moreover, byconsidering structure (A,+,;,0,1,→,∗) axiomatised by (1)–(16)we obtain thedefinition of(left-residuated) actionalgebra[40]. The interestedreader isreferredto [13]for adetaileddiscussionon the relationship betweenKleene algebras,action algebras and actionlattices. Asstatedintheintroduction, thestructure ofanaction latticeisexplored inthispaperalongadouble dimension:asacomputationalmodelandasatruthspace.Theintuitionsforsomeofitsoperationsshallbetakenfromboth oftheseperspectives.Suchisthecaseofoperation+,whichplaystheroleofnon-deterministicchoice,intheinterpretation ofprograms,and oflogicaldisjunction,intheinterpretation ofsentences.However,thereareoperationswhoseintuitionis borrowedfrom just inone ofthese domains.For instance, whileoperations ∗and ; aretaken asiterativeapplication and sequentialcompositionofactions,operations→ and·play theroleoflogicalimplicationandconjunction,respectively.

ThefollowingtheoremestablishesasetofwellknownKleenealgebrapropertiestobeusedinthesequel.

Theorem1.(See[8].) Let(A,+,;,0,1,∗)beaKleenealgebra.Thefollowingpropertieshold:

a

a (23)

a

=

a∗∗ (24)

a

=

a

;

a (25)

1

+

a

;

a

=

a (26)

Anactionlatticeissaidtobecompletewhenanysubsetof Ahasbothasupremumandaninfimumw.r.t.≤.Thegreatest and least elements, when they exist, are denoted in the sequel by ⊤ and, respectively. Note that in any action lattice

⊥=0, sinceforany aA, a+0=a, i.e.,0a. Inthe caseofcompleteaction lattices, theexistence ofgreatestelements isalsoensured. Since+ and· areassociative,wecangeneralise themton-aryoperators,and weresorttonotation! for theiteratedversionofthe(join)operator+,and "fortheiteratedversionofthe(meet) operator

·ofactionlattices. The left associativity of operators + and · is, asusual, assumed. Differentlyfrom the original definition [21], where a pair of residuesisconsidered,wekeeponlytheleftone. Equivalenceab isunderstoodasthevalue(ab);(ba).Notethat, as usual (e.g. [6]), thecomposition ;, rather than meet ·, is taken asconjunction in the definitionof ↔. The reasons for thischoicewillbecomeclearinthediscussionofduality betweenboxand diamondmodalities(subsection3.2.4).Actually, theadjointofimplication→iscomposition; (andnotthejoin ·).Inthecontextofmany-valuedlogics,theconnective;is calledstrong conjunction

As mentionedabove, thisstructure supportsboth thecomputational paradigm (to distinguishbetween e.g. imperative, deterministicornon-deterministic computations,orbetweenplain orweighted transitions)andthetruthspace(tocapture e.g.thestandardBooleanreasoningormorecomplextruthspaces).

ThefollowingLemma providesacatalogueofusefulpropertiesofactionlattices.

Lemma1.LetAbeanactionlattice.

IfAiscompleteandI finite:

x

→ (

#

iI

yi

) =

#

iI

(

x

yi

)

(27)

(

$

iI

xi

) →

y

=

#

iI

(

xi

y

)

(28)

a

· ⊤ =

a

= ⊤ ·

a (29)

(

a

→ ⊤ ) = ⊤

(30)

ThefollowingpropertiesholdinanyactionlatticeA:

xya;xa;y (31)

xyx;ay;a (32)

ab&cda+cb+d (33)

a→(b·c)≤ab (34)

ab&cda·cb·d (35)

a;(b·c)≤(a;b)·(a;c) (36) a→(b·c)≤(ab)·(ac) (37)

ab⇒(ca)≤(cb) (38) ab⇒(bc)≤(ac) (39) a→(bc)=(b;a)→c (40)

ab&acab·c (41)

ab&cda;cb;d (42)

1≤(0→a) (43)

(5)

IfAis;-commutative,

x

;

x

=

x

⇒ (

x

→ (

y

z

)) ; (

x

y

) ≤ (

x

z

)

(44)

WhenI finite,wehavealso,

$

iI

(

ai

·

bi

) ≤

$

iI ai

·

$

iI

bi (45)

Proof. For theproofof(27)and(28)see[6].Theremainingcasesareprovedinthesequel.

Equation(29)holdssince⊤ isthegreatestelementofthelattice,i.e.,thatforanyaA,a≤ ⊤.

To establish (30) we just have to note that, since ⊤ is the greatest element, we have y≤ ⊤ for any yA and, in particular,a;⊤≤ ⊤.Hence,by(13),⊤≤a→ ⊤.Sinceisthegreatestelement, (a→ ⊤)=⊤.

For(31),assuming xy,i.e., x+y=y.By(7).Then,a;x+a;y=a;(x+y)=a;y.

Theprooffor(32)isanalogousbutresortingtodistributivity(8).

For(33),assumingabandcd,i.e.,a+b=bandc+d=d.By(1)and(2),wehave(a+c)+(b+d)=(a+b)+(c+d)= b+d.

Inordertoprove(34)weobservethat a

x

a

→ (

x

+

b

)

⇒ {

subst.x*→b·c

}

a

→ (

b

·

c

) ≤

a

→ ((

b

·

c

) +

b

)

⇔ {

(2)and(20)

}

a

→ (

b

·

c

) ≤

a

b By(14)wehaveaxa→(x+b).Hencea→(b·c)≤ab holds.

Inordertoprove(35),assuminga·b=aandc·d=c andapplying(17)and (18)wehave(a·c)·(b·d)=(a·b)·(c·d)= a·(c·d)=a·c.

For(36),weobservethat b

.

c

b andb

.

c

c

⇔ {

(31)

}

a

; (

b

.

c

) ≤

a

;

b anda

; (

b

.

c

) ≤

a

;

c

⇔ {

(35)

}

a

; (

b

.

c

) ·

a

; (

b

.

c

) ≤ (

a

;

b

) · (

a

;

c

)

⇔ {

(19)

}

a

; (

b

.

c

) ≤ (

a

;

b

) · (

a

;

c

)

Sincebypropertiesforanya,b,cA,b.cb andb.cc,wehavethata;(b.c)≤(a;b)·(a;c). Inordertoprove(37),weobservethat

a

→ (

b

·

c

) ≤

a

band a

→ (

b

·

c

) ≤

a

c

⇒ {

(35)

}

(

a

→ (

b

·

c

)) · (

a

→ (

b

·

c

)) ≤ (

a

b

) · (

a

c

)

⇔ {

(19)

} (

a

→ (

b

·

c

)) ≤ (

a

b

) · (

a

c

)

By(34),wehavea→(b·c)≤ab anda→(b·c)≤ac.Therefore(a→(b·c))≤(ab)·(ac).

Inordertoprove(38),property(14)yields (ca)≤(c→(a+b)).Byhypothesisab, i.e.,a+b=b.Thus,(ca)≤ (cb).

Inordertoprove(39),wehavebyhypothesisthatab,i.e.,a+b=b.Hence(bc)=((a+b)→c).By(28),((a+b)→ c)=(ac)·(bc).Hence(bc)=(ac)·(bc),i.e.,(bc)≤(ac).

Toestablish (40)wereason

b

c

b

c

⇔ {

(13)

}

b

; (

b

c

) ≤

c

⇒ {

subst.b*→b;a

} (

b

;

a

) ; ((

b

;

a

) →

c

) ≤

c

⇔ {

(5)

}

b

; (

a

; ((

b

;

a

) →

c

)) ≤

c

⇔ {

(13)

}

a

; ((

b

;

a

) →

c

) ≤

b

c

⇔ {

(13)

}

(

b

;

a

) →

c

a

→ (

b

c

)

(6)

Moreover,

a

b

a

b

⇔ {

(13)

}

a

; (

a

b

) ≤

b

⇒ {

subst.b*→bc

}

a

; (

a

→ (

b

c

)) ≤

b

c

⇒ {

(31)

}

b

; (

a

; (

a

→ (

b

c

))) ≤

b

; (

b

c

)

⇒ {

(22)and transitivity

}

b

; (

a

; (

a

→ (

b

c

))) ≤

c

⇔ {

(5)

}

(

b

;

a

) ; (

a

→ (

b

c

)) ≤

c

⇔ {

(13)

}

a

→ (

b

c

) ≤ (

b

;

a

) →

c

Fortheproofof(41)letussupposeabandac,i.e.,thata·b=aanda·c=a.Then,(a·bc=a·c=a,i.e.,ab·c.

Regardingproperty(42)assumethat ab and cd.Then, by(7)and sincecdc+d=d, wehaveb;c+b;d=b; (c+d)=b;d, i.e., b;cb;d. Moreover, by (8) and since aba+b=b, we have b;c=(a+b);c=a;c+b;c, i.e., a;cb;d.

Inordertoprove(43),since0 isthesmallestelement ofthelattice,by(6),(32)and (13),wehavethat, 0≤a0;1a;10;1a10a.

Fortheproofof(44)letAbe;-commutativeand letusassumethatx=x;x.

((

x

→ (

y

z

)) ; (

x

y

)) ;

x

= {

sincex=x;x

}

((

x

→ (

y

z

)) ; (

x

y

)) ; (

x

;

x

)

= {

(5)+;-commutativity

}

(

x

; (

x

y

)) ; (

x

; (

x

→ (

y

z

)))

≤ {

(22)+(42)

}

y

; (

y

z

)

≤ {

(22)

}

z

Hence,

(

x

→ (

y

z

)) ; (

x

y

) ;

x

z

⇔ {

;-commutativity

}

x

; (

x

→ (

y

z

)) ; (

x

y

) ≤

z

⇔ {

(13)

}

(

x

→ (

y

z

)) ; (

x

y

) ≤ (

x

z

)

In the proof of (45), supposing a finite I, and ai ·biai and ai ·bibi we have by (33) that !

iI(ai ·bi)≤

!

iIai and !

iI(ai·bi)≤!

iIbi.Hence,by(41)!

iI(ai·bi)≤!

iIai·!

iIbi holds. ✷

Pleasenote that we extended some of the axioms for + and · to the corresponding generalised versions, ! and ", respectively (e.g. aibi⇒!

iIai≤!

iIbi stands for thegeneralised version of(33)). Generalised versions of(33), (35) and(41)areusedinthisway.

Nowwediscussanumberofillustrativeexamples.Amongthem,Examples 1,2,4,and5werealreadypresentedin[29].

Example1(2–lineartwo-valueslattice).Letusconsiderthewellknown binarystructure 2

= ( {⊤ , ⊥} , ∨ , ∧ , ⊥ , ⊤ , ∗ , → , ∧ )

withthestandardbooleanconnectives:

∨ ⊥ ⊤

⊥ ⊥ ⊤

⊤ ⊤ ⊤

∧ ⊥ ⊤

⊥ ⊥ ⊥

⊤ ⊥ ⊤

→ ⊥ ⊤

⊥ ⊤ ⊤

⊤ ⊥ ⊤

∗⊥ ⊤

⊤ ⊤

Itisnotdifficulttoseethat2isanactionlattice.Moreover,theactionlatticeisobviouslycompleteanditsatisfiescondition (36)(notethatbothcompositionandmeetarerealised by∧).

Example2 (3–linearthree-valuelattice). The explicit introduction of a denotation for unknown give rise to the following threeelementslinearlattice

3

= ( {⊤ ,

u

, ⊥} , ∨ , ∧ , ⊥ , ⊤ , ∗ , → , ∧ )

where

∨ ⊥ u

⊥ ⊥ u

u u u

⊤ ⊤ ⊤ ⊤

∧ ⊥ u

⊥ ⊥ ⊥ ⊥

uu u

⊤ ⊥ u

→ ⊥ u

⊥ ⊤ ⊤ ⊤

u ⊥ ⊤ ⊤

⊤ ⊥ u

∗⊥ ⊤

u

⊤ ⊤

(7)

Itiseasytoseethat alltheconditionsinDefinition 1hold.Moreover,theactionlattice iscomplete.

Example3(2A– powerset of A). Forafixed,finiteset A,letusconsiderthestructure 2A

= (

P

(

A

), ∪ , ∩ , ∅ ,

A

, ∗ , → , ∩ )

whereP(A) denotesthepowersetofA,∪andareset unionandintersectionoperations,∗mapseachset X∈P(A) into A and XY =XcY,where Xc= {xA|x∈/X}.Thisactionlatticeisalsocomplete.

Example4(Ł–theŁukasiewiczarithmeticlattice).Thisexampleisbasedonthewell-knownŁukasiewicz arithmeticlattice Ł

= ( [

0

,

1

] ,

max

, ⊙ ,

0

,

1

, ∗ , → ,

min

)

wherexy = min{1,1−x+y},xy=max{0,y+x1}andmapseachpointof[0,1]to1.Again,thisisacomplete actionlattice.

Example5(FW–theFloyd–Warshallalgebra).TheFloyd–Warshallalgebraconsistsofatuple N+⊥⊤

= ( {⊥ ,

0

,

1

, . . . , ⊤} ,

max

, + , ⊥ ,

0

, ∗ ,

,

min

)

where+extendsadditiononNbyconsidering⊥asitsabsorbentelementanda+⊤=⊤=⊤+aforanya̸=⊥.Operation max(respectively,min)isdefinedasthemaximum(respectively, minimum)undertheorder⊥<0<· · ·<⊤.Operation⌣ istruncatedsubtraction

ab

=

⎧⎪

⎪⎪

⎪⎪

⎪⎩

⊤ ,

ifa

= ⊥

orb

= ⊤

b

a

,

ifb

aanda

,

b

N 0

,

ifa

>

banda

,

b

N

otherwise

and,forany naturali>0,

∗⊥ 0 0 0 i

⊤ ⊤ .

Note that theorder induced byab iff max{a,b}=b corresponds to the one mentioned above. The action lattice is complete.

Example6(REL(A)-relational algebra over a set A). Let us consider the action lattice defined by relationsover a set A. The corresponding Kleene algebra turns to be quite paradigmatic, since it underlies most standard semantics for sequential programsbasedoninput/outputrelations.

Givenaset A,wehave

REL

(

A

) = (

P

(

A2

), ∪ , ◦ , ∅ ,

"

, ∗ , \ , ∩ )

where ∪ andstand for set union and intersection, respectively, ∅ represents the empty relation and " the diagonal relation {(a,a)|aA}. Operationis Kleene closure, recursively defined, for each R∈P(A2), by R=)

nωRn, where R0=" and Rn+1=RnR. Finally theresiduum is given by Q \R= {(x,y)| for everyzif(y,z)∈Q then(x,z)∈R}. The actionlatticeiscomplete.

Example7 (LAN($)-languages over an alphabet$). Let us consider the action lattice defined by the finite languages on a finitealphabet $.Then,foragivenfinitealphabet $,wedefinetheactionlatticeoflanguagesover$ as

LAN

($) = (

P

($

), ∪ , · , ∅ , { ϵ } , ∗ , → , ∩ )

where∪andstand forsetunionandintersection,∅representstheemptylanguage,ϵistheemptyword,theoperation∗ istheKleenestardefinedbyL=)

n0Ln= {w1· · · · ·wn|wiL,1≤in}and L0= {ϵ}and Ln+1=L·Ln.Thecomposition

·isdefinedby L1·L2= {w1·w2|w1L1and w2L2}and theresiduumbyL1L2= {v|∀u(uL1u·vL2)}.The actionlatticeiscomplete.

Example8 (Wk finiteWajsberghoops). We consider now an action lattice endowing the finite Wajsberghoops [4] with a suitablestaroperation.Hence,forafix naturalk>0 andageneratora,wedefinethestructure

Wk

= (

Wk

, + , ; ,

0

,

1

, ∗ , → , · )

where Wk = {a0,a1,· · ·,ak1}, 1=a0 and 0=ak1. Moreover, for any m,nk1, am+an=amin{m,n}, am;an=am+n, (am)=a0,aman=amax{nm,0} andam·an=amax{m,n}.

(8)

Fig. 2.Examples in theALhierarchy.

2.2. I,HandMV-actionlattices

This section introduces three strict classes ofaction lattices (AL) which become much relevant in the context of the presentwork.Thefirstclassissoundwithrespecttothepositive existentialfragmentofPDL;thesecondoneisalsosound with respect to the remaining positive axioms involving box modalities and tests. The third one captures the standard dualitybetween[_]and_⟩modalities. Thus,

Definition2.LetA=(A,+,;,0,1,∗,→,·)beanactionlattice.ThenAissaid tobe

1. AI-actionlattice,whentheidentityoftheKleenealgebracoincideswiththegreatestelement oftheresiduatedlattice, i.e.,

1

= ⊤

(46)

2. A H-actionlattice, if it belongs to the class of I-action lattices whose Kleene algebra composition coincides with the infimumoftheresiduatedlattice,i.e.,suchthatforanya,bA,

a

;

b

=

a

·

b (47)

3. AMV-actionlattice,ifitisontheclassofI-actionlatticesand satisfiescondition

(

x

y

) →

y

=

x

+

y (48)

The symbols I H, MV refer to the residuated lattices from which these properties come from, in particular, integral, Heyting and MV algebras. We can find a succinct presentation of these classes in the survey [19]. For a more complete accountofsuchalgebraicstructuressupportingmany-valuedlogicsseebooks[7]and [14].

With exception of Examples 5, 6,and 7, all theaction lattices introduced in the previoussection are I-actionlattices.

Thiscomes from observingthat thegreatest element ofeachsupporting set,w.r.t.the orderinducedby+, istheidentity of;.

Sincetheirrealisations of·and;coincide, thestructurespresentedinExamples 1,3,and 2,aswellas,theactionlatticeof thecasek=2 in Example 8,areexamplesofH-actionlattices.

Moreover,theH-actionlatticesofExamples 1 and3areexamplesofMV-actionlatticesfor2,(48)canbeeasilychecked by constructing a truth table and for 2A, we observe that (XY)→Y =(XcY)cY =(XccYc)∪Y =(Xc cY)∩ (YcY)=(XY)∩A=XY. The lattice 3 of Example 2 illustrates a H-action lattice that is not a MV-actionlattice (since(u→ ⊥)→ ⊥=⊤̸=u+⊥).Theactionlattice ŁofExample 4illustratesaMV-actionlatticethatisnotanH-action lattice.Infact,condition (48)canbeverifiedforExample 4asfollows:

(9)

(

x

y

) →

y

⇔ {

interpretation inŁtwice

}

min*

1

,

1

min

{

1

,

1

x

+

y

} +

y+

⇔ {

min{a,b} =max{−a,b}

}

min*

1

,

1

+

max

{−

1

,

x

1

y

} +

y+

⇔ {

max{a+x,a+y} =a+max{x,y}

}

min*

1

,

max

{

0

,

x

y

} +

y+

⇔ {

max{a+x,a+y} =a+max{x,y}

}

min*

1

,

max

{

y

,

x

}

+

⇔ {

sincex,y[0,1]

}

max

{

y

,

x

}

⇔ {

+interpretation inŁ

}

x

+

y

Finally, wecan observethat, forany k, theaction lattices ofExample 8 are MV-action lattices. Actually, bythedefinition of Wk,wehave that:(aman)→an=amax{nm,0}an=amax,nmax{nm,0},0-=amax,n+min{mn,0},0-=amin(m,n)=am+an. TheexamplesdiscussedabovearesummarisedinFig. 2.

Thefollowinglemmaisavery importantresultforwhatfollows.

Lemma2.ThefollowingpropertiesholdinanyI-lattice:

1. (a1)=1 2. (1→a)=a 3. (⊥→a)=1 4. (aa)=1

5. 1=a;ba=1&b=1 6. ab⇔(ab)=1 7. a=b⇔(ab)=1

Proof. Inordertoprove1.,notethatrules(46),(6)and(13)entaila1a;111≤(a1).By(46),1=(a1). In order to prove 2., we have by (6) and (13), aa1;aaa≤(1→a). Moreover, by (6) and (22), (1→a)= 1;(1→a)≤a.I.e.,(1→a)=a.

Inorderto prove 3.,we haveby (6)and (13), ⊥≤a⇔ ⊥;1a1≤(⊥→a). Since(46), wehave 1≤(⊥→a)≤1, i.e.,(⊥→a)=1.

For4.wejustneedtoobserve,by(6)and (13)a;1a1≤(aa).By(46),1=(aa).

Inordertoprove5.,wehaveby(13)and2.thata;b1b≤(a1)=1.Since1=⊤,b=1.Then,by(6),a;1=1a=1.

For6.,by(6),(13)and(46),wehaveaba;1b1ab1=(ab). Inordertoprove7.wehave

a

=

b

⇔ {

=defn

}

a

b&b

a

⇔ {

6.

}

1

=

a

b& 1

=

b

a

⇔ {

5. and;is functional

}

1

;

1

= (

a

b

) ; (

b

a

)

⇔ {

by(46)and(6)

}

1

= (

a

b

)

Proposition1.LetAbeaI-actionlattice.Then,ifAisaH-actionlattice,property

(

a

→ ⊥ ) ·

a

= ⊥

(49)

holds.Moreover,ifAisalsoaMV-actionlattice,theproperty

(

a

→ ⊥ ) +

a

=

1 (50)

alsoholds.

Proof. Inordertoprove(49),weobservethat a

→ ⊥ ≤

a

→ ⊥

⇔ {

(13)

}

a

; (

a

→ ⊥ ) ≤ ⊥

⇔ {

(47)+is the smallest inA

}

a

· (

a

→ ⊥ ) = ⊥

(10)

Theproofof(50)canbedoneasfollows:

(

a

→ ⊥ ) +

a

= {

(48)

}

((

a

→ ⊥ ) →

a

) →

a

= {

(40)

} (

a

; (

a

→ ⊥ )) →

a

= {

(49)

}

⊥ →

a

= {

3. ofLemma 2+(46)

}

1

Note that conditions (49) and (50) actually fail for MV and H-action lattices, respectively –(49) failsin the H-action lattice 3,and (50), failsintheH-actionlatticeŁ.Finally, wenotethat, asaconsequence, every MV-actionlattice whichis alsoaH-actionlattice,satisfiestheentireaxiomaticsofBooleanalgebras.

3. Parametricconstructionofmany-valueddynamiclogics

3.1. Themethod

Oncerevisitedthenotionofanactionlattice,wearenowpreparedtointroducethegeneralconstructionofmany-valued dynamiclogics.Wewillthereforeintroduceitssignatures,formulæ, semanticsandsatisfaction,ontopofanarbitrarycom- pleteactionlattice A=(A,+,;,0,1,∗,→,·).ThelogicobtainedisdenotedbyGDL(A).

Signatures.SignaturesofGDL(A)arepairs(&,Prop)correspondingtothedenotationsofatomiccomputationsand propo- sitions,respectively.

Formulæ.Acoreingredientofanydynamiclogicisitssetofprograms.Letusdenotethesetofatomicprogramsby&.The setof&-programs,denotedbyPrg(&),consistsofallexpressionsgeneratedby

π π

0

| π ; π | π + π | π

forπ0∈&. Givenasignature(&,Prop), wedefinetheGDL(A)-formulæfor(&,Prop), denotedbyFmGDL(A)(&,Prop),as theonesgeneratedbygrammar

ρ ∋ ⊤ | |

p

| ρ ρ | ρ ρ | ρ ρ | ρ ρ | π ρ | [ π ] ρ

for pProp andπPrg(&).Notethatthiscorrespondstothepositivefragmentofthepropositional dynamiclogic.

Semantics.ThefirststepistointroducethespacewherethecomputationsofGDL(A) aretobeinterpreted. Basedonthe classicmatricialconstructionsoverKleenealgebras(see[8,22])define

Mn

(

A

) = (

Mn

(

A

), + ,

;

,

0

,

1

, ∗ )

asfollows:

1. Mn(A)isthespaceof(n×n)-matricesoverA.

2. Forany A,BMn(A),define M=A+BbyMij=Aij+Bij,i,jn.

3. Forany A,BMn(A),define M=A;B byMij=!n

k=1(Aik;Bkj) foranyi,jn.

4. 1and0arethe(n×n)-matrices definedby1ij=

.1 if i= j

0 otherwise and0ij=0,forany i,jn.

5. Forany M= [a]∈M1(A), M= [a]; forany M=

/A B C D 0

Mn(A),n>1,where A and D aresquarematrices,define

M

=

/F F;B;D D

;

C

;

F D

+ (

D;C;F;B;D

)

0

where F=A+B;D;C.Notethatthisconstructionisrecursivelydefined fromthebasecase(wheren=2)wherethe operationsofthebaseactionlattice Aareused.

Finally,aclassicresult(e.g.,[8,22])establishesthatKleenealgebrasareclosedunderformationofmatrices.

Referências

Documentos relacionados

Figure 9 – Simplified series of water temperature at station in the river gallery, with measures of dispersion (maximum and minimum) and central tendency (mode) for the period

Conseqüentemente, se a linguagem utilizada para descrever o programa for estendida, não é necessária a criação de novas regras de inferência, como ocorre com o cálculo de Hoare,

Finally, we study the case of finite-valued Lukasiewicz logics where we axiomatize a large family of intermediate logics defined by families of matrices (A, F ) such that A is a

A interação dos profissionais da saúde ainda na graduação, torna-se possível por meio de iniciativas como o Programa de Educação pelo Trabalho para a Saúde (PET-Saúde), o qual

Este estudo estimou a prevalência autorreferida de edentulismo total em idosos de 60 anos ou mais em município de Minas Gerais cadastrados na Estratégia Saúde da Família,

Here we show how a similar characterisation of validity can be applied to a large class of many-valued logics whose algebraic presentation satisfy a set of multiplier

The focus on this paper is given on the construction of a realistic numerical model based on a detailed in-situ survey of the chimney, involving: geometrical

Nos periódicos lidos, as atividades observadas para controle e prevenção dos vetores da doença foram: atuação da vigilância sanitária; tratamento de reservatórios potenciais