University of Leicester

cms

Haskell Code - How to approximate infinite objects



Proof of correctness


The proof of correctness for this code is in the paper:
  • Approximation of Nested Fixpoints – A Coalgebraic View of Parametric Dataypes by Alexander Kurz, Alberto Pardo, Daniela Petrişan, Paula Severi, and Fer-Jan de Vries.


Haskell Code - Instructions


  1. The file Trunc.hs is needed for all sections.

  2. Example from the Introduction. Naive printing gives infinite 0's. Files WrongPrinting.hs and TestWrongPrinting.hs . To compile ghc TestWrongPrinting.hs

  3. Non-generic Solution. Files NonGeneric.hs and TestNonGeneric.hs . To compile ghc -XDataKinds -XGADTs TestNonGeneric.hs

  4. Generic Solution. Files Generic.hs and the file TestGeneric.hs . To compile ghc -XDataKinds -XGADTs TestGeneric.hs































Author: Paula Severi .
© University of Leicester. Last modified: 1st April 2015, 09:25:27
CMS Web Maintainer.