{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T04:24:29Z","timestamp":1750220669828,"version":"3.41.0"},"reference-count":60,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2020,11,13]],"date-time":"2020-11-13T00:00:00Z","timestamp":1605225600000},"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":[[2020,11,13]]},"abstract":"<jats:p>Gradual typing provides a methodology to integrate static and dynamic typing, harmonizing their often conflicting advantages in a single language. When a user wants to enjoy the advantages of static typing, most gradual languages require that they add type annotations. Many nontrivial tasks must be undertaken while adding type annotations, including understanding program behaviors and invariants. Unfortunately, if this is done incorrectly then the added type annotations can be wrong\u2013leading to inconsistencies between the program and the type annotations. Gradual typing implementations detect such inconsistencies at runtime, raise cast errors, and generate messages. However, solely relying on such error messages for understanding and fixing inconsistencies and their resulting cast errors is often insufficient for multiple reasons. One reason is that while such messages cover inconsistencies in one execution path, fixing them often requires reconciling information from multiple paths. Another is that users may add many wrong type annotations that they later find difficult to identify and fix, when considering all added annotations.<\/jats:p>\n          <jats:p>Recent studies provide evidence that type annotations added during program migration are often wrong and that many programmers prefer compile-time warnings about wrong annotations. Motivated by these results, we develop exploratory typing to help with the static detection, understanding, and fixing of inconsistencies. The key idea of exploratory typing is that it systematically removes dynamic types and explores alternative types for static type annotations that can remedy inconsistencies. To demonstrate the feasibility of exploratory typing, we have implemented it in PyHound, which targets programs written in Reticulated Python, a gradual variant of Python. We have evaluated PyHound on a set of Python programs, and the evaluation results demonstrate that our idea can effectively detect inconsistencies in 98% of the tested programs and fix 93% of inconsistencies, significantly outperforming pytype, a widely used Python tool for enforcing type annotations.<\/jats:p>","DOI":"10.1145\/3428259","type":"journal-article","created":{"date-parts":[[2020,11,24]],"date-time":"2020-11-24T23:36:06Z","timestamp":1606260966000},"page":"1-30","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":7,"title":["Taming type annotations in gradual typing"],"prefix":"10.1145","volume":"4","author":[{"given":"John Peter","family":"Campora","sequence":"first","affiliation":[{"name":"University of Louisiana at Lafayette, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Sheng","family":"Chen","sequence":"additional","affiliation":[{"name":"University of Louisiana at Lafayette, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2020,11,13]]},"reference":[{"volume-title":"https:\/\/github.com\/google\/pytype Last accessed on April 27th","year":"2020","key":"e_1_2_2_1_1"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/103135.103138"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/1925844.1926409"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110283"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/99583.99621"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628149"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796816000162"},{"volume-title":"Gradual Program Verification","author":"Bader Johannes","key":"e_1_2_2_8_1"},{"volume-title":"Int. Workshop on Implementation of Functional Languages.","year":"2004","author":"Bra\u00dfel Bernd","key":"e_1_2_2_9_1"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3158103"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236793"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/113445.113469"},{"volume-title":"Gradual Typing with Union and Intersection Types. In ACM SIGPLAN International Conference on Functional Programming (ICFP 2017 ). To appear.","year":"2017","author":"Castagna Giuseppe","key":"e_1_2_2_13_1"},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133872"},{"volume-title":"An Error-Tolerant Type System for Variational Lambda Calculus. In ACM Int. Conf. on Functional Programming. 29-40","author":"Chen S.","key":"e_1_2_2_15_1"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2364527.2364535"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/2518190"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/2518190"},{"volume-title":"Gradual Information Flow Typing. In International Workshop on Scripts to Programs.","year":"2011","author":"Disney Tim","key":"e_1_2_2_19_1"},{"key":"e_1_2_2_20_1","unstructured":"Oli Evans and Alan Shaw. 2018. asciify. https:\/\/github.com\/olizilla\/asciify  Oli Evans and Alan Shaw. 2018. asciify. https:\/\/github.com\/olizilla\/asciify"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2714064.2660215"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1109\/CSF.2013.22"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676992"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837670"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2629609"},{"key":"e_1_2_2_26_1","first-page":"197","volume-title":"Dynamic Typing: Syntax and Proof Theory. In Selected Papers of the Symposium on Fourth European Symposium on Programming (ESOP'92)","author":"Henglein Fritz","year":"1994"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10990-011-9066-z"},{"volume-title":"Gradual Session Types. In ACM SIGPLAN International Conference on Functional Programming (ICFP 2017 ). To appear.","year":"2017","author":"Igarashi Atsushi","key":"e_1_2_2_28_1"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110284"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/2048066.2048114"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009865"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2908080.2908091"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/1667048.1667051"},{"volume-title":"Fundamental Approaches to Software Engineering","author":"Kristensen Erik Krogh","key":"e_1_2_2_34_1"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133914"},{"key":"e_1_2_2_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009856"},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628156"},{"key":"e_1_2_2_38_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806006034"},{"key":"e_1_2_2_39_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-28869-2_29"},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-73589-2_2"},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-46669-8_18"},{"key":"e_1_2_2_42_1","first-page":"81","article-title":"Gradual Typing for Functional Languages","author":"Siek Jeremy G.","year":"2006","journal-title":"IN SCHEME AND FUNCTIONAL PROGRAMMING WORKSHOP."},{"key":"e_1_2_2_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/1408681.1408688"},{"key":"e_1_2_2_44_1","volume-title":"LIPIcs-Leibniz International Proceedings in Informatics","volume":"32","author":"Siek Jeremy G","year":"2015"},{"key":"e_1_2_2_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/2500365.2500616"},{"key":"e_1_2_2_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/2837614.2837630"},{"volume-title":"Type inference with partial types","author":"Thatte Satish","key":"e_1_2_2_47_1","doi-asserted-by":"crossref","DOI":"10.1007\/3-540-19488-6_146"},{"key":"e_1_2_2_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/1176617.1176755"},{"key":"e_1_2_2_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328486"},{"key":"e_1_2_2_50_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.SNAPL.2017.17"},{"volume-title":"Revisited. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '19)","year":"2019","author":"Toro Mat\u00edas","key":"e_1_2_2_51_1"},{"key":"e_1_2_2_52_1","doi-asserted-by":"crossref","unstructured":"Mat\u00edas Toro and \u00c9ric Tanter. 2017. A Gradual Interpretation of Union Types. In SAS.  Mat\u00edas Toro and \u00c9ric Tanter. 2017. A Gradual Interpretation of Union Types. In SAS.","DOI":"10.1007\/978-3-319-66706-5_19"},{"key":"e_1_2_2_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276945.3276947"},{"key":"e_1_2_2_54_1","doi-asserted-by":"crossref","unstructured":"Michael M. Vitousek Andrew M. Kent Jeremy G. Siek and Jim Baker. 2014. Design and Evaluation of Gradual Typing for Python. ( 2014 ) 45-56.  Michael M. Vitousek Andrew M. Kent Jeremy G. Siek and Jim Baker. 2014. Design and Evaluation of Gradual Typing for Python. ( 2014 ) 45-56.","DOI":"10.1145\/2775052.2661101"},{"key":"e_1_2_2_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009849"},{"key":"e_1_2_2_56_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_1"},{"key":"e_1_2_2_57_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2017.28"},{"key":"e_1_2_2_58_1","first-page":"459","volume-title":"Gradual Typestate. In Proceedings of the 25th European Conference on Object-oriented Programming (ECOOP'11)","author":"Wolf Roger","year":"2011"},{"key":"e_1_2_2_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133929"},{"volume-title":"d. S. Oliveira","year":"2018","author":"Xie Ningning","key":"e_1_2_2_60_1"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428259","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3428259","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T22:02:57Z","timestamp":1750197777000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428259"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,11,13]]},"references-count":60,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2020,11,13]]}},"alternative-id":["10.1145\/3428259"],"URL":"https:\/\/doi.org\/10.1145\/3428259","relation":{},"ISSN":["2475-1421"],"issn-type":[{"type":"electronic","value":"2475-1421"}],"subject":[],"published":{"date-parts":[[2020,11,13]]},"assertion":[{"value":"2020-11-13","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}