CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Testing Type Class Laws

J. Jeuring ; Patrik Jansson (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)) ; Claudio Amaral (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers))
SIGPLAN notices (0362-1340). Vol. 47 (2012), 12, p. 49-60.
[Artikel, refereegranskad vetenskaplig]

The specification of a class in Haskell often starts with stating, in comments, the laws that should be satisfied by methods defined in instances of the class, followed by the type of the methods of the class. This paper develops a framework that supports testing such class laws using QuickCheck. Our framework is a light-weight class law testing framework, which requires a limited amount of work per class law, and per datatype for which the class law is tested. We also show how to test class laws with partially-defined values. Using partially-defined values, we show that the standard lazy and strict implementations of the state monad do not satisfy the expected laws.

Nyckelord: design, languages, verification, laws, classes, testing, state monad

Denna post skapades 2013-02-25. Senast ändrad 2014-09-02.
CPL Pubid: 174048


Läs direkt!

Länk till annan sajt (kan kräva inloggning)

Institutioner (Chalmers)

Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)



Chalmers infrastruktur