PrologCheck - Property-Based Testing in Prolog

被引:0
作者
Amaral, Claudio [1 ]
Florido, Mario [1 ]
Costa, Vitor Santos [1 ]
机构
[1] Univ Porto, Fac Sci, DCC, P-4100 Oporto, Portugal
来源
FUNCTIONAL AND LOGIC PROGRAMMING, FLOPS 2014 | 2014年 / 8475卷
关键词
QUICKCHECK;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present PrologCheck, an automatic tool for property-based testing of programs in the logic programming language Prolog with randomised test data generation. The tool is inspired by the well known QuickCheck, originally designed for the functional programming language Haskell. It includes features that deal with specific characteristics of Prolog such as its relational nature (as opposed to Haskell) and the absence of a strong type discipline. PrologCheck expressiveness stems from describing properties as Prolog goals. It enables the definition of custom test data generators for random testing tailored for the property to be tested. Further, it allows the use of a predicate specification language that supports types, modes and constraints on the number of successful computations. We evaluate our tool on a number of examples and apply it successfully to debug a Prolog library for AVL search trees.
引用
收藏
页码:1 / 17
页数:17
相关论文
共 22 条
  • [1] Overlapping rules and logic variables in functional logic programs
    Antoy, Sergio
    Hanus, Michael
    [J]. LOGIC PROGRAMMING, PROCEEDINGS, 2006, 4079 : 87 - 101
  • [2] Bernardy JP, 2010, LECT NOTES COMPUT SC, V6012, P125, DOI 10.1007/978-3-642-11957-6_8
  • [3] Boberg J, 2008, ERLANG '08: PROCEEDINGS OF THE 2008 SIGPLAN ERLANG WORKSHOP, P9
  • [4] Christiansen J, 2008, LECT NOTES COMPUT SC, V4989, P322
  • [5] QuickCheck: A lightweight tool for random testing of Haskell programs
    Claessen, K
    Hughes, J
    [J]. ACM SIGPLAN NOTICES, 2000, 35 (09) : 268 - 279
  • [6] Claessen K., 2010, P AST ACM, P103
  • [7] Finding Race Conditions in Erlang with QuickCheck and PULSE
    Claessen, Koen
    Palka, Michal
    Smallbone, Nicholas
    Hughes, John
    Svensson, Hans
    Arts, Thomas
    Wiger, Ulf
    [J]. ACM SIGPLAN NOTICES, 2009, 44 (8-9) : 149 - 160
  • [8] The YAP Prolog system
    Costa, Vitor Santos
    Rocha, Ricardo
    Damas, Luis
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2012, 12 : 5 - 34
  • [9] DEVILLE Y, 1990, LOGIC PROGRAMMING SY
  • [10] DUREGARD J, 2012, P 5 ACM SIGPLAN S HA, V47, P61