Java Generics Are Turing Complete Radu Grigore September 2017 - - PowerPoint PPT Presentation

java generics are turing complete
SMART_READER_LITE
LIVE PREVIEW

Java Generics Are Turing Complete Radu Grigore September 2017 - - PowerPoint PPT Presentation

Java Generics Are Turing Complete Radu Grigore September 2017 Highlights Why do we care? . . . . . . distinguished at ECOOP 2016 But . . . Java is messy! FOOL 2007 Problem Input infinite directed graph two distinguished vertices t


slide-1
SLIDE 1

Java Generics Are Turing Complete

Radu Grigore September 2017 Highlights

slide-2
SLIDE 2

Why do we care?

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6

. . . . . .

slide-7
SLIDE 7

distinguished at ECOOP 2016

slide-8
SLIDE 8

But . . . Java is messy!

slide-9
SLIDE 9

FOOL 2007

slide-10
SLIDE 10

Problem

Input infinite directed graph two distinguished vertices t and t′ Output Is there a finite path t t′ in the given graph?

slide-11
SLIDE 11

Vertices: Types

f (g (x), h ())

slide-12
SLIDE 12

Vertices: Types

f 2(g1(x), h0())

slide-13
SLIDE 13

Vertices: Types

f gxh

slide-14
SLIDE 14

Vertices: Types

x, y, ...are variables C, D, ...have arity 1 Z has arity 0

Example vertex/type: CDCCDEZ

s, t, ...are meta-variables, ranging over types

slide-15
SLIDE 15

Arcs: Inheritance Rules

the inheritance rule

Cx <:: t(x)

means that, for all ground types s, there is an arc

Cs → t(s)

slide-16
SLIDE 16

Arcs: Inheritance Rules

the inheritance rule

Cx <:: t(x)

means that, for all ground types s, there is an arc

Cs → t(s)

class table set of inheritance rules

slide-17
SLIDE 17

Arcs: Contravariance

if

s t

then

Ct → Cs

slide-18
SLIDE 18

Theorem It is undecidable whether t t′ according to a given unambiguous class table.

slide-19
SLIDE 19

Theorem It is undecidable whether t t′ according to a given unambiguous class table. class table subtype query type checker Y/N/? Turing machine input tape

slide-20
SLIDE 20

Theorem It is undecidable whether t t′ according to a given unambiguous class table. class table subtype query type checker Y/N/? Turing machine input tape

applies to Java!

slide-21
SLIDE 21

eof