FortressCheck: automatic testing for generic properties

  • Authors:
  • Seonghoon Kang;Sukyoung Ryu

  • Affiliations:
  • KAIST;KAIST

  • Venue:
  • Proceedings of the 2011 ACM Symposium on Applied Computing
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

QuickCheck is a random testing library designed for the purely functional programming language Haskell. Its main features include a descriptive yet embedded domain-specific testing language, a variety of test generators including a generator for functions, and a set of operations for monitoring generated inputs. QuickCheck is limited to ad-hoc testing, compared to more systematic testing methods such as full coverage testing. However, experiences showed that well-factored functions and properties make the QuickCheck approach as effective as systematic testing while maintaining its conciseness. QuickCheck and its variants are now available in dozens of programming languages. We present a version of QuickCheck for the Fortress programming language in this paper. Fortress is an object-oriented language with extensive support for functional programming, with the strong emphasis on high-performance computing, parallelism by default, and growability of the language. While the main features of QuickCheck are straight-forward to implement, we are extending them to support unique features of Fortress and to support seamless integration to Fortress. We observed that the prevalent uses of implicit parallelism in Fortress call for testing parallel language constructs especially those using side effects. Also, because Fortress provides both subtype polymorphism and parametric polymorphism unlike Haskell, testing both polymorphic properties becomes interesting. We propose FortressCheck to test implicit parallelism and to test parametric polymorphism via reflection, by generating first-class type objects and using QuickCheck's own implication checking as a safety mechanism.