Repository logo

Infoscience

  • English
  • French
Log In
Logo EPFL, École polytechnique fédérale de Lausanne

Infoscience

  • English
  • French
Log In
  1. Home
  2. Academic and Research Output
  3. Conferences, Workshops, Symposiums, and Seminars
  4. Late Data Layout: Unifying Data Representation Transformations
 
conference paper

Late Data Layout: Unifying Data Representation Transformations

Ureche, Vlad  
•
Burmako, Eugene  
•
Odersky, Martin  
2014
Proceedings of the 2014 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications
Object Oriented Programming Systems Languages and Applications (OOPSLA)

Values need to be represented differently when interacting with certain language features. For example, an integer has to take an object-based representation when interacting with erased generics, although, for performance reasons, the stack-based value representation is better. To abstract over these implementation details, some programming languages choose to expose a unified high-level concept (the integer) and let the compiler choose its exact representation and insert coercions where necessary. This pattern appears in multiple language features such as value classes, specialization and multi-stage programming: they all expose a unified concept which they later refine into multiple representations. Yet, the underlying compiler implementations typically entangle the core mechanism with assumptions about the alternative representations and their interaction with other language features. In this paper we present the Late Data Layout mechanism, a simple but versatile type-driven generalization that subsumes and improves the state-of-the-art representation transformations. In doing so, we make two key observations: (1) annotated types conveniently capture the semantics of using multiple representations and (2) local type inference can be used to consistently and optimally introduce coercions. We validated our approach by implementing three language features as Scala compiler extensions: value classes, specialization (using the miniboxing representation) and a simplified multi-stage programming mechanism.

  • Files
  • Details
  • Metrics
Loading...
Thumbnail Image
Name

ldl-oopsla14_1.pdf

Type

Publisher's Version

Version

Published version

Access type

openaccess

Size

346.03 KB

Format

Adobe PDF

Checksum (MD5)

65500ec939e0cfcab86e765dc36d8396

Loading...
Thumbnail Image
Name

ldl-logo.png

Access type

openaccess

Size

70.95 KB

Format

PNG

Checksum (MD5)

f4541b9b5e56d2643c210eb9c83043bb

Logo EPFL, École polytechnique fédérale de Lausanne
  • Contact
  • infoscience@epfl.ch

  • Follow us on Facebook
  • Follow us on Instagram
  • Follow us on LinkedIn
  • Follow us on X
  • Follow us on Youtube
AccessibilityLegal noticePrivacy policyCookie settingsEnd User AgreementGet helpFeedback

Infoscience is a service managed and provided by the Library and IT Services of EPFL. © EPFL, tous droits réservés