In English

Towards Reasoning about State Transformer Monads in Agda

Viet Ha Bui
Göteborg : Chalmers tekniska högskola, 2009. 41 s.
[Examensarbete på avancerad nivå]

Wouter Swierstra showed in his PhD thesis how to implement stateful computations in the dependently typed functional programming language Agda. In particular he defined a notion of state which is parameterized by a list of types indicating what kind of data are to be stored in the respective locations. He also showed how to define monadic state transformation over this notion of state. In this thesis we extend Swierstra’s work with two new contributions. The first is to implement a stateful version of Dijkstra’s algorithm for the Dutch National Flag in Agda. We prove some properties of a function which swaps the contents of two locations, an important step towards showing full correctness of the algorithm in Agda. The second contribution is to formally prove (in Agda) some properties about monads suggested by Plotkin and Power.

Publikationen registrerades 2010-03-05. Den ändrades senast 2013-04-04

CPL ID: 117330

Detta är en tjänst från Chalmers bibliotek