Show simple item record

dc.rights.licenseCC-BY-SA
dc.contributor.advisorSwierstra, W.S.
dc.contributor.authorZutekouw, Raymon
dc.date.accessioned2025-07-21T23:01:31Z
dc.date.available2025-07-21T23:01:31Z
dc.date.issued2025
dc.identifier.urihttps://studenttheses.uu.nl/handle/20.500.12932/49305
dc.description.abstractIn purely functional programming languages, operations on pointers are ruled out to guarantee referential transparency. There are language extensions that allow the programmer to write purely functional code, which can be compiled to efficient pointer operations internally. Constructor contexts in Koka are such a language extension, which has introduced a limited API that allows creating values of types which may be extended in O(1) time at the end of the structure by making use of an extra internal pointer. Such constructs remediate the inadequacy of purely functional programming to express code that is cheap and effective within imperative programming. Currently Koka only allows creating and filling these so called constructor contexts, as the implementation is quite new to the language. But one can imagine that this kind of structure can also be pattern matched on, so that you have access to the constructor and arguments like you would with regular pattern matching. What does the language design of that feature look like? And how does it allow defining highly efficient functional datastructures? This research specifies this new feature, and contributes the following: • Demonstrate how to implement queues with O(1) operations with them; • Define pattern matching on constructor contexts as a specification; • Prototype the implementation in a recent Koka compiler version.
dc.description.sponsorshipUtrecht University
dc.language.isoEN
dc.subjectCurrently the programming language Koka only allows creating and filling constructor contexts, as the implementation this API is quite new to Koka. The thesis designs pattern matching as an additional language feature to the current API, for which a prototype is built within the Koka compiler. The thesis includes the language design of this general pattern matching on constructor contexts, and applies it to Koka.
dc.titleTaking a functional datastructure out of context
dc.type.contentMaster Thesis
dc.rights.accessrightsOpen Access
dc.subject.keywordspurely functional programming; Koka; functional programming; constructor contexts; one-hole context; regular type
dc.subject.courseuuComputing Science
dc.thesis.id48947


Files in this item

Thumbnail

This item appears in the following Collection(s)

Show simple item record