length1.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 487 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
%query: len1(i,o).
%% len1(Xs, X) :- X is the length of the list Xs.
%%

%TWTYPES     :- type len1(list,nat).

len1([], 0).
len1([_ | Ts], N) :- len1(Ts, M), eq(N,s(M)).

%TWTYPES :- type eq(nat,nat).

eq(X,X).



/*TWDESC

 len1(Xs, X) :- X is the length of the list Xs.

*/


/*TWTYPES

list([]).
list([X|Xs]) :-
	poly(X),
	list(Xs).

poly(dummy).

nat(0).
nat(s(X)) :- nat(X).

*/


/*TWDEMO

selected_norms([list,nat,poly]).

query(len1(b,f,f,f,f,f)).
query(len1(f,f,b,f,f,f)).


*/
popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark