{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,3,25]],"date-time":"2025-03-25T14:33:44Z","timestamp":1742913224091,"version":"3.40.3"},"publisher-location":"Cham","reference-count":34,"publisher":"Springer International Publishing","isbn-type":[{"type":"print","value":"9783030674373"},{"type":"electronic","value":"9783030674380"}],"license":[{"start":{"date-parts":[[2021,1,1]],"date-time":"2021-01-01T00:00:00Z","timestamp":1609459200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2021,1,13]],"date-time":"2021-01-13T00:00:00Z","timestamp":1610496000000},"content-version":"vor","delay-in-days":12,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2021]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>In this paper, we describe our experience incorporating gradual types in a statically typed functional language with Hindley-Milner style type inference. Where most gradually typed systems aim to improve static checking in a dynamically typed language, we approach it from the opposite perspective and promote dynamic checking in a statically typed language. Our approach provides a glimpse into how languages like SML and OCaml might handle gradual typing. We discuss our implementation and challenges faced\u2014specifically how gradual typing rules apply to our representation of composite and recursive types. We review the various implementations that add dynamic typing to a statically typed language in order to highlight the different ways of mixing static and dynamic typing and examine possible inspirations while maintaining the gradual nature of our type system. This paper also discusses our motivation for adding gradual types to our language, and the practical benefits of doing so in our industrial setting.<\/jats:p>","DOI":"10.1007\/978-3-030-67438-0_4","type":"book-chapter","created":{"date-parts":[[2021,1,15]],"date-time":"2021-01-15T11:04:40Z","timestamp":1610708680000},"page":"54-70","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Putting Gradual Types to Work"],"prefix":"10.1007","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-8430-9229","authenticated-orcid":false,"given":"Bhargav","family":"Shivkumar","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9878-2781","authenticated-orcid":false,"given":"Enrique","family":"Naudon","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Lukasz","family":"Ziarek","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"297","published-online":{"date-parts":[[2021,1,13]]},"reference":[{"key":"4_CR1","unstructured":"Using Type Dynamic. https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/programming-guide\/types\/using-type-dynamic. Accessed 02 Jan 2021"},{"issue":"2","key":"4_CR2","doi-asserted-by":"publisher","first-page":"237","DOI":"10.1145\/103135.103138","volume":"13","author":"M Abadi","year":"1991","unstructured":"Abadi, M., Cardelli, L., Pierce, B., Plotkin, G.: Dynamic typing in a statically typed language. ACM Trans. Program. Lang. Syst. (TOPLAS) 13(2), 237\u2013268 (1991)","journal-title":"ACM Trans. Program. Lang. Syst. (TOPLAS)"},{"key":"4_CR3","doi-asserted-by":"publisher","first-page":"59","DOI":"10.4204\/EPTCS.285.3","volume":"285","author":"F Balestrieri","year":"2018","unstructured":"Balestrieri, F., Mauny, M.: Generic programming in OCaml. Electron. Proc. Theor. Comput. Sci. 285, 59\u2013100 (2018). https:\/\/doi.org\/10.4204\/EPTCS.285.3","journal-title":"Electron. Proc. Theor. Comput. Sci."},{"key":"4_CR4","doi-asserted-by":"crossref","unstructured":"Damas, L., Milner, R.: Principal type-schemes for functional programs. In: Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 207\u2013212 (1982)","DOI":"10.1145\/582153.582176"},{"issue":"1","key":"4_CR5","doi-asserted-by":"publisher","first-page":"303","DOI":"10.1145\/2775051.2676992","volume":"50","author":"R Garcia","year":"2015","unstructured":"Garcia, R., Cimini, M.: Principal type schemes for gradual programs. SIGPLAN Not. 50(1), 303\u2013315 (2015). https:\/\/doi.org\/10.1145\/2775051.2676992","journal-title":"SIGPLAN Not."},{"issue":"10","key":"4_CR6","doi-asserted-by":"publisher","first-page":"231","DOI":"10.1145\/1103845.1094830","volume":"40","author":"KE Gray","year":"2005","unstructured":"Gray, K.E., Findler, R.B., Flatt, M.: Fine-grained interoperability through mirrors and contracts. ACM SIGPLAN Not. 40(10), 231\u2013245 (2005)","journal-title":"ACM SIGPLAN Not."},{"key":"4_CR7","unstructured":"Greenberg, M.: The dynamic practice and static theory of gradual typing. In: 3rd Summit on Advances in Programming Languages (SNAPL 2019). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2019)"},{"key":"4_CR8","unstructured":"Gronski, J., Knowles, K., Tomb, A., Freund, S.N., Flanagan, C.: Sage: hybrid checking for flexible specifications. In: Scheme and Functional Programming Workshop, vol. 6, pp. 93\u2013104 (2006)"},{"key":"4_CR9","unstructured":"Hejlsberg, A.: C# 4.0 and beyond by anders hejlsberg. Microsoft Channel, vol. 9 (2010)"},{"key":"4_CR10","unstructured":"Huet, G.: Resolution d\u2019equations dans des languages d\u2019order 1, 2,..., $$\\upomega $$. these d\u2019etat, University de Paris (1976). https:\/\/ci.nii.ac.jp\/naid\/10006536039\/en\/"},{"issue":"3","key":"4_CR11","doi-asserted-by":"publisher","first-page":"396","DOI":"10.1145\/503502.503505","volume":"23","author":"A Igarashi","year":"2001","unstructured":"Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396\u2013450 (2001). https:\/\/doi.org\/10.1145\/503502.503505","journal-title":"ACM Trans. Program. Lang. Syst."},{"issue":"2","key":"4_CR12","first-page":"18","volume":"26","author":"L Ina","year":"2009","unstructured":"Ina, L., Igarashi, A.: Gradual typing for featherweight Java. Comput. Softw. 26(2), 18\u201340 (2009)","journal-title":"Comput. Softw."},{"key":"4_CR13","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"292","DOI":"10.1007\/978-3-319-30936-1_16","volume-title":"A List of Successes That Can Change the World","author":"S Peyton Jones","year":"2016","unstructured":"Peyton Jones, S., Weirich, S., Eisenberg, R.A., Vytiniotis, D.: A reflection on types. In: Lindley, S., McBride, C., Trinder, P., Sannella, D. (eds.) A List of Successes That Can Change the World. LNCS, vol. 9600, pp. 292\u2013317. Springer, Cham (2016). https:\/\/doi.org\/10.1007\/978-3-319-30936-1_16"},{"issue":"1","key":"4_CR14","doi-asserted-by":"publisher","first-page":"93","DOI":"10.1145\/62029.62030","volume":"21","author":"K Knight","year":"1989","unstructured":"Knight, K.: Unification: a multidisciplinary survey. ACM Comput. Surv. (CSUR) 21(1), 93\u2013124 (1989)","journal-title":"ACM Comput. Surv. (CSUR)"},{"issue":"3","key":"4_CR15","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/1498926.1498930","volume":"31","author":"J Matthews","year":"2009","unstructured":"Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. ACM Trans. Program. Lang. Syst. (TOPLAS) 31(3), 1\u201344 (2009)","journal-title":"ACM Trans. Program. Lang. Syst. (TOPLAS)"},{"key":"4_CR16","unstructured":"Meijer, E., Drayton, P.: Static typing where possible, dynamic typing when needed: the end of the cold war between programming languages. Citeseer (2004)"},{"issue":"3","key":"4_CR17","doi-asserted-by":"publisher","first-page":"348","DOI":"10.1016\/0022-0000(78)90014-4","volume":"17","author":"R Milner","year":"1978","unstructured":"Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17(3), 348\u2013375 (1978)","journal-title":"J. Comput. Syst. Sci."},{"issue":"POPL","key":"4_CR18","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3290331","volume":"3","author":"Y Miyazaki","year":"2019","unstructured":"Miyazaki, Y., Sekiyama, T., Igarashi, A.: Dynamic type inference for gradual Hindley-Milner typing. Proc. ACM Program. Lang. 3(POPL), 1\u201329 (2019). https:\/\/doi.org\/10.1145\/3290331","journal-title":"Proc. ACM Program. Lang."},{"issue":"9","key":"4_CR19","doi-asserted-by":"publisher","first-page":"280","DOI":"10.1145\/357766.351267","volume":"35","author":"S Peyton Jones","year":"2000","unstructured":"Peyton Jones, S., Eber, J.M., Seward, J.: Composing contracts: an adventure in financial engineering (functional pearl). SIGPLAN Not. 35(9), 280\u2013292 (2000). https:\/\/doi.org\/10.1145\/357766.351267","journal-title":"SIGPLAN Not."},{"key":"4_CR20","unstructured":"Pottier, F.: A modern eye on ml type inference: old techniques and recent developments (September 2005)"},{"key":"4_CR21","doi-asserted-by":"crossref","unstructured":"Pottier, F., R\u00e9my, D.: The essence of ML type inference, pp. 389\u2013489 (January 2005)","DOI":"10.7551\/mitpress\/1104.003.0016"},{"issue":"1","key":"4_CR22","doi-asserted-by":"publisher","first-page":"481","DOI":"10.1145\/2103621.2103714","volume":"47","author":"A Rastogi","year":"2012","unstructured":"Rastogi, A., Chaudhuri, A., Hosmer, B.: The ins and outs of gradual type inference. SIGPLAN Not. 47(1), 481\u2013494 (2012). https:\/\/doi.org\/10.1145\/2103621.2103714","journal-title":"SIGPLAN Not."},{"key":"4_CR23","unstructured":"Siek, J., Taha, W.: Gradual typing for functional languages. In: Scheme and Functional Programming Workshop (2006)"},{"key":"4_CR24","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","first-page":"2","DOI":"10.1007\/978-3-540-73589-2_2","volume-title":"ECOOP 2007 \u2013 Object-Oriented Programming","author":"J Siek","year":"2007","unstructured":"Siek, J., Taha, W.: Gradual Typing for objects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 2\u201327. Springer, Heidelberg (2007). https:\/\/doi.org\/10.1007\/978-3-540-73589-2_2"},{"key":"4_CR25","doi-asserted-by":"crossref","unstructured":"Siek, J.G., Vachharajani, M.: Gradual typing with unification-based inference. In: Proceedings of the 2008 Symposium on Dynamic Languages, pp. 1\u201312 (2008)","DOI":"10.1145\/1408681.1408688"},{"key":"4_CR26","doi-asserted-by":"publisher","unstructured":"Siek, J.G., Vitousek, M.M., Cimini, M., Boyland, J.T.: Refined criteria for gradual typing. In: Ball, T., Bodik, R., Krishnamurthi, S., Lerner, B.S., Morrisett, G. (eds.) 1st Summit on Advances in Programming Languages (SNAPL 2015). Leibniz International Proceedings in Informatics (LIPIcs), vol. 32, pp. 274\u2013293. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl (2015). https:\/\/doi.org\/10.4230\/LIPIcs.SNAPL.2015.274","DOI":"10.4230\/LIPIcs.SNAPL.2015.274"},{"issue":"2","key":"4_CR27","doi-asserted-by":"publisher","first-page":"215","DOI":"10.1145\/321879.321884","volume":"22","author":"RE Tarjan","year":"1975","unstructured":"Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM (JACM) 22(2), 215\u2013225 (1975)","journal-title":"J. ACM (JACM)"},{"key":"4_CR28","doi-asserted-by":"crossref","unstructured":"Tobin-Hochstadt, S., Felleisen, M.: Interlanguage migration: from scripts to programs. In: Companion to the 21st ACM SIGPLAN Symposium on Object-Oriented Programming Systems, Languages, and Applications, pp. 964\u2013974 (2006)","DOI":"10.1145\/1176617.1176755"},{"issue":"1","key":"4_CR29","doi-asserted-by":"publisher","first-page":"395","DOI":"10.1145\/1328897.1328486","volume":"43","author":"S Tobin-Hochstadt","year":"2008","unstructured":"Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of typed scheme. ACM SIGPLAN Not. 43(1), 395\u2013406 (2008)","journal-title":"ACM SIGPLAN Not."},{"key":"4_CR30","doi-asserted-by":"publisher","unstructured":"Vitousek, M.M., Kent, A.M., Siek, J.G., Baker, J.: Design and evaluation of gradual typing for Python. In: Proceedings of the 10th ACM Symposium on Dynamic Languages, DLS 2014, pp. 45\u201356. Association for Computing Machinery, New York (2014). https:\/\/doi.org\/10.1145\/2661088.2661101","DOI":"10.1145\/2661088.2661101"},{"key":"4_CR31","doi-asserted-by":"publisher","unstructured":"Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad hoc. In: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1989, pp. 60\u201376. Association for Computing Machinery, New York (1989). https:\/\/doi.org\/10.1145\/75277.75283","DOI":"10.1145\/75277.75283"},{"key":"4_CR32","doi-asserted-by":"crossref","unstructured":"Wand, M.: A simple algorithm and proof for type inference (1987)","DOI":"10.3233\/FI-1987-10202"},{"key":"4_CR33","doi-asserted-by":"publisher","first-page":"22","DOI":"10.4204\/EPTCS.198.2","volume":"198","author":"L White","year":"2015","unstructured":"White, L., Bour, F., Yallop, J.: Modular implicits. Electron. Proc. Theor. Comput. Sci. 198, 22\u201363 (2015). https:\/\/doi.org\/10.4204\/EPTCS.198.2","journal-title":"Electron. Proc. Theor. Comput. Sci."},{"issue":"1","key":"4_CR34","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3310339","volume":"42","author":"N Xie","year":"2019","unstructured":"Xie, N., Bi, X., Oliveira, B.C.D.S., Schrijvers, T.: Consistent subtyping for all. ACM Trans. Program. Lang. Syst. 42(1), 1\u201379 (2019). https:\/\/doi.org\/10.1145\/3310339","journal-title":"ACM Trans. Program. Lang. Syst."}],"container-title":["Lecture Notes in Computer Science","Practical Aspects of Declarative Languages"],"original-title":[],"language":"en","link":[{"URL":"http:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-030-67438-0_4","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2024,8,22]],"date-time":"2024-08-22T12:53:33Z","timestamp":1724331213000},"score":1,"resource":{"primary":{"URL":"http:\/\/link.springer.com\/10.1007\/978-3-030-67438-0_4"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021]]},"ISBN":["9783030674373","9783030674380"],"references-count":34,"URL":"https:\/\/doi.org\/10.1007\/978-3-030-67438-0_4","relation":{},"ISSN":["0302-9743","1611-3349"],"issn-type":[{"type":"print","value":"0302-9743"},{"type":"electronic","value":"1611-3349"}],"subject":[],"published":{"date-parts":[[2021]]},"assertion":[{"value":"13 January 2021","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}},{"value":"PADL","order":1,"name":"conference_acronym","label":"Conference Acronym","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"International Symposium on Practical Aspects of Declarative Languages","order":2,"name":"conference_name","label":"Conference Name","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Copenhagen","order":3,"name":"conference_city","label":"Conference City","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Denmark","order":4,"name":"conference_country","label":"Conference Country","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2021","order":5,"name":"conference_year","label":"Conference Year","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"18 January 2021","order":7,"name":"conference_start_date","label":"Conference Start Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"19 January 2021","order":8,"name":"conference_end_date","label":"Conference End Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"23","order":9,"name":"conference_number","label":"Conference Number","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"padl2021","order":10,"name":"conference_id","label":"Conference ID","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"https:\/\/popl21.sigplan.org\/home\/PADL-2021","order":11,"name":"conference_url","label":"Conference URL","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Single-blind","order":1,"name":"type","label":"Type","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"EasyChair","order":2,"name":"conference_management_system","label":"Conference Management System","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"21","order":3,"name":"number_of_submissions_sent_for_review","label":"Number of Submissions Sent for Review","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"10","order":4,"name":"number_of_full_papers_accepted","label":"Number of Full Papers Accepted","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"0","order":5,"name":"number_of_short_papers_accepted","label":"Number of Short Papers Accepted","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"48% - The value is computed by the equation \"Number of Full Papers Accepted \/ Number of Submissions Sent for Review * 100\" and then rounded to a whole number.","order":6,"name":"acceptance_rate_of_full_papers","label":"Acceptance Rate of Full Papers","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"3","order":7,"name":"average_number_of_reviews_per_paper","label":"Average Number of Reviews per Paper","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"3,5","order":8,"name":"average_number_of_papers_per_reviewer","label":"Average Number of Papers per Reviewer","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"Yes","order":9,"name":"external_reviewers_involved","label":"External Reviewers Involved","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"Due to the Corona pandemic this event was held virtually.","order":10,"name":"additional_info_on_review_process","label":"Additional Info on Review Process","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}}]}}