Ackermann_false-termination.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:16.0
disk size 495 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
/*
 * Date: 06/07/2015
 * Created by: Ton Chanh Le (chanhle@comp.nus.edu.sg)
 *
 * The program does not terminate when x >= 0 & y < 0
 */

extern int __VERIFIER_nondet_int();

int Ack(int m, int n)
{
  if (m == 0) return n+1;
  else if (n == 0) return Ack(m-1, 1);
  else return Ack(m-1, Ack(m, n-1));
}

int main() {
    int x = __VERIFIER_nondet_int();
    int y = __VERIFIER_nondet_int();
    if (x < 0) {
        return 0;
    }
    int r = Ack(x, y);
    return r;
}
popout

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

actions get anonymous link download benchmark