Show simple item record

dc.rights.licenseCC-BY-NC-ND
dc.contributor.advisorSwierstra, W.
dc.contributor.advisorJeuring, J.
dc.contributor.authorSijsling, Y.
dc.date.accessioned2016-08-22T17:01:06Z
dc.date.available2016-08-22T17:01:06Z
dc.date.issued2016
dc.identifier.urihttps://studenttheses.uu.nl/handle/20.500.12932/23661
dc.description.abstractModern dependently typed functional programming languages like Agda allow very specific restrictions to be built into datatypes by using indices and dependent types. Properly restricted types can help programmers to write correct-by-construction software. However, code duplication will occur because the language does not recognise that similarly-structured datatypes with slightly different program-specific restrictions can be related. Some functions will be copy-pasted for lists, vectors, sorted lists and bounded lists. Ornaments specify the exact relation between of different datatypes and may be a path towards a solution. It is a first step in structuring the design space of datatypes in dependently typed languages. Literature has shown how ornaments can produce conversion functions between types, and how they can help to recover code reuse by transporting functions across ornaments. This thesis presents an Agda library for experimentation with ornaments. We have implemented a generic programming framework where datatypes are represented as descriptions. A description can be generated from a real datatype and patched with an ornament to create new description, which in turn can be converted back to a new datatype. Our descriptions are carefully designed to always be convertible to actual datatypes, resulting in an unconventional design. They pass along a context internally to support dependent types and they can be used with multiple parameters and multiple indices.
dc.description.sponsorshipUtrecht University
dc.format.extent448435
dc.format.extent436537
dc.format.mimetypeapplication/pdf
dc.format.mimetypeapplication/pdf
dc.language.isoen
dc.titleGeneric programming with ornaments and dependent types
dc.type.contentMaster Thesis
dc.rights.accessrightsOpen Access
dc.subject.keywordsFunctional Programming; Generic Programming; Agda; Ornaments; Reflection; Dependent Types
dc.subject.courseuuComputing Science


Files in this item

Thumbnail
Thumbnail

This item appears in the following Collection(s)

Show simple item record