gcd.koat

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:03.0
disk size 792 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
(GOAL COMPLEXITY)
(STARTTERM (FUNCTIONSYMBOLS evalgcdstart))
(VAR A B)
(RULES
  evalgcdstart(A,B) -> Com_1(evalgcdentryin(A,B))
  evalgcdentryin(A,B) -> Com_1(evalgcdreturnin(A,B)) :|: 0 >= A
  evalgcdentryin(A,B) -> Com_1(evalgcdreturnin(A,B)) :|: 0 >= B
  evalgcdentryin(A,B) -> Com_1(evalgcdbb7in(B,A)) :|: A >= 1 && B >= 1
  evalgcdbb7in(A,B) -> Com_1(evalgcdbb4in(A,B)) :|: A >= B + 1
  evalgcdbb7in(A,B) -> Com_1(evalgcdbb4in(A,B)) :|: B >= A + 1
  evalgcdbb7in(A,B) -> Com_1(evalgcdreturnin(A,B)) :|: B = A
  evalgcdbb4in(A,B) -> Com_1(evalgcdbb5in(A,B)) :|: A >= B + 1
  evalgcdbb4in(A,B) -> Com_1(evalgcdbb6in(A,B)) :|: B >= A
  evalgcdbb5in(A,B) -> Com_1(evalgcdbb7in(A - B,B))
  evalgcdbb6in(A,B) -> Com_1(evalgcdbb7in(A,B - A))
  evalgcdreturnin(A,B) -> Com_1(evalgcdstop(A,B))
)
popout

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

actions get anonymous link download benchmark