Functional Reachability Luke Ong and Nikos Tzevelekos University of Oxford Shonan, September 2011

What this talk is about Reachability in functional computation. • Consider a term M of a higher-order functional programming language. • Now consider a point p inside M . • Is there a program context C such that computation of C[M ] reaches p?

Functional Reachability – 2

What this talk is about Reachability in functional computation. • Consider a term M of a higher-order functional programming language. • Now consider a point p inside M . •

Is there a program context C such that computation of C[M ] reaches p?

Functional Reachability – 2

What this talk is about Reachability in functional computation. • Consider a term M of a higher-order functional programming language. • Now consider a point p inside M . •

Is there a program context C such that computation of C[M ] reaches p?

Surprisingly, (Contextual) Reachability per se had not been studied in HO functional languages. Idea: Use Games, Traversals, Automata.

Functional Reachability – 2

Relevant work • Control Flow Analysis. Compute at compile time the flow of control that is going to happen at run time. • Reynolds (’70), Jones (’80), Shivers (’90), many more people in this room, . . . Using game semantics: Malacaria & Hankin (late 90’s). • CFA > Reach: more general. Reach > CFA: open vs closed world approach.

Functional Reachability – 3

Relevant work • Control Flow Analysis. Compute at compile time the flow of control that is going to happen at run time. • Reynolds (’70), Jones (’80), Shivers (’90), many more people in this room, . . . Using game semantics: Malacaria & Hankin (late 90’s). • CFA > Reach: more general. Reach > CFA: open vs closed world approach. • Useless code detection. • Strictness analysis, etc. Functional Reachability – 3

PCF The examined language: (binary) PCF. • lambda-calculus, • Boolean base type, • recursion at all types.

A, B ::= o | A → B v ::= t | f M, N ::= v | x | λx.M | M N | if M N1 N2 | YA

Functional Reachability – 4

PCF

A, B ::= o | A → B v ::= t | f M, N ::= v | x | λx.M | M N | if M N1 N2 | YA

Functional Reachability – 5

PCF

A, B ::= o | A → B v ::= t | f M, N ::= v | x | λx.M | M N | if M N1 N2 | YA (λx.M )N → M {N/x} YM → M (YM )

if t → λxy.x if f → λxy.y

M → N =⇒ E[M ] → E[N ] E ::= [−] | E M | if E Functional Reachability – 5

PCF

A, B ::= o | A → B

Call-by-name λ-calculus +if + Y

v ::= t | f M, N ::= v | x | λx.M | M N | if M N1 N2 | YA • Write (A1 , . . . , An , o) for A1 → · · · → An → o. • Divergence definable, e.g. ⊥ := Yo (λx.x).

Functional Reachability – 5

PCF

A, B ::= o | A → B

Call-by-name λ-calculus +if + Y

v ::= t | f M, N ::= v | x | λx.M | M N | if M N1 N2 | YA • Write (A1 , . . . , An , o) for A1 → · · · → An → o. • Divergence definable, e.g. ⊥ := Yo (λx.x). • Finitary restrictions (i.e. no Y): fPCF

M, N ::= v | x | λx.M | M N | if M N1 N2

fPCF⊥

M, N ::= v | x | λx.M | M N | if M N1 N2 | ⊥ Functional Reachability – 5

Reachability Using a Context Lemma we can restate Reachability as:

• Given a closed PCF-term M : (A1 , ..., An , o) and a coloured subterm L of M , • Are there closed PCF-terms N1 : A1 , . . . , Nn : An and a coloured term L′ such that

~ ։ E[L′ ] ? MN

Functional Reachability – 6

Reachability Using a Context Lemma we can restate Reachability as:

• Given a closed PCF-term M : (A1 , ..., An , o) and a coloured subterm L of M , • Are there closed PCF-terms N1 : A1 , . . . , Nn : An and a coloured term L′ such that

~ ։ E[L′ ] ? MN We can make things simpler

Functional Reachability – 6

PCF-with-error: PCF⋆ • Include an error constant: o = {t, f, ⋆} • New rule: if ⋆ → λxy.⋆

(i.e. E[⋆] ։ ⋆)

Functional Reachability – 7

PCF-with-error: PCF⋆ • Include an error constant: o = {t, f, ⋆} • New rule: if ⋆ → λxy.⋆

(i.e. E[⋆] ։ ⋆)

⋆-Reachability: • Given a closed PCF⋆ -term M with exactly one ⋆ ,

~ ։ ⋆? • Are there closed PCF-terms N1 , ..., Nn such that M N

Functional Reachability – 7

