skip to main content
10.1145/3315454.3329961acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Records with rank polymorphism

Published:08 June 2019Publication History

ABSTRACT

In a rank-polymorphic programming language, all functions automatically lift to operate on arbitrarily high-dimensional aggregate data. By adding records to such a language, we can support computation on data frames, a tabular data structure containing heterogeneous data but in which individual columns are homogeneous. In such a setting, a data frame is a vector of records, subject to both ordinary array operations (, filtering, reducing, sorting) and lifted record operations—projecting a field lifts to projecting a column. Data frames have become a popular tool for exploratory data analysis, but fluidity of interacting with data frames via lifted record operations depends on how the language’s records are designed.

We investigate three languages with different notions of record data: Racket, Standard ML, and Python. For each, we examine several common tasks for working with data frames and how the language’s records make these tasks easy or hard. Based on their advantages and disadvantages, we synthesize their ideas to produce a design for record types which is flexible for both scalar and lifted computation.

Skip Supplemental Material Section

Supplemental Material

3315454.3329961.mp4

mp4

44.8 MB

References

  1. J. Nathan Foster, Michael B. Greenwald, Jonathan T. Moore, Benjamin C. Pierce, and Alan Schmitt. 2007. Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View-update Problem. ACM Trans. Program. Lang. Syst. 29, 3, Article 17 (May 2007). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Jeremy Gibbons. 2016. APLicative Programming with Naperian Functors (Extended Abstract). In Proceedings of the 1st International Workshop on Type-Driven Development (TyDe 2016) . ACM, New York, NY, USA, 13–14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Troels Henriksen. 2017. Design and Implementation of the Futhark Programming Language . Ph.D. Dissertation. University of Copenhagen, Universitetsparken 5, 2100 København.Google ScholarGoogle Scholar
  4. Troels Henriksen. 2017. Dot Notation for Records. https:// futhark-lang.org/blog/2017-11-11-dot-notation-for-records.htmlGoogle ScholarGoogle Scholar
  5. Kenneth E. Iverson. 1962. A programming language. John Wiley & Sons, Inc., New York, NY, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Wes McKinney et al. 2010. Data structures for statistical computing in python. In Proceedings of the 9th Python in Science Conference, Vol. 445. Austin, TX, 51–56.Google ScholarGoogle Scholar
  7. Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. 1997. The definition of standard ML: revised . MIT press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R Core Team. 2013. R: A Language and Environment for Statistical Computing . R Foundation for Statistical Computing, Vienna, Austria. http://www.R-project.org/Google ScholarGoogle Scholar
  9. Justin Slepak, Olin Shivers, and Panagiotis Manolios. 2014. An arrayoriented language with static rank polymorphism. In European Symposium on Programming Languages and Systems . Springer, 27–46.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Satish Thatte. 1991. A type system for implicit scaling. Sci. Comput. Program. 17, 1-3 (Dec. 1991), 217–245. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Mitchell Wand. 1991. Type inference for record concatenation and multiple inheritance. Information and Computation 93, 1 (1991), 1–15. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Records with rank polymorphism

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            ARRAY 2019: Proceedings of the 6th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming
            June 2019
            104 pages
            ISBN:9781450367172
            DOI:10.1145/3315454

            Copyright © 2019 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 8 June 2019

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate17of25submissions,68%

            Upcoming Conference

            PLDI '24
          • Article Metrics

            • Downloads (Last 12 months)7
            • Downloads (Last 6 weeks)1

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader