Test Sources

We will give credit to the sources of our test cases. The Prolog ISO standard movement consists of some documents that have already been adopted by the ISO. Further there exists a working group that is involved in the definition of eventual supplements. The documents currently adopted by ISO contain more or less a systematic set of example uses of the predicates and evaluable functions. These examples form the basis for our test cases.

The Jekejeke Prolog system does not yet implement all of the documents adopted by the ISO. For example we do not yet implement the part 2 of the Prolog ISO standard that deals with modules. On the other hand we have already implemented some documents that have not been adopted by the ISO standard. Among these we find the definite clause grammars draft and the draft technical corrigendum 2.

In summary the documents that have been respected in our test cases are:

The documents that have not yet been respected in our test cases are:

As [9] has already observed there could be test cases that could prevent a test suite from properly functioning. These are test cases that either run infinitely or that produce an exception that is not wrapped by the Jekejeke Prolog system and thus considered to be fatal. In the ISO core standard we find a set of test cases that matches this category. These are test cases that involve cyclic terms. They are marked by the outcome undefined. We have excluded all of these test cases.

Here is an example of an unused test case with cyclic terms:

/* X = Y, ISO 8.2.1.4 */

% test(=, 2, structure, _) :- f(X,Y,X,1) = f(a(X),a(Y),Y,2).

A further problem we observed was a certain redundancy in the test cases. The ISO standard often contains a test case with named variables and a test case with anonymous variables which are only variants of each other. We run the test suite with the singleton variables check on, so that either of the variants is not accepted. We have only included one variant since we did not see a benefit by going to some lengths to implement both variants as checks.

Here is an example of an unused test case with singleton variables:

/* X \= Y, ISO 8.2.3.4 */

% Redundant: test(\=, 2, structure, _) :- \+ X \= Y.
test(\=, 2, structure, 3) :- \+ _ \= _.

Some arithmetic examples in the ISO core standard are marked as implementation dependent. We have included them under the assumption that the 2-complement is used and the division (/)/2 uses rounding towards zero. Further we did not include ISO examples that made use of the Prolog flags max_integer or min_integer, since we did not see any use for them in the context of our unbounded integer arithmetic.

Comments