Abstract
This paper documents our experience of adapting and using the QuickCheck-style approach for extensive randomised property-based testing of computational geometry algorithms.
The need in rigorous evaluation of computational geometry procedures has naturally arisen in our quest of organising a medium-size programming contest for second year university students—an experiment we conducted as an attempt to introduce them to computational geometry. The main effort in organising the event was implementation of a solid infrastructure for testing and ranking solutions. For this, we employed functional programming techniques. The choice of the language and the paradigm made it possible for us to engineer, from scratch and in a very short period of time, a series of robust geometric primitives and algorithms, as well as implement a scalable framework for their randomised testing.
We describe the main insights, enabling efficient random testing of geometric procedures, and report on our experience of using the testing framework, which helped us to detect and fix a number of issues not just in our programming artefacts, but also in the published algorithms we had implemented.
- Y. Amit, J. S. B. Mitchell, and E. Packer. Locating guards for visibility coverage of polygons. In ALENEX. SIAM, 2007. Google Scholar
Digital Library
- T. Auer and M. Held. Heuristics for the generation of random polygons. In CCCG. Carleton University Press, 1996. Google Scholar
Digital Library
- F. Bungiu, M. Hemmer, J. Hershberger, K. Huang, and A. Kröller. Efficient computation of visibility polygons. CoRR, abs/1403.3905, 2014.Google Scholar
- V. Chvátal. A combinatorial theorem in plane geometry. Journal of Combinatorial Theory, Series B, 18, 1975.Google Scholar
- K. Claessen and J. Hughes. QuickCheck: a lightweight tool for random testing of Haskell programs. In ICFP. ACM, 2000. Google Scholar
Digital Library
- O. Danvy. Back to direct style. Sci. Comput. Program., 22(3), 1994. Google Scholar
Digital Library
- O. Danvy and K. Millikin. Refunctionalization at work. Sci. Comput. Program., 74(8), 2009. Google Scholar
Digital Library
- M. de Berg, O. Cheong, M. van Kreveld, and M. Overmars. Computational Geometry: Algorithms and Applications. Springer-Verlag TELOS, 3rd edition, 2008. ISBN 3540779736, 9783540779735. Google Scholar
Digital Library
- E. Dolstra, J. Hage, B. Heeren, S. Holdermans, J. Jeuring, A. Löh, C. Löh, A. Middelkoop, A. Rodriguez, and J. van Schie. Report on the Tenth ICFP Programming Contest. In ICFP. ACM Press, 2008. Google Scholar
Digital Library
- S. Fisk. A short proof of Chvátal’s watchman theorem. J. Comb. Theory, Ser. B, 24(3), 1978.Google Scholar
Cross Ref
- S. Ghosh. Visibility Algorithms in the Plane. Cambridge University Press, 2007. Google Scholar
Digital Library
- P. Haller and M. Odersky. Actors that unify threads and events. In COORDINATION, volume 4467 of LNCS. Springer, 2007. Google Scholar
Digital Library
- S. Holdermans. Random testing of purely functional abstract datatypes: guidelines for dealing with operation invariance. In PPDP. ACM, 2013. Google Scholar
Digital Library
- C. Hritcu, J. Hughes, B. C. Pierce, A. Spector-Zabusky, D. Vytiniotis, A. Azevedo de Amorim, and L. Lampropoulos. Testing noninterference, quickly. In ICFP. ACM, 2013. Google Scholar
Digital Library
- J. Hughes. QuickCheck Testing for Fun and Profit. In PADL, volume 4354 of LNCS. Springer, 2007. Google Scholar
Digital Library
- B. Joe and R. B. Simpson. Visibility of a simple polygon from a point. Technical Report CS-85-38, Dept. of Math and Computer Science, Drexel University, 1985.Google Scholar
- B. Joe and R. B. Simpson. Corrections to Lee’s Visibility Polygon Algorithm. BIT Numerical Mathematics, 27(4), 1987. Google Scholar
Digital Library
- D. Lee and A. Lin. Computational complexity of art gallery problems. IEEE Transactions on Information Theory, 32(2), 1986. Google Scholar
Digital Library
- G. H. Meisters. Polygons Have Ears. The American Mathematical Monthly, 82(6), 1975.Google Scholar
- J. Midtgaard and A. Møller. QuickChecking Static Analysis Properties. In ICST. IEEE, 2015.Google Scholar
Cross Ref
- R. Nilsson. ScalaCheck: The Definitive Guide – Property-based testing on the Java Platform. Artima Press, 2014.Google Scholar
- M. Odersky and A. Moors. Fighting bit Rot with Types (Experience Report: Scala Collections). In FSTTCS, volume 4 of LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2009.Google Scholar
- B. C. d. S. Oliveira, A. Moors, and M. Odersky. Type classes as objects and implicits. In OOPSLA. ACM, 2010. Google Scholar
Digital Library
- J. O’Rourke. Art Gallery Theorems and Algorithms. Oxford University Press, 1987. ISBN 0-19-503965-3. V. St-Amour and N. Toronto. Experience report: applying random testing to a base type environment. In ICFP. ACM, 2013. Google Scholar
Digital Library
- A. P. Tomás and A. L. Bajuelos. Quadratic-time linear-space algorithms for generating orthogonal polygons with a given number of vertices. In ICCSA (3), volume 3045 of LNCS. Springer, 2004.Google Scholar
- D. C. Tozoni, P. J. de Rezende, and C. C. de Souza. The quest for optimal solutions for the Art Gallery Problem: A practical iterative algorithm. In SEA, volume 7933 of LNCS. Springer, 2013.Google Scholar
- C.-K. Yap. Towards exact geometric computation. Comput. Geom., 7:3–23, 1997. Google Scholar
Digital Library
Index Terms
Experience report: growing and shrinking polygons for random testing of computational geometry algorithms
Recommendations
Experience report: growing and shrinking polygons for random testing of computational geometry algorithms
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingThis paper documents our experience of adapting and using the QuickCheck-style approach for extensive randomised property-based testing of computational geometry algorithms.
The need in rigorous evaluation of computational geometry procedures has ...
Prioritizing random combinatorial test suites
SAC '17: Proceedings of the Symposium on Applied ComputingThe behaviour of a system under test can be influenced by several factors, such as system configurations, user inputs, and so on. It has also been observed that many failures are caused by only a small number of factors. Combinatorial testing aims at ...
Fault detection effectiveness of source test case generation strategies for metamorphic testing
MET '18: Proceedings of the 3rd International Workshop on Metamorphic TestingMetamorphic testing is a well known approach to tackle the oracle problem in software testing. This technique requires the use of source test cases that serve as seeds for the generation of follow-up test cases. Systematic design of test cases is ...







Comments