samefringe.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 378 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: samefringe(i,i).

/* from Boyer, Moore, 1979. inspired by algorithm from McCarthy */

gopher(nil,nil).
gopher(cons(nil,Y),cons(nil,Y)).
gopher(cons(cons(U,V),W),X) :-  gopher(cons(U,cons(V,W)),X).

samefringe(nil,nil).
samefringe(cons(U,V),cons(X,Y)) :- gopher(cons(U,V),cons(U1,V1)), gopher(cons(X,Y),cons(X1,Y1)),
                                   samefringe(V1,Y1).
popout

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

actions get anonymous link download benchmark