Gradual Parametricity, Revisited

Size: px
Start display at page:

Download "Gradual Parametricity, Revisited"

Transcription

1 <latexit sha1_base64="tedsamj/tflchcmupueabzjwdeg=">aaachicbvddssmwge39nfov6qu30sf4y2lfuerk6i3etbbys0jtdmtle1lkgqj7nrh8am81sfwtrwvh8d3mo12ozshkpyc7zvkywlsrqwy7s9jbn5hcwm5sljdvvf2ds3tlsyyqqmtzywrlgbkorrtpqkkkbcvbaub4y0g8f1uw8/ecfpwu/vmcv+jhqcrhqjpawuuedfiucmqdecljy61nvfofruusouxdk1a7zll4czxjmqgpig0tw/vtdbwuy4wgxj2hsvpk5eopirkzvl5mkriaeqsjkucxk5efmued7qsqj2tnqguv3tyfes5taodgemvf9o1wrxv1onu9gzn1oezopwph4oyhhucsxygsevbcs21arhqfwseperqfjp9kpeacxdelfoi+tksofitkcws1rhlmnbzt1jr41sagcdse+oaqooav1camaoakweatp4aw8gk/gm/fufixb54yjzwf8gfh5a4h9n/m=</latexit> <latexit sha1_base64="tedsamj/tflchcmupueabzjwdeg=">aaachicbvddssmwge39nfov6qu30sf4y2lfuerk6i3etbbys0jtdmtle1lkgqj7nrh8am81sfwtrwvh8d3mo12ozshkpyc7zvkywlsrqwy7s9jbn5hcwm5sljdvvf2ds3tlsyyqqmtzywrlgbkorrtpqkkkbcvbaub4y0g8f1uw8/ecfpwu/vmcv+jhqcrhqjpawuuedfiucmqdecljy61nvfofruusouxdk1a7zll4czxjmqgpig0tw/vtdbwuy4wgxj2hsvpk5eopirkzvl5mkriaeqsjkucxk5efmued7qsqj2tnqguv3tyfes5taodgemvf9o1wrxv1onu9gzn1oezopwph4oyhhucsxygsevbcs21arhqfwseperqfjp9kpeacxdelfoi+tksofitkcws1rhlmnbzt1jr41sagcdse+oaqooav1camaoakweatp4aw8gk/gm/fufixb54yjzwf8gfh5a4h9n/m=</latexit> <latexit sha1_base64="tedsamj/tflchcmupueabzjwdeg=">aaachicbvddssmwge39nfov6qu30sf4y2lfuerk6i3etbbys0jtdmtle1lkgqj7nrh8am81sfwtrwvh8d3mo12ozshkpyc7zvkywlsrqwy7s9jbn5hcwm5sljdvvf2ds3tlsyyqqmtzywrlgbkorrtpqkkkbcvbaub4y0g8f1uw8/ecfpwu/vmcv+jhqcrhqjpawuuedfiucmqdecljy61nvfofruusouxdk1a7zll4czxjmqgpig0tw/vtdbwuy4wgxj2hsvpk5eopirkzvl5mkriaeqsjkucxk5efmued7qsqj2tnqguv3tyfes5taodgemvf9o1wrxv1onu9gzn1oezopwph4oyhhucsxygsevbcs21arhqfwseperqfjp9kpeacxdelfoi+tksofitkcws1rhlmnbzt1jr41sagcdse+oaqooav1camaoakweatp4aw8gk/gm/fufixb54yjzwf8gfh5a4h9n/m=</latexit> <latexit sha1_base64="tedsamj/tflchcmupueabzjwdeg=">aaachicbvddssmwge39nfov6qu30sf4y2lfuerk6i3etbbys0jtdmtle1lkgqj7nrh8am81sfwtrwvh8d3mo12ozshkpyc7zvkywlsrqwy7s9jbn5hcwm5sljdvvf2ds3tlsyyqqmtzywrlgbkorrtpqkkkbcvbaub4y0g8f1uw8/ecfpwu/vmcv+jhqcrhqjpawuuedfiucmqdecljy61nvfofruusouxdk1a7zll4czxjmqgpig0tw/vtdbwuy4wgxj2hsvpk5eopirkzvl5mkriaeqsjkucxk5efmued7qsqj2tnqguv3tyfes5taodgemvf9o1wrxv1onu9gzn1oezopwph4oyhhucsxygsevbcs21arhqfwseperqfjp9kpeacxdelfoi+tksofitkcws1rhlmnbzt1jr41sagcdse+oaqooav1camaoakweatp4aw8gk/gm/fufixb54yjzwf8gfh5a4h9n/m=</latexit> <latexit sha1_base64="gt+gp89y784vwrxqcdyatn8bjts=">aaaci3icbvdnssnagnzuv1r/oh69lbbriyerqrgrohe9vba/0isy2wzapztn2n0ijfqrfayfwks+gtfx4sgj7+em7ag2frdsmpmnozt+wqhutv1llbywl5zyquvtfwnzs1ze6cp41rg0saxi0br5iwyklducvioxeert4jl9wk+utryikjfmdgibei1cp05bipdtvnq/do67g8rus7ssl6iaxqizbtgwnpa5zts27gdgpnamogsnuu+apg8q4jqhmcepo46dkc9dqlhmykjippikca9qj3q05cgi0sukd43ggwycqjpoozmu7lqjq5guw8jmxfsftmr5er/widv4bmuz6kina8fihmgvqxznubaruekzbuagfbdvai+0ggrhshfbcwzgejkad5f3kke3fmw5ghzrplss3n/rrau540vaz7yb8caqecgrq4bqabg8grfwct6mz+pd+da+x6sly+lzb/g+p4fb1aijq==</latexit> <latexit sha1_base64="gt+gp89y784vwrxqcdyatn8bjts=">aaaci3icbvdnssnagnzuv1r/oh69lbbriyerqrgrohe9vba/0isy2wzapztn2n0ijfqrfayfwks+gtfx4sgj7+em7ag2frdsmpmnozt+wqhutv1llbywl5zyquvtfwnzs1ze6cp41rg0saxi0br5iwyklducvioxeert4jl9wk+utryikjfmdgibei1cp05bipdtvnq/do67g8rus7ssl6iaxqizbtgwnpa5zts27gdgpnamogsnuu+apg8q4jqhmcepo46dkc9dqlhmykjippikca9qj3q05cgi0sukd43ggwycqjpoozmu7lqjq5guw8jmxfsftmr5er/widv4bmuz6kina8fihmgvqxznubaruekzbuagfbdvai+0ggrhshfbcwzgejkad5f3kke3fmw5ghzrplss3n/rrau540vaz7yb8caqecgrq4bqabg8grfwct6mz+pd+da+x6sly+lzb/g+p4fb1aijq==</latexit> <latexit sha1_base64="gt+gp89y784vwrxqcdyatn8bjts=">aaaci3icbvdnssnagnzuv1r/oh69lbbriyerqrgrohe9vba/0isy2wzapztn2n0ijfqrfayfwks+gtfx4sgj7+em7ag2frdsmpmnozt+wqhutv1llbywl5zyquvtfwnzs1ze6cp41rg0saxi0br5iwyklducvioxeert4jl9wk+utryikjfmdgibei1cp05bipdtvnq/do67g8rus7ssl6iaxqizbtgwnpa5zts27gdgpnamogsnuu+apg8q4jqhmcepo46dkc9dqlhmykjippikca9qj3q05cgi0sukd43ggwycqjpoozmu7lqjq5guw8jmxfsftmr5er/widv4bmuz6kina8fihmgvqxznubaruekzbuagfbdvai+0ggrhshfbcwzgejkad5f3kke3fmw5ghzrplss3n/rrau540vaz7yb8caqecgrq4bqabg8grfwct6mz+pd+da+x6sly+lzb/g+p4fb1aijq==</latexit> <latexit sha1_base64="gt+gp89y784vwrxqcdyatn8bjts=">aaaci3icbvdnssnagnzuv1r/oh69lbbriyerqrgrohe9vba/0isy2wzapztn2n0ijfqrfayfwks+gtfx4sgj7+em7ag2frdsmpmnozt+wqhutv1llbywl5zyquvtfwnzs1ze6cp41rg0saxi0br5iwyklducvioxeert4jl9wk+utryikjfmdgibei1cp05bipdtvnq/do67g8rus7ssl6iaxqizbtgwnpa5zts27gdgpnamogsnuu+apg8q4jqhmcepo46dkc9dqlhmykjippikca9qj3q05cgi0sukd43ggwycqjpoozmu7lqjq5guw8jmxfsftmr5er/widv4bmuz6kina8fihmgvqxznubaruekzbuagfbdvai+0ggrhshfbcwzgejkad5f3kke3fmw5ghzrplss3n/rrau540vaz7yb8caqecgrq4bqabg8grfwct6mz+pd+da+x6sly+lzb/g+p4fb1aijq==</latexit> <latexit sha1_base64="uuaalrt2d2bj5o+2o3z+emwtft8=">aaacjhicbvdlsgmxfl3jo2p9jbrsjiicg8umg11p0y3ufgwrderjzdiamkmgjfmoq0h/w7vu9t/ciqs3fotg3kxbwdebkjnz7+henddltbvpe3umjqemszozc+5hcwlzdltaflpgite8mlugixppwjwjfmchqrkoqtknnm2d0q6s0evzpjcw76kw0n+fkwmbfsrnrxk8gjmgh7hwuhknaske7idsgl77gbtubav0l/phs1eq3h9cacnpx34nikiyhwhcotw75mraovageu4h5sdtnmwkiy9py1kbe6rb+fata7rplqjfutljvxqq3x05trtuj6httlc50r9rhfhfrzwzek+dm5fmhgoyghrnhbmjikrqxbqlhvctwuqxuysiv1hhymxu5wbozcmam8gkzptgs+tfbfc2ifm/i/llgjtv36v6zzatgowwcxvyhy3wyrdqcaynuaccn3apd/do3dlpzrpzmmqdcmaenfgb5+0tj0+lpq==</latexit> <latexit sha1_base64="dv+za/citurtsmyynlkk2y0xpa=">aaacjhicbva9swmxgm6prbv+vr27bivgyrlz0umllrpvsb/qkywy7whuericovydhdxvzjr4qd/w00cpwrgru5tok2phdy5hnfh/fn40wmkm3b79bc4limu5xbya+urw9sfra260reepmafkzipocuyzstmqaakwykcqo9rhpe/zytnwzekir4tr5gpb2ilqcbxugbqvmoupdcw4mt6j5cv9ewvdpmrcsuyjzzsmoe+ckslvsndf/pe2u+0upl1f4dgkgoglgo5dqtbczkaykzgetdwjek4j7qkzshhivhtzpyjedwzig8dic0xk43v344ehuonq890hkj31gwtff+rtwidhlctyqnye44ng4kyqs1gmgj0qsrys6ehcetqdow4hytc2uswd8fgxccb5ttnti1+tifpr3ktkjmbytyph5ydu+xcmbqqyiickijdsa8ccaqq4ajuqq1gcamewbn4tu6tf+vvepu0llhtzw74a+vjg9pvpso=</latexit> <latexit sha1_base64="dv+za/citurtsmyynlkk2y0xpa=">aaacjhicbva9swmxgm6prbv+vr27bivgyrlz0umllrpvsb/qkywy7whuericovydhdxvzjr4qd/w00cpwrgru5tok2phdy5hnfh/fn40wmkm3b79bc4limu5xbya+urw9sfra260reepmafkzipocuyzstmqaakwykcqo9rhpe/zytnwzekir4tr5gpb2ilqcbxugbqvmoupdcw4mt6j5cv9ewvdpmrcsuyjzzsmoe+ckslvsndf/pe2u+0upl1f4dgkgoglgo5dqtbczkaykzgetdwjek4j7qkzshhivhtzpyjedwzig8dic0xk43v344ehuonq890hkj31gwtff+rtwidhlctyqnye44ng4kyqs1gmgj0qsrys6ehcetqdow4hytc2uswd8fgxccb5ttnti1+tifpr3ktkjmbytyph5ydu+xcmbqqyiickijdsa8ccaqq4ajuqq1gcamewbn4tu6tf+vvepu0llhtzw74a+vjg9pvpso=</latexit> <latexit sha1_base64="rcjy0lef1cmeipbmve2q4kqbleg=">aaacjhicbvc7tsmwfhv4lvikmhaxqjbyqbiwmkccbbyi0yfuvjjok1vx45sp1ivdebnyi/yemmlhwe4ctbglajmt5+nx7dk+phzoqton8wevlk6tr66wn8ubw9s6uvbffuikrmdsxyej2fkqio5w0ndwmdgjjuoqz0vzh11m9pszsuchv9sqmvqgnoa0prtpifbvi3inty6gdwk9rapszl5qrc+vqtg64snycvegbrt/+8gkbk4hwjrlsqus6se6lsgqkgzmwvusrgoergpcuorxfrps/bntegsuaizcmmnwytfjhrfsk0i33rgsa/vfc0t/6t1ex2e91lk40qtjmedworblwcwcayojfiziseis2p2hiijmla5fb2cmmakjbymmwmpj/aokdtsgnjny9kkbroa65tc++car1exfucfaijoelzkad3iagaaimhsateayv1qp1ar1z77pwjavwhia/sd6/abqmo04=</latexit> Gradual Typing 101 precision Int! Int v Int!? v?!? v? Gradual Parametricity, Revisited some gradual types convey more information than consistency others best-effort static checking backed by dynamic checking Int!??! Bool Int!? 6 Bool!? <latexit sha1_base64="xwkkkm4momkpbjatwvvkw8bug=">aaackhicbzdnsgmxfiv+fvr9wvudbybdewgte60qib3anywuiukslkndstdemmuiyuxfrrb6ho3hri/gezqykwj0qojx7l/fmcxlothhdn2dicmp6zry0v55fwfxarqysnrvmfaenirlurqbrypmgdcmmp61eurwhnf4hvzo8ft2nsjmprswgoz0y3wgwmyknjbqvtf9mglr7ipwj5atpfm1i5b9lyudht1j1a24h9nd46za7+/rapaebfy4yespdevhncsddtze9pjsdkmcdos+6mmcsy9fepb1gocu93jio8m0bznqhrjzz89q0h/tmq41noqb7yzxuzwj9fy8l9aozrqsdjikknfws0keo5mhllvfdifcwgd6zbrdf7kyk3wgfilluywxmiy2yydk3pfzo+iebli0kbxzj9pcq3luzbuwthjuuuqwavuwax7sqx1o4rwaqoaohuejnp0h58v5dd5grrpo18wa/jlz/glynkav</latexit> sha1_base64="gi5b4mjtwakzfmc2wyu/lu7/bly=">aaackhicbvdlsgmxfm3uv62vqitxybaibiwzbnslrte6u7fw6jsaydyxozlksdkfmnqp/kvd6n+4e7d+gl9gplwdsbwooce7s0jes60cd1pzaxotu9u5wtzc0vlc6vl1eutewvhtqvkrrggjgteddmmpholfa4obdi+ge536jb0ozks5np4fwtg4fixglxkrt8oz/kgzeocd+ifafnl5mmfapporjsv2uufv3bpyej+kulu7v7i8gcjzu/zuh5kmmqhdodg66bmjawveguy5dep+qiehtetuowmpidhovjb6yabvwsekvt22bng6vdermkt+3fgj2niovq3l4v/ec3urputjikknsdoefgucmwkzlvbivnade9bqqhi9lzmo0qramx3j8uzekimgb5b3rwpfvcnijzkrzflfwlv7tvz61657atghqjinbrjtpghtpdnsczladushhtajenkgzrpz4ryorwvoz2yv/ydz9ggop6gy</latexit> sha1_base64="dmdpmor1sfp38tc/jeovjrbdvfu=">aaackhicbvdlsgmxfm34rpu16tkfwsk4scy40zuw3eiugn1ap5rmjtog5jekmuizuvrndkv/4u669rp8atn2bg09ediccw/35oqjo9p43thzwl5zvsvbbq3t7z3dt29/bqwqckkhiwtqhkitrgvpgaoyaszkij4yegj7n9o/maake2ledtdhlq56goau4ymltruuavddy7gse1diq0gaycbjdsspnycute2zsclhi/jywqo9pxv4ji4pqtytbdwrd8lzhtdcldmsojypbqkidcr13sslqgtnq7m35kbe+sesfykvvswvp1dyjdoshd+0kr6an572j+j/sk182c6osfjdbj4tilmgjystvmbefcggds1bwff7k8q9pba2trtima1meympojpe9ohhg0r0vlql+fovljl6edn3yv6dv6pu8rok4bacg1pggwtqaegcmoagyfwal7bm/psvdsfzng2uutkmqpwb87nnzzjpsm=</latexit> Éric Tanter Inria Paris & University of Chile joint work with Matías Toro & Elizabeth Labrada type safety (+ s) conservative extension of static language embedding of dynamic language gradual guarantees SGG & DGG 1 2 Challenging Gradual Typing Parametric Polymorphism subtyping unions recursive types refinements effects session types 3 typestates parametric polymorphism ownership security typing System F explicit f :.! f = Λ.λx:.x f [Int] 10 f [Bool] add type binders infer type instantiations Haskell implicit f :! f = λx.x f 10 f implicit polymorphism induces a notion of subtyping 8.! <: Int! Int add [Int] Int! Int <: 8.Int! Int 4 add Λ