PCF-with-error: PCF⋆ • Include an error constant: o = {t, f, ⋆} • New rule: if ⋆ → λxy.⋆

(i.e. E[⋆] ։ ⋆)

⋆-Reachability: • Given a closed PCF⋆ -term M with exactly one ⋆ ,

~ ։ ⋆? • Are there closed PCF-terms N1 , ..., Nn such that M N

Reachability ∼ = ⋆-Reachability

Functional Reachability – 7

Reach template v-Reach [L1 , L2 ]:

v ∈ {t, f, ⋆} and L1 , L2 ⊆ PCF⋆

• Given a closed L1 -term M ,

~ ։ v? • Are there closed L2 -terms N1 , ..., Nn such that M N

E.g.

  ⋆-Reachability = ⋆-Reach [PCF1⋆ , PCF] 

Functional Reachability – 8

Reach template v-Reach [L1 , L2 ]:

v ∈ {t, f, ⋆} and L1 , L2 ⊆ PCF⋆

• Given a closed L1 -term M ,

~ ։ v? • Are there closed L2 -terms N1 , ..., Nn such that M N

E.g.

  ⋆-Reachability = ⋆-Reach [PCF1⋆ , PCF]

 v-Reach [L, PCF] = v-Reach [L, fPCF]

Functional Reachability – 8

Reach template v-Reach [L1 , L2 ]:

v ∈ {t, f, ⋆} and L1 , L2 ⊆ PCF⋆

• Given a closed L1 -term M ,

~ ։ v? • Are there closed L2 -terms N1 , ..., Nn such that M N

E.g.

  ⋆-Reachability = ⋆-Reach [PCF1⋆ , PCF]

 v-Reach [L, PCF] = v-Reach [L, fPCF] From [Loader]: Observational equivalence in fPCF⊥ is undecidable. therefore: t-Reach [fPCF⊥ , fPCF] is undecidable. Functional Reachability – 8

Undecidability The following problems are undecidable. • t-Reach [fPCF⊥ , fPCF] • ⋆-Reach [fPCF1⊥⋆ , fPCF] • ⋆-Reachability, i.e. ⋆-Reach [PCF1⋆ , PCF] • Reachability

Functional Reachability – 9

Undecidability The following problems are undecidable. • t-Reach [fPCF⊥ , fPCF] • ⋆-Reach [fPCF1⊥⋆ , fPCF] • ⋆-Reachability, i.e. ⋆-Reach [PCF1⋆ , PCF] • Reachability Not all is lost • Reachability for finitary M ? • ⋆-Reach [fPCF1⋆ , fPCF] ? • ⋆-Reach [fPCF⋆ , fPCF] ? Functional Reachability – 9

Our approach We focus on v-Reach [fPCF⋆ , fPCF]

Computations of fPCF⋆ -term P : o O 

Traversals over its computation tree, λ(P ) O 

Runs of an Alternating Tree Automaton (ATA) on λ(P )

Functional Reachability – 10

Our approach We focus on v-Reach [fPCF⋆ , fPCF]

Computations of fPCF⋆ -term P : o O 

Traversals over its computation tree, λ(P ) O 

Runs of an Alternating Tree Automaton (ATA) on λ(P )

P ։ v iff an ATA accepts λ(P ) on initial state with value v Functional Reachability – 10

Computation trees Starting from a fPCF⋆ -term M , • take its η-long form, • add application symbols (@), • view the result as a tree, λ(M ).

Functional Reachability – 11

Computation trees Starting from a fPCF⋆ -term M ,

λ

• take its η-long form,  

• add application symbols (@),

?? NNN NN

λf x λ

λΦz

• view the result as a tree, λ(M ). ( λΦz. Φ(λy. ify ⋆ z)t ) (λf x. f x) t

@ ?NNN

7−→

λy

~~ ~ ~

>> >

if C  C

λ y



λ ⋆

CC

f

Φ>

λ

λ

t

x

t

λ z

Functional Reachability – 11

Traversals A traversal [Blum, Ong] over a full computation tree: • follows the flow of control within it, • seen from the perspective of Game Semantics.

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: λ • follows the flow of control within it,

@ JTJTTTT t JJ TTTT tt t JJ TTTT t t t TTT

• seen from the perspective of Game Semantics. λΦz

λy

λ y

Φ II t t II t t II t t II t t

v if LLLL v LL vv v LL vv

λ ⋆

λf x

λ

f

t

λ

λ

t

x

λ z

⋆-complete traversal

Functional Reachability – 12

