test(	'testpgs/qsort.pl',
	dp(mode2,pair),
	([Xs],[]), % Xs is ground
       iqsort(Xs,Ys) ).     

test(	'testpgs/qsort.pl',
	dp(mode2,pair),
	([Ys],[]), % Ys is ground
       iqsort(Xs,Ys) ).     

test(	'testpgs/pg14.10',
	dp(mode2,pair),
	([X],[]), % X is ground
	connected(X,Y) ).     

test(	'testpgs/pg14.10',
	dp(mode2,pair),
	([Y],[]), % Y is ground
	connected(X,Y) ).     

test(	'testpgs/pg11.1',
	dp(mode2,pair),
	([Xs,Ys],[]), % Xs,Ys are ground
        merge(Xs,Ys,Zs) ).
test(	'testpgs/pg11.1',
	dp(mode2,pair),
	([Zs],[]), % Zs is ground
        merge(Xs,Ys,Zs) ).

test(	'testpgs/nrev.pl',
	dp(mode2,pair),
	([X],[]), % X is ground
	nrev(X,Y) ).

test(	'testpgs/nrev.pl',
	dp(mode2,pair),
	([Y],[]), % Y is ground
	nrev(X,Y) ).

test(	'testpgs/buggyqs.pl', 
	dp(mode2,pair),
	([Li],[]), % Li is ground
        qs(Li,Lo) ).
test(	'testpgs/buggyqs.pl', 
	dp(mode2,pair),
	([Lo],[]), % Lo is ground
        qs(Li,Lo) ).

test(	'testpgs/treesort.pl',
	dp(mode2,pair),
	([Xs],[]), % Xs is ground
        treesort(Xs,Ys) ).
test(	'testpgs/treesort.pl',
	dp(mode2,pair),
	([Ys],[]), % Ys is ground
        treesort(Xs,Ys) ).

test(	'testpgs/diff.pl',
	dp(mode2,pair),
	([Y,Z],[]), % Y, Z are ground
	diff(X,Y,Z) ).
test(	'testpgs/diff.pl',
	dp(mode2,pair),
	([X],[]), % X is ground
	diff(X,Y,Z) ).

test(	'testpgs/insert.pl',
	dp(mode2,pair),
	([X,Y],[]),	% X,Y are ground
	insert(X,Y,Z) ).
test(	'testpgs/insert.pl',
	dp(mode2,pair),
	([Y,Z],[]),	% Y,Z are ground
	insert(X,Y,Z) ).
test(	'testpgs/insert.pl',
	dp(mode2,pair),
	([X,Z],[]),	% X,Z are ground
	insert(X,Y,Z) ).

test(	'testpgs/pg11.5',
	dp(mode2,pair),
	([Xs],[]), % Xs is ground
	sort(Xs,Ys) ).     
test(	'testpgs/pg11.5',
	dp(mode2,pair),
	([Ys],[]), % Ys is ground
	sort(Xs,Ys) ).     

test(	'testpgs/pg15.4',
	dp(mode2,pair),
	([Xs],[]), % Xs is ground
	quicksort(Xs,Ys) ).
test(	'testpgs/pg15.4',
	dp(mode2,pair),
	([Ys],[]), % Ys is ground
	quicksort(Xs,Ys) ).

test(	'testpgs/pg3.20',
	dp(mode2,pair),
	([Xs],[]), % Xs is ground
	sort(Xs,Ys)  ).
test(	'testpgs/pg3.20',
	dp(mode2,pair),
	([Ys],[]), % Ys is ground
	sort(Xs,Ys)  ).

test(	'testpgs/pg3.28',
	dp(mode2,pair),
	([T],[]), % T is ground
	heapify(T,H) ).     

test(	'testpgs/pg3.28',
	dp(mode2,pair),
	([H],[]), % H is ground
	heapify(T,H) ).

test(	'testpgs/pg3.5',
	dp(mode2,pair),
	([N,X],[]), % N, X are ground
	exp(N,X,Y) ).     
test(	'testpgs/pg3.5',
	dp(mode2,pair),
	([N,Y],[]), % N, Y are ground
	exp(N,X,Y) ).
test(	'testpgs/pg3.5',
	dp(mode2,pair),
	([X,Y],[]), % X, Y are ground
	exp(N,X,Y) ).


test(	'testpgs/pg3.6',
	dp(mode2,pair),
	([N],[]), % N is ground
	factorial(N,F) ).     
test(	'testpgs/pg3.6',
	dp(mode2,pair),
	([F],[]), % F is ground
	factorial(N,F) ).     