2 Parametricity 101 Gradual Parametricity Flavors of parametric polymorphism g : (.!)! Int g = λh:(.!).h [Int] 10 Genericity: type safety with generic definitions Parametricity: strong reasoning principle ( theorems for free ) G f : 8.! P n0 <latexit sha1_base64="6pcm44zr9pqg/kviojpilr4d0e=">aaab+3icbvdlssnafl2pr1pfvzdugkvwvrirdfl047if+4a2lmnkph06myszivbcv8ctfoe7cevh+ah+h5m0c209mha45x7unemnncntof9wzwnza3unulvb2z84pkofn/runeqkrrzwa58opazgv3nnmdbipfepse+p7vp/f4tssvi8ajncormqgwmkq0ktpig84taeavu7ckjsgrhtc/x4fmu0jfjpyottqdrltzurqrjkuaqnuyulojexwakggesovkw5d2bdgcewwluyjbrfq70rgiqmkw8mi6knatlxf+8yardwy9jikk1crpcfkbc1rgd/9oomesq+dwqqiuzt9p0sish2nrtgxblmcqczb3ohamf3e1hsu2q6ttptddad2vdvtidc7gef26gbq/qhi5qqhigf3i1ftab9w59lecrvpk5ht+wpn8agoavha==</latexit> <latexit Gradual parametricity is challenging early work on PBC [POPL 11] without proof of parametricity several recent developments: [ICFP 17], System FG [ICFP 17], ie et al [ESOP 18] arguable decisions, problems, conjectures (dynamic GG?) free theorems not fully understood n <latexit sha1_base64="6pcm44zr9pqg/kviojpilr4d0e=">aaab+3icbvdlssnafl2pr1pfvzdugkvwvrirdfl047if+4a2lmnkph06myszivbcv8ctfoe7cevh+ah+h5m0c209mha45x7unemnncntof9wzwnza3unulvb2z84pkofn/runeqkrrzwa58opazgv3nnmdbipfepse+p7vp/f4tssvi8ajncormqgwmkq0ktpig84taeavu7ckjsgrhtc/x4fmu0jfjpyottqdrltzurqrjkuaqnuyulojexwakggesovkw5d2bdgcewwluyjbrfq70rgiqmkw8mi6knatlxf+8yardwy9jikk1crpcfkbc1rgd/9oomesq+dwqqiuzt9p0sish2nrtgxblmcqczb3ohamf3e1hsu2q6ttptddad2vdvtidc7gef26gbq/qhi5qqhigf3i1ftab9w59lecrvpk5ht+wpn8agoavha==</latexit> <latexit <latexit sha1_base64="/ytveqe+g2lilrwwqwvvan32i8=">aaab/hicbvdlssnafl2pr1pfvzdugkv0vrirdfl047kkfuabymr60w6dtmlmrcihfofb/qj34tz/8qp8dydpftp6yobwzj3co8epovpacb6s0srq2vpgeboytb2zu1fdp2irkjeuwztikez6rcfnaluaay7dwcijfy4df3kt+z1hlipf4kfpy/rcmhisyjroi92l00g15tsdhpyycqtsgwlnqfw7p4xoeqlqlboleq4tay8lujpkcvbpjwpjqidkhd1dbqlrewl+6cw+mcrqdijpntb2rv5opcruahr6zjikeqwwvuz8z+slorjyuibirkog80vbwm0d2dm37sgtsdwfgkkozozwm46jjfsbcir9pjgomwcczcwomenfwxhmbtp665td+8uao3roqeyhmexniell9caw2hccyge8awv8go9ww/wu/uxhy1zreyq/sd6/ahktjw1</latexit> <latexit sha1_base64="vuomklr0yzmectbbhlvyyfzpds=">aaacbhicbvdlssnafl3xweur6tlnybfcluqebtdfn7qryb+yhdkzttqhk0mymqgldosunuvccdu/q8/wp9wkmahrqcgdufcw71zgoqzpw37y1palldw69svde3tnd2a3v7hrwnkta2iksewfwldnb25pptnujpdgkoo0g4+vc7z5sqvgs7vuko6eh4kfjgbtpifqu0sudyu036/v7yzdac0spyr1knhq1769quzsiapnofbkdexe+xmwmhfop1uvvttbziyh1dvu4igqpysunqjjowxqgevzheaf+jur4uipsrsyyqjrkzr3cve/z011eofntcsppolmfouprzpg+ffrgelknj8ygolk5lzerlhiok1jva8izgmamshygttu9olmt7bioqcnx244d2f15lzuauo4qhowifzamintkanbaq8wwu8wk/wm/vufcxgl6wycwb/yh3+aitommw=</latexit> g : 8Y.! Y! <latexit sha1_base64="jyzed7aeytaet1dnl6wzunbalgs=">aaacfnicbvbps8mwhe39o+e/qje9bifgxdgkohiqorepe9zwszarpukwlqylsyvrbn4mp4f/qtexktp4dfw7trqtcfjdze+z3yy/mtrqwyrc9jyfpeww1slzd39jc2jz3dtsytgumlryzwdg+korrtlqkkkacrbau+yx0/nfn7nceija05vdqnbavqgnoq4qr0llf3b9cqjembwimot06dodjfezml9m3a1bdkgdniv2sgijr7jvfbhdjncjcyyak7nlworwmcuuxi5oqm0qsidxca9ltlkoisc8r/jcbr1ojon5eh65gof5ozcischz5ejjcaihnvvz8z+ulkrzwmsqtvbgopw+fkymqhnkhmkccymgmiasqn4v4iescctdw9utgllaqspppmc6f7s2rbmsfu0blt1++6s1rgug6qaa3aijoenzked3iimaaemhsezeagvxppxzrwbh9prbapm7ie/md5/ajusnvw=</latexit> g [Int] [Int] n1 n2 <latexit sha1_base64="/ytveqe+g2lilrwwqwvvan32i8=">aaab/hicbvdlssnafl2pr1pfvzdugkv0vrirdfl047kkfuabymr60w6dtmlmrcihfofb/qj34tz/8qp8dydpftp6yobwzj3co8epovpacb6s0srq2vpgeboytb2zu1fdp2irkjeuwztikez6rcfnaluaay7dwcijfy4df3kt+z1hlipf4kfpy/rcmhisyjroi92l00g15tsdhpyycqtsgwlnqfw7p4xoeqlqlboleq4tay8lujpkcvbpjwpjqidkhd1dbqlrewl+6cw+mcrqdijpntb2rv5opcruahr6zjikeqwwvuz8z+slorjyuibirkog80vbwm0d2dm37sgtsdwfgkkozozwm46jjfsbcir9pjgomwcczcwomenfwxhmbtp665td+8uao3roqeyhmexniell9caw2hccyge8awv8go9ww/wu/uxhy1zreyq/sd6/ahktjw1</latexit> <latexit sha1_base64="yl7a9ak8rb16jmtqxaiywwgrg9w=">aaab/icbvdlssnafl2pr1pfvzdugkvwvrirdfl047kiryu2lmnkph06myszivbc8qvc6he4e7d+ix/gfzhjs9dwawohc+7h3jl+wpnsjvnlvvzw19y3qpu1re2d3b36/kfxamk2kexj2pjwo5e9jrthpsjrjj5hn88cfuf/wifkxwnzrayjereachywsbaq7msh9ybtdaryy8qtsqnktif170eq0zrcosknsvvdj9ferqrmloosnkgvjoroyaj7hgosofky4tszfwkuwa5jaz7qdqh+tmqkumoa+wyyinqsfr1c/m/rpzq89dimklsjopnfycpthdv5v+2asasatw0hvdjzq03hrbkqttu1qrhmagyzyhkzamz6crdbwcbds6brnn3b80brqmyockdwdkfgwgw04aba0aeki3igf3i1nqw36936mi9wrdjzch9gff4asrcwka==</latexit> <latexit sha1_base64="9jsurbfu5vldre8bfjj2e084cm0=">aaab/icbvdlssnafl2pr1pfvzdugkvwvzii6lloxmvf+4a2lmn0ph06myszivbc8qvc6he4e7d+ix/gfzhjs9dwawohc+7h3jl+zjnsjvnlldbwnza3ytuvnd29/ypq4vfhrymk2kyrj2tpjwo5e9jwthpsxrjj6hps+tobzo8+olqseg96fqmkrfgaaneg+ledbvdas2poznsveiwpayfwspq92au0sreosknsvvdj9zesqrmloo8mkguxoroyrj7hgosovls/ns5fwaukr1e0jyh7vz9nuhjqnqs9m1kspreluz+j/t3rw5avmxilgqrelgotborkzf9sjjpfqpjoeumnmrtadeemonu1ubnkwhwhabmuaupti7vcwirpnoquu3fvlmrn66khmpzakzydc5fqhftoqrsojoezudverlerhfryzfasormmfyb9fkdsqewkq==</latexit> <latexit sha1_base64="nsa4ttvvz6i/px6rjayrjslfejs=">aaacdnicbvdlssnafj34rpuv69lnybfcluqehw6kbnrwt6gcwuyuwmhtizhzikw0h/wc9zqf7gtt/6ch+b/og2z0nydwxzouyd7ouhkmdko82wtrk6tb2ywtsrbo7t7+/zbpa2stfjo0yqnshsqbzwjagmmortcsqoohsc0fu7zyavcwr93qcgh+tgwaro0qbqw9bl4d97xbo2vpv/7dtwpotpgzeiwpioknpv2txcmnitbamqjuj3sbwfe6kz5tape5mclnargudpuefiuh4+u32ct4ws4iir5gmnz+rvre5ipczxyczjoodq0zuk/3m9teefs5emmkqdl4oyjjwcz4wgummgwo+norqycytma6jjfsbusreljihedhbplwpienfwxhmbtpaq5tc+/oq42roqesoklh6bs56ai10a1qohai6be9oxf0aj1zb9a79tefbgkzch6a+vzb9arncq=</latexit> n 0 n1 design space is subtle and complex <latexit sha1_base64="yl7a9ak8rb16jmtqxaiywwgrg9w=">aaab/icbvdlssnafl2pr1pfvzdugkvwvrirdfl047kiryu2lmnkph06myszivbc8qvc6he4e7d+ix/gfzhjs9dwawohc+7h3jl+wpnsjvnlvvzw19y3qpu1re2d3b36/kfxamk2kexj2pjwo5e9jrthpsjrjj5hn88cfuf/wifkxwnzrayjereachywsbaq7msh9ybtdaryy8qtsqnktif170eq0zrcosknsvvdj9ferqrmloosnkgvjoroyaj7hgosofky4tszfwkuwa5jaz7qdqh+tmqkumoa+wyyinqsfr1c/m/rpzq89dimklsjopnfycpthdv5v+2asasatw0hvdjzq03hrbkqttu1qrhmagyzyhkzamz6crdbwcbds6brnn3b80brqmyockdwdkfgwgw04aba0aeki3igf3i1nqw36936mi9wrdjzch9gff4asrcwka==</latexit> 5 6 Gradual Parametricity Gradual Implicit Polymorphism [ie et al. ESOP 18] and FG use ad hoc static relations <latexit sha1_base64="hvs+aue5spprb5br4cvahwivzq8=">aaacdicbvdnssnagnzuv1r/uj16wsycf0migp6k6mvjbdsgmla2m027dlmjuxulhd6dt+bvn8cbepuzfadfw02ag7yolawz37ddbcmjutn2l1fbwv1b36hvnra2d3b3zoz+tyazwksle5yin0csmmpjv1hfijskgukak4wusn8/gmrkib8k1t4sdoxglemvjagppnl0oeygy6fnth6rv0h2bltuwscjk4fwmbcp2h+e2fcc5iwhvmsmqby6fkz5fqfdmya3izjcncezqia005ion087l6db5rjys6g35cwvl9nchrlou0dvrljnrylnqf+j83yfr06eeup5kihm8/ijigvqklhwbibcgkttvbwfddfeixeggrvvbdk4n5sclkabgunoldnmuvlknvzhjsy7k7b7wvq4q4bacgrpggavqbrega7oag0fwdf7aq/fkvbnvxsf8tgzumqpwb8bnd7mwmuq=</latexit> explicit polymorphism with (different) flavors of implicitness Int! Int?!? Int! Bool 8.! <latexit sha1_base64="str8cy+tqnqf4bcfmebv1xgl+u=">aaacbnicbvdlssnafj34rpvvdelmsahulikiupkig91vsa9oqplmbtqhk0mymqgldo8unuvccdu/q0/wp9wkmahrregozxzd/dw/iqzpw37y1palldw69svde3tnd2a3v7hrwnkkkbxjywpz8o4exawzpnozdiijhpoeupb3k9+whssvg86ekcksggowmem0o170tgp9e4fwf1op2wy4glwknbhvutmtq+3admkyrce05uarv2in2mii1oxymvtdvkba6jkpogyhibmrlisxtfgyyaiexnm9kknjfjoxesk0i32xgri/uvjat/2n9vieszekmoqdhyotdnwmc4lwagtqdwfgecozcyrpimicdwmpqpbglmaqizypgaml6c+rywqees4dgn5/683rwug6qgq3setpcdllat3aiwaiokevsmtcr9ws9we/wx2x1yso9b+jpwj8/ajuzpq==</latexit> <latexit sha1_base64="i0wgl9otvtt+t/v+sl8ckimqpw=">aaacanicbvdlssnafl2pr1pfvzdubovgxpkioctbdooygn1ae8pkmmmhtizhziku0j1f4fa/wj249uf8ap/dazqfth4yojxzd/fo8rpollbtl6u0srq2vlhergxt7+zuvfcpoipojaftevny9nyskgectjtnpysshkc9r1x7czv/tipwkxencthhorhgowmok1kpua51di7cxqnbsup0dlroniduo0bpuv90gjmlehsyck9v37er7gzaaeu6nftdvnmfkjie0b6jaevvelt87rsdgcvays/oerrn6o5hhsklj5jvjcourwvrm4n9ep9hlzcxkasacjjffkyc6rjnpo8cjinrfgiijpkzwxezyymjnhvv3dyybtrkgs3quvpti7pywjlpnncdu+7c9san0vdzticyzgfby6hcfqgjyq4paml/bqpvlv1rv1mr8twumep7a+vwb2hupq==</latexit> <latexit sha1_base64="evnh0f2rsf65sccgr7zztuhoba=">aaacb3icbvdnsgmxgpzw31r/qh69bivgxbirgp6k1ivektgf6c4lm2bb0gyyjlmhlh0an8crpoe38epj+ac+h9m2b20dcawz35bhwoqzbvz3y1lalldwy9sfde3tnd2s3v7ts1trwidsc5vo8sacizowzddattrfmchp61wej37rueqnjpi3owsgss4l1jecdzwcvxbyddpffjruvjuqexw3anqivfmpawz1lulb78nsrptyqjhwnc8nzfbhpvhhnnx0u81ttaz4j7twcpwthwqtuqp0bfveiisyj5byql+tmq41nouh/yyxmag571c/m/rpca6ddimktrqqayfrslhrqj8adrjihldr5zgopjtisgak0ym3anot4jzj0zmshwjpba7epmrljlmwcvzk97deblamy1ugem4ghpw4akqcan1aacbb3igf3h1npw35935mj4uobpmafyb8/kdk4+zqa==</latexit> <latexit sha1_base64="6uqcw1azmfmc7kwwadhkcnfhla8=">aaacehicbvdnssnagnz4w+tf/ll5wsycf0migp6k6evvfwwbaelzbdbt0s0m7g6egvospoffqjv4tu38af8dzdpdto6sddmfmmoe6smsmb8bc4tlyymptrb6+sbm1be7sdmsscuzaoggjcamkcaoctbvvjlipicgogokgo+vc7z4qiwnc79u4j6mbpxgfcolpb6570wjqixb14iuplme3i1fbnhw3yjoe+cijrahvbf/pbcbgcx4qozjgpsvpl50goihmz1l1mkhtherqqnqycxut6edl+ao+0ekjdqz+uykn+tuqolnicb/oyrmooz71c/m/rzsq68hpk00wrjqcfrrmdkohffdckgmdfxpoglkjucveqcysvhqzulce8jbhltbhltvquzuwk86rzajm25dydnzp1ui1caaowtfwwdloghvqam2awsn4bi/g1gy3ox342n6umbumt3wb8bndxtbnde=</latexit> f = Λ.λx:?.x f = Λ.λx:?.x+1 <latexit sha1_base64="9fdl0lpmtioj2eipf3dagfskiy=">aaacehicbvdnssnagnz4w+tf/ll5wsycf0migujbil48vrbtoalls9m0szebslsrauhl+are9qm8ivffwafwpdykowjrwmiw8w07tjaykpvtfxkli0vlk6u1tfr6xubwtrmz25fjjjbp44qlwg2qjixy0lzumekmgqa4ykqbjg4kv/tahkqjv1fjlpgxgnaauyyulvrmfnqjvsgridhowtcfj1fq7zsn27jlwhnivkqbkrt65rcjjilcveyisl7jp0qp0dcuczipo5lkqqij9ca9dtlkcbsz8v2e3iklrdqdvpxbuv1dyjhsztjoncmvjdoesv4n9el1prhz9tnmakcdz9kmoyvakspoahfqqrntyeyuf1v4ihsccs9gb1rwzmiykop8vycqj3cwzmcedu8uxlefurng8rhaqgqnwci6ba85be9ycfmgddb7bm3gbr8at8wa8gx/t0wwjyuybpza+fwbofjvc</latexit> f [Int] n f = Λ.λx:.x f :? g f 8.! Int <latexit sha1_base64="njlw7iszzxblwekvo9mpwdak0xa=">aaacdnicbvdnssnagnz4w+tfrecvi0wykhe0jmwvisyntae8pms2mbjzhdyow0hfwcbzqe3gtr76cd+b7uelz0nabhwhmg3ayigvuktv+mpawv1b1msb9c2t7z1dc6/rlukmmonghccdzakjhlsuvqx4qacodhgpbembwq/90cepam/v5ou+deachprjjswbmbdixkbgioubv14cgm9q4hztc27bfwktkwaoej7yh57yykzmhcfgzky79ip8nmkfmwmtotejkmk8bgnsv9tjmii/bzspovhwgmhlqefv7bufydyfes5iqn9gsm1kvneif7n9tmvfg55wmmcmezj6kmqzayggyukgwyhnnebzud4v4hatcss9v98pghpkiclpmjad6f2d+huspbuc23luzpqt62qhgjgah+ayooactmataimowoarpim8go8gw/gu/exo10yqsw++apj8wdoe5sx</latexit> 8.!? 8.?! Int <latexit sha1_base64="kqkd7b+lv7phevotpge2v2qjeik=">aaaceicbvdnssnagnz4w+tfvdx5wsycf0sigp606evvfewpnkfstl/apztn2n0ijfqpfakv+gtexktp4ap4hm7thlr1yggy+yydjkg4u9pxvqyfxalldswnl9y3nr297zbao4lrqanoaxbadeawccgpppdu1eaokcdq1gedpxw48gfyvfgx4l4eekl1jiknfg6tr7hhlwjluv7f3hu8uscndneuofunb54nbkeqqec9a397vzimeqhnovgq4zqj9jminamcxmuvvzaqoir96bgqsatkz/l6y3xklb42pcwtgufq70rgiqvguwaui6ihatabip95nvshf37grjjqeht6uzhyrgm82ql3masq+cgqqiuztedeemonouvvtyy9sbkgk3wumozizu7wjxpnlzdp+ren1vq18vcjsadtexcte5qqfbvecnrfggntelerwerdfr3fqyni5yrwyp/yh1+qoxgjx+</latexit> 7 System FG same observations wrt statics of and FG separate consistency from subtyping clean definition of consistent subtyping focus on the statics, uses for runtime 8

