cutoff _
SFE(S,
m¯)= (
max(
1,
m¯(
1)), . . . ,
max(
1,
m¯(
k)))
foranyS ∈ SFE
withk ≥
1 rolesandanym¯
∈ N
k.Fig. 14. Them-stuttering simulation of a bigger system¯ S(¯n)by the cutoff systemS(¯c).
Following thecutoffcalculation, themodelcheckingprocedure checkstheconcrete system
S(¯
c)
against thetrivialin- stantiationφ[
trivial]
of∀
v¯(φ (
v))
.Ifφ[
trivial]
issatisfiedbyS(¯
c)
,thentheprocedurereturnstrue,otherwiseitreturnsfalse. Note that,differentlyfromthemodelcheckingprocedures forSMR
andSGS
systems,the modelcheckingprocedureforSFE
systemsalways producesan output.Weshowthat thisoutputisalwayscorrectinSection 7.3.First,we computeits valuefortheautonomousrobotexample.7.2. Verifying the autonomous robot example
InSection2.3.3weencodedtheautonomousrobotexampleasaPIIS
S
ARcomposedofanagenttemplateTR1 represent-
ing robotswithaccessto asensor,an agenttemplateTR2 representing
robotswithnoaccesstoasensor, anda template environmentE
representingtheenvironment.InSection3.2we expressedtheproperty“wheneverarobot halts,itknows thatitisinthegoalregion”inthefollowing(
1,
1)
-indexedformula:φ
AR= ∀
({v},{x})AG((
h_1,
v)→
KTR1v((
gr_1,
v))∧ (
h_2,
x)→
KTR2x((
gr_2,
x)))
where v is avariableof
TR1, u is
avariableofTR2, theatomicpropositiongr_1 (gr_2,
respectively)holdsinthetemplate states wherethevalue ofthe positioncomponentoftemplate robot 1(templaterobot 2,respectively) isin{
2,
3,
4}
,and the atomicpropositionh_1 (h_2,
respectively) holdsinthetemplatestateswherethetemplaterobot 1(templaterobot 2, respectively)hashalted.Wenowusetheprocedure Check_
SFE
toestablishwhetherornottheautonomousrobotmeetstheabovespecification. Wehavethat¯
c
=
cutoff _SFE(S
AR, (
1,
1))= (
1,
1)
Thus, we need to check whetherornot
S
AR((
1,
1))|= φ
AR[
trivial]
.The latter querycan be testedwitha standard model checker; thiswill returntrue thereby establishing thecorrectness of theprotocol irrespectively ofthe number ofrobots present.7.3. Soundness of the Check_
SFE
procedureWenowassessthesoundnessofthe Check_
SFE
procedure.Theorem7.2.
Given S = T ,E, V∈ SFE
and an m-indexed formula¯
∀
v¯φ (
v¯)
, Check_SFE(S,∀
v¯φ (
v¯))
returns true iffS |= ∀
v¯φ (
v¯)
. We provethisresultbyshowingthat:(i) thecutoffsystemS(¯
c)
m-stuttering¯
simulateseverybigger system;(ii) every bigger systemm-stuttering¯
simulatesS(¯
c)
. Differentlyfromthe corresponding resultsfortheSMR
andSGS
classes,the absenceofagent-environmentandmulti-roleactions intheSFE
classremovesthenecessitytosimulatesynchronisations of the environment on actions that are not admitted by the agents inA( ¯
m)
. Indeed, whenever an agent not inA( ¯
m)
synchronises withtheenvironment,all agentsofthesamerole (orallagentsinthesystemdependingonthetype ofthe action)synchronisetheenvironmentaswell.7.3.1. Part A: the cutoff system m-stuttering simulates every bigger system
¯
Consider an arbitrarily big system
S(¯
n)
withn¯≥ ¯
c, whereS(¯
c)
is the cutoff system. Fig. 14 showsthe m-stuttering¯
simulationbetween
S(¯
n)
andS(¯
c)
.TosimulateanactionperformedbytheagentsinA(¯
c)
inS(¯
n)
,S(¯
c)
performsthesame action.AnyactionperformedinS(¯
n)
thatisnotadmittedby anagentinA(¯
c)
isboundtobean asynchronousaction.As onlythestateoftheagentperformingtheactionisupdated,S(¯
c)
simulatestheseactionsbyperformingthenullaction.Lemma 7.3. Consider a PIIS
S = T ,E, V∈ SFE
of k roles and m¯
≥ N
k. Then,S(¯
n)≤
mss¯S(¯
c)
for all n¯
≥ ¯
c, where c¯
=
cutoff _
SFE(S,
m¯)
.Proof. Choose an arbitraryn
¯≥ ¯
c. We show thatS(¯
n)≤
mss¯S(¯
c)
.Define thesimulationrelation∼
mss¯⊆G(¯
n)×G(¯
c)
asfol- lows:Fig. 15. Them-stuttering simulation of the cutoff system¯ S(¯c)by a bigger systemS(¯n).
(
g,
g)∈∼
mss¯ iff lsri(
g)=
lsri(
g),
for(
i,
r)∈A(
c¯)
Weshowthat
∼
mss¯ isanm-stuttering¯
simulationbetweenS(¯
n)
andS(¯
c)
.Itisclearthatι(
n¯)∼
mss¯ι(
c¯)
.Letg∼
mss¯ gforan arbitrarypairofglobalstatesinG(¯
n)×G(¯
c)
.Weshowsimulationrequirements (i)and (iii).Requirement (i)followsbythe definitionof∼
mss¯ .Forsimulationrequirement (iii), letπ∈ (
g)
.Construct a pathπ
∈ (
g)
asfollows:foreach j≥
1,π
(
j,
Act)=π(
j,
Act)
ifπ(
j,
Act)∈
(i,r)∈A(¯c)Actri;otherwise,π
(
j,
Act)=
.Itcanbecheckedthatπ
isavalidpath,and thatπ(
j)∼
mss¯π
(
j)
,foreach j≥
1.Thus,partitionπ
andπ
intosingletonblocks.ItfollowsthatS(¯
n)≤
mss¯S(¯
c)
.2
7.3.2. Part B: every bigger system m-stuttering simulates the cutoff system
¯
Fig. 15showsthem-stuttering
¯
simulationbetweenS(¯
c)
andS(¯
n)
.An asynchronousactiona defined
fortemplatei is
simulatedby
S(¯
c)
bymeansoftwocases.Ifa is
notadmittedintherepertoireofagent(
i,
1)
,thenS(¯
n)
simplyperformsa.
If
a is
admittedintherepertoireofagent(
i,
1)
,then,onebyone,theagents(
i,
1),(
i,
c¯(
i)+
1),. . . ,(
i,
n¯(
i))
performa.
Thus, foreachrolei,
everyagentin{¯
c(
i)+
1, . . . ,
n¯(
i)}
mimicsagent(
i,
1)
.S(¯
n)
maythensimulatearole-synchronousactionor aglobal-synchronousactionbyperformingtheactioninquestion.Lemma7.4.
Consider a PIIS S = T ,E, V∈ SFE
of k roles and m¯
∈ N
k. Then,S(¯
c)≤
mss¯S(¯
n)
, where¯
c=
cutoff _SFE(S,
m¯)
.Proof. Let n
¯≥ ¯
c. Assume an integer i with 1≤
i≤
k. Define n¯
to be a k-tuple of integers such that: n¯
(
i)= ¯
n(
i)+
1;¯
n
(
j)= ¯
n(
j)
forall j with 1≤
j≤
k and j=
i. WeshowthatS(¯
n)≤
mss¯S(¯
n)
.Thatis,weprovethatthesystemobtainedby addingoneconcreteagent(ofanarbitraryrole)toS(¯
n)
m-stuttering¯
simulatesS(¯
n)
.Theinductiveapplicationofthelatter entailsthemainclaimofthelemma.Assume
r= ¯
n(
i)
.Definethesimulationrelation∼
mss¯⊆G(¯
n)×G(¯
n)
asfollows:g
∼
mss¯ giff lsqj(
g)=
ls q j(
g)
for(
j,
q)∈A(
n¯),
lsE(
g)=
lsE(
g)
and g→
Ar i∗g 1,
where tlsr i(
g1)=
tls1i(
g)
If
g∼
mss¯ g,thenthelocalstatesoftheagentsinA(¯
n)
andthelocalstatesoftheenvironmentarethesameinthetwo globalstates.Additionally,theagent(
i,
r)
inS(¯
n)
isabletochangeitslocalstatetothelocalstateofagent(
i,
1)
inS(¯
n)
viaasynchronoustransitions.Weshowthat∼
mss¯ isanm-stuttering¯
simulationbetweenS(¯
n)
andS(¯
n)
.Thecaseof
ι(
n¯)∼
mss¯ι(
n¯
)
followstrivially.Supposethat g∼
mss¯ g foran arbitrarypairofglobalstatesinG(¯
n)×G(¯
n)
. We show simulation requirements (i) and(iii). The former requirement followsby the definitionof∼
mss¯ .For the latter requirement,letπ∈ (
g)
.Byinductiononthelengthofπ
,weconstructapathπ
∈ (
g)
suchthat:(i)π
isasrequired bythem-stuttering¯
simulation;(ii)tls
ri(π
[])=
tls1 i
(π
[])
. Forthe base step, g∼
mss¯ g gives g→
Ari∗ g
1, where tlsr
i
(
g1)=
tls 1i
(
g)
. Letπ
be the pathfrom g to g1.The first blocksB
1,
B1 aredefinedasfollows:B
1=
g and B1 isthesequenceofstatesinπ
.Clearly, g is∼
mss¯ -relatedtoeverystate inπ
.For the inductive step, assume that for a prefix
[
x−
1]π
we have already constructed a prefix[
x−
1]π
such thattlsri
(π
(
x−
1))=
tls1i(π
(
x−
1))
,andapartitionofthestatesin[
x−
1]π
and[
x−
1]π
intocorrespondingblocks.Wenow definethenextblocks BxandB
x.Therearetwocases.Fig. 16.MCMAS-Parchitecture.
1.
π(
x−
1,
Act)∈/
A1i. Define Bx
=π(
x)
and Bx=π
(
x)
,whereπ
(
x−
1)→
π(x−1,Act)π
(
x)
. The inductive hypothesisgives
π(
x−
1)∼
mss¯π
(
x−
1)
andtls
ri(π
(
x−
1))=
tls 1i
(π
(
x−
1))
.Therefore,π
(
x−
1)→
π(x−1,Act)π
(
x)
isavalidtransition,
π(
x)∼
mss¯π
(
x)
,andtls
ri(π
(
x))=
tls 1 i(π(
x))
. 2.π(
x−
1,
Act)∈
A1i. Let
a be
the corresponding template action ofπ(
x−
1,
Act)
. Define Bx=π(
x)
and Bx=π
(
x)◦
π
(
x+
1)
,whereπ
(
x−
1)→
(a,1)π
(
x)→
(a,r)π
(
x+
1)
.Theinductivehypothesisgivesπ(
x−
1)∼
mss¯π
(
x−
1)
andtlsri
(π
(
x−
1))=
tls1i(π
(
x−
1))
. Therefore,π
(
x−
1)→
(a,1)π
(
x)→
(a,r)π
(
x+
1)
are validtransitions,π(
x)∼
mss¯π
(
x)
,π(
x)∼
mss¯π
(
x+
1)
,andtls
ri(π
(
x+
1))=
tls1 i
(π
(
x))
.Simulation requirement (iii) istherefore satisfied. It follows that
S(¯
n)≤
mss¯S(¯
n)
. Bythe inductive application of the latterandbytransitivityof≤
mss¯ ,weobtainthatS(¯
c)≤
mss¯S(¯
n)
.2
Corollary7.5.
Consider a PIIS S = T ,E, V∈ SFE
of k roles and an m-indexed formula¯
∀
v¯φ (
v¯)
. Then,S(¯
c)|= ∀
v¯φ (
v¯)
iff∀¯
n≥
¯
c
.S(¯
n)|= ∀
v¯φ (
v¯)
, where c¯=
cutoff _SFE(S,
m¯)
.Proof. Let n
¯≥ ¯
c be arbitrary. ByTheorem 3.9 itsuffices to show thatS(¯
n)≤
mss¯S(¯
c)
andS(¯
c)≤
mss¯S(¯
n)
.The former is givenbyLemma 7.3.ThelatterisgivenbyLemma 7.4.2
This concludes theproof ofTheorem 7.2.Corollary 7.5 givesa methodology forsolving the PMCPby modelchecking the cutoff system. Differently from Corollary 5.13and Corollary 6.6,where certain conditions are assumed, by means of
Corollary 7.5 we always solve the PMCP forany givensystem andspecification. In other words,while Check_
SMR
and Check_SGS
donotprovideananswertothePMCPintheabsenceofanagent-environmentsimulation, Check_SFE
always providesasolution.Therefore,thePMCPfortheSFE
classofPIISisdecidable.Corollary7.6.