Proving Type Class Laws in Haskell
[Examensarbete på avancerad nivå]
Type classes in Haskell are a way to ensure both the programmer and the compiler that a set of functions are defined for a specific data type. Each instance of such functions is often expected to behave in a certain way and satisfy laws associated with the respective class. These are commonly stated in comments and as such there is no real way to enforce this behavior other than by rigorous testing. This thesis presents a tool able to prove such laws using induction and external theorem provers. The tool is an extension of an already existing system, HipSpec, with the added functionality of being able to handle type classes. Using this extended HipSpec, users can automatically prove laws for instances of built-in type classes, as well as dene and prove laws for their own type classes. We discover that this is a very promising approach which has several advantages over similar systems.
Nyckelord: Haskell, Type Class, TIP, HipSpec
Det verkar som att din webbläsare saknar möjlighet att visa PDF. Klicka Öppna i nytt fönster för att läsa.
Oracle XML Developers Kit 10.2.0.2.0 - ProductionXML-25011: Error processing XSLT stylesheet: ../index.xsl
file:////usr/local/tomcat/webapps/chex/local/xsl/output/html/normal/body.xsl<Line 340, Column 84>: XML-22021: (Error) Error parsing external document: 'Förbindelse vägras'.