{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,19]],"date-time":"2026-06-19T18:17:39Z","timestamp":1781893059194,"version":"3.54.5"},"reference-count":37,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2018,10,24]],"date-time":"2018-10-24T00:00:00Z","timestamp":1540339200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2018,10,24]]},"abstract":"<jats:p>The promise of gradual typing is that programmers should get the best of both worlds: the static guarantees of static types, and the dynamic flexibility of untyped programming. This is an enticing benefit, but one that, in practice, may carry significant costs. Significant enough, in fact, to threaten the very practicality of gradual typing; slowdowns as high as 120x are reported as arising from gradual typing.<\/jats:p>\n          <jats:p>If one examines these results closely, though, it becomes clear that the costs of gradual typing are not evenly distributed. Indeed, while mixing typed and untyped code almost invariably carries non-trivial costs, many truly deal-breaking slowdowns exhibit pathological performance. Unfortunately, the very presence of these pathological cases---and therefore the possibility of hitting them during development---makes gradual typing a risky proposition in any setting that even remotely cares about performance.<\/jats:p>\n          <jats:p>This work attacks one source of large overheads in these pathological cases: an accumulation of contract wrappers that perform redundant checks. The work introduces a novel strategy for contract checking---collapsible contracts---which eliminates this redundancy for function and vector contracts and drastically reduces the overhead of contract wrappers.<\/jats:p>\n          <jats:p>We implemented this checking strategy as part of the Racket contract system, which is used in the Typed Racket gradual typing system. Our experiments show that our strategy successfully brings a class of pathological cases in line with normal cases, while not introducing an undue overhead to any of the other cases. Our results also show that the performance of gradual typing in Racket remains prohibitive for many programs, but that collapsible contracts are one essential ingredient in reducing the cost of gradual typing.<\/jats:p>","DOI":"10.1145\/3276503","type":"journal-article","created":{"date-parts":[[2018,10,24]],"date-time":"2018-10-24T11:57:18Z","timestamp":1540382238000},"page":"1-27","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":13,"title":["Collapsible contracts: fixing a pathology of gradual typing"],"prefix":"10.1145","volume":"2","author":[{"given":"Daniel","family":"Feltey","sequence":"first","affiliation":[{"name":"Northwestern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ben","family":"Greenman","sequence":"additional","affiliation":[{"name":"Northeastern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Christophe","family":"Scholliers","sequence":"additional","affiliation":[{"name":"Ghent University, Belgium"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Robert Bruce","family":"Findler","sequence":"additional","affiliation":[{"name":"Northwestern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Vincent","family":"St-Amour","sequence":"additional","affiliation":[{"name":"Northwestern University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2018,10,24]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2013.06.006"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/353171.353175"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133878"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-44202-9_11"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1565824.1565827"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/165854.165893"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133872"},{"key":"e_1_2_1_8_1","first-page":"23","volume-title":"Jan Vitek. KafKa: Gradual Typing for Objects. In Proc. European Conf. Object-Oriented Programming","author":"Chung Benjamin W.","year":"2018","unstructured":"Benjamin W. Chung , Paley Li , Francesco Zappa Nardelli , and Jan Vitek. KafKa: Gradual Typing for Objects. In Proc. European Conf. Object-Oriented Programming , pp. 12:1\u201312: 23 , 2018 . Benjamin W. Chung, Paley Li, Francesco Zappa Nardelli, and Jan Vitek. KafKa: Gradual Typing for Objects. In Proc. European Conf. Object-Oriented Programming, pp. 12:1\u201312:23, 2018."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-28869-2_11"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/581478.581484"},{"key":"e_1_2_1_11_1","volume-title":"Racket","author":"Flatt Matthew","year":"2010","unstructured":"Matthew Flatt and PLT. Reference : Racket . PLT Design Inc., PLT-TR- 2010 -1, 2010. https:\/\/racket-lang.org\/tr1\/ Matthew Flatt and PLT. Reference: Racket. PLT Design Inc., PLT-TR-2010-1, 2010. https:\/\/racket-lang.org\/tr1\/"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676967"},{"key":"e_1_2_1_13_1","volume-title":"Greenberg. Space-Efficient Latent Contracts. In Proc. Sym. Trends in Functional Programming","author":"Michael","year":"2016","unstructured":"Michael Greenberg. Space-Efficient Latent Contracts. In Proc. Sym. Trends in Functional Programming , 2016 . Michael Greenberg. Space-Efficient Latent Contracts. In Proc. Sym. Trends in Functional Programming, 2016."},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236766"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3162066"},{"key":"e_1_2_1_16_1","first-page":"104","volume-title":"Cormac Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Proc. Wksp. Scheme and Functional Programming","author":"Gronski Jessica","year":"2006","unstructured":"Jessica Gronski , Kenneth Knowles , Aaron Tomb , Stephen N. Freund , and Cormac Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Proc. Wksp. Scheme and Functional Programming , pp. 93\u2013 104 , 2006 . Jessica Gronski, Kenneth Knowles, Aaron Tomb, Stephen N. Freund, and Cormac Flanagan. Sage: Hybrid Checking for Flexible Specifications. In Proc. Wksp. Scheme and Functional Programming, pp. 93\u2013104, 2006."},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(94)00004-2"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10990-011-9066-z"},{"key":"e_1_2_1_19_1","volume-title":"Efficient Gradual Typing. arXiv","author":"Kuhlenschmidt Andre","year":"1802","unstructured":"Andre Kuhlenschmidt , Deyaaeldeen Almahallawi , and Jeremy G. Siek . Efficient Gradual Typing. arXiv , 1802 .06375v1, 2018. Andre Kuhlenschmidt, Deyaaeldeen Almahallawi, and Jeremy G. Siek. Efficient Gradual Typing. arXiv, 1802.06375v1, 2018."},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/1498926.1498930"},{"key":"e_1_2_1_21_1","first-page":"0","article-title":"MACLISP Reference Manual. MIT","author":"Moon David A.","year":"1974","unstructured":"David A. Moon . MACLISP Reference Manual. MIT , Revision 0 , 1974 . David A. Moon. MACLISP Reference Manual. MIT, Revision 0, 1974.","journal-title":"Revision"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133880"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676971"},{"key":"e_1_2_1_24_1","volume-title":"Polymorphic Dynamic Typing: Aspects of proof theory and inference. DIKU, 95\/9","author":"Rehof Jakob","year":"1995","unstructured":"Jakob Rehof . Polymorphic Dynamic Typing: Aspects of proof theory and inference. DIKU, 95\/9 , 1995 . Jakob Rehof. Polymorphic Dynamic Typing: Aspects of proof theory and inference. DIKU, 95\/9, 1995."},{"key":"e_1_2_1_25_1","volume-title":"Jan Vitek. Concrete Types for TypeScript. In Proc. European Conf. Object-Oriented Programming","author":"Richards Gregor","year":"2015","unstructured":"Gregor Richards , Francesco Zappa Nardelli , and Jan Vitek. Concrete Types for TypeScript. In Proc. European Conf. Object-Oriented Programming , 2015 . Gregor Richards, Francesco Zappa Nardelli, and Jan Vitek. Concrete Types for TypeScript. In Proc. European Conf. Object-Oriented Programming, 2015."},{"key":"e_1_2_1_26_1","volume-title":"Performance is Not. arXiv:1807.00661v1","author":"Roberts Richard","year":"2018","unstructured":"Richard Roberts , Michael Homer , Stefan Marr , and James Noble . Shallow Types for Insightful Programs: Grace is Optional , Performance is Not. arXiv:1807.00661v1 , 2018 . Richard Roberts, Michael Homer, Stefan Marr, and James Noble. Shallow Types for Insightful Programs: Grace is Optional, Performance is Not. arXiv:1807.00661v1, 2018."},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2737968"},{"key":"e_1_2_1_28_1","volume-title":"Proc. Wksp. Scheme and Functional Programming","author":"Jeremy","year":"2006","unstructured":"Jeremy G. Siek and Walid Taha. Gradual Typing for Functional Languages . In Proc. Wksp. Scheme and Functional Programming , 2006 . Jeremy G. Siek and Walid Taha. Gradual Typing for Functional Languages. In Proc. Wksp. Scheme and Functional Programming, 2006."},{"key":"e_1_2_1_29_1","volume-title":"Common Lisp the Language","author":"Steele Guy L.","year":"1990","unstructured":"Guy L. Steele . Common Lisp the Language . 2 nd edition. Digital Press , 1990 . Guy L. Steele. Common Lisp the Language. 2nd edition. Digital Press, 1990.","edition":"2"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/2384616.2384685"},{"key":"e_1_2_1_31_1","volume-title":"Matthias Felleisen. Towards Practical Gradual Typing. In Proc. European Conf. Object-Oriented Programming","author":"Takikawa Asumu","year":"2015","unstructured":"Asumu Takikawa , Daniel Feltey , Earl Dean , Robert Bruce Findler , Matthew Flatt , Sam Tobin-Hochstadt , and Matthias Felleisen. Towards Practical Gradual Typing. In Proc. European Conf. Object-Oriented Programming , 2015 . Asumu Takikawa, Daniel Feltey, Earl Dean, Robert Bruce Findler, Matthew Flatt, Sam Tobin-Hochstadt, and Matthias Felleisen. Towards Practical Gradual Typing. In Proc. European Conf. Object-Oriented Programming, 2015."},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837630"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/1176617.1176755"},{"key":"e_1_2_1_34_1","first-page":"17","volume-title":"Asumu Takikawa. Migratory Typing: Ten Years Later. In Proc. Summit on Advances in Programming Languages","author":"Tobin-Hochstadt Sam","year":"2017","unstructured":"Sam Tobin-Hochstadt , Matthias Felleisen , Robert Bruce Findler , Matthew Flatt , Ben Greenman , Andrew M. Kent , Vincent St-Amour , T. Stephen Strickland , and Asumu Takikawa. Migratory Typing: Ten Years Later. In Proc. Summit on Advances in Programming Languages , pp. 17:1\u201317: 17 , 2017 . Sam Tobin-Hochstadt, Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Ben Greenman, Andrew M. Kent, Vincent St-Amour, T. Stephen Strickland, and Asumu Takikawa. Migratory Typing: Ten Years Later. In Proc. Summit on Advances in Programming Languages, pp. 17:1\u201317:17, 2017."},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009849"},{"key":"e_1_2_1_36_1","first-page":"29","volume-title":"Jakub Zalewski. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In Proc. European Conf. Object-Oriented Programming","author":"Williams Jack","year":"2017","unstructured":"Jack Williams , J. Garrett Morris , Philip Wadler , and Jakub Zalewski. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In Proc. European Conf. Object-Oriented Programming , pp. 28:1\u201328: 29 , 2017 . Jack Williams, J. Garrett Morris, Philip Wadler, and Jakub Zalewski. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In Proc. European Conf. Object-Oriented Programming, pp. 28:1\u201328:29, 2017."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/1706299.1706343"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3276503","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3276503","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T19:03:39Z","timestamp":1750273419000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3276503"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,10,24]]},"references-count":37,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2018,10,24]]}},"alternative-id":["10.1145\/3276503"],"URL":"https:\/\/doi.org\/10.1145\/3276503","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018,10,24]]},"assertion":[{"value":"2018-10-24","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}