{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T21:45:08Z","timestamp":1770241508087,"version":"3.49.0"},"reference-count":43,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2024,10,8]],"date-time":"2024-10-08T00:00:00Z","timestamp":1728345600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2024,10,8]]},"abstract":"<jats:p>Dynamically typed array languages such as Python, APL, and Matlab lift scalar operations to arrays and replicate scalars to fit applications. We present a mechanism for automatically inferring map and replicate operations in a statically-typed language in a way that resembles the programming experience of a dynamically-typed language while preserving the static typing guarantees. Our type system\u2014which supports parametric polymorphism, higher-order functions, and top-level let-generalization\u2014makes use of integer linear programming in order to find the minimum number of operations needed to elaborate to a well-typed program. We argue that the inference system provides useful and unsurprising guarantees to the programmer. We demonstrate important theoretical properties of the mechanism and report on the implementation of the mechanism in the statically-typed array programming language Futhark.<\/jats:p>","DOI":"10.1145\/3689774","type":"journal-article","created":{"date-parts":[[2024,10,8]],"date-time":"2024-10-08T03:23:04Z","timestamp":1728357784000},"page":"1787-1813","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["AUTOMAP: Inferring Rank-Polymorphic Function Applications with Integer Linear Programming"],"prefix":"10.1145","volume":"8","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-5848-8166","authenticated-orcid":false,"given":"Robert","family":"Schenck","sequence":"first","affiliation":[{"name":"University of Copenhagen, Copenhagen, Denmark"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7559-0939","authenticated-orcid":false,"given":"Nikolaj Hey","family":"Hinnerskov","sequence":"additional","affiliation":[{"name":"University of Copenhagen, Copenhagen, Denmark"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1195-9722","authenticated-orcid":false,"given":"Troels","family":"Henriksen","sequence":"additional","affiliation":[{"name":"University of Copenhagen, Copenhagen, Denmark"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7510-8724","authenticated-orcid":false,"given":"Magnus","family":"Madsen","sequence":"additional","affiliation":[{"name":"Aarhus University, Aarhus, Denmark"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6061-5993","authenticated-orcid":false,"given":"Martin","family":"Elsman","sequence":"additional","affiliation":[{"name":"University of Copenhagen, Copenhagen, Denmark"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,10,8]]},"reference":[{"key":"e_1_3_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3503221.3508422"},{"issue":"2","key":"e_1_3_1_3_1","first-page":"27","article-title":"FinPar: A Parallel Financial Benchmark","volume":"13","author":"Andreetta Christian","year":"2016","unstructured":"Christian Andreetta, Vivien B\u00e9got, Jost Berthold, Martin Elsman, Fritz Henglein, Troels Henriksen, Maj-Britt Nordfang, and Cosmin E. Oancea. 2016. FinPar: A Parallel Financial Benchmark. ACM Trans. Archit. Code Optim. 13, 2, Article 18 (June 2016), 27 pages. https:\/\/doi.org\/10.1145\/2898354 10.1145\/2898354","journal-title":"ACM Trans. Archit. Code Optim"},{"key":"e_1_3_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3609024.3609412"},{"key":"e_1_3_1_5_1","doi-asserted-by":"crossref","first-page":"3","DOI":"10.1145\/1926354.1926358","article-title":"Accelerating Haskell array codes with multicore GPUs","author":"Chakravarty Manuel MT","year":"2011","unstructured":"Manuel MT Chakravarty, Gabriele Keller, Sean Lee, Trevor L McDonell, and Vinod Grover. 2011. Accelerating Haskell array codes with multicore GPUs. In Proceedings of the sixth workshop on Declarative aspects of multicore programming. 3\u201314. https:\/\/doi.org\/10.1145\/1926354.1926358 10.1145\/1926354.1926358","journal-title":"In Proceedings of the sixth workshop on Declarative aspects of multicore programming."},{"key":"e_1_3_1_6_1","doi-asserted-by":"crossref","first-page":"44","DOI":"10.1109\/IISWC.2009.5306797","article-title":"Rodinia: A benchmark suite for heterogeneous computing","author":"Che S.","year":"2009","unstructured":"S. Che, M. Boyer, J. Meng, D. Tarjan, J. W. Sheaffer, S. H. Lee, and K. Skadron. 2009. Rodinia: A benchmark suite for heterogeneous computing. In Workload Characterization, 2009. IISWC 2009. IEEE International Symposium on. 44\u201354. https:\/\/doi.org\/10.1109\/IISWC.2009.5306797 10.1109\/IISWC.2009.5306797","journal-title":"Workload Characterization, 2009. IISWC 2009. IEEE International Symposium on"},{"key":"e_1_3_1_7_1","unstructured":"Luis Damas. 1984. Type assignment in programming languages. Ph. D. Dissertation. The University of Edinburgh."},{"key":"e_1_3_1_8_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-72792-7_22"},{"key":"e_1_3_1_9_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.orl.2009.03.004"},{"key":"e_1_3_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/2627373.2627390"},{"key":"e_1_3_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/512529.512531"},{"key":"e_1_3_1_12_1","doi-asserted-by":"crossref","first-page":"196","DOI":"10.1007\/978-3-540-24754-8_15","volume-title":"International Symposium on Functional and Logic Programming","author":"Garrigue Jacques","year":"2004","unstructured":"Jacques Garrigue. 2004. Relaxing the value restriction. In International Symposium on Functional and Logic Programming. Springer, 196\u2013213. https:\/\/doi.org\/10.1007\/978-3-540-24754-8_15 10.1007\/978-3-540-24754-8_15"},{"key":"e_1_3_1_13_1","doi-asserted-by":"crossref","first-page":"556","DOI":"10.1007\/978-3-662-54434-1_21","volume-title":"Programming Languages and Systems: 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22\u201329, 2017, Proceedings (Uppsala, Sweden)","author":"Gibbons Jeremy","year":"2017","unstructured":"Jeremy Gibbons. 2017. APLicative Programming with Naperian Functors. In Programming Languages and Systems: 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22\u201329, 2017, Proceedings (Uppsala, Sweden). Springer-Verlag, Berlin, Heidelberg, 556\u2013583. https:\/\/doi.org\/10.1007\/978-3-662-54434-1_21 10.1007\/978-3-662-54434-1_21"},{"key":"e_1_3_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/512760.512761"},{"key":"e_1_3_1_15_1","doi-asserted-by":"publisher","DOI":"10.1038\/s41586-020-2649-2"},{"key":"e_1_3_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/3460944.3464310"},{"key":"e_1_3_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062354"},{"key":"e_1_3_1_18_1","article-title":"The principal type-scheme of an object in combinatory logic","author":"Hindley Roger","year":"1969","unstructured":"Roger Hindley. 1969. The principal type-scheme of an object in combinatory logic. Transactions of the American Mathematical Society (AMS) (1969). https:\/\/doi.org\/10.2307\/1995158 10.2307\/1995158","journal-title":"Transactions of the American Mathematical Society (AMS)"},{"key":"e_1_3_1_19_1","first-page":"108","volume-title":"Proc. ACM Program. Lang","author":"Roger K.","year":"2020","unstructured":"Roger K. W. Hui and Morten J. Kromberg. 2020. APL since 1978. Proc. ACM Program. Lang. 4, HOPL, Article 69 (jun 2020), 108 pages. https:\/\/doi.org\/10.1145\/3386319 10.1145\/3386319"},{"key":"e_1_3_1_20_1","volume-title":"A programming language","author":"Iverson Kenneth E.","year":"1962","unstructured":"Kenneth E. Iverson. 1962. A programming language. John Wiley & Sons, Inc., USA. https:\/\/doi.org\/10.1145\/1460833.1460872 10.1145\/1460833.1460872"},{"key":"e_1_3_1_21_1","doi-asserted-by":"publisher","DOI":"10.5555\/AAI28128363"},{"key":"e_1_3_1_22_1","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(94)00005-0"},{"key":"e_1_3_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/3360589"},{"key":"e_1_3_1_24_1","first-page":"108","article-title":"Implicit parameters: Dynamic scoping with static types","author":"Lewis Jeffrey R","year":"2000","unstructured":"Jeffrey R Lewis, John Launchbury, Erik Meijer, and Mark B Shields. 2000. Implicit parameters: Dynamic scoping with static types. In Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages. 108\u2013118. https:\/\/doi.org\/10.1145\/325694.325708 10.1145\/325694.325708","journal-title":"Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages"},{"key":"e_1_3_1_25_1","doi-asserted-by":"crossref","unstructured":"Robin Milner. 1978. A theory of type polymorphism in programming. J. Comput. System Sci. (1978). https:\/\/doi.org\/10.1016\/0022-0000(78)90014-4 10.1016\/0022-0000(78)90014-4","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"e_1_3_1_26_1","article-title":"The definition of standard ML: revised","author":"Milner Robin","year":"1997","unstructured":"Robin Milner. 1997. The definition of standard ML: revised. MIT press. https:\/\/doi.org\/10.7551\/mitpress\/2319.001.0001 10.7551\/mitpress\/2319.001.0001","journal-title":"MIT press."},{"key":"e_1_3_1_27_1","unstructured":"Greg Morrisett. 1995. Compiling with Types. Ph. D. Dissertation. School of Computer Science Carnegie Mellon University Pittsburgh PA 15213."},{"key":"e_1_3_1_28_1","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3158130","article-title":"Simplicitly: Foundations and applications of implicit function types","volume":"2","author":"Odersky Martin","year":"2017","unstructured":"Martin Odersky, Olivier Blanvillain, Fengyun Liu, Aggelos Biboudis, Heather Miller, and Sandro Stucki. 2017. Simplicitly: Foundations and applications of implicit function types. Proceedings of the ACM on Programming Languages 2, POPL (2017), 1\u201329. https:\/\/doi.org\/10.1145\/3158130 10.1145\/3158130","journal-title":"Proceedings of the ACM on Programming Languages"},{"issue":"1","key":"e_1_3_1_29_1","doi-asserted-by":"crossref","first-page":"35","DOI":"10.1002\/(SICI)1096-9942(199901\/03)5:1<35::AID-TAPO4>3.0.CO;2-4","article-title":"Type inference with constrained types","volume":"5","author":"Odersky Martin","year":"1999","unstructured":"Martin Odersky, Martin Sulzmann, and Martin Wehr. 1999. Type inference with constrained types. Theory and Practice of Object Systems 5, 1 (1999), 35\u201355. https:\/\/doi.org\/10.1002\/(SICI)1096-9942(199901\/03)5:1<35::AID-TAPO4>3.0.CO;2-4 10.1002\/(SICI)1096-9942(199901\/03)5:1<35::AID-TAPO4>3.0.CO;2-4","journal-title":"Theory and Practice of Object Systems"},{"issue":"10","key":"e_1_3_1_30_1","doi-asserted-by":"crossref","first-page":"341","DOI":"10.1145\/1932682.1869489","article-title":"Type classes as objects and implicits","volume":"45","author":"Oliveira Bruno CdS","year":"2010","unstructured":"Bruno CdS Oliveira, Adriaan Moors, and Martin Odersky. 2010. Type classes as objects and implicits. ACM Sigplan Notic es 45, 10 (2010), 341\u2013360. https:\/\/doi.org\/10.1145\/1932682.1869489 10.1145\/1932682.1869489","journal-title":"ACM Sigplan Notic es"},{"key":"e_1_3_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/155090.155112"},{"key":"e_1_3_1_32_1","unstructured":"Robert Schenck. 2024. AUTOMAP Supplementary Material. https:\/\/doi.org\/10.5281\/zenodo.13628289 10.5281\/zenodo.13628289"},{"key":"e_1_3_1_33_1","unstructured":"Robert Schenck Nikolaj Hey Hinnerskov Troels Henriksen Magnus Madsen and Martin Elsman. 2024. futhark-oopsla24. https:\/\/doi.org\/10.5281\/zenodo.12775308 10.5281\/zenodo.12775308"},{"key":"e_1_3_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3219753.3219758"},{"key":"e_1_3_1_35_1","doi-asserted-by":"crossref","first-page":"27","DOI":"10.1007\/978-3-642-54833-8_3","volume-title":"Programming Languages and Systems: 23rd European Symposium on Programming, ESOP 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014, Proceedings 23","author":"Slepak Justin","year":"2014","unstructured":"Justin Slepak, Olin Shivers, and Panagiotis Manolios. 2014. An array-oriented language with static rank polymorphism. In Programming Languages and Systems: 23rd European Symposium on Programming, ESOP 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014, Proceedings 23. Springer, 27\u201346. https:\/\/doi.org\/10.1007\/978-3-642-54833-8_3 10.1007\/978-3-642-54833-8_3"},{"issue":"2012","key":"e_1_3_1_36_1","article-title":"Parboil: A revised benchmark suite for scientific and commercial throughput computing","volume":"127","author":"Stratton John A","year":"2012","unstructured":"John A Stratton, Christopher Rodrigues, I-Jui Sung, Nady Obeid, Li-Wen Chang, Nasser Anssari, Geng Daniel Liu, and Wen-mei W Hwu. 2012. Parboil: A revised benchmark suite for scientific and commercial throughput computing. Center for Reliable and High-Performance Computing 127 (2012).","journal-title":"Center for Reliable and High-Performance Computing"},{"key":"e_1_3_1_37_1","unstructured":"Martin Franz Sulzmann and Paul Hudak. 2000. A General Framework for Hindley\/Milner Type Systems with Constraints. Ph. D. Dissertation. USA. AAI9973781."},{"issue":"1","key":"e_1_3_1_38_1","doi-asserted-by":"crossref","first-page":"217","DOI":"10.1016\/0167-6423(91)90040-5","article-title":"A type system for implicit scaling","volume":"17","author":"Thatte Satish","year":"1991","unstructured":"Satish Thatte. 1991. A type system for implicit scaling. Science of Computer Programming 17, 1 (1991), 217\u2013245. https:\/\/doi.org\/10.1016\/0167-6423(91)90040-5 10.1016\/0167-6423(91)90040-5","journal-title":"Science of Computer Programming"},{"key":"e_1_3_1_39_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.ejor.2006.11.024"},{"key":"e_1_3_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3609024.3609410"},{"key":"e_1_3_1_41_1","first-page":"1","volume-title":"Proceedings of the 8th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming (San Diego, CA, USA) (ARRAY 2022)","author":"\u0160inkarovs Artjoms","year":"2022","unstructured":"Artjoms \u0160inkarovs and Sven-Bodo Scholz. 2022. Parallel Scan as a Multidimensional Array Problem. In Proceedings of the 8th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming (San Diego, CA, USA) (ARRAY 2022). Association for Computing Machinery, New York, NY, USA, 1\u201311. https:\/\/doi.org\/10.1145\/3520306.3534500 10.1145\/3520306.3534500"},{"key":"e_1_3_1_42_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796811000098"},{"key":"e_1_3_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/1708016.1708023"},{"key":"e_1_3_1_44_1","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1994.1093"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3689774","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3689774","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T09:07:41Z","timestamp":1770196061000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3689774"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,10,8]]},"references-count":43,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2024,10,8]]}},"alternative-id":["10.1145\/3689774"],"URL":"https:\/\/doi.org\/10.1145\/3689774","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,10,8]]},"assertion":[{"value":"2024-04-06","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-08-18","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-10-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}