A Principled Approach to Ornamentation in ML

Abstract : Ornaments are a way to describe changes in datatype definitions reorganizing, adding, or dropping some pieces of data so that functions operating on the bare definition can be partially and sometimes totally lifted into functions operating on the ornamented structure. We propose an extension of ML with higher-order ornaments, demonstrate its expressiveness with a few typical examples, including code refactoring, study the metatheoretical properties of ornaments, and describe their elaboration process. We formalize ornamentation via an a posteriori abstraction of the bare code, called generic lifting, which lives in a meta-language above ML. The lifted code is obtained by application of the generic lifting to well-chosen arguments, followed by staged reduction, and some remaining simplifications. We use logical relations to closely relate the lifted code to the bare code.
Document type :
Reports
Complete list of metadatas

Cited literature [18 references]  Display  Hide  Download

https://hal.inria.fr/hal-01628060
Contributor : Thomas Williams <>
Submitted on : Tuesday, November 7, 2017 - 4:36:49 PM
Last modification on : Thursday, April 26, 2018 - 10:28:33 AM
Long-term archiving on : Thursday, February 8, 2018 - 12:10:25 PM

File

ornaments-long.pdf
Files produced by the author(s)

Identifiers

Collections

Citation

Thomas Williams, Didier Rémy. A Principled Approach to Ornamentation in ML. [Research Report] RR-9117, Inria. 2017. ⟨hal-01628060⟩

Share

Metrics

Record views

200

Files downloads

213