3 Gradual Runtime as the target of choice for runtime semantics violates scoping & type instantiation Gradual Runtime as the target of choice for runtime semantics violates scoping & type instantiation let f :? = Λ.λx:.x System F G f [Int] 1 1* 1* (f [Int] 1) + 1 pending cast with out-of-scope variable (1 : Int => α : α =>?) (1 : =>?) 9 10 Gradual Runtime as the target of choice for runtime semantics Instantiations matter! gradual types soundly augment expressiveness violates scoping & type instantiation let f :? = Λ.λx:.x System F G t = λx.x Int! Int STLC Bool! Bool t = λx.(x [Int]) F (.!)! Int!Int ( Y.!Y!)! Y.Int!Y!Int f [Bool] F.! Fω P, (.P )! P Int f [Int] GTLC?!? GF (.?)!? instantiations on? are lost! lack of precision backed by runtime enforcement (t 3) id:.! (t id) 1 1 (t 3) 1 (t id) 11 12

4 Gradual Free Theorems Open Challenges [ICFP 17] includes some free theorems about fully-static signatures What about imprecise type signatures? claims only.? constant or fail [POPL 11], or unusable result [STOP 09,ICFP 17] Proper semantics for gradual explicit polymorphism? (/ FC) adequate as an internal cast language? Parametricity &/vs dynamic gradual guarantee?.? always fail [ICFP 17] id? Gradual free theorems? This Work Proper semantics for gradual explicit polymorphism? GSF: derived from F using AGT (++) (/ FC) adequate as an internal cast language? no: type instantiations matter (GSFε) Parametricity &/vs dynamic gradual guarantee? GSF: Gradual System F Gradual free theorems? incompatible! (weaker property holds) disprove claims, prove cheap theorems 15 16

