• No results found

Fair testing vs. must testing in a fair setting

N/A
N/A
Protected

Academic year: 2021

Share "Fair testing vs. must testing in a fair setting"

Copied!
38
0
0

Loading.... (view fulltext now)

Full text

(1)

Fair testing vs. must testing in a fair setting

Tom Hirschowitz and Damien Pous

(2)

Goal

Reconcile, in the particular case of Milner’s CCS,

Joyal, Nielsen, and Winskel’s 1993 (JNW) approach to concurrency theory,

with

theinteractive approach to behavioural equivalences:

I testing semantics in process algebra (Hennessy and De Nicola, Beffara),

I Krivine realisability,

I game semantics (Hyland and Ong, Abramsky et al.), Girard’s ludics.

(3)

Review of JNW

CategoryP of (non-empty)paths, i.e.:

I objects: non-empty words over an alphabetA; I morphisms: prefix extensions, e.g.,abc →abcd.

Presheaves bP, i.e., functorsPop →Set.

Presheaves are like trees. Examplesab+ac anda(b+c). Natural transformations are like functional simulations. Example.

(4)

Positions

LetCbe:

. . . n . . . p . . .

?. 0

n−1

...

0

p−1

...

Definition

Positions are presheaves onC.

(5)

Example

F(?) ={a,b},

F(1) ={X1,X3},

F(2) ={X2},

F(?−→0 1)(X1) =a,

Notation: X1·0 =a.

X2·0 =a,X2·1 =b,

X3·0 =b.

X1 X2 X3

a b

0 0 1 0

The category of elementsR F.

(6)

Moves from natural deduction, example: input

a1, . . . ,an`P

a1, . . . ,an`ai.P

Add an objectι−n,i to C:

? n ι−n,i

0

n−1

s t

·· ·

(7)

Motivating the definition

The category of elements of the representableι−3,2 is the partially ordered set generated by

t·0

t t·2

t·1

ι−3,2

s·0

s s ·2

(8)

Forking

The category of elements of the representableπ3 is the partially

ordered set generated by

t10 =t20

t1 t2 t12 =t20

t11 =t21

π3

s0

s s2

(9)

Name creation

The category of elements of the representableν2 is the partially

ordered set generated by

t·0

t t·2

t·1

ν2

s·0

s s·1.

(10)

Tick

t0

t t2

t1

3

s0

s s2

(11)

Synchronisation: the 4th dimension

ρt0

ρt ρt2 =t1 t t0

ρt1

ρ

ρs0

ρs ρs2 =s1 s s0

ρs1.

(12)

Examples

The two maximal executions ofa|b, which are actually equal. Ifa=b, one more execution.

An execution ofa|µX.(X |X). Some “wrong” examples.

(13)

Restrictions and moves

A restrictionfrom X to Y is a cospan Y ,→X ←id−-X.

A movefromX toY is a cospanY ,→M ←-X of presheaves

obtained

I from a cospanY0

t’s

,−−→M0 s

←−-X0, I withM0a representable of dim 2 or 3, I by identifying some names.

(14)

Observations

Definition

Anobservationis a presheaf U ∈Cb isomorphic to a possibly denumerable “composition” of moves and restrictions in

Cospan(Cb):

X0 X1 . . . Xn Xn+1 Xn+2 . . .

M0 . . . Mn Mn+1 . . .

U

(15)

The category

E

of observations

Objects: X ,→U in Cb with

I U an observation, I X its base;

Morphisms: all commuting squares

U V

X Y.

Obvious functor to positionsπ:E→B:

(16)

A Grothendieck topology

Let? have dimension 0,n have dimension 1, and so on up to 3.

Definition

Let a sieveS onX ,→U inE beview-covering when it is jointly

(17)

Elementary views

Anelementary view fromX toY is a composite of a move from a representable,

followed by a restriction to a representable:

n0 ,→X ←id−-X ,→M ←-n.

(18)

Views

Definition

Aviewis an observation X ,→U isomorphic to a possibly

(19)

Views are a canonical covering

Proposition

For any observation X ,→U, the sieve generated by morphisms

from finite views into U is covering.

Proposition

(20)

The categories

E

X

Here we want to relativise to a base positionX. Definition

LetEX have as objects U ←-Y →X, and morphisms

transformations between such withX fixed.

U U0

Y Y0

X

(21)

Strategies as sheaves

Definition

(22)

The stack of strategies

Proposition

This X 7→SX extends to a functorS : Bop →CAT, which is a

stackfor the restriction of the view-covering topology to B.

Why stacks?

Strategies are only sensible up to iso.

Intuitively, only the number of possible states should matter, not the precise set of states.

(23)

Canonical spatial decomposition

LetSq(X) =a

n

X(n).

Proposition

SX '

Y

(n,x)∈Sq(X)

(24)

Temporal decomposition

Let MX be the set of moves fromX (explain the size).

For eachi ∈MX, letXi be the domain of i.

Theorem

Sn'Fam

 Y

i∈Mn

SXi

.

A strategy is determined by its initial states, and

