tcgen is an automatic test case generator for Prolog programs. The tool is based on constructing closed SLD trees as introduced in the following paper:

  • Naoki Nishida, Germán Vidal. A Framework for Computing Finite SLD Trees. Submitted for publication, 2014. PDF

It takes the following inputs:

  • a logic program (you can choose one of the list, edit it or write it down a new one), e.g., tcex/ilist.pl
  • an initial goal, e.g., [ilist(_A,_B,_C)], tipically with all arguments different variables
  • the maximum term depth to ensure termination (tipically, a value between 1 and 3 should be fine in most examples)
  • the set of non-regular predicates (i.e., predicates that might produce goals in which the number of atoms keeps growing infinitely, see the above paper for a precise definition), e.g., [ilist(_,_,_)]

Check the web interface in the next tab.

Please let me know if you have any question or comment to gvidal@dsic.upv.es.

Source program
Choose a file:
Initial goal:
Maximum term depth: Non-regular predicates:

Generated test cases: