Abstract
This paper discusses our approach to test programs that determine which candidates are elected in the Scottish Single Transferable Vote (STV) elections. Due to the lack of properties suited for model-based testing, we have implemented a reference implementation in a pure functional programming language. Our tests revealed issues in the law regulating these elections as well as the programs implementing the rules that are offered for certification. Hence, certification by testing with a reference implementation is able to reveal problems in the software to be certified. Functional programming languages appeared to be an excellent tool to implement reference implementations. The reference implementation was developed quickly and none of the differences found was due to an error in the reference implementation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aslaksen, H., Mcguire, G.: Mathematical aspects of irish elections. Irish Mathematics Teachers Association Newsletter 105, 40–59 (2006)
Fishburn, P.C., Brams, S.J.: Paradoxes of preferential voting. Mathematics Magazine 56(4), 207–214 (1983)
Droop, H.: On methods of electing representatives. Journal of the Statistical Society of London 44(2), 141–202 (1881)
Farrell, D.M.: Comparing electoral systems. Prentice Hall/Harvester Wheatsheaf, London, New York (1997)
Koopman, P., Alimarine, A., Tretmans, J., Plasmeijer, R.: Gast: generic automated software testing. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, pp. 84–100. Springer, Heidelberg (2003)
Koopman, P., Plasmeijer, R.: Fully automatic testing with functions as specifications. In: Horváth, Z. (ed.) CEFP 2005. LNCS, vol. 4164, pp. 35–61. Springer, Heidelberg (2006)
Koopman, P., Plasmeijer, R.: Generic generation of elements of types. In: Proceedings of the 6th Symposium on Trends in Functional Programming, TFP 2005, Tallin, Estonia, September 23-24, pp. 163–178. Intellect Books (2005) ISBN 978-1-84150-176-5
Plasmeijer, R., van Eekelen, M.: Concurrent Clean language report (version 2.0) (December 2001), http://www.cs.ru.nl/~clean/
The Electoral Commission. Vote Scotland, http://www.votescotland.com
The Scottish Ministers. Scottish local government elections order 2007. Rule 45–52 (2006)
Wikipedia. Single transferable vote, http://en.wikipedia.org/wiki/Single_transferable_vote
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Koopman, P., Plasmeijer, R. (2011). Testing with Functional Reference Implementations. In: Page, R., Horváth, Z., Zsók, V. (eds) Trends in Functional Programming. TFP 2010. Lecture Notes in Computer Science, vol 6546. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22941-1_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-22941-1_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22940-4
Online ISBN: 978-3-642-22941-1
eBook Packages: Computer ScienceComputer Science (R0)