Relational algebraic ornaments

<p>Dependently typed programming is hard, because ideally dependently typed programs should share structure with their correctness proofs, but there are very few guidelines on how one can arrive at such integrated programs. McBride’s <em>algebraic ornamentation</em> provides a meth...

Full description

Bibliographic Details
Main Authors: Ko, H, Gibbons, J
Format: Conference item
Published: ACM 2013
_version_ 1797102546384322560
author Ko, H
Gibbons, J
author_facet Ko, H
Gibbons, J
author_sort Ko, H
collection OXFORD
description <p>Dependently typed programming is hard, because ideally dependently typed programs should share structure with their correctness proofs, but there are very few guidelines on how one can arrive at such integrated programs. McBride’s <em>algebraic ornamentation</em> provides a methodological advancement, by which the programmer can derive a datatype from a specification involving a fold, such that a program that constructs elements of that datatype would be correct by construction. It is thus an effective method that leads the programmer from a specification to a dependently typed program. We enhance the applicability of this method by generalising alge- braic ornamentation to a relational setting and bringing in relational algebraic methods, resulting in a hybrid approach that makes es- sential use of both dependently typed programming and <em>relational program derivation</em>. A dependently typed solution to the minimum coin change problem is presented as a demonstration of this hybrid approach. We also give a theoretically interesting “completeness theorem” of relational algebraic ornaments, which sheds some light on the expressive power of ornaments and inductive families.</p> <h3>Supplementary material</h3> <p>The Agda code can be found on <a href="https://github.com/josh-hs-ko/Thesis/tree/DTP13">GitHub</a>, as part of the ornament framework developed by the first author; the solution to the minimum coin change problem presented in the paper is in the file <a href="https://github.com/josh-hs-ko/Thesis/blob/DTP13/Examples/MinCoinChange.agda">MinCoinChange.agda</a>.</p> <p>The slides for the Dependently Typed Programming workshop are <a href='\"http://www.cs.ox.ac.uk/people/hsiang-shang.ko/algOrn/DTP.pdf\"'>here</a>.</p>
first_indexed 2024-03-07T06:07:26Z
format Conference item
id oxford-uuid:ee5794e5-6b3f-465c-adde-f656e1d87d30
institution University of Oxford
last_indexed 2024-03-07T06:07:26Z
publishDate 2013
publisher ACM
record_format dspace
spelling oxford-uuid:ee5794e5-6b3f-465c-adde-f656e1d87d302022-03-27T11:31:50ZRelational algebraic ornamentsConference itemhttp://purl.org/coar/resource_type/c_5794uuid:ee5794e5-6b3f-465c-adde-f656e1d87d30Department of Computer ScienceACM2013Ko, HGibbons, J<p>Dependently typed programming is hard, because ideally dependently typed programs should share structure with their correctness proofs, but there are very few guidelines on how one can arrive at such integrated programs. McBride’s <em>algebraic ornamentation</em> provides a methodological advancement, by which the programmer can derive a datatype from a specification involving a fold, such that a program that constructs elements of that datatype would be correct by construction. It is thus an effective method that leads the programmer from a specification to a dependently typed program. We enhance the applicability of this method by generalising alge- braic ornamentation to a relational setting and bringing in relational algebraic methods, resulting in a hybrid approach that makes es- sential use of both dependently typed programming and <em>relational program derivation</em>. A dependently typed solution to the minimum coin change problem is presented as a demonstration of this hybrid approach. We also give a theoretically interesting “completeness theorem” of relational algebraic ornaments, which sheds some light on the expressive power of ornaments and inductive families.</p> <h3>Supplementary material</h3> <p>The Agda code can be found on <a href="https://github.com/josh-hs-ko/Thesis/tree/DTP13">GitHub</a>, as part of the ornament framework developed by the first author; the solution to the minimum coin change problem presented in the paper is in the file <a href="https://github.com/josh-hs-ko/Thesis/blob/DTP13/Examples/MinCoinChange.agda">MinCoinChange.agda</a>.</p> <p>The slides for the Dependently Typed Programming workshop are <a href='\"http://www.cs.ox.ac.uk/people/hsiang-shang.ko/algOrn/DTP.pdf\"'>here</a>.</p>
spellingShingle Ko, H
Gibbons, J
Relational algebraic ornaments
title Relational algebraic ornaments
title_full Relational algebraic ornaments
title_fullStr Relational algebraic ornaments
title_full_unstemmed Relational algebraic ornaments
title_short Relational algebraic ornaments
title_sort relational algebraic ornaments
work_keys_str_mv AT koh relationalalgebraicornaments
AT gibbonsj relationalalgebraicornaments