Skip to main content

Testing with Functional Reference Implementations

  • Conference paper
Trends in Functional Programming (TFP 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6546))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aslaksen, H., Mcguire, G.: Mathematical aspects of irish elections. Irish Mathematics Teachers Association Newsletter 105, 40–59 (2006)

    Google Scholar 

  2. Fishburn, P.C., Brams, S.J.: Paradoxes of preferential voting. Mathematics Magazine 56(4), 207–214 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  3. Droop, H.: On methods of electing representatives. Journal of the Statistical Society of London 44(2), 141–202 (1881)

    Article  Google Scholar 

  4. Farrell, D.M.: Comparing electoral systems. Prentice Hall/Harvester Wheatsheaf, London, New York (1997)

    Book  Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. 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

    Google Scholar 

  8. Plasmeijer, R., van Eekelen, M.: Concurrent Clean language report (version 2.0) (December 2001), http://www.cs.ru.nl/~clean/

  9. The Electoral Commission. Vote Scotland, http://www.votescotland.com

  10. The Scottish Ministers. Scottish local government elections order 2007. Rule 45–52 (2006)

    Google Scholar 

  11. Wikipedia. Single transferable vote, http://en.wikipedia.org/wiki/Single_transferable_vote

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics