Hostname: page-component-77f85d65b8-jkvpf Total loading time: 0 Render date: 2026-04-22T14:55:55.920Z Has data issue: false hasContentIssue false

Programming with ornaments

Published online by Cambridge University Press:  12 December 2016

HSIANG-SHANG KO
Affiliation:
Information Systems Architecture Research Division, National Institute of Informatics, Japan (e-mail: hsiang-shang@nii.ac.jp)
JEREMY GIBBONS
Affiliation:
Department of Computer Science, University of Oxford, UK (e-mail: jeremy.gibbons@cs.ox.ac.uk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Dependently typed programming advocates the use of various indexed versions of the same shape of data, but the formal relationship amongst these structurally similar datatypes usually needs to be established manually and tediously. Ornaments have been proposed as a formal mechanism to manage the relationships between such datatype variants. In this paper, we conduct a case study under an ornament framework; the case study concerns programming binomial heaps and their operations — including insertion and minimum extraction — by viewing them as lifted versions of binary numbers and numeric operations. We show how current dependently typed programming technology can lead to a clean treatment of the binomial heap constraints when implementing heap operations. We also identify some gaps between the current technology and an ideal dependently typed programming language that we would wish to have for our development.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2016 
Supplementary material: File

Ko and Gibbons supplementary material

Ko and Gibbons supplementary material 1

Download Ko and Gibbons supplementary material(File)
File 9.4 KB
Submit a response

Discussions

No Discussions have been published for this article.