5 Gradual Parametricity, Revisited Concretization for GSF (Int) = { Int } Exploit methodology to gradualize languages: AGT (G1! G2 ) = { T1! T2 T1 2 (G1 ), T2 2 (G2 ) } effective: refinements, effects, unions, security typing, etc. (?) = { T T 2 Type } <latexit sha1_base64="ojtwjze3agwfemgy0riuk8knuae=">aaacpicbvfdb9mwfhc1wgfk/dii0uftbjusytejyq8tb4qbps2k2qq8hxbjprthpzzqqqyz/hj/e3+au4ayfu40qwzj3n3hute7nkcgpd8kfn37l77/6dvyfbo8dpnu4pnj2fm7lwdgasfku+y6gbwrmllcczionvgyctrolz51+egna8fildl3butkv4gvn1doqhfzamkyolhrevio7xm8omtfgmy5rmshb/04jfd7i3ycxr0r6g3jhkzsgf/hlifc7rsm3/sntiet7ttyad/q5ouycadul+26waytsi+8g0qbceqbemkhfwieclqccoyqy1zrgfllw3vljmbbubqaxvlf3qfcwcvlwcwtb/ffr92ti6lurunlo7z3yqgsmpwmnnose25ual15p+0rw2lg2dvvvbugwzqkgftiutojzrofzsaams3dze7p5oy6w4kl6wyahgindhm+0f7jlnbecwfn1cyw0wjydroim+fxhop9t17ag6buaoqh9rfp0bz2ggwke7428yiv9t/43p/hng6vvbwteogvhp78bg3pf3g==</latexit> Natural definition of gradual types (syntactic) meaning of gradual types () = { } (8.G) induces precision = { 8.T T 2 (G) } <latexit sha1_base64="scr8tfdnxckfzkkg2u2lksipude=">aaacihicbzdlsgmxgiuzmu9vv24cbmsst2ugrf0ixtcukxgl9apjzp5pw0mmshjfmowl6nbfq934lifwycwvqjaeibwoof/sfifcwfauo6hs7s8srq2tgobm5t7+yw9vabok4vhqaneazaadhamysgyyzdo1farmchftzcjpvwejrmsbw3ows6gvqlixglxka90ihgfp8iqsrtm3x6j0njmvnufcqu1v3irxovjkpo5nqvdkh8y0fsan5utrjucmppsrzrjlkbf9venc6appq8dasqtobjb5qi5pbblikfb2simn6e+njaitrykwk4kygz7vxuf/sc10vu3yzjjdug6vshkotyxhtpaivnadr9zq6hi9q2ydogi1fhmr+ymiuqmcngvht+kw1dlhctjg8eyajpnlc9t+rdzrrtrmuajpcx6icphsjaugw1veduzsjj/smpxh59v5c96no0voboca/zhz+q2zoqjn</latexit> and consistency <latexit sha1_base64="dbauega4/3l8qep3sf2vvitstho=">aaacr3icbvbnsynbfoyjnzuublape2kmlnojm7kgfygwt1gsdsqcefnz5vy2n0zdpcewph/s39gr+5lf8wch2wpdiart8kgoqqv7zfeecgxsev7za0vlk6tr6b3/j4+bwp/rn7uutfzphl2ui070ydaqusgu5fdjlnykmbv7fn2cz/2qm2vbmdewkx4gekeipz2cdnkyfuhqnqeryj9jmgxc01zw/of9pqb8ztou/tunvaydgd0hzg+m/rdecjpbbfqwhavsiau0h/hkmlyivfzjscyfhjkdlcctpwjnpprytahdgmj7duqqkizlnu/p3tpkql1f7mnlk3u/xmlsgmmmnateuy1ee3nxpe8fmht40hjvv5yvgy+kc0etrmdluytrpfzmeemobuvsquqqozrlo/qojlgilffarmt5r44rjywvk3lllg+bydaml741wq1fevkc9kl+yqkr6rfvpm26rjgfpb78kb+enfeb++p93c+wvmwmr3yajvcag7rze=</latexit> G1 <latexit sha1_base64="a4kung5lmvj/tqdxc3hfl9+z7r0=">aaaccnicbvdlssnafj3uv62vqks3g0vwvri3uiy40gvf+4a2lmnkph06myszsage/ifu9t/civt/wt/wc5ykebt1wmdhnhu4d44c6a0b9alb1jc2t6nztz3dv/6b+enrvusipdgjei9n3ialobhq00xz6sqqsehx63vq693szkipf4khpy3bdmhysyjroi93fjjxrvwe37qj4ltglaaas7vh9a+hhnalbamqjugphjrwbeqkz5zdvhomcmnapgcpauefcug5anjrhm6p4oiikeuljqv2dsemo1dz0zgri9eqte7n4nzdidhdlpkzeiqzbf4uchgmd4fzf2gcsqozzqwivznyk6yriqrvppzysgqkparmsb0zlp9rmz1nnloqsv7jkuhdnx246d3aj1srrqqitdirokymuuqvdojbqiirg6ak9oxfr0q13qz3xwjfkjph6a+sj2/mr5sk</latexit> sha1_base64="zvhpqngdzrmwli3lvifrelzssa=">aaaccnicbvdlssnafl2prxpf1s7dbivgqirudflwocuk9gftkjpjpb06myszsagegb+gw/0pd+lwbxd8dzeunkqvtpawogce7h3jhczkpvtfxilldw19y3yprm1vbo7v9k/amsoezi0cmqi0fwqjixy0ljumdknbughx0jhg1/kfmdchkqrv1tmlghgniauiyulm4ub86gurprdgfrmthzumtu37/uaka5qhz2/qgnieekmyrlz7fj5azikiozycx+ikmm8bgnsu9tjkii3bq4nbootejbqst048oq1n+jfivstknpt4zijesil4v/eb1ebedusnmckmlxbfgqmetfvv5vy6ecymwmmiasql7vwimkefa6hbnfbfofbjttvbmz/wgtn2amlslzrgszte/rjl13rnvbdzihdidwbcfgwbk04aqa0aimq3iar3gy7o1n48v4ny2wjhmmcn9gvh0dsdkdxw==</latexit> sha1_base64="ywkzxdkmycmqy0cjlm0icjfo=">aaaccnicbvdlssnafj3uv42vapdugkvwisvxo8ucc11wta9os5lmbtqhk0mymrrkyma1bvu/3ilbv0hwd1y7doukractbwyo59zdvpcifgpbpvdkcwtr6yufdfnjc2t7z3s7l5threg0cahc0bxriy5dbqvdforwjw4djouapzzg+nquga8hs1iaa4agnpivyaen6ou/0sxw7auewfokzi5va+e3r9im9rvdln10vjheabggpew4dqr6crakegap2y0lrjim8aa6mnicgowl+ampdagvz/jdor9vq7+tiq4khisuhoywgoo571m/m/rxmo/6ywur7ectqal/jhzkrsyf1sefuaum2iciad6vosmscbe6bmbh5mppapp1kzmv3rxh5ntv2sm1/jimmevb276lzptmpoiilarwfocdnofnqjaqjbijogo7ra3o07own49l4my4wjfmmjp7aep0g/dkfwg==</latexit> Dynamic semantics, <latexit sha1_base64="gkkxa9pydgyawdlzqqvnhc+ukbe=">aaaceicbvdlssnafj34rpfvdekmwarjgjy4iufawd2xcmuxu2qgtszyzferiv+hw/8odupul/a2/wekaqvspdbzouyd75/gjo1lz9qexsrq2vrfz2zk3d3b39ushh10zp4jah8qsfn0fs2cuq0drxacfcmcrz6dnt64kvzcfiwnm79qsas/ci05dsrds0r2rbmv8xobhwg/ytbuetuycijrqhfaw/uugmukj4iowloasrplzvgoshjkpptksdcz4bemnou4aull5cw5daqvwapjor9vqn+tmq4kniw+oywmosf71c/m8bpcq89dlkk1qbj/nfycosfvvf962acickzttbrfb9q0gwgcidemmwwazaelkavgqzh+0aubzu5fklfaytlrntcduord2o3vd1vvdx+gensehaawukft1eeecfsentgl8wi8gm/g+3x0xagyr+gpji9vs/ceug==</latexit> <latexit sha1_base64="ybti1wkli1o6e9669zvzanb6tac=">aaaceicbvdlssnafl2pr1pfvzdugkvwvri3urogc5cv7apbuiatm3bozbjnjous+hw66ulxn9yjo/el/a2/wold0nyda4dz7uheov7mmdko82lllpzvtey67mnza3tnfzulvfiaryorgpzn0jcjktwnfmc6zheknocax5vyux+ujvcwsn3oqyyskhcecrok20m1ts0zeh+ndo19wis4e9ijxz6rw/j4apqnauz3/avortuiumnkivmn1yt1kidsmchzmmoncmnae6wdduefcvk10cvhqpjkkbwerne9oe6l+tqqkvgoqemyyjlqr5r2x+j/shrw1kqzibongk4bqm3dwspv2/7tclvfgaiozkzw23ajzjqburknsfb1meactyusa1/tl7phjltkjtfyskpnhrdp+heo4sjuyrhqm4hgnw4rrkcavlqaafaq/wce/wvfvivvpv09gmncvswx9yh9+bfqgu</latexit> sha1_base64="4cd9ajnfvnlhhiiaktr3pcqk8=">aaaceicbvdlssnafj34rpfvdekmwarjgjowu6cfnbprapztk5aydojnfmuigh6ebbf0pd+jo/aj/wy9wklbq1gmdh3pu4d45syovlb9aswsli2vrjbwzpwnza3t8s5uu0ajinageyte28msgoqufqxamcccogxahnd89xvjubigvfrny6hg+i+pwelwgnpxlwcyt5ncnsrv+yqccaj86uvm7eh3i81nvll9epsbicv4rhktuohatuiowihefmuomegjmh7knhu45dkn20udizdriw0ek9opkkttfirshuo5dt0+gwa3krjel/3mdrawn3ztyofhaywrrkdblrvb+fcunaohiy00wevtfapebfpgozlpfshuh4bymhcksx9t5npm1cu5s5mk+zx1bgrzpvdqv2gcupohx2gi+sge1rdl6iogoggju7re3o27ow49v4m4wugnpmhvod4+mbf2qjwq==</latexit> evidence-based reduction semantics strengthened for parametricity enforcement <latexit sha1_base64="aqum2pvad0po439vnpa2u7vuqc=">aaaczicdzddssmwgiaz+jer0/qdjx4yhiinltythyebeolhbpcdyxhpmm5havqadddkbs678ar01f2batdbn/0g4ev98ivfi/mtcrhesszg5tb2zvlnvv3jwab0dt2wujos2smsjpothstkttkwy4rqbjxshhqcdb/yy886ejpjf4kvny9op8vcwgbgstdwweaqibhmouzbswpshvaeaguo7ckrbvyjq/1an1nf9yfud2ykkrgt3kapgwc2bnud+rnkqcku4lrlnorhqzzhrjha6m1eqayzjga9pt0ubqyr7wzhcdf5px4d6jr2ego7sypdoztt0nmnq6xgcpl5l+sl6rgvp8xeaekcrj4keg5vbhmi4u+0x9wfkofjgnts0iywgkmsgdvoqix82nabmtdl7nvb+kzmaldclcjwrftw9t1bpfzqtyay7jk4bxcgmvggjvqae+gcvqagffwat7bvpruvixt42xx1cgte07arziuvgbbbbo</latexit> sha1_base64="zz0jmschguutwmqhb6tbbccblsy=">aaaczicdzdlsgmxfizpx3u91qtubgsghvljbufghbcufsw7ubtsiatqcfmzphkcmuo+ca+jw/he+hwwb2zaqvt9udcz//ljce/fwuutg2/lky5+yfpewv8ura+szmzwu7pai0oaxjixelrkcue1yypuzamddogak9wdrew1o2wowkb7joz2mwtckfckdtok2vq+ccralrajk1pclti7mhuu4b+6gui6mib78hxowiy97lapds4tcs8kzigpj8enzeqbuepup7ec0dznuvbcloo4d625ges2pykmythwlc0gfdyxupkqqw5wpdbcr8bxkznjlklr4f7syeio1dd0zmmq6hs1zlzl9zjddezbimu80kht8upalpcowrip+bd2sxnilqhjtzeb0ncahabf/grwpms4blnoeurt/ewoejsgnjmy5kvrroa45dc25nwg0y1zlswyecgwnn0ibruiemuhign3ihj9krtw7twnvjo1zp0rmdv8o6+aloobg/</latexit> sha1_base64="j5nof9ur4dglnjcwf/8jtlhwghc=">aaab+icbzdnssnafivv6l+nvevazwarjejs4fny4r2b9os5lmbtqhk0mymrrkyf7c+h7uxgfxnwcj2kfbt0wcdhnlnpnc1lbtfg8t6e2s7u3f1a/di8a7vhjabpr00mmghzzihi1ckhgwsv2dtccb6lcggcc+8h8vuz7c1saj/ljlfmcx3qqecqzntbqtjotr+1vitvg5swrdvpfo3chguxssme1roe6kz51qzzgqw7ijtmfi2p1mcwitpjhqcv2sw5nimiykszy80pep/t+q01nozb/zmtm1mb3zl+f83zex0o865tdodkq0eijjbtelkp5oqk2rglk2hthg7k2ezqigzlow7qgbzecmueulffz/ziusfaxn5m0s2te+67tt/9gdopzdbvybdzdwbw/qgs4wcoefp1n58157gsowuoz/bhzsc3ccs0w==</latexit> sha1_base64="xc6twtzktyycjgmtwh3jayvfyxe=">aaacwnicdzdfssmwfmbp6r85n50i3ngthii3jtybhyetvpfygtskyxhpmm5havqadddks638an01j2bwtdbnz2q8pf9ocnjz4sfv9q23wrw1vbo7l5xv3rqrhwevy/lhrwlcwvtgokoct2imocsttgrlxwkjocdb1xo+lvdthiekrfnhtmpvdmpq84jroyw2qgadrqorabh256preblibh+yoihtopctnf1itbmbnqbvm1+280kzwvqigq2onqnpsrzqnmdruekv6jh3rfkyszalgsxjofysjhzmh6xkpschup8spznclcxkzjjlaps7pzsyeio1dt1zmir6pnazhfl1kt1cnfpuixtzsrdphskaukilzain5spaze1gtcem1krhzgeug3al3dempks4jivokvztzfx+axkidnrsdzf56bu2hn2yyinmmfiedt/aat9ccnlb4hq/4hhnh3apyp0ucvmhf9qr+l2bzeztr0=</latexit> sha1_base64="9woobvgnuiuary88slfy2hhgqnm=">aaaczicdzdnsgmxfit0dy6wq0/uhfhsahuldnufaq24mzlbfsdtsmztkynzwsgsazqhm59ch/bp/atfaldwnbvoq2grv5iojwvn7k5tsizvjb1mjhw1ro5jfymubvd2nkt7u03zrbhhdziwioo7wbjoro0ozjitb1gfpsopy1nedvjrrgnjavegxqhtovjvmaei1hpq1deyasizdlsl2ebtzodvvq99buauuq1t9h2qwiqu9yskqw2nbvwevrkmwe/ouz4/zeq84rw5ayp8krtiwsmnboeomofkmcdoxusxpimkq92lhs4f9krtjmsienmnhhomvyscqfuzi8g+lgpf0sd9razymc3mv1gnvt51n2eijbuvzp6qf3ooajilflpmf1jxsrayrezpcskar5gohbyj0sbepr4tbba6nhx7i5dntb2svrzjqmhelm2rbn/rtgpgnlwde7bobdbfaibo1ahdudac3ghh2caetmkxqfxnd9qzby9b+bgsdfe1c5za==</latexit> <latexit sha1_base64="kdoen/m9m1vfjtlk5m8pjiden9e=">aaacenicbvdlssnafj34rpfvdelmsah1uxi3uiy40guf+4aklmlk0g6dmyszsage/ivu9t/civt/wn/wc5ykfbt1wmdhnhu4d06ymqq043xaa+sbm1vbtr17d2//4lb+dnxtssyx6ekejiqikuyfasrqwzkkeqcemhip5zclh5/sqsiijqs5qehi0ejslg2kiep0kco+bt0l0y1htoy6kav4m7ia2wqgdy//kjbgecci0zuspznvqhozkaykyk288usrgeobhxdbwiexk1ckfpddkbonemic0rntfirxxpwy8njmc6bfa9krxp8/ldhwd5fskmsyczxffgym6ge/yuqlwzrndefyunmrxgmkedamjduvgnleyipo2zaqfrrpravbloquv7jkepct12m5906j3v7uvqon4aw0gquuqbvcgq7oagws8asewyv1al1ab9b7fhtnwmrowb9yh99xzz4k</latexit> sha1_base64="eab4i925x6v1bev5af9atig3c=">aaacenicbvdlsgmxfl1t7w+qi7dbitqn2gjs4llntzgn1aw0omk2ldk8yqzaplml/qrf6ho3hrd7hz6dovmh0i2nogcdjnhu7n8wpothhddye3tr6xuzfluzs7u0ffa+pmjpkfkenevfit2skwesngwznlzjrbhwow35o+up3xptpvkk78wkpj2bb5kfjgbjpu53gia5zu+d94vltykownajd6clkqo/vkbalv+8asbrcqrvbrcsdydz41nl8kmmjpvugmmsayjpcadiyvwfdds2cnz+jmkgeki2wfngim/k6kwgg9eb6dfngm9bi3ff/zookjr3opk3fiqctzrwhckynq9p8oyioswyewykkyvrwrivaygntsotslpgenmwtthnt2o40dlhvssd5yjaukevhx3ipt21vyy48nmaplmgds6jcldsgaqqieibhehlunwfnxmdj+acreyy/sb5+wywq6cd</latexit> sha1_base64="qjf2z2fsx7dtivsnyne+osllzcg=">aaacenicbvdlsgmxfm3ur+v4qrp0eyxc3zqzqrzckhlfuwd2qfkmpk2ni8hyrtk0l/qrf6ho3hrd/gd4tovmh0i2nogcdjnhu7ncrngtfg8dye3tr6xms9suds7u3v7xypdppapwqsbjzoqhsjngbwkyahhpj0ognjiscsck/91ogotaw4m+oebbz1by0prszknw4fcy7knz3/rfcservvbrhk/aupvwh986oqv6j1il/dsokue2ewq1p3fc8xqyauoziridtnnukqhqi+6vgqecc6ygynt+cpvsiys2wfmhcm/k5kigs95qgd5mgm9li3ff/zoqmjr4kmiiq1rod5ojhl0eg4/t+mqclyslelcctqb4v4gbtcxrbkdmfblcixftakj78akoitlxbkr9cysppnld8r+lbvtvmecbhimtuay+uarvcatqoaewkoabpiin5955dl6c1/lozllkjsafog/fgj6g5w==</latexit> (G1 ) v G1 G2 G2 <latexit sha1_base64="dfdzcjzevmj7ocn4eb5wtu8tmsu=">aaace3icbzdlssnagiunmu8vv26gsycq5j0o8uci7qsyc/qhdcztnqhm5mwmymukmfqrb6ho3hra/gapohtnik2hhg4npp/zm8powq7tif1sbm1vbobm3p3j84pdqun5z2vzjjtho4yykchkgrrgpaaozgaasib4ymgint4t+mcns0uq86hlkfi7ggsyui20irxo40fouw07qcuonp+muguvgruwdvoog9s8vsndgidcyiavgrpnqp0dsu8xiyuziincuzqmi2mf4kt5elzas9nese4keyjdcv090aoufjzhppjjvreral8l9ulon4xs+psdnnbf5+fgcm6gquamcisoi1mxudsktmvognscksdsbbkxfzimru0auivfxks4gwtohkrijzn/1w03wa7r3talcrdvwdi7afdbnwido9afpybbcp7am3ixhq uwnogfgj6+mbq4ceow==</latexit> sha1_base64="shuomodxgkktuurx5jil+tbchw0=">aaace3icbzbls8nafivvfnb4qnbpzrairkrsjs4lluqygn1au8pkmmmhtizhzliooecf0k3+d3fi1q3g33dpymlaqvspdbzouze5fh7cmdko82gtrw9sbm0duzdvf2dw+lrcuvfqss0swiey46pfevm0kzmmtnoiimofe7b/uhq1rfhvcowi1s9swgvwgpbqkawnpf77viuyxc961yw7fscwjuwprrpfevowbo9iufhctnkjce46v6rpoonszlportqe2lyqaydlca9o1vuciql6w3zxfzyyjubhl84rgefp7i8oruppin5mr1ko13m3c/7puqsplszekmoqypyjmovix2ggaavmuql5xbhmjdo3ijleehntmnlevpgfngsczrcp6u82dtjunpdczssrplwtue7fvtg0ajbau7gfm7bhquowtu0oakeeniar3iy7q1n68v6ny+uwyudevyr9fynjwog3g==</latexit> sha1_base64="vv5azmbdufbsld/pda5ds3p+lck=">aaace3icbzc9s8nagmyvftb4ve3oclgebyljfx0ldnwsyd+gcevyubrhl5dwdymukm/qvf9p9ze1vwp3b2dpksvtdwbw4enud9uzeffzmqlww9gyura+sbm6utc3tnd2+/fhdykveimgnjiewi5yfjgowkrahipbclgkkpka43vsz77oqissn+o6yxcum05dsggckdoc2bdr1jq9gc1aflqlwzcsfly89ntvf5+7r9ym5ag/kn40c4cqlmcep+7yvkzdfqlhmsgy6isqxwmm0jh1toqqjdnpi5gye6mshqst04wow6e+nfivstknpt4zijeril4f/df1ebrdusnmckmlx7kmgyvbfmacafsoivmyqdckc6lshhigbsnkytkdyth0sue5zrdl7ysy+zuwnyv5esmw69zpt1exrtasbziqbi3amtoenzkediewaammynaphscjcwc8gc/gy2x0xzjvvmafga/f3koicq==</latexit> <latexit sha1_base64="ftri2ie71emotj162fslla+w4a0=">aaaccnicbvdlssnafl3xweur6tlnybfclaqbrzc6lkifuabymqyaydojmfmuighf6bb/q934taf8df8aidpbg09mha45x7unepfnclt25/w2vrg5tz2zae6u7d/cfg7ou6qkjgedkjei9n3skkccdrrthpajyfocdpz5te535vrqvikjq85i6ir4lfjcctzhub0bnua1un+wcaju4jaldifao9j0i5kevgjcsvidx461m2kpgee0qw4trwnmpnhmb4ykhfllpswpgto3io+csjonncru34kuh0rnq89mhlhp1lki/95g0qhv27krjxokshiuzbwpcou/xv5tfki+dwqtcqztyiywritbdqpdotg6toaczy3o7ifbeazrgpkcpyrwsdzsoxg86dw+1yroqcapncaeoeilbqenhsawhid4hhfr0q13qz3xeiavwzo4a+sj2/ou5sl</latexit> sha1_base64="4sokh/h/lqwirlkb2ejdyb37dni=">aaaccnicbvdlssnafl3xweor2qwbybfclaqbrzc6lkifuabymqyaydojmfmuigh4afovv/dnbj1gwr/w6urj2kfbt0wcdjnhu6d48wmsmbh8bk6tr6xmzpy9ze2d3blx8ctmwucexaogkr6hpieky5asmqgonggqdqy6tjjs9yvzmhqtki36pptnwqdtknkezkszeg/qglvrdgfrmthzum1u3r/uaka5kh/2/qgnieekmyrlz7fj5azikiozycx+ikmm8bgnsu9tjkii3bq4nbnotojbqst048oq1n+jfivstknpt4zijesil4v/eb1ebedusnmckmlxbfgqmetfvv5vy6ecymwmmiasql7vwimkefa6hbnfbfofbjttvbmz/wgtn2amlslzrgsztos1x64517qtbsxqgim4hlnw4awacavnaaggitzaizwz98az8wk8zkzjhmman9gvh0dsdadya==</latexit> sha1_base64="iq1u/wvwbgi5cluggyreu66lsa0=">aaaccnicbvdlssnafl3xweor2qwbybfcsem60wbhs4r2ge0ouwmk3bozbjmjoussngtw/0pd+lwbxd8a9cutlnk2jrgyhdofdw7xwvzlqq2343lpzvtfwcxvm5tb2zm5xb78po0rg0sari0tbq5iwyklducvioxyehr4jlw94pvfbiyikjfingsfedvgf04biplr0fdgr9oplu2lnsbajmyplwunt6/yjo6n3ip9dp8jjsljcdenzcexyusksimjgmrobsbijper90tguo5bin81pzawjrfhwean9uljy9ciragu49dtkyfsaznvtct/ve6igjm3ptxofof4uihimkuia/jvy6ecymgmiasql7vwgmkefa6hbobb1ofbjttstmy+9fgps1mziz8kiavyrjl1xrnrbnziiaadwcmfgwcnu4blq0aamfbihb3g07own49l4my4ugbnmcf7aep0g/3afww==</latexit> <latexit sha1_base64="yrpdo69l7g1fdpnb1kq3gfa17dg=">aaacenicbvdlssnafj3uv42vqks3wslutum60wbhs4r2ackouwmk3bozctmtaol5c90q//httz6a/6g+akjactbwyo59zdvochbkpbpvtqg1sbm3v1hfnvf2dw6pg8claxqlaui9igotracwmhoo+ioriusiwzahfw2b2u/jdorasxpxblrlsmzjhjciiki253gqyblu3487lung023yja504fwmccr1x48sly5qyzbwiuersrplz1aogijots+voifobify1zrdhqwflsfn1ovwqiukh5cwa6o5fbjuwcbqsqtwvq14h/ue5qyqu/yzwjfwyo+wikkwwiq3i/1zibeakljsbsbb9q4wmueckdeumvwazeeeek6ihmf9o85dkpi7jwa1knqw6bcduo/d2s9ut6qqdm3aowsabv6al7kap9aecmgcz+dfedrejtfjftlam6rmkfgd4+mbcwqejq==</latexit> sha1_base64="gak/znmt92fpr62yiba9yt8bnrc=">aaacenicbvdlsgmxfl3js9z1awbybhqpsx0o8ucc122yb/qlpljznrqjdmkmuiz+he61f9wj279acufsfztok2nogcdjnhu7n8wpothhdd2dtfwnzazu3k9/d2z84lbwdn3wukeibjokravtyu84kbrhmog3himlhc9ryr9ez3xptpvkk78wkpj2bb5kfjgbjpu53giapzt+5ajfklpldwa0srwfkvzr/fmdagr9wlc3iegiqdsey607nhuboqvyyttab6babpjmsid2rfuykf1l52dpenvglqgcn7peez9cixulrifdtpmbmqje9tpzp6yqmvoqltmajozlmf4ujryzc2f9rwbqlhk8swuqxeysiq6wwmbalfhcwtamamsmyhvt0rxshbjq3jnllayszqsuwwvbtuqwhw5oiuzkiehl1cfw6hbawhe8acp8otco8/oi/m6h11zfpkt+apn7rs6kce</latexit> sha1_base64="m8nluskba0f1gqodlz2a3q63488=">aaacenicbvdlsgmxfm34ah1fvzdugkwomzjtef0woiybfuazlaymuwbmmsgjfmoq/9ct/of7sstp+apigu/whraqvspba7n3mo9ouhcqnko826trw9sbhwk2/bo7t7+qenwqk3ivglswjglztdaijaqsettzug3kqtxgjfomlqe+z0xkyrg4k5peujznba0ohhpi/w8aeicvw76tfn+qexunrxwlbgluq7d5udhsdr6je+vddgksdcy4au6rloov0msu0xi1pbsxvjeb6haekzkhanys/yk6fwzcghjgjpntawv38nmssvmvdathkkh2rzm4n/eb1ur1d+rkwsailwffgumqhjops/dkkkwlojiqhlam6feigkwtq0zht5matjrawdnasmp9o4pfpbloquv7jk2rwq61tdpmmrduyoghnwcirabzegdm5ba7qabjf4ai/gybq3nq063u+umytmsfgd6y3b4pjoog=</latexit> (G2 ) 8.! v 8.!? v 8.?!? v? 18 GSF Statics Evidence-based Dynamics <latexit sha1_base64="str8cy+tqnqf4bcfmebv1xgl+u=">aaacbnicbvdlssnafj34rpvvdelmsahulikiupkig91vsa9oqplmbtqhk0mymqgldo8unuvccdu/q0/wp9wkmahrregozxzd/dw/iqzpw37y1palldw69svde3tnd2a3v7hrwnkkkbxjywpz8o4exawzpnozdiijhpoeupb3k9+whssvg86ekcksggowmem0o170tgp9e4fwf1op2wy4glwknbhvutmtq+3admkyrce05uarv2in2mii1oxymvtdvkba6jkpogyhibmrlisxtfgyyaiexnm9kknjfjoxesk0i32xgri/uvjat/2n9vieszekmoqdhyotdnwmc4lwagtqdwfgecozcyrpimicdwmpqpbglmaqizypgaml6c+rywqees4dgn5/683rwug6qgq3setpcdllat3aiwaiokevsmtcr9ws9we/wx2x1yso9b+jpwj8/ajuzpq==</latexit> <latexit sha1_base64="i0wgl9otvtt+t/v+sl8ckimqpw=">aaacanicbvdlssnafl2pr1pfvzdubovgxpkioctbdooygn1ae8pkmmmhtizhziku0j1f4fa/wj249uf8ap/dazqfth4yojxzd/fo8rpollbtl6u0srq2vlhergxt7+zuvfcpoipojaftevny9nyskgectjtnpysshkc9r1x7czv/tipwkxencthhorhgowmok1kpua51di7cxqnbsup0dlroniduo0bpuv90gjmlehsyck9v37er7gzaaeu6nftdvnmfkjie0b6jaevvelt87rsdgcvays/oerrn6o5hhsklj5jvjcourwvrm4n9ep9hlzcxkasacjjffkyc6rjnpo8cjinrfgiijpkzwxezyymjnhvv3dyybtrkgs3quvpti7pywjlpnncdu+7c9san0vdzticyzgfby6hcfqgjyq4paml/bqpvlv1rv1mr8twumep7a+vwb2hupq==</latexit> <latexit sha1_base64="evnh0f2rsf65sccgr7zztuhoba=">aaacb3icbvdnsgmxgpzw31r/qh69bivgxbirgp6k1ivektgf6c4lm2bb0gyyjlmhlh0an8crpoe38epj+ac+h9m2b20dcawz35bhwoqzbvz3y1lalldwy9sfde3tnd2s3v7ts1trwidsc5vo8sacizowzddattrfmchp61wej37rueqnjpi3owsgss4l1jecdzwcvxbyddpffjruvjuqexw3anqivfmpawz1lulb78nsrptyqjhwnc8nzfbhpvhhnnx0u81ttaz4j7twcpwthwqtuqp0bfveiisyj5byql+tmq41nouh/yyxmag571c/m/rpca6ddimktrqqayfrslhrqj8adrjihldr5zgopjtisgak0ym3anot4jzj0zmshwjpba7epmrljlmwcvzk97deblamy1ugem4ghpw4akqcan1aacbb3igf3h1npw35935mj4uobpmafyb8/kdk4+zqa==</latexit> <latexit sha1_base64="6uqcw1azmfmc7kwwadhkcnfhla8=">aaacehicbvdnssnagnz4w+tf/ll5wsycf0migp6k6evvfwwbaelzbdbt0s0m7g6egvospoffqjv4tu38af8dzdpdto6sddmfmmoe6smsmb8bc4tlyymptrb6+sbm1be7sdmsscuzaoggjcamkcaoctbvvjlipicgogokgo+vc7z4qiwnc79u4j6mbpxgfcolpb6570wjqixb14iuplme3i1fbnhw3yjoe+cijrahvbf/pbcbgcx4qozjgpsvpl50goihmz1l1mkhtherqqnqycxut6edl+ao+0ekjdqz+uykn+tuqolnicb/oyrmooz71c/m/rzsq68hpk00wrjqcfrrmdkohffdckgmdfxpoglkjucveqcysvhqzulce8jbhltbhltvquzuwk86rzajm25dydnzp1ui1caaowtfwwdloghvqam2awsn4bi/g1gy3ox342n6umbumt3wb8bndxtbnde=</latexit> 8.! Int <latexit sha1_base64="njlw7iszzxblwekvo9mpwdak0xa=">aaacdnicbvdnssnagnz4w+tfrecvi0wykhe0jmwvisyntae8pms2mbjzhdyow0hfwcbzqe3gtr76cd+b7uelz0nabhwhmg3ayigvuktv+mpawv1b1msb9c2t7z1dc6/rlukmmonghccdzakjhlsuvqx4qacodhgpbembwq/90cepam/v5ou+deachprjjswbmbdixkbgioubv14cgm9q4hztc27bfwktkwaoej7yh57yykzmhcfgzky79ip8nmkfmwmtotejkmk8bgnsv9tjmii/bzspovhwgmhlqefv7bufydyfes5iqn9gsm1kvneif7n9tmvfg55wmmcmezj6kmqzayggyukgwyhnnebzud4v4hatcss9v98pghpkiclpmjad6f2d+huspbuc23luzpqt62qhgjgah+ayooactmataimowoarpim8go8gw/gu/exo10yqsw++apj8wdoe5sx</latexit> 8.?! 17 Int! Int?!? Int! Bool 8.! T1 = T2 <latexit sha1_base64="28/v271yh1had18caf27k5uwamc=">aaaca3icbvdlssnafj3uv62vqks3g0vwvzii6eyounfzos9pq5hmb9qhk0mymqgldokunuvccdu/ra/wp9wkmahrqcgdufcw71z/jgzpw37yyqtrw9sbpw3kzu7e/sh1cojroossafdix7jvk8uccago5nm0i8lkndn0pont5nfewspwctaehadg5kxyagjrbvpoe05+bq3vyzrdl1owdeju5baqhay6t+d0crtuiqmnki1mcxy+2mrgpgocwrw0rbtoiujgfgqcahkdfnd57jm6omcbbj84tgufo7kzjqqvnom8mq6ila9jlxp2+q6odktzmiew2clhyfccc6wtnv8yhjojrpdcfumnmrphmicdwmo8owd6yjcjhgwt9qbnpxlltyjd1g3bhrzv1frltnfrgj+gunsmhaimukmt1eeuhegzvab68l6s96tj8voysoyx+gprm8fonsra==</latexit> <latexit sha1_base64="r4uapsv0nm/nyj8skic74vbahtc=">aaachhicbvdnssnagnzuvxr/oj16wsycf0viru9a8okxgv2bjptnztmu3wzc7qyqql9fr/oe3ssr4gv4bg7scno6sddmfmmo4yemsmbn0ztb1jc6u+be7s7u0fwidhprmnapmujlksbj6shffouooqrgajicjygen709vc78+ikdtmdyplibehmachxuhpawq13dawide4aeh3bp5fwwecwu27zzeaq8spsbnu6iyslzeicrorrjbdug4do1fejosimjg56aasjahp0zgmneuoitlly/jzekqvaoow+nefs/v3ikerlfnk68siqylc9grxp2+yqvdkyylpuku4nwupgyqgbzlwiakghlnefyun0v4gksccu9l+mwwtwgiew02erof7rzqoemhslznmsv9c5ajt1y7u1mu13nvqfh4ascaqdcgja4ax3qbrhk4ak8gxfj0g13oz3xwnnqdin8afgxzdddkb+</latexit> sha1_base64="kdqwzaxuuf2fwfat9u4dwj98vwu=">aaachhicbvblswmxgpy2aq31tdqjl2arvfh2vehjc148vrap6jaszwbb0gx2sbkfsht8iaj/r/exkvg3xc8mz4ebr0iddpfkgh8hdolhefdyq2srucxvfza3tnv17b7+h4lqswicxj2lx4pyjmhdm81pk5eurz6nt9wnfgbqyovi8wthiw0e+geycejwbupa5e8mjayc9sqio8snvygfurazafitigwitsn5wr+/usoagpd+9mlypjgvgjcsvjt10l0j8nsm8lpuoiliiaydhcptg0vokkqk03lj9gruqjkwpgnnjqqvxmzjpqarb65jlduq0vviv7ntvmdnncyjpjuu0fmh4uprzpgkyvqwcqlmo8mwuqy0xwrppayaln0zsgs4cgtldjvmr8ow0dni6akdzfszzj47tioh3xqxvhrkkcachcawuneevrqegdsawgkd4gmfrwqxq232wnommdk8afw+ze2qklv</latexit> sha1_base64="rmahb51bel/zkvrpbzffgu+kkvy=">aaachhicbvbps8mwhe2nm3p+q+7ojtgel47wi5504mjblcv1jhsnn3c0rqk6acuv0uolcfp4y38sr4nqtvzn8e3wqelz3e+txvjhrqszrwyisrbzla+1ysbm1vaoubvlleimgnhiec8zakjhlsulqx4ssconbjpoonlid+z0yepbg/uwlmeieacbpqjjsw+mbvdskbginohbo8pgcorbv1qy6nqvcjvac1bqluy/+ffts9s1p149wehkumensdm0rvr0mcuuxi3nftssjer6haelqylfizc+bls/hovz8qfvoxxwcqr8tgqqltenp4zidewinxh/87qjcs56gevxogjhs4+cheevwcks0kecymvstrawvhefeigewkrvvgnwcwnaev0spmf7sxt/okhslengszte/qtlw3r/vadtbdgeyda3aebhakguakneelyjccb/ainox748v4nd5mpwvjnqmcpzdevwfjv6p6</latexit> <latexit sha1_base64="hvs+aue5spprb5br4cvahwivzq8=">aaacdicbvdnssnagnzuv1r/uj16wsycf0migp6k6mvjbdsgmla2m027dlmjuxulhd6dt+bvn8cbepuzfadfw02ag7yolawz37ddbcmjutn2l1fbwv1b36hvnra2d3b3zoz+tyazwksle5yin0csmmpjv1hfijskgukak4wusn8/gmrkib8k1t4sdoxglemvjagppnl0oeygy6fnth6rv0h2bltuwscjk4fwmbcp2h+e2fcc5iwhvmsmqby6fkz5fqfdmya3izjcncezqia005ion087l6db5rjys6g35cwvl9nchrlou0dvrljnrylnqf+j83yfr06eeup5kihm8/ijigvqklhwbibcgkttvbwfddfeixeggrvvbdk4n5sclkabgunoldnmuvlknvzhjsy7k7b7wvq4q4bacgrpggavqbrega7oag0fwdf7aq/fkvbnvxsf8tgzumqpwb8bnd7mwmuq=</latexit> v static semantics follow via Galois connection (no tweaking!) v 8.!? 8.?! Int <latexit sha1_base64="kqkd7b+lv7phevotpge2v2qjeik=">aaaceicbvdnssnagnz4w+tfvdx5wsycf0sigp606evvfewpnkfstl/apztn2n0ijfqpfakv+gtexktp4ap4hm7thlr1yggy+yydjkg4u9pxvqyfxalldswnl9y3nr297zbao4lrqanoaxbadeawccgpppdu1eaokcdq1gedpxw48gfyvfgx4l4eekl1jiknfg6tr7hhlwjluv7f3hu8uscndneuofunb54nbkeqqec9a397vzimeqhnovgq4zqj9jminamcxmuvvzaqoir96bgqsatkz/l6y3xklb42pcwtgufq70rgiqvguwaui6ihatabip95nvshf37grjjqeht6uzhyrgm82ql3masq+cgqqiuztedeemonouvvtyy9sbkgk3wumozizu7wjxpnlzdp+ren1vq18vcjsadtexcte5qqfbvecnrfggntelerwerdfr3fqyni5yrwyp/yh1+qoxgjx+</latexit> System FG GSF keep track of witnesses of consistent judgments consistent transitivity: combine evidence or fail evidence-augmented term justifies Bool ~? justifies? ~ Int consistent transitivity conservative extension of System F explicit polymorphism natural precision & consistency 19 20

