Show simple item record

Files in this item

Thumbnail

Item metadata

dc.contributor.advisorBrady, Edwin
dc.contributor.authorTejiščák, Matúš
dc.coverage.spatialxxi, 276 p.en_US
dc.date.accessioned2023-12-14T10:16:46Z
dc.date.available2023-12-14T10:16:46Z
dc.date.issued2020-07-07
dc.identifier.urihttps://hdl.handle.net/10023/28867
dc.description.abstractIt is important to reduce the cost of correctness in programming. Dependent types and related techniques, such as type-driven programming, offer ways to do so. Some parts of dependently typed programs constitute evidence of their typecorrectness and, once checked, are unnecessary for execution. These parts can easily become asymptotically larger than the remaining runtime-useful computation, which can cause linear-time algorithms run in exponential time, or worse. It would be unnacceptable, and contradict our goal of reducing the cost of correctness, to make programs run slower by only describing them more precisely. Current systems cannot erase such computation satisfactorily. By modelling erasure indirectly through type universes or irrelevance, they impose the limitations of these means to erasure. Some useless computation then cannot be erased and idiomatic programs remain asymptotically sub-optimal. This dissertation explains why we need erasure, that it is different from other concepts like irrelevance, and proposes two ways of erasing non-computational data. One is an untyped flow-based useless variable elimination, adapted for dependently typed languages, currently implemented in the Idris 1 compiler. The other is the main contribution of the dissertation: a dependently typed core calculus with erasure annotations, full dependent pattern matching, and an algorithm that infers erasure annotations from unannotated (or partially annotated) programs. I show that erasure in well-typed programs is sound in that it commutes with single-step reduction. Assuming the Church-Rosser property of reduction, I show that properties such as Subject Reduction hold, which extends the soundness result to multi-step reduction. I also show that the presented erasure inference is sound and complete with respect to the typing rules; that this approach can be extended with various forms of erasure polymorphism; that it works well with monadic I/O and foreign functions; and that it is effective in that it not only removes the runtime overhead caused by dependent typing in the presented examples, but can also shorten compilation times.en_US
dc.description.sponsorship"This work was supported by the University of St Andrews (School of Computer Science)." -- Acknowledgementsen
dc.language.isoenen_US
dc.publisherUniversity of St Andrews
dc.subject.lccQA76.62T4
dc.subject.lcshFunctional programming (Computer science)en
dc.subject.lcshComputer software--Verificationen
dc.subject.lcshIdris (Computer program language)en
dc.titleErasure in dependently typed programmingen_US
dc.typeThesisen_US
dc.contributor.sponsorUniversity of St Andrews. School of Computer Scienceen_US
dc.type.qualificationlevelDoctoralen_US
dc.type.qualificationnamePhD Doctor of Philosophyen_US
dc.publisher.institutionThe University of St Andrewsen_US
dc.identifier.doihttps://doi.org/10.17630/sta/677


This item appears in the following Collection(s)

Show simple item record