Traversals A traversal [Blum, Ong] over a full computation tree: • follows the flow of control within it, • seen from the perspective of Game Semantics. A traversal is v -complete if: • every question (red visit) has been answered (green visit), • and the root question has been answered with v . For any P : o and v , P ։ v iff there is a v -complete traversal over λ(P ).

Functional Reachability – 12

Alternating Tree Automata An ATA is a quadruple A = hQ, Σ, q0 , ∆i where: • Q is a finite set of states, • Σ is a finite ranked alphabet, • q0 ∈ Q is the initial state, • ∆ is a finite transition relation: q

s∈Σ q∈Q s → (Q1 , . . . , Qk ). Q1 , ... , Qk ⊆ Q

Functional Reachability – 13

Alternating Tree Automata An ATA is a quadruple A = hQ, Σ, q0 , ∆i where: • Q is a finite set of states, • Σ is a finite ranked alphabet, • q0 ∈ Q is the initial state, • ∆ is a finite transition relation: q

s1 ...

s∈Σ q∈Q s → (Q1 , . . . , Qk ). Q1 , ... , Qk ⊆ Q

ly s OOOO l l OOO ll yy l l y OOO ll yy l l OOO y ll l y O l l ...

s2

...

...

sk ... Functional Reachability – 13

Alternating Tree Automata An ATA is a quadruple A = hQ, Σ, q0 , ∆i where: • Q is a finite set of states, • Σ is a finite ranked alphabet, • q0 ∈ Q is the initial state, • ∆ is a finite transition relation: q

s∈Σ q∈Q s → (Q1 , . . . , Qk ). Q1 , ... , Qk ⊆ Q

A(q)

s1 ...

ly s OOOO l l OOO ll yy l l y OOO ll yy l l OOO y ll l y O l l ...

s2

...

...

sk ... Functional Reachability – 13

Alternating Tree Automata An ATA is a quadruple A = hQ, Σ, q0 , ∆i where: • Q is a finite set of states, • Σ is a finite ranked alphabet, • q0 ∈ Q is the initial state, • ∆ is a finite transition relation: q

s∈Σ q∈Q s → (Q1 , . . . , Qk ). Q1 , ... , Qk ⊆ Q

