2014Infoscience (Ecole Polytechnique Fédérale de Lausanne)Open access

Self-Assembly: Lightweight Language Extension and Datatype Generic Programming, All-in-One!

Heather Miller, Philipp Haller, d. S. Oliveira, Christie J. Bruno

Open full text 0 citations

Abstract

In this paper we show a general mechanism, called self-assembly, for lightweight language extensions (LLEs). LLEs allow users to define generic operations or properties that operate over a large class of types. With LLEs it is possible, for example, for users to define their own Java-style automatic serialization mechanism; or implement simple forms of custom pluggable type system extensions like an immutability checker. However unlike language built-in mechanisms (such as Java serialization), LLEs are user-definable, multi-purpose (they can be used to define various forms of generic functionality), and highly customizable and extensible. The key idea, inspired by existing datatype-generic programming approaches, is to provide programmers with a generic mechanism for providing automatic implementations of type classes. We implemented our technique as a library, \\sselfassembly, for Scala, and evaluated its practicality by migrating a full-featured industrial-strength serialization framework, Scala/Pickling, keeping the same published performance numbers while reducing the code size for type class instance generation by 56%.

Open-access reader

About this research paper

What this paper is about

In this paper we show a general mechanism, called self-assembly, for lightweight language extensions (LLEs). LLEs allow users to define generic operations or properties that operate over a large class of types. With LLEs it is possible, for example, for users to define their own Java-style automatic serialization mechanism; or implement simple forms of custom pluggable type system extensions like an immutability checker. However unlike language built-in mechanisms (such as Java serialization), LLEs are user-definable, multi-purpose (they can be used to define various forms of generic functionality), and highly customizable and extensible. The key idea, inspired by existing datatype-generic programming approaches, is to provide programmers with a generic mechanism for providing automatic implementations of type classes. We implemented our technique as a library, \\sselfassembly, for Scala, and evaluated its practicality by migrating a full-featured industrial-strength serialization framework, Scala/Pickling, keeping the same published performance numbers while reducing the code size for type class instance generation by 56%.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

In this paper we show a general mechanism, called self-assembly, for lightweight language extensions (LLEs). LLEs allow users to define generic operations or properties that operate over a large class of types. With LLEs it is possible, for example, for users to define their own Java-style automatic serialization mechanism; or implement simple forms of custom pluggable type system extensions like an immutability checker. However unlike language built-in mechanisms (such as Java serialization), LLEs are user-definable, multi-purpose (they can be used to define various forms of generic functionality), and highly customizable and extensible. The key idea, inspired by existing datatype-generic programming approaches, is to provide programmers with a generic mechanism for providing automatic implementations of type classes. We implemented our technique as a library, \\sselfassembly, for Scala, and evaluated its practicality by migrating a full-featured industrial-strength serialization framework, Scala/Pickling, keeping the same published performance numbers while reducing the code size for type class instance generation by 56%.

Key concepts: Serialization, Computer science, Programming language, Scala, Immutability, Java, Type safety, Generic programming

Related papers

Back to paper searchBrowse research topicsOriginal source
Self-Assembly: Lightweight Language Extension and Datatype Generic Programming, All-in-One! — Research Paper | ScholarLens