6 GSF Dynamics GSF Dynamics Refinements for GSF type names in evidence: path of bindings let f :? = Λ.λx:.x System F G GSF strengthen CT to enforce parametricity f [Int] hint, Int i <latexit sha1_base64="yf0p8qmgjo0izeqre2xnefi/6dw=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrpppngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvnuut71ebmj9fbe8nxg152guwiuendg6mcg1sd+9siepzhhgjokvn91hpyzjdfjoq1l1veidxgq9i3lkoykd8rp5ddy6oemeqkovzduv2dyfcs1cqozgsm9ejne44n9dpdtpz5slvboop4uilegdwkingfjjsgytqxcw1lwv4hgscgvtwc0rg1liispp0zcqenhnw1gknbog6ztcu/n682rwubucginwalxwazrgbrrag2cqg2fwal6tj+vnerc+pqmva5bzb39gff4abjgfsw==</latexit> <latexit sha1_base64="yf0p8qmgjo0izeqre2xnefi/6dw=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrpppngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvnuut71ebmj9fbe8nxg152guwiuendg6mcg1sd+9siepzhhgjokvn91hpyzjdfjoq1l1veidxgq9i3lkoykd8rp5ddy6oemeqkovzduv2dyfcs1cqozgsm9ejne44n9dpdtpz5slvboop4uilegdwkingfjjsgytqxcw1lwv4hgscgvtwc0rg1liispp0zcqenhnw1gknbog6ztcu/n682rwubucginwalxwazrgbrrag2cqg2fwal6tj+vnerc+pqmva5bzb39gff4abjgfsw==</latexit> <latexit sha1_base64="yf0p8qmgjo0izeqre2xnefi/6dw=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrpppngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvnuut71ebmj9fbe8nxg152guwiuendg6mcg1sd+9siepzhhgjokvn91hpyzjdfjoq1l1veidxgq9i3lkoykd8rp5ddy6oemeqkovzduv2dyfcs1cqozgsm9ejne44n9dpdtpz5slvboop4uilegdwkingfjjsgytqxcw1lwv4hgscgvtwc0rg1liispp0zcqenhnw1gknbog6ztcu/n682rwubucginwalxwazrgbrrag2cqg2fwal6tj+vnerc+pqmva5bzb39gff4abjgfsw==</latexit> <latexit sha1_base64="yf0p8qmgjo0izeqre2xnefi/6dw=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrpppngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvnuut71ebmj9fbe8nxg152guwiuendg6mcg1sd+9siepzhhgjokvn91hpyzjdfjoq1l1veidxgq9i3lkoykd8rp5ddy6oemeqkovzduv2dyfcs1cqozgsm9ejne44n9dpdtpz5slvboop4uilegdwkingfjjsgytqxcw1lwv4hgscgvtwc0rg1liispp0zcqenhnw1gknbog6ztcu/n682rwubucginwalxwazrgbrrag2cqg2fwal6tj+vnerc+pqmva5bzb39gff4abjgfsw==</latexit> h Int, Inti <latexit sha1_base64="mgjm/8nykwadlczmh11fyn96bne=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrrnpngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvmqeyp0khm3oen5t2w607dkqeitsjdtbda2b/e2gc05hwjrlsqu86qvszkppirvkalyoieb6jiekbylfmlj+vh8jhsvfcgcshk5hqf5ozchwahihzjjgeqtmvul8z+unorr0m8pfqgnh00vryqboynegdkkkwlojiqhlat4k8qhjhlproavwswkeew06esvvbjzlsyszlnddrru3m9etvrqaoowre4as64ae1wa1qgdtdiwtn4aa/wk/vmvvsf09gkncvsgz+wpn8ac6fsw==</latexit> <latexit sha1_base64="mgjm/8nykwadlczmh11fyn96bne=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrrnpngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvmqeyp0khm3oen5t2w607dkqeitsjdtbda2b/e2gc05hwjrlsqu86qvszkppirvkalyoieb6jiekbylfmlj+vh8jhsvfcgcshk5hqf5ozchwahihzjjgeqtmvul8z+unorr0m8pfqgnh00vryqboynegdkkkwlojiqhlat4k8qhjhlproavwswkeew06esvvbjzlsyszlnddrru3m9etvrqaoowre4as64ae1wa1qgdtdiwtn4aa/wk/vmvvsf09gkncvsgz+wpn8ac6fsw==</latexit> <latexit sha1_base64="mgjm/8nykwadlczmh11fyn96bne=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrrnpngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvmqeyp0khm3oen5t2w607dkqeitsjdtbda2b/e2gc05hwjrlsqu86qvszkppirvkalyoieb6jiekbylfmlj+vh8jhsvfcgcshk5hqf5ozchwahihzjjgeqtmvul8z+unorr0m8pfqgnh00vryqboynegdkkkwlojiqhlat4k8qhjhlproavwswkeew06esvvbjzlsyszlnddrru3m9etvrqaoowre4as64ae1wa1qgdtdiwtn4aa/wk/vmvvsf09gkncvsgz+wpn8ac6fsw==</latexit> <latexit sha1_base64="mgjm/8nykwadlczmh11fyn96bne=">aaace3icbvbltsmwfhtkr5rfgaulnhyvegtujqgjlhvsyfck+pgaudmo01p1hmt2kkoox+aeboee7bbbdsabuado2gw0jgrrnpngz55amkq043xzlalldw16npty3nre8fe3euojjwythhcetklkckmctlwvdpse5kgogckg4yvc7/7sksicb/e0h8ga05jshg2kgd+8atmvmqeyp0khm3oen5t2w607dkqeitsjdtbda2b/e2gc05hwjrlsqu86qvszkppirvkalyoieb6jiekbylfmlj+vh8jhsvfcgcshk5hqf5ozchwahihzjjgeqtmvul8z+unorr0m8pfqgnh00vryqboynegdkkkwlojiqhlat4k8qhjhlproavwswkeew06esvvbjzlsyszlnddrru3m9etvrqaoowre4as64ae1wa1qgdtdiwtn4aa/wk/vmvvsf09gkncvsgz+wpn8ac6fsw==</latexit> (f [Int] 1) seal unseal f [Bool] unseal on the outside f [Int] proper handling of type instantiations wrt? GSF Properties Parametricity is incompatible with DGG Type safe, conservative extension of System F f :.! = Λ.λx:.x:: v f :.?! = Λ.λx:?.x:: Well-typed terms are relationally-parametric [Ahmed+17] Dynamic gradual guarantee cannot be satisfied together with parametricity (pick one) must necessarily fail when applied proof independent of representation of evidence and of the interpretation of unknown type 23 24