what remains of them after each possible move. Almost a sketch: would be Sn∼=QiMnSXi.

(25)

Scenarioses

In concurrency,

Physical, or fair scenario: players are really independent; Interpreted, orpotentially unfairscenario: a scheduler is responsible for parallelism.

(26)

Must testing

Supposing a fixed move♥: Definition

A processP is must orthogonalto a contextC, when all maximal

traces ofC[P] play ♥at some point. Notation: P⊥mC,P⊥m

. Definition

P andQ aremust equivalent, notationP ∼m Q, when

(27)

Must testing in an unfair setting

Usually, only the unfair scenario is formalised:

P = (Ω|a) and Q = Ω

are must equivalent.

The obvious testC =a.♥ | is not orthogonal toP. Indeed, there is an infinite looping trace, maximal.

(28)

Fair testing in an unfair setting

The example

(Ω|a)∼mΩ

takes potential unfairness of the scheduler into account. Usually people do not want to, and resort to:

Definition

A processP isfair orthogonal to a contextC, when all finite traces ofC[P] extend to traces that play♥at some point.

Notation: P⊥fC,P⊥f

. Definition

(29)

Closed-world observations

Definition

An observationX ,→U isclosed-world when both

a

n,i

U(ι+n,i)←− a n,i,m,j

U(τn,i,m,j) ρ − →a

n,i

U(ι−n,i) (1)

(30)

Global behaviours

Let W,→E be the full subcategory of closed-world

observations.

Let W(X) be the fibre overX for the projection functor W→B.

Definition

Let the category ofglobal behavioursonX be simply GX =W\(X).

The inclusion W(X),→WX ,→EX induces a functor

(31)

Observable criterion

Definition

Anobservable criterion consists for all positions X, of a subcategory⊥⊥X ,→GX.

(32)

Interactive equivalence

Definition

For any strategyS onX and any pushoutP

I Y

X Z

(2)

of positions withI of dimension 0, letS⊥⊥P be the class of all

strategiesT onY such that Gl(S kT)∈ ⊥⊥Z.

Herek denotes amalgamation in the stack S.

(33)

Fair testing

Definition

A closed-world story issuccessful when it contains a♥n.

Definition

Given a global behaviourG ∈GX, anextension of a state

s ∈G(U) toU0 is an s0 ∈G(U0) withi:U →U0 ands0·i =s. Definition

Thefair criterion⊥⊥fX contains all global behaviours G such that any states ∈G(U) for finiteU admits a successful extension.

(34)

Must testing

Definition

An extension ofs ∈G(U) is strictwhen U →U0 is not surjective. Definition

For any global behaviourG ∈GX, a states ∈G(U) isG-maximal

when it has no strict extension. Definition

Let themustcriterion ⊥⊥mX consist of all global behavioursG such that for all closed-worldU, and G-maximals ∈G(U),U is successful.

(35)

The key result

Theorem

For any strategy S , any state s∈Gl(S)(U) admits a

(36)

Fair vs. must

Thanks to the theorem, we have: Lemma

For all S∈SX,Gl(S)∈ ⊥⊥mX iff Gl(S)∈ ⊥⊥fX.

Proof.

LetG = Gl(S).

(⇒) By the theorem, any states ∈G(U) has aG-maximal extensions0 ∈G(U0), for which U0 is successful by hypothesis, hences has a successful extension.

(⇐) AnyG-maximals ∈G(U) admits by hypothesis a successful

extension which may only be onU byG-maximality, and henceU

(37)

Fair equals must

Theorem

For all S,S0∈SX, S ∼mS0 iff S ∼f S0.

Proof.

(⇒) Consider two strategies S andS0 onX, and a strategyT on

Y (as in the pushoutP). We have:

Gl(S kT)∈ ⊥⊥f iff Gl(S kT)∈ ⊥⊥m

iff Gl(S0 kT)∈ ⊥⊥m

iff Gl(S0 kT)∈ ⊥⊥f.

(38)

Perspectives

Short term:

Link with CCS. Kleene theorem. Longer term:

Treat π, λ, . . .

Understand the abstract structure. What is a compilation?

References

Related documents

(b) violation of the Company Sellers’ Code of Ethics, misrepresentation, defalcation, or malfeasance, or any other act or deed by the Broker or any of its third-party

The length specified for the input buffer "CscDhlPara.InLen" in the parameter block is

Next, a GPS receiver using correlator beamforming was developed to apply the necessary phase shift to each data sample and form an antenna beam in the direction of the

Based on the description, it is necessary to conduct classroom action research of General Biology Learning based on Contextual Teaching and Learning (CTL) with

Generate Impact Study Develop HR Program Objectives Develop Evalua- tion Plan Collect Data During Program Collect Data After Imple- mentation Isolate the Effects of

Cohen Mimis : IPRAS Chairman of the Scientific Advisory Board Honorary Chairman Cohen Mimis Course Director Tsoutsos Dimosthenis Course Co-organizer Yiacoumettis Andreas Members

While our results in regard to the first research question suggest that it is indeed feasible to add a 30 min psychological flexibility module to cultural competence training,