in-bf.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 708 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: in(i,o).
%% in(Element, Tree) :- Element is an element of the search tree Tree.
%%

%TWTYPES  :- type in(nat,treen).

in(X, tree(X, _, _)).
in(X, tree(Y, Left, _)) :- less(X,Y), in(X, Left).
in(X, tree(Y, _, Right)) :- less(Y,X), in(X, Right).


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

less(0, s(_)).
less(s(X), s(Y)) :- less(X, Y).



/*TWDESC

 in(Element, Tree) :- Element is an element of the search tree Tree.

*/


/*TWTYPES

treen(void).
treen(tree(V,L,R)) :-
        nat(V),
        treen(L),
        treen(R).

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

*/


/*TWDEMO

selected_norms([nat,treen]).

query(in(b,f,b,f)).
query(in(b,f,f,b)).
query(in(f,f,b,f)).
query(less(b,f,f,f)).
query(less(f,f,b,f)).

*/
popout

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

actions get anonymous link download benchmark