and make_list is responsible for the value flowing into f
Reading about dereferences (x[0]) in their calculus:
their blame theorem is that a "safe coercion" never gets blamed. A coercion from type T1 to type T2 is written T1 => T2
their calculus translates source programs to target programs with coercions and checks. A check is not a coercion. A check that v has type T is written v \Downarrow T
a bad deference (like our example) raises a blame error
that blame error will blame a set of labels
the label between typed code for List(Int) => List(Int) will not appear in the set
what other labels will? I don't know yet.
NOTE "coercion" and "cast" are my own words, I'm not sure that's exactly what they say in the paper.
Translate this example to the calculus from their POPL'17 paper. What happens?
Running in reticulated:
f
make_list
is responsible for the value flowing intof
Reading about dereferences (
x[0]
) in their calculus:T1
to typeT2
is writtenT1 => T2
v
has typeT
is writtenv \Downarrow T
List(Int) => List(Int)
will not appear in the setNOTE "coercion" and "cast" are my own words, I'm not sure that's exactly what they say in the paper.