APLAS 2023
Sun 26 - Wed 29 November 2023 Taipei, Taiwan

Many programming mechanisms proposed in the past support the ability to merge features from multiple independent units of code into a single unit. Typically, implementing the merging process employs source-to-source transformations or other mechanisms with limited support for separate compilation. This work presents a compiler for the CP language, which supports modular type checking and separate compilation. CP is capable of not only static merging of features, but also dynamic merging at runtime. We show how the features in CP can be compiled to languages supporting extensible records or similar mechanisms. Key to this compilation scheme is a mapping from types to record labels that are used to efficiently perform type-based lookups on merges. The concrete implementation of the CP compiler targets JavaScript, where records are modeled via JavaScript objects. We conduct an empirical evaluation through various benchmarks and evaluate the impact of several CP-specific compiler optimizations.

Poster (Yaozhu Sun.pdf)452KiB

Tue 28 Nov

Displayed time zone: Beijing, Chongqing, Hong Kong, Urumqi change