const length = 2.

:- not trans(test,0,2).

proc(test).
head(test, a1).
tail(test, two).

proc(two).
head(two, i).

% first test -> use length = 2 and :- not trans(test,0,2)
% a1 ; if (p, null, a); ?p

tail(two, p).		
if(i,p,null,a).


% second test -> use length = 5 and :- not trans(test,0,4)
% a1; a2 $ a2 $ a $ null; if (p, null, a) 
% tail(two, three).

% choiceAction(n1).
% in(a2, n1).
% in(a3, n1).
% in(a, n1).
% in(null, n1).

% proc(three).

% head(three, i).
% tail(three, p).

% if(i,p,if1,if2).

% proc(if1).
% head(if1, null).
% tail(if1, null).

% proc(if2).
% head(if2, a).
% tail(if2,null).