ly s OOOO l l OOO ll yy l l y OOO ll yy l l OOO y 2) ll1 ) A(Q l A(Q y O l l ...

s1

s2

...

...

...

A(Qk )

sk

... Functional Reachability – 13

Traversal-simulating ATA’s λ

How can we simulate a complete traversal by an ATA?

@-;

;   --- ;;; - ; 

λf x λ

λΦz

f

Φ-

  --

λy

λ

λ

if 0

t

x

0   000 

λ λ

λ

y ⋆

z

t

Functional Reachability – 14

Traversal-simulating ATA’s How can we simulate a complete traversal by an ATA?

λ

• By guessing the number of visits of each node.

@-;

;   --- ;;; - ; 

• By guessing the profile of each variable per visit.

λf x λ

λΦz

• By verifying these guesses. f

Φ-

  --

λy

λ

λ

if 0

t

x

0   000 

λ λ

λ

y ⋆

z

t

Functional Reachability – 14

Variable profiles Introduced in [Ong’06]. • VPΣ (A1 , . . . , An , o) :=

Var A Σ

× Val × P(

Sn

i=1 VPΣ (Ai ))

• Notation: (x, v), (x, v | π1 , . . . , πn )

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

λy

λ y

@ TIITTTT u III TTT uu u II TTTTT u u TTT u

Φ HH u u HH u u HH u u HH uu

w if KKKK w KK ww w KK ww

λ

λ



z

λf x

λ

f

t

λ

λ

t

x

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

f

λ y

λy

@ TIITTTT u III TTT uu u II TTTTT u u TTT u Φ

Φ HH u u HH u u HH u u HH uu

w if KKKK w KK ww w KK ww

xλ t

λ

λ



z

λf x

λ

f

t

y

λ x

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

f

λ y

λy

@ TIITTTT u III TTT uu u II TTTTT u u TTT u Φ

Φ HH u u HH u u HH u u HH uu

w if KKKK w KK ww w KK ww

xλ t

λ

λ



z

λf x

λ

f

t

y

λ x

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

⋆λ

⋆ λΦz

f ⋆ λy

tλ ty

@ TIITTTT ⋆ u III TTT uu u II TTTTT u u TTT u Φ

Φ HH ⋆ u u HH u u HH u u HH uu

wt if KKKK w KK ww w KK ww

⋆λ

λ



z

⋆ λf x

λ

⋆f

t

xλ t

y tλ

t

tx

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

⋆λ

⋆ λΦz

f ⋆ λy

tλ ty

@ TIITTTT ⋆ u III TTT uu u II TTTTT u u TTT u Φ

Φ HH ⋆ u u HH u u HH u u HH uu

wt if KKKK w KK ww w KK ww

⋆λ

λ



z

⋆ λf x

λ

⋆f

t

xλ t

y tλ

t

tx

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

f

λ ty

λy

@ TIITTTT u III TTT uu u II TTTTT u u TTT u Φ

Φ HH ⋆ u u HH u u HH u u HH uu

w if KKKK w KK ww w KK ww

xλ t

λ

λ



z

λf x

λ

⋆f

t

y

λ

tx

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

f

λ (y, t)

y

λy

@ TIITTTT u III TTT uu u II TTTTT u u TTT u Φ

Φ HH ⋆ u u HH u u HH u u HH uu

w if KKKK w KK ww w KK ww

xλ t

λ

λ



z

λf x

λ

⋆f

t

y

(x, t)

λ x

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

f

λ (y, t)

y

λy

@ TIITTTT u III TTT uu u II TTTTT u u TTT u Φ λf x

f Φ HH ⋆ u u (f, ⋆ | (y, t)) H u HH uu HH u H uu

w if KKKK w KK ww w KK ww

xλ t

λ

λ



z

y

(x, t)

λ t

λ x

Functional Reachability – 15

VP(A1 , . . . , An , o) := Var × Val × P( Notation: (x, v), (x, v | π1 , . . . , πn )

Variable profiles

Sn

i=1 VP(Ai ))

λ

λΦz

@ TIITTTT u III TTT uu u II TTTTT u u TTT u Φ λf x

f Φ HH u u (f, ⋆ | (y, t)) H (Φ, ⋆ | (f, ⋆ | (y, t)), (x,ut)) u HH u HH u H uu f

λ (y, t)

y



λy

w if KKKK w KK ww w KK ww

t

λ

λ



z

y

(x, t)

λ t

λ x

Functional Reachability – 15

ATA correspondence Given a finite fPCF⋆ -alphabet Σ, the states of the traveral-simulating ATA AΣ are:

Q := Val × P(VPΣ ) × P(VPΣ ) P ։ v iff AΣ accepts λ(P ) on initial state with value v . Any tree accepted by AΣ on closed initial state represents a closed fPCF⋆ term over Σ.

Functional Reachability – 16

Results Theorem: M : (A1 , . . . , An , o) ∈ v-Reach [fPCF⋆Σ , fPCFΣ ] iff there is a closed initial state q0 with value v such that: • AΣ (q0 ) accepts λ(M ), • ∀i, the language accepted by AΣ ˜ (q0 ↾ Ai ) is non-empty.

Functional Reachability – 17

Results Theorem: M : (A1 , . . . , An , o) ∈ v-Reach [fPCF⋆Σ , fPCFΣ ] iff there is a closed initial state q0 with value v such that: • AΣ (q0 ) accepts λ(M ), • ∀i, the language accepted by AΣ ˜ (q0 ↾ Ai ) is non-empty. Corollary: ⋆-Reach [fPCF⋆ , fPCF(n)] is decidable. Corollary: ⋆-Reach [fPCF⋆ , fPCF] is decidable up to order 3.

Functional Reachability – 17

Results Theorem: M : (A1 , . . . , An , o) ∈ v-Reach [fPCF⋆Σ , fPCFΣ ] iff there is a closed initial state q0 with value v such that: • AΣ (q0 ) accepts λ(M ), • ∀i, the language accepted by AΣ ˜ (q0 ↾ Ai ) is non-empty. Corollary: ⋆-Reach [fPCF⋆ , fPCF(n)] is decidable. Corollary: ⋆-Reach [fPCF⋆ , fPCF] is decidable up to order 3.

• For the general case (also with ⊥) we use Alternating Dependency Tree Automata [Stirling’09]. • Corollary: Emptiness problem is undecidable for ADTA’s. Functional Reachability – 17

Last slide • A new kind of Reachability problems. • Some undecidability results. • Some technology from game semantics. • Characterisation by ATA’s and ADTA’s. • Some (relativised) decidability results.

Functional Reachability – 18

Last slide • A new kind of Reachability problems. • Some undecidability results. • Some technology from game semantics. • Characterisation by ATA’s and ADTA’s. • Some (relativised) decidability results.

• Conjecture: ⋆-Reach [fPCF⋆ , fPCF] ? • Can this yield a (semantic) CFA? • Extensions: expressivity, algorithms, abstractions.

Functional Reachability – 18

Last slide • A new kind of Reachability problems.

Thank you!

• Some undecidability results. • Some technology from game semantics. • Characterisation by ATA’s and ADTA’s. • Some (relativised) decidability results.

• Conjecture: ⋆-Reach [fPCF⋆ , fPCF] ? • Can this yield a (semantic) CFA? • Extensions: expressivity, algorithms, abstractions.

Functional Reachability – 18

Functional Reachability

Is there a program context C such that computation of C[M] reaches p? ..... Functional Reachability – 15. VP(A1,...,An,o) := Var × Val × P(⋃ n i=1. VP(Ai)).

240KB Sizes 0 Downloads 164 Views

Recommend Documents

SRAM Dynamic Stability Verification by Reachability ...
Mar 27, 2013 - variation, the mismatch among transistors may lead to func- tional failures. ...... In IEEE Design, Automation and Test in Europe. (DATE), Mar.

Reachability of Linear Switched Systems: Differential ...
Jun 20, 2005 - Key words: Hybrid systems, switched linear systems, reachable set ... The inputs of the switched system Σ are the functions PC(T, U) and the.

ProbReach: Verified Probabilistic Delta-Reachability for ...
We present ProbReach, a tool for verifying probabilistic reachability for stochastic hybrid systems, i.e., computing the probability that ... tem behaving in a faulty way. By investigating a .... {call dReach}. 12 if φC ([x]) .... ios are given in t

Reachability Graph of Finite and Deterministic DEVS ...
1Why we introduce the restrictions 1)–3) will be explained at footnote 9 in. Section IV-C. ...... Laptop with 1.3 GHz CPU and 1.0 GByte RAM. We consider a ...