7 GSF: System F imprecise embedding Gradual Free Claims Disproved imprecise termination has interesting consequences A System F term ascribed to an imprecise GSF type hereditarily terminates.? constant or fail [POPL 11], or unusable result [STOP 09,ICFP 17].? always fail [ICFP 17] new property, weaker than DGG the gradual medium is harmless id ::.? id ::.? are both well-behaved identity functions! Cheap Theorems when looking at the types is not interesting enough (v:.? ) (v = Λ.λx:?.t) always fails Conclusions independent of body 27 28

8 PBC Ahmed et al. POPL 11 Ahmed et al. ICFP 17 FG / FC Igarashi et al. ICFP 17 ie et al. ESOP 18 language cast calculus cast calculus State-of-the-art polym. explicit* explicit* static relations ad-hoc compatibility ad-hoc compatibility ad-hoc language explicit* precision & consistency language implicit consistent subtyping parametricity static GG dynamic GG conjecture - - faithful instantiation s proven (future) (future) conjecture (FC) inherited () proven* conjecture proven - PBC Ahmed et al. POPL 11 Ahmed et al. ICFP 17 FG / FC Igarashi et al. ICFP 17 ie et al. ESOP 18 language cast calculus cast calculus polym. explicit* explicit* Contribution static relations ad-hoc compatibility ad-hoc compatibility ad-hoc language explicit* precision & consistency language implicit consistent subtyping parametricity static GG dynamic GG conjecture - - faithful instantiation s proven (future) (future) conjecture (FC) inherited () new criteria violated by all existing work proven* conjecture proven - GSF language explicit precision & consistency proven proven proven impossible GSF language explicit precision & consistency proven proven proven impossible sensible, systematic design (derived with AGT) can swap Contributions beyond GSF Perspectives 1. (and System FC) are not appropriate internal languages of gradual parametricity 2. parametricity is incompatible with DGG so is noninterference! 3. novel: imprecise embedding of F, disprove claims (language with references) [TOPLAS] Cast calculus for GSF prove equivalence with evidence-based semantics Add implicit polymorphism combine with [ie et al.] Novel form of parametricity to reconcile with DGG? 31 32

Consistent Subtyping for All

Consistent Subtyping for All Consistent Subtyping for All Ningning Xie Xuan Bi Bruno C. d. S. Oliveira 11 May, 2018 The University of Hong Kong 1 Background There has been ongoing debate about which language paradigm, static typing

More information

The Polymorphic Blame Calculus and Parametricity

