sameleaves.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 403 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: sameleaves(i,i).
% by: Bart Demoen <bmd@cs.kuleuven.ac.be>

sameleaves(leaf(L),leaf(L)) .
sameleaves(tree(T1,T2),tree(S1,S2)) :-
		getleave(T1,T2,L,T) ,
		getleave(S1,S2,L,S) ,
		sameleaves(T,S) .

getleave(leaf(A),C,A,C) .
getleave(tree(A,B),C,L,O) :- getleave(A,tree(B,C),L,O) .


/*TWDESC

Checks if two binary trees have the same fringe.

*/

/*TWDEMO

selected_norms([termsize_edges]).

*/
popout

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

actions get anonymous link download benchmark