Reachability Queries on Large Dynamic Graphs: A ...
inapplicable to the dynamic graphs (e.g., social networks and the ... republish, to post on servers or to redistribute to lists, requires prior specific permission.

ePUB Functional Programming in Java: How functional ...
... performance and parallelization and it will show you how to structure your application so that it will ... a better Java developer. ... building enterprise software.

Functional Remedies.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Functional Remedies.pdf. Functional Remedies.pdf. Open. Extract. Open with. Sign In. Details. Comments. Gene

Functional rarefaction: estimating functional diversity from field data
With the inferential tools that we develop here, researchers will be ... conduct a functional rarefaction analysis of field data. Comparisons with ..... dimensions, it can not be easily represented on graph paper. ... Third, we used PCoA to visualize

Functional Remedies.pdf
yields the highest concentrations of. healthy cannabinoids (CBD, CBG, CBN),. terpenes, phytonutrients and all the. other amazing compounds found in. hemp. It's full-spectrum goodness on. turbo-charge. WE. MAKE. THE. BEST. CBD. HEMP. OIL. Page 3 of 10

Functional English.pdf
3) 'The Grapes of Wrath'---------------an excellent book. 4) Students-------------doing their home work. .... Main menu. Displaying Functional English.pdf. Page 1 of 4.

Functional Traits - Richard Vogt
Feb 15, 2016 - processes (effect traits) (Violle et al., 2007; Diaz et al., 2013). .... aFunctional plant classification by physical characters (plant height, stem density) .... Seed mass. Dispersal mode. Seed mass and shape. Competitive ability. Com

Functional Traits - Richard Vogt
Feb 15, 2016 - Beatrix E Beisner, Department of Biological Sciences, University of Quebec at. Montreal ... ecosystem functions or services (Norberg, 2004; Hooper et al., .... Ecosystem services. People. Environmental drivers. Filtering. Species. A. B

Functional Programming in Scala - GitHub
Page 1 ... MADRID · NOV 21-22 · 2014. The category design pattern · The functor design pattern … ..... Play! ∘ Why Play? ∘ Introduction. Web Dictionary.

Adaptive Functional Programming
dependences in the execution in the form of a dynamic dependence graph. When the input to the program changes, a change ... Languages and Systems, Vol. 28, No. 6, November 2006, Pages 990–1034. ... and re-executing code where necessary. The input c

Functional Requirements Questionnaire (FRQ) Overview.pdf ...
Blue Prism Group plc, Centrix House, Crow Lane East, Newton-le-Willows, WA12 9UY, United Kingdom. Registered in England: Reg. No. 4260035. Tel: +44 870 ...

Density functional theory
C. Beyond mean-field: Recovering the missing correlation. 10. IV. The Kohn-Sham revolution: Single-particle equations with correlation. 11. A. Replacing Ψ by ρ: The Hohenberg-Kohn functional. 11. B. How Kohn and Sham used F[ρ] to include electron