The Polymorphic Blame Calculus and Parametricity 1 / 31 The Polymorphic Blame Calculus and Parametricity Jeremy G. Siek Indiana University, Bloomington University of Strathclyde August 2015 2 / 31 Integrating static and dynamic typing Static Dynamic

More information

Goal. CS152: Programming Languages. Lecture 15 Parametric Polymorphism. What the Library Likes. What The Client Likes. Start simpler.

Goal. CS152: Programming Languages. Lecture 15 Parametric Polymorphism. What the Library Likes. What The Client Likes. Start simpler. Goal Understand what this interface means and why it matters: CS152: Programming Languages Lecture 15 Parametric Polymorphism Dan Grossman Spring 2011 type a mylist; val mt_list : a mylist val cons : a

More information

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012 CS-XXX: Graduate Programming Languages Lecture 9 Simply Typed Lambda Calculus Dan Grossman 2012 Types Major new topic worthy of several lectures: Type systems Continue to use (CBV) Lambda Caluclus as our

More information

Gradual Typing with Union and Intersection Types

Gradual Typing with Union and Intersection Types Gradual Typing with Union and Intersection Types Giuseppe Castagna, Victor Lanvin ICFP 17 September 6, 2017 1 / 14 Outline 1 Motivating Example 2 Types and Subtyping 3 Function Types and Operators 4 Conclusion

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 12/02/2013 OCaml 1 Acknowledgement The material on these slides is based on notes provided by Dexter Kozen. 2 About OCaml A functional programming language All computation

More information

Topics Covered Thus Far CMSC 330: Organization of Programming Languages

Topics Covered Thus Far CMSC 330: Organization of Programming Languages Topics Covered Thus Far CMSC 330: Organization of Programming Languages Names & Binding, Type Systems Programming languages Ruby Ocaml Lambda calculus Syntax specification Regular expressions Context free

More information

Meta-programming with Names and Necessity p.1

Meta-programming with Names and Necessity p.1 Meta-programming with Names and Necessity Aleksandar Nanevski Carnegie Mellon University ICFP, Pittsburgh, 05 October 2002 Meta-programming with Names and Necessity p.1 Meta-programming Manipulation of

More information

Consistent Subtyping for All

Consistent Subtyping for All Consistent Subtyping for All Ningning Xie, Xuan Bi, and Bruno C. d. S. Oliveira The University of Hong Kong {nnxie,xbi,bruno}@cs.hku.hk Abstract. Consistent subtyping is employed in some gradual type systems

More information

Types. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus

Types. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus Types Type checking What is a type? The notion varies from language to language Consensus A set of values A set of operations on those values Classes are one instantiation of the modern notion of type

More information

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106 CS 565: Programming Languages Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106 Administrivia Who am I? Course web page http://www.cs.purdue.edu/homes/peugster/cs565spring08/ Office hours By appointment Main

More information

Programming Languages

Programming Languages CSE 230: Winter 2008 Principles of Programming Languages Ocaml/HW #3 Q-A Session Push deadline = Mar 10 Session Mon 3pm? Lecture 15: Type Systems Ranjit Jhala UC San Diego Why Typed Languages? Development

More information

Harvard School of Engineering and Applied Sciences Computer Science 152

Harvard School of Engineering and Applied Sciences Computer Science 152 Harvard School of Engineering and Applied Sciences Computer Science 152 Lecture 17 Tuesday, March 30, 2010 1 Polymorph means many forms. Polymorphism is the ability of code to be used on values of different

More information

An update on XML types

An update on XML types An update on XML types Alain Frisch INRIA Rocquencourt (Cristal project) Links Meeting - Apr. 2005 Plan XML types 1 XML types 2 3 2/24 Plan XML types 1 XML types 2 3 3/24 Claim It is worth studying new

More information

The gradual typing approach to mixing static and dynamic typing

The gradual typing approach to mixing static and dynamic typing 1 / 38 The gradual typing approach to mixing static and dynamic typing Jeremy G. Siek University of Colorado = Indiana University TFP 2013 at Provo, Utah, May 2013 The Goals of Gradual Typing Enjoy the

More information

Types and Type Inference

Types and Type Inference Types and Type Inference Mooly Sagiv Slides by Kathleen Fisher and John Mitchell Reading: Concepts in Programming Languages, Revised Chapter 6 - handout on the course homepage Outline General discussion

More information

Types, Type Inference and Unification

Types, Type Inference and Unification Types, Type Inference and Unification Mooly Sagiv Slides by Kathleen Fisher and John Mitchell Cornell CS 6110 Summary (Functional Programming) Lambda Calculus Basic ML Advanced ML: Modules, References,

More information

INF 212 ANALYSIS OF PROG. LANGS Type Systems. Instructors: Crista Lopes Copyright Instructors.

INF 212 ANALYSIS OF PROG. LANGS Type Systems. Instructors: Crista Lopes Copyright Instructors. INF 212 ANALYSIS OF PROG. LANGS Type Systems Instructors: Crista Lopes Copyright Instructors. What is a Data Type? A type is a collection of computational entities that share some common property Programming

More information

Topics Covered Thus Far. CMSC 330: Organization of Programming Languages. Language Features Covered Thus Far. Programming Languages Revisited

Topics Covered Thus Far. CMSC 330: Organization of Programming Languages. Language Features Covered Thus Far. Programming Languages Revisited CMSC 330: Organization of Programming Languages Type Systems, Names & Binding Topics Covered Thus Far Programming languages Syntax specification Regular expressions Context free grammars Implementation

More information

Logical Relations. Amal Ahmed. Northeastern University. OPLSS Lecture 5, June 26, 2015

