A15.itrs

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:14.0
disk size 447 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
(VAR l m n u v)
(RULES
sort(l) -> st(0, l)

st(n, l) -> stNat(n >= 0, n, l)

stNat(TRUE, n, l) -> cond1(member(n, l), n, l)

cond1(TRUE, n, l) -> cons(n, st(n+1, l))
cond1(FALSE, n, l) -> cond2(n > max(l), n, l)

cond2(TRUE, n, l) -> nil
cond2(FALSE, n, l) -> st(n+1, l)

member(n, nil) -> FALSE
member(n, cons(m, l)) -> n = m || member(n, l)

max(nil) -> 0
max(cons(u, l)) -> if(u > max(l), u, max(l))

if(TRUE, u, v) -> u
if(FALSE, u, v) -> v
)
popout

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

actions get anonymous link download benchmark