Provably Correct Key-Value Maps in Agda - Leveraging Membership to Reach Correctness

dc.contributor.authorBergman, Carl
dc.contributor.authorEk, Johan Henrik
dc.contributor.departmentChalmers tekniska högskola / Institutionen för data och informationstekniksv
dc.contributor.departmentChalmers University of Technology / Department of Computer Science and Engineeringen
dc.contributor.examinerRusso, Alejandro
dc.contributor.supervisorAbel, Andreas
dc.date.accessioned2025-02-25T12:57:17Z
dc.date.available2025-02-25T12:57:17Z
dc.date.issued2024
dc.date.submitted
dc.description.abstractThis thesis describes the interface and implementation of a provably correct finite map in the Agda programming language. Finite maps are fundamental data structures in computer science, and existing finite maps in Agda can be improved in terms of correctness and some implementation details. We present an extension of ‘A Theory of Finite Maps’ (Collins & Syme, 1995) and an Agda formalisation of that extended theory. The formalisation is designed to be structure agnostic, allowing for many underlying implementations, and its flexibility is demonstrated through a proof-of-concept simply typed lambda calculus interpreter. The core of the formalisation is implemented and proven for AVL trees, extending the Agda standard library with additional proofs and operations. Among these are laws defining the behaviour of delete and unionWith as well as an alternative unionWith implementation. The implementation is also differentiated from the standard library by using erasure to remove, among other things, ordering proofs from the tree data type and operations. The performance of our implementation is compared to the standard library and the results show no meaningful performance gains for our implementation. Finally, we discuss the inclusion of correct-by-construction membership properties in the tree structure itself. Such properties have not been introduced in our implementation. This is due to the constant need to update each proof on every operation on the collection, since any operation that modifies the structure of the tree may cause a proof to become irrelevant for the new map.
dc.identifier.coursecodeDATX05
dc.identifier.urihttp://hdl.handle.net/20.500.12380/309156
dc.language.isoeng
dc.setspec.uppsokTechnology
dc.subjectAgda
dc.subjectAVL Trees
dc.subjectCollections
dc.subjectFinite maps
dc.titleProvably Correct Key-Value Maps in Agda - Leveraging Membership to Reach Correctness
dc.type.degreeExamensarbete för masterexamensv
dc.type.degreeMaster's Thesisen
dc.type.uppsokH
local.programmeComputer science – algorithms, languages and logic (MPALG), MSc

Ladda ner

Original bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
CSE 24-108 CB JE.pdf
Storlek:
738.03 KB
Format:
Adobe Portable Document Format

License bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
license.txt
Storlek:
2.35 KB
Format:
Item-specific license agreed upon to submission
Beskrivning: