A totaly Epic backend for Agda

dc.contributor.authorFredriksson, Olle
dc.contributor.authorGustafsson, Daniel
dc.contributor.departmentChalmers tekniska högskola / Institutionen för data- och informationsteknik (Chalmers)sv
dc.contributor.departmentChalmers University of Technology / Department of Computer Science and Engineering (Chalmers)en
dc.date.accessioned2019-07-03T12:40:00Z
dc.date.available2019-07-03T12:40:00Z
dc.date.issued2011
dc.description.abstractAgda is a programming language that utilises dependent types which add the power to express properties about terms very precisely, but this also introduces a runtime performance overhead. This thesis presents a new compiler backend for Agda targeting Epic with the aim to use the types for optimising programs and for removing the overhead. One source of inefficiencies is in the data representation. Two ways to remove these inefficiencies are presented: Forcing, which deletes fields in constructors that may be inferred, and representing datatypes as primitive data, which is done by using machine integers for types on a certain form. Many terms in dependently typed languages have no computational content(observable at runtime). Three optimisations for getting rid of such terms are presented: Erasure, which erases types and unused arguments to functions, smashing, which replaces inefficient computations with a result that is the only observable one, and injection detection, which detects inefficient identity functions so that they can be replaced by faster versions. The results of doing the optimisations are benchmarked, and in some examples the runtime of an optimised program compared to an unoptimised one is almost one third and the produced executable size is halved. The code that is produced is also closer to efficient code written without using sexy types, and it does not take as long to compile it. This work makes it more feasible to write programs usable in the “real world” using Agda, and shows that it is perfectly possible to use dependently typed languages for programming.
dc.identifier.urihttps://hdl.handle.net/20.500.12380/146807
dc.language.isoeng
dc.setspec.uppsokTechnology
dc.subjectInformations- och kommunikationsteknik
dc.subjectDatavetenskap (datalogi)
dc.subjectInformation & Communication Technology
dc.subjectComputer Science
dc.titleA totaly Epic backend for Agda
dc.type.degreeExamensarbete för masterexamensv
dc.type.degreeMaster Thesisen
dc.type.uppsokH
Ladda ner
Original bundle
Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
146807.pdf
Storlek:
2.35 MB
Format:
Adobe Portable Document Format
Beskrivning:
Fulltext