Logical Relations. Amal Ahmed. Northeastern University. OPLSS Lecture 5, June 26, 2015 Logical Relations Amal Ahmed Northeastern University OPLSS Lecture 5, June 26, 2015 Unary Logical Relations or: Logical Predicates --- can be used to prove: strong normalization type safety (high-level

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Type Systems, Names and Binding CMSC 330 - Spring 2013 1 Topics Covered Thus Far! Programming languages Ruby OCaml! Syntax specification Regular expressions

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

Type Checking and Type Inference

Type Checking and Type Inference Type Checking and Type Inference Principles of Programming Languages CSE 307 1 Types in Programming Languages 2 Static Type Checking 3 Polymorphic Type Inference Version: 1.8 17:20:56 2014/08/25 Compiled

More information

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic 3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax

More information

Tradeoffs. CSE 505: Programming Languages. Lecture 15 Subtyping. Where shall we add useful completeness? Where shall we add completeness?

Tradeoffs. CSE 505: Programming Languages. Lecture 15 Subtyping. Where shall we add useful completeness? Where shall we add completeness? Tradeoffs CSE 505: Programming Languages Lecture 15 Subtyping Zach Tatlock Autumn 2017 Desirable type system properties (desiderata): soundness - exclude all programs that get stuck completeness - include

More information

A New Foundation for Generic Programming

A New Foundation for Generic Programming Ord List A ) in The Implicit Calculus nt ) [[2, 5], [1, 3]] A New Foundation for Generic Programming 1 (presenter), Tom 2, Bruno C. d.{?(ord S.?(Ord Oliveira Schrijvers List Int with List Int )} List Int

More information

Programming Languages Lecture 15: Recursive Types & Subtyping

Programming Languages Lecture 15: Recursive Types & Subtyping CSE 230: Winter 2008 Principles of Programming Languages Lecture 15: Recursive Types & Subtyping Ranjit Jhala UC San Diego News? Formalize first-order type systems Simple types (integers and booleans)

More information

Some instance messages and methods

Some instance messages and methods Some instance messages and methods x ^x y ^y movedx: dx Dy: dy x

More information

Adding GADTs to OCaml the direct approach

Adding GADTs to OCaml the direct approach Adding GADTs to OCaml the direct approach Jacques Garrigue & Jacques Le Normand Nagoya University / LexiFi (Paris) https://sites.google.com/site/ocamlgadt/ Garrigue & Le Normand Adding GADTs to OCaml 1

More information

Recursive Types and Subtyping

Recursive Types and Subtyping Recursive Types and Subtyping #1 One-Slide Summary Recall: Recursive types (e.g., τ list) make the typed lambda calculus as powerful as the untyped lambda calculus. If τ is a subtype of σ then any expression

More information

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context Types 1 / 15 Outline Introduction Concepts and terminology The case for static typing Implementing a static type system Basic typing relations Adding context 2 / 15 Types and type errors Type: a set of

More information

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011 CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics Dan Grossman Spring 2011 Review e ::= λx. e x e e c v ::= λx. e c τ ::= int τ τ Γ ::= Γ, x : τ (λx. e) v e[v/x] e 1 e 1 e 1 e

More information

Simply-Typed Lambda Calculus

Simply-Typed Lambda Calculus #1 Simply-Typed Lambda Calculus #2 Back to School What is operational semantics? When would you use contextual (small-step) semantics? What is denotational semantics? What is axiomatic semantics? What

More information

Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes

Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes Atsushi Igarashi (Kyoto Univ.) based on joint work [POPL2001, TCS2003] with Naoki Kobayashi (Tohoku Univ.) Programming

More information

Static Use-Based Object Confinement. Christian Skalka and Scott Smith The Johns Hopkins University

Static Use-Based Object Confinement. Christian Skalka and Scott Smith The Johns Hopkins University Static Use-Based Object Confinement Christian Skalka and Scott Smith The Johns Hopkins University Object confinement: what is it? Object confinement is concerned with the encapsulation, or protection,

More information

Mutable References. Chapter 1

Mutable References. Chapter 1 Chapter 1 Mutable References In the (typed or untyped) λ-calculus, or in pure functional languages, a variable is immutable in that once bound to a value as the result of a substitution, its contents never

More information

λ calculus is inconsistent

λ calculus is inconsistent Content Rough timeline COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Gerwin Klein, June Andronick, Toby Murray λ Intro & motivation, getting started [1] Foundations & Principles

More information

Polymorphism and Type Inference

Polymorphism and Type Inference Polymorphism and Type Inference Volker Stolz stolz@ifi.uio.no INF 3110-2008 Department of Informatics University of Oslo Initially by Gerardo Schneider. Based on John C. Mitchell s slides (Stanford U.)

More information

Recursive Types and Subtyping

Recursive Types and Subtyping Recursive Types and Subtyping #1 One-Slide Summary Recursive types (e.g., list) make the typed lambda calculus as powerful as the untyped lambda calculus. If is a subtype of then any expression of type

More information

Programming Language Concepts: Lecture 19

Programming Language Concepts: Lecture 19 Programming Language Concepts: Lecture 19 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 19, 01 April 2009 Adding types

More information

Lambda Calculi With Polymorphism

Lambda Calculi With Polymorphism Resources: The slides of this lecture were derived from [Järvi], with permission of the original author, by copy & x = 1 let x = 1 in... paste or by selection, annotation, or rewording. [Järvi] is in turn

More information

Why Types Matter. Zheng Gao CREST, UCL

Why Types Matter. Zheng Gao CREST, UCL Why Types Matter Zheng Gao CREST, UCL Russell s Paradox Let R be the set of all sets that are not members of themselves. Is R a member of itself? If so, this contradicts with R s definition If not, by

More information

Lecture Notes on Program Equivalence

Lecture Notes on Program Equivalence Lecture Notes on Program Equivalence 15-312: Foundations of Programming Languages Frank Pfenning Lecture 24 November 30, 2004 When are two programs equal? Without much reflection one might say that two

More information

Generic polymorphism on steroids

Generic polymorphism on steroids Generic polymorphism on steroids or How to Solve the Expression Problem with Polymorphic Variants Claudio Sacerdoti Coen Dipartimento di Informatica Scienza e Ingegneria

More information

Polymorphism. Lecture 19 CS 565 4/17/08

Polymorphism. Lecture 19 CS 565 4/17/08 Polymorphism Lecture 19 CS 565 4/17/08 The Limitations of F 1 (simply-typed λ- calculus) In F 1 each function works exactly for one type Example: the identity function id = λx:τ. x : τ τ We need to write

More information

A Type System for Functional Traversal-Based Aspects

A Type System for Functional Traversal-Based Aspects A Type System for Functional Traversal-Based Aspects Bryan Chadwick College of Computer & Information Science Northeastern University, 360 Huntington Avenue Boston, Massachusetts 02115 USA chadwick@ccs.neu.edu

More information

Dynamic Dependency Monitoring to Secure Information Flow

Dynamic Dependency Monitoring to Secure Information Flow Dynamic Dependency Monitoring to Secure Information Flow Mark Thober Joint work with Paritosh Shroff and Scott F. Smith Department of Computer Science Johns Hopkins University CSF 07 1 Motivation Information

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 14 Tuesday, March 24, 2015 1 Parametric polymorphism Polymorph means many forms. Polymorphism is the ability of

More information

Recitation 8: Dynamic and Unityped Languages : Foundations of Programming Languages

Recitation 8: Dynamic and Unityped Languages : Foundations of Programming Languages Recitation 8: Dynamic and Unityped Languages 15-312: Foundations of Programming Languages Jeanne Luning Prak, Charles Yuan March 7, 2018 1 Untyped Languages In this recitation, we explore two languages:

More information

INF 212/CS 253 Type Systems. Instructors: Harry Xu Crista Lopes

INF 212/CS 253 Type Systems. Instructors: Harry Xu Crista Lopes INF 212/CS 253 Type Systems Instructors: Harry Xu Crista Lopes What is a Data Type? A type is a collection of computational entities that share some common property Programming languages are designed to

More information

Derek Dreyer. WG2.8 Meeting, Iceland July 16-20, 2007

Derek Dreyer. WG2.8 Meeting, Iceland July 16-20, 2007 Why Applicative Functors Matter Derek Dreyer Toyota Technological Institute at Chicago WG2.8 Meeting, Iceland July 16-20, 2007 Matthias Felleisen Gets In a Good Jab Matthias Felleisen, POPL PC Chair report,

More information

An Approach to Behavioral Subtyping Based on Static Analysis

An Approach to Behavioral Subtyping Based on Static Analysis TACoS 04 Preliminary Version An Approach to Behavioral Subtyping Based on Static Analysis Francesco Logozzo 1 STIX - École Polytechnique F-91128 Palaiseau, France Abstract In mainstream object oriented

More information

Once Upon a Polymorphic Type

Once Upon a Polymorphic Type Once Upon a Polymorphic Type Keith Wansbrough Computer Laboratory University of Cambridge kw217@cl.cam.ac.uk http://www.cl.cam.ac.uk/users/kw217/ Simon Peyton Jones Microsoft Research Cambridge 20 January,

More information

Static Use Based Object Confinement. Christian Skalka and Scott Smith The Johns Hopkins University

Static Use Based Object Confinement. Christian Skalka and Scott Smith The Johns Hopkins University Static Use Based Object Confinement Christian Skalka and Scott Smith The Johns Hopkins University Object confinement: what is it? Object confinement is concerned with the encapsulation, or protection,

More information

Type Systems, Type Inference, and Polymorphism

Type Systems, Type Inference, and Polymorphism 6 Type Systems, Type Inference, and Polymorphism Programming involves a wide range of computational constructs, such as data structures, functions, objects, communication channels, and threads of control.

More information

Overloading, Type Classes, and Algebraic Datatypes

Overloading, Type Classes, and Algebraic Datatypes Overloading, Type Classes, and Algebraic Datatypes Delivered by Michael Pellauer Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. September 28, 2006 September 28, 2006 http://www.csg.csail.mit.edu/6.827

More information

Intersections and Unions of Session Types

Intersections and Unions of Session Types Intersections and Unions of Session Types Coşku Acay Frank Pfenning Carnegie Mellon University School of Computer Science ITRS 2016 C. Acay & F. Pfenning (CMU) Intersections and Unions of Session Types

More information

Programming Languages Lecture 14: Sum, Product, Recursive Types

Programming Languages Lecture 14: Sum, Product, Recursive Types CSE 230: Winter 200 Principles of Programming Languages Lecture 4: Sum, Product, Recursive Types The end is nigh HW 3 No HW 4 (= Final) Project (Meeting + Talk) Ranjit Jhala UC San Diego Recap Goal: Relate

More information

Second-Order Type Systems

Second-Order Type Systems #1 Second-Order Type Systems Homework 5 Summary Student : 37.9704 Student : 44.4466 ORIGINAL : 50.2442 Student : 50.8275 Student : 50.8633 Student : 50.9181 Student : 52.1347 Student : 52.1633 Student

More information

Modular implicits for OCaml how to assert success. Gallium Seminar,

Modular implicits for OCaml how to assert success. Gallium Seminar, Modular implicits for OCaml how to assert success Jacques Garrigue Nagoya University Frédéric Bour Sponsored by Jane Street LLC Gallium Seminar, 14-03-2016 Garrigue & Bour Mdular implicits and success

More information

Typing & Static Analysis of Multi-Staged Programs

Typing & Static Analysis of Multi-Staged Programs Typing & Static Analysis of Multi-Staged Programs School of Computer Science & Engineering Seoul National University 6/7/2011 @ Oxford U (co-work with I. Kim, W. Choi, B. Aktemur, C. Calcagno, M. Tatsuda)

More information

Subtyping. Lecture 13 CS 565 3/27/06

Subtyping. Lecture 13 CS 565 3/27/06 Subtyping Lecture 13 CS 565 3/27/06 Polymorphism Different varieties of polymorphism: Parametric (ML) type variables are abstract, and used to encode the fact that the same term can be used in many different

More information

Cryptographically Sound Implementations for Typed Information-Flow Security

Cryptographically Sound Implementations for Typed Information-Flow Security FormaCrypt, Nov 30. 2007 Cryptographically Sound Implementations for Typed Information-Flow Security Cédric Fournet Tamara Rezk Microsoft Research INRIA Joint Centre http://msr-inria.inria.fr/projects/sec/cflow

More information

Representation Independence, Confinement and Access Control

Representation Independence, Confinement and Access Control Representation Independence, Confinement and Access Control Anindya Banerjee and David Naumann ab@cis.ksu.edu and naumann@cs.stevens-tech.edu Kansas State University and Stevens Institute of Technology,

More information

1 Introduction. 3 Syntax

1 Introduction. 3 Syntax CS 6110 S18 Lecture 19 Typed λ-calculus 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic semantics,

More information

Type Systems. Pierce Ch. 3, 8, 11, 15 CSE

Type Systems. Pierce Ch. 3, 8, 11, 15 CSE Type Systems Pierce Ch. 3, 8, 11, 15 CSE 6341 1 A Simple Language ::= true false if then else 0 succ pred iszero Simple untyped expressions Natural numbers encoded as succ succ

More information

Where is ML type inference headed?

Where is ML type inference headed? 1 Constraint solving meets local shape inference September 2005 2 Types are good A type is a concise description of the behavior of a program fragment. Typechecking provides safety or security guarantees.

More information

Eta-equivalence in Core Dependent Haskell

Eta-equivalence in Core Dependent Haskell Eta-equivalence in Core Dependent Haskell You should machine-check your proofs Stephanie Weirich University of Pennsylvania Core Dependent Haskell A Specification for Dependent Types in Haskell Stephanie

More information

Representation Independence, Confinement and Access Control

Representation Independence, Confinement and Access Control Representation Independence, Confinement and Access Control Anindya Banerjee and David Naumann ab@cis.ksu.edu and naumann@cs.stevens-tech.edu Kansas State University and Stevens Institute of Technology

More information

Let Arguments Go First

Let Arguments Go First Let Arguments Go First Ningning Xie and Bruno C. d. S. Oliveira The University of Hong Kong {nnxie,bruno}@cs.hku.hk Abstract. Bi-directional type checking has proved to be an extremely useful and versatile

More information

Types and Type Inference

Types and Type Inference CS 242 2012 Types and Type Inference Notes modified from John Mitchell and Kathleen Fisher Reading: Concepts in Programming Languages, Revised Chapter 6 - handout on Web!! Outline General discussion of

More information

Collage of Static Analysis

Collage of Static Analysis Course Outline Collage of Static Analysis 0.5hr: Static Analysis Overview 1.5hr: Static Analysis Design Framework 1.0hr: Static Analysis Engineering Framework 1.0hr: Static Analysis of Multi-Staged Programs

More information

Introduction to System F. Lecture 18 CS 565 4/20/09

Introduction to System F. Lecture 18 CS 565 4/20/09 Introduction to System F Lecture 18 CS 565 4/20/09 The Limitations of F 1 (simply-typed λ- calculus) In F 1 each function works exactly for one type Example: the identity function id = λx:τ. x : τ τ We

More information

Operational Semantics of Cool

Operational Semantics of Cool Operational Semantics of Cool Key Concepts semantics: the meaning of a program, what does program do? how the code is executed? operational semantics: high level code generation steps of calculating values

More information

Formal Systems and their Applications

Formal Systems and their Applications Formal Systems and their Applications Dave Clarke (Dave.Clarke@cs.kuleuven.be) Acknowledgment: these slides are based in part on slides from Benjamin Pierce and Frank Piessens 1 Course Overview Introduction

More information

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ 1 Last time... λ calculus syntax free variables, substitution β reduction α and η conversion

More information

From Types to Sets in Isabelle/HOL

From Types to Sets in Isabelle/HOL From Types to Sets in Isabelle/HOL Extented Abstract Ondřej Kunčar 1 and Andrei Popescu 1,2 1 Fakultät für Informatik, Technische Universität München, Germany 2 Institute of Mathematics Simion Stoilow

More information

Polymorphism and Type Inference

Polymorphism and Type Inference Polymorphism and Type Inference Volker Stolz stolz@ifi.uio.no Department of Informatics University of Oslo Initially by Gerardo Schneider. Based on John C. Mitchell s slides (Stanford U.) Compile-time

More information

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals Review CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics e ::= λx. e x ee c v ::= λx. e c (λx. e) v e[v/x] e 1 e 2 e 1 e 2 τ ::= int τ τ Γ ::= Γ,x : τ e 2 e 2 ve 2 ve 2 e[e /x]:

More information

Coq with Classes. Matthieu Sozeau. Journées PPS 2011 September 5th 2011 Trouville, France. Project Team πr 2 INRIA Paris

Coq with Classes. Matthieu Sozeau. Journées PPS 2011 September 5th 2011 Trouville, France. Project Team πr 2 INRIA Paris Coq with Classes Matthieu Sozeau Project Team πr 2 INRIA Paris Journées PPS 2011 September 5th 2011 Trouville, France This talk A quick overview of Coq Elaboration Type Classes Matthieu Sozeau - Coq with

More information

4.5 Pure Linear Functional Programming

4.5 Pure Linear Functional Programming 4.5 Pure Linear Functional Programming 99 4.5 Pure Linear Functional Programming The linear λ-calculus developed in the preceding sections can serve as the basis for a programming language. The step from

More information

CSE 505: Programming Languages. Lecture 10 Types. Zach Tatlock Winter 2015

CSE 505: Programming Languages. Lecture 10 Types. Zach Tatlock Winter 2015 CSE 505: Programming Languages Lecture 10 Types Zach Tatlock Winter 2015 What Are We Doing? Covered a lot of ground! Easy to lose sight of the big picture. Zach Tatlock CSE 505 Winter 2015, Lecture 10

More information

Operational Semantics. One-Slide Summary. Lecture Outline

Operational Semantics. One-Slide Summary. Lecture Outline Operational Semantics #1 One-Slide Summary Operational semantics are a precise way of specifying how to evaluate a program. A formal semantics tells you what each expression means. Meaning depends on context:

More information

Formal Modelling of Railway Interlockings Using Event-B and the Rodin Tool-chain

Formal Modelling of Railway Interlockings Using Event-B and the Rodin Tool-chain 1 / Formal Modelling of Railway Interlockings Using Event-B and the Rodin Tool-chain Klaus Reichl, Thales Austria GmbH Luis Diaz, Thales España Grp, S.A.U. Dusseldorf, 2014-10-23 2 / Overview 1 2 3 4 5

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2018 Lecture 7b Andrew Tolmach Portland State University 1994-2018 Dynamic Type Checking Static type checking offers the great advantage of catching errors early And

More information

Formal C semantics: CompCert and the C standard

Formal C semantics: CompCert and the C standard Formal C semantics: CompCert and the C standard Robbert Krebbers 1, Xavier Leroy 2, and Freek Wiedijk 1 1 ICIS, Radboud University Nijmegen, The Netherlands 2 Inria Paris-Rocquencourt, France Abstract.

More information

Verified compilers. Guest lecture for Compiler Construction, Spring Magnus Myréen. Chalmers University of Technology

Verified compilers. Guest lecture for Compiler Construction, Spring Magnus Myréen. Chalmers University of Technology Guest lecture for Compiler Construction, Spring 2015 Verified compilers Magnus Myréen Chalmers University of Technology Mentions joint work with Ramana Kumar, Michael Norrish, Scott Owens and many more

More information

` e : T. Gradual Typing. ` e X. Ronald Garcia University of British Columbia

` e : T. Gradual Typing. ` e X. Ronald Garcia University of British Columbia aaab/hicbvbns8naen34wetxtecvi0xwvbirfe9fd3qs0c9oqplsnu3s3stsbgqh1l/ixymixv0h3vw3btsctpxbwoo9gwbmbslnsjvot7w2vrg5tv3ake/u7r8c2kfhbzvkktawsxgiuweoyllmw5pptruppcactjvb6g7md8zukpbetz2n1bcwifnecggj9e2kdw9capbgiaghpvggn/t21ak5c+bv4hakigo0+vaxfyykeztwhinspddjtt8bqrnhdfr2mkvticmy0j6hmqiq/mn8+ck+m0qio0saijweq78njicuykvgogxoovr2zuj/xi/t0bu/yxgaarqtxaio41gnejyedpmkrppceccsmvsxgyieok1ezrocu/zykmlf1fyn5j5evuu3rrwldijo0tly0rwqowfuqc1eui6e0st6s56sf+vd+li0rlnftax9gfx5a8zmk40=

More information

On Polymorphic Gradual Typing

On Polymorphic Gradual Typing On Polymorphic Gradual Typing YUU IGARASHI, Kyoto University TARO SEKIYAMA, IBM Research - Tokyo ATSUSHI IGARASHI, Kyoto University We study an extension of gradual typing a method to integrate dynamic

More information

From IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich

From IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich From IMP to Java Andreas Lochbihler ETH Zurich parts based on work by Gerwin Klein and Tobias Nipkow 2015-07-14 1 Subtyping 2 Objects and Inheritance 3 Multithreading 1 Subtyping 2 Objects and Inheritance

More information

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic

More information

cs242 Kathleen Fisher Reading: Concepts in Programming Languages, Chapter 6 Thanks to John Mitchell for some of these slides.

cs242 Kathleen Fisher Reading: Concepts in Programming Languages, Chapter 6 Thanks to John Mitchell for some of these slides. cs242 Kathleen Fisher Reading: Concepts in Programming Languages, Chapter 6 Thanks to John Mitchell for some of these slides. We are looking for homework graders. If you are interested, send mail to cs242cs.stanford.edu

More information

Symmetry in Type Theory

Symmetry in Type Theory Google May 29th, 2012 What is Symmetry? Definition Symmetry: Two or more things that initially look distinct, may actually be instances of a more general underlying principle. Why do we care? Simplicity.

More information

Tracing Ambiguity in GADT Type Inference

Tracing Ambiguity in GADT Type Inference Tracing Ambiguity in GADT Type Inference ML Workshop 2012, Copenhagen Jacques Garrigue & Didier Rémy Nagoya University / INRIA Garrigue & Rémy Tracing ambiguity 1 Generalized Algebraic Datatypes Algebraic

More information

Programming Language Pragmatics

Programming Language Pragmatics Chapter 10 :: Functional Languages Programming Language Pragmatics Michael L. Scott Historical Origins The imperative and functional models grew out of work undertaken Alan Turing, Alonzo Church, Stephen

More information

Turning proof assistants into programming assistants

Turning proof assistants into programming assistants Turning proof assistants into programming assistants ST Winter Meeting, 3 Feb 2015 Magnus Myréen Why? Why combine proof- and programming assistants? Why proofs? Testing cannot show absence of bugs. Some

More information

Exploring the Design Space of Higher-Order Casts ; CU-CS

Exploring the Design Space of Higher-Order Casts ; CU-CS University of Colorado, Boulder CU Scholar Computer Science Technical Reports Computer Science Fall 10-1-2008 Exploring the Design Space of Higher-Order Casts ; CU-CS-1047-08 Jeremy Siek University of

More information

Parametric types. map: ( a (a b) a list b list. filter: ( a bool) a list a list. Why? a and b are type variables!

Parametric types. map: ( a (a b) a list b list. filter: ( a bool) a list a list. Why? a and b are type variables! What is the deal with a? Parametric types aka: what s up with those a? These meta-functions have strange types: map: ( a b) a list b list filter: ( a bool) a list a list Why? Polymorphism Poly = many,

More information

Call-by-Name Gradual Type Theory

Call-by-Name Gradual Type Theory Call-by-Name Gradual Type Theory Max S. New 1 Northeastern University, Boston, USA maxnew@ccs.neu.edu Daniel R. Licata 2 Wesleyan University, Middletown, USA dlicata@wesleyan.edu Abstract We present gradual

More information

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 Contents 1 Solution to the Exercise 1 1.1 Semantics for lambda calculus.......................

More information