{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,24]],"date-time":"2026-09-24T04:44:34Z","timestamp":1790225074650,"version":"4.1.0"},"reference-count":67,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T00:00:00Z","timestamp":1503964800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["CCF-1453796,CCF-1518844"],"award-info":[{"award-number":["CCF-1453796,CCF-1518844"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2017,8,29]]},"abstract":"<jats:p>The polymorphic blame calculus integrates static typing, including universal types, with dynamic typing. The primary challenge with this integration is preserving parametricity: even dynamically-typed code should satisfy it once it has been cast to a universal type. Ahmed et al. (2011) employ runtime type generation in the polymorphic blame calculus to preserve parametricity, but a proof that it does so has been elusive. Matthews and Ahmed (2008) gave a proof of parametricity for a closely related system that combines ML and Scheme, but later found a flaw in their proof. In this paper we present an improved version of the polymorphic blame calculus and we prove that it satisfies relational parametricity. The proof relies on a step-indexed Kripke logical relation. The step-indexing is required to make the logical relation well-defined in the case for the dynamic type. The possible worlds include the mapping of generated type names to their types and the mapping of type names to relations. We prove the Fundamental Property of this logical relation and that it is sound with respect to contextual equivalence. To demonstrate the utility of parametricity in the polymorphic blame calculus, we derive two free theorems.<\/jats:p>","DOI":"10.1145\/3110283","type":"journal-article","created":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T18:19:41Z","timestamp":1504030781000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":35,"title":["Theorems for free for free: parametricity, with and without types"],"prefix":"10.1145","volume":"1","author":[{"given":"Amal","family":"Ahmed","sequence":"first","affiliation":[{"name":"Northeastern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Dustin","family":"Jamner","sequence":"additional","affiliation":[{"name":"Northeastern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jeremy G.","family":"Siek","sequence":"additional","affiliation":[{"name":"Indiana University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Philip","family":"Wadler","sequence":"additional","affiliation":[{"name":"University of Edinburgh, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,8,29]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/103135.103138"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1017\/S095679680000126X"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328476"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/11693024_6"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1709093.1709094"},{"key":"e_1_2_2_6_1","volume-title":"An Indexed Model of Impredicative Polymorphism and Mutable References. (Jan","author":"Ahmed Amal","year":"2003","unstructured":"Amal Ahmed , Andrew W. Appel , and Roberto Virga . 2003. An Indexed Model of Impredicative Polymorphism and Mutable References. (Jan . 2003 ). Available at http:\/\/www.cs.princeton.edu\/\u223cappel\/papers\/impred.pdf. Amal Ahmed, Andrew W. Appel, and Roberto Virga. 2003. An Indexed Model of Impredicative Polymorphism and Mutable References. (Jan. 2003). Available at http:\/\/www.cs.princeton.edu\/\u223cappel\/papers\/impred.pdf."},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/1594834.1480925"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926409"},{"key":"e_1_2_2_9_1","volume-title":"Technical Report: Theorems for Free for Free: Parametricity, With and Without Types. Technical Report. Perma.cc. https:\/\/perma.cc\/L74G- 6A8W","author":"Ahmed Amal","year":"2017","unstructured":"Amal Ahmed , Dustin Jamner , Jeremy G. Siek , and Philip Wadler . 2017 . Technical Report: Theorems for Free for Free: Parametricity, With and Without Types. Technical Report. Perma.cc. https:\/\/perma.cc\/L74G- 6A8W Amal Ahmed, Dustin Jamner, Jeremy G. Siek, and Philip Wadler. 2017. Technical Report: Theorems for Free for Free: Parametricity, With and Without Types. Technical Report. Perma.cc. https:\/\/perma.cc\/L74G- 6A8W"},{"key":"e_1_2_2_10_1","volume-title":"Theorems for low, low prices! (April","author":"Ahmed Amal","year":"2011","unstructured":"Amal Ahmed , Lindsey Kuper , and Jacob Matthews . 2011. Parametric polymorphism through run-time sealing, or , Theorems for low, low prices! (April 2011 ). Available at http:\/\/www.ccs.neu.edu\/home\/amal\/papers\/paramseal-tr.pdf. Amal Ahmed, Lindsey Kuper, and Jacob Matthews. 2011. Parametric polymorphism through run-time sealing, or, Theorems for low, low prices! (April 2011). Available at http:\/\/www.ccs.neu.edu\/home\/amal\/papers\/paramseal-tr.pdf."},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/1570506.1570507"},{"key":"e_1_2_2_12_1","volume-title":"Blame for All (revised). (August","author":"Ahmed Amal","year":"2014","unstructured":"Amal Ahmed , James T. Perconti , Jeremy G. Siek , and Philip Wadler . 2014. Blame for All (revised). (August 2014 ). draft. Amal Ahmed, James T. Perconti, Jeremy G. Siek, and Philip Wadler. 2014. Blame for All (revised). (August 2014). draft."},{"key":"e_1_2_2_14_1","volume-title":"Gradual Typing for Smalltalk. Science of Computer Programming (Aug","author":"Allende Esteban","year":"2013","unstructured":"Esteban Allende , Oscar Calla\u00fa , Johan Fabry , \u00c9ric Tanter , and Marcus Denker . 2013. Gradual Typing for Smalltalk. Science of Computer Programming (Aug . 2013 ). Available online. Esteban Allende, Oscar Calla\u00fa, Johan Fabry, \u00c9ric Tanter, and Marcus Denker. 2013. Gradual Typing for Smalltalk. Science of Computer Programming (Aug. 2013). Available online."},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-44202-9_11"},{"key":"e_1_2_2_16_1","unstructured":"Gilad Bracha. 2011. Optional Types in Dart. Google.  Gilad Bracha. 2011. Optional Types in Dart. Google."},{"key":"e_1_2_2_17_1","unstructured":"Avik Chaudhuri. 2014. Flow: a static type checker for JavaScript. (2014). http:\/\/flowtype.org\/  Avik Chaudhuri. 2014. Flow: a static type checker for JavaScript. (2014). http:\/\/flowtype.org\/"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837632"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009863"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-28869-2_11"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/581478.581484"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676992"},{"key":"e_1_2_2_23_1","volume-title":"Interpr\u00e9tation Fonctionnelle et \u00c9limination des Coupures de l\u2019Arithm\u00e9tique d\u2019Ordre Sup\u00e9rieur. Th\u00e8se de doctorat d\u2019\u00e9tat. Universit\u00e9 Paris VII","author":"Girard Jean-Yves","unstructured":"Jean-Yves Girard . 1972. Interpr\u00e9tation Fonctionnelle et \u00c9limination des Coupures de l\u2019Arithm\u00e9tique d\u2019Ordre Sup\u00e9rieur. Th\u00e8se de doctorat d\u2019\u00e9tat. Universit\u00e9 Paris VII , Paris, France . Jean-Yves Girard. 1972. Interpr\u00e9tation Fonctionnelle et \u00c9limination des Coupures de l\u2019Arithm\u00e9tique d\u2019Ordre Sup\u00e9rieur. Th\u00e8se de doctorat d\u2019\u00e9tat. Universit\u00e9 Paris VII, Paris, France."},{"key":"e_1_2_2_24_1","unstructured":"Michael Greenberg. 2013. Manifest Contracts. Ph.D. Dissertation. University of Pennsylvania.  Michael Greenberg. 2013. Manifest Contracts. Ph.D. Dissertation. University of Pennsylvania."},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/1706299.1706341"},{"key":"e_1_2_2_26_1","volume-title":"Sage: Hybrid Checking for Flexible Specifications. In Scheme and Functional Programming Workshop (Scheme). 93\u2013104","author":"Gronski Jessica","year":"2006","unstructured":"Jessica Gronski , Kenneth Knowles , Aaron Tomb , Stephen N. Freund , and Cormac Flanagan . 2006 . Sage: Hybrid Checking for Flexible Specifications. In Scheme and Functional Programming Workshop (Scheme). 93\u2013104 . Jessica Gronski, Kenneth Knowles, Aaron Tomb, Stephen N. Freund, and Cormac Flanagan. 2006. Sage: Hybrid Checking for Flexible Specifications. In Scheme and Functional Programming Workshop (Scheme). 93\u2013104."},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/371880.371887"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/1297081.1297089"},{"key":"e_1_2_2_29_1","volume-title":"Practical Foundations for Programming Languages","author":"Harper Robert","unstructured":"Robert Harper . 2013. Practical Foundations for Programming Languages . Cambridge University Press . Robert Harper. 2013. Practical Foundations for Programming Languages. Cambridge University Press."},{"key":"e_1_2_2_30_1","volume-title":"Microsoft Channel 9 Blog. (April","author":"Hejlsberg Anders","year":"2010","unstructured":"Anders Hejlsberg . 2010. C# 4.0 and beyond by Anders Hejlsberg . Microsoft Channel 9 Blog. (April 2010 ). Anders Hejlsberg. 2010. C# 4.0 and beyond by Anders Hejlsberg. Microsoft Channel 9 Blog. (April 2010)."},{"key":"e_1_2_2_31_1","unstructured":"Anders Hejlsberg. 2012. Introducing TypeScript. Microsoft Channel 9 Blog. (2012).  Anders Hejlsberg. 2012. Introducing TypeScript. Microsoft Channel 9 Blog. (2012)."},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(94)00004-2"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110284"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/2048066.2048114"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1007\/3540543961_20"},{"key":"e_1_2_2_36_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-78739-6_2"},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/1190216.1190220"},{"key":"e_1_2_2_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/361932.361937"},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/1596550.1596572"},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796811000165"},{"key":"e_1_2_2_42_1","doi-asserted-by":"publisher","DOI":"10.1007\/1-4020-8141-3_34"},{"key":"e_1_2_2_43_1","unstructured":"Benjamin Pierce and Eijiro Sumii. 2000. Relating cryptography and polymorphism. (2000). www.cis.upenn.edu\/~bcpierce\/ papers\/infohide.ps Manuscript.  Benjamin Pierce and Eijiro Sumii. 2000. Relating cryptography and polymorphism. (2000). www.cis.upenn.edu\/~bcpierce\/ papers\/infohide.ps Manuscript."},{"key":"e_1_2_2_44_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0055063"},{"key":"e_1_2_2_45_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0055063"},{"key":"e_1_2_2_46_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-57182-5_8"},{"key":"e_1_2_2_47_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-06859-7_148"},{"key":"e_1_2_2_48_1","volume-title":"abstraction, and parametric polymorphism. Information Processing","author":"Reynolds John C.","year":"1983","unstructured":"John C. Reynolds . 1983. Types , abstraction, and parametric polymorphism. Information Processing ( 1983 ), 513\u2013523. John C. Reynolds. 1983. Types, abstraction, and parametric polymorphism. Information Processing (1983), 513\u2013523."},{"key":"e_1_2_2_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/888251.888274"},{"key":"e_1_2_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/1159803.1159816"},{"key":"e_1_2_2_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/2994594"},{"key":"e_1_2_2_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/360204.360225"},{"key":"e_1_2_2_53_1","volume-title":"Gradual Typing for Functional Languages. In Scheme and Functional Programming Workshop (Scheme). 81\u201392","author":"Jeremy","unstructured":"Jeremy G. Siek and Walid Taha. 2006 . Gradual Typing for Functional Languages. In Scheme and Functional Programming Workshop (Scheme). 81\u201392 . Jeremy G. Siek and Walid Taha. 2006. Gradual Typing for Functional Languages. In Scheme and Functional Programming Workshop (Scheme). 81\u201392."},{"key":"e_1_2_2_54_1","volume-title":"Refined Criteria for Gradual Typing. In SNAPL: Summit on Advances in Programming Languages (LIPIcs: Leibniz International Proceedings in Informatics).","author":"Siek Jeremy G.","year":"2015","unstructured":"Jeremy G. Siek , Michael M. Vitousek , Matteo Cimini , and John Tang Boyland . 2015 . Refined Criteria for Gradual Typing. In SNAPL: Summit on Advances in Programming Languages (LIPIcs: Leibniz International Proceedings in Informatics). Jeremy G. Siek, Michael M. Vitousek, Matteo Cimini, and John Tang Boyland. 2015. Refined Criteria for Gradual Typing. In SNAPL: Summit on Advances in Programming Languages (LIPIcs: Leibniz International Proceedings in Informatics)."},{"key":"e_1_2_2_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/1706299.1706342"},{"key":"e_1_2_2_56_1","volume-title":"Siek and Philip Wadler","author":"Jeremy","year":"2016","unstructured":"Jeremy G. Siek and Philip Wadler . 2016 . The key to blame: Gradual typing meets cryptography. (July 2016). http:\/\/homepages. inf.ed.ac.uk\/wadler\/topics\/blame.html#blame- key (draft). Jeremy G. Siek and Philip Wadler. 2016. The key to blame: Gradual typing meets cryptography. (July 2016). http:\/\/homepages. inf.ed.ac.uk\/wadler\/topics\/blame.html#blame- key (draft)."},{"key":"e_1_2_2_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/1190315.1190324"},{"key":"e_1_2_2_60_1","doi-asserted-by":"publisher","DOI":"10.3233\/JCS-2003-11403"},{"key":"e_1_2_2_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/2535838.2535889"},{"key":"e_1_2_2_62_1","doi-asserted-by":"publisher","DOI":"10.1145\/2384616.2384674"},{"key":"e_1_2_2_63_1","doi-asserted-by":"publisher","DOI":"10.1145\/96709.96747"},{"key":"e_1_2_2_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/1176617.1176755"},{"key":"e_1_2_2_65_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328486"},{"key":"e_1_2_2_66_1","doi-asserted-by":"publisher","DOI":"10.1145\/1863543.1863561"},{"key":"e_1_2_2_67_1","volume-title":"TypeScript and the Road to 2.0. (October","author":"Turner Jonathan","year":"2014","unstructured":"Jonathan Turner . 2014. TypeScript and the Road to 2.0. (October 2014 ). https:\/\/blogs.msdn.microsoft.com\/typescript\/2014\/ 10\/22\/typescript- and- the- road- to- 2- 0\/ Jonathan Turner. 2014. TypeScript and the Road to 2.0. (October 2014). https:\/\/blogs.msdn.microsoft.com\/typescript\/2014\/ 10\/22\/typescript- and- the- road- to- 2- 0\/"},{"key":"e_1_2_2_68_1","volume-title":"Facebook: Analyzing PHP statically. In Commercial Users of Functional Programming (CUFP).","author":"Verlaguet Julien","year":"2013","unstructured":"Julien Verlaguet . 2013 . Facebook: Analyzing PHP statically. In Commercial Users of Functional Programming (CUFP). Julien Verlaguet. 2013. Facebook: Analyzing PHP statically. In Commercial Users of Functional Programming (CUFP)."},{"key":"e_1_2_2_69_1","doi-asserted-by":"publisher","DOI":"10.1145\/99370.99404"},{"key":"e_1_2_2_70_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_1"},{"key":"e_1_2_2_71_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01018828"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110283","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3110283","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3110283","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T04:38:44Z","timestamp":1750221524000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110283"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,8,29]]},"references-count":67,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2017,8,29]]}},"alternative-id":["10.1145\/3110283"],"URL":"https:\/\/doi.org\/10.1145\/3110283","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,8,29]]},"assertion":[{"value":"2017-08-29","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}