get_sign.c

/*
 * First KLEE tutorial: testing a small function
 */


int get_sign(int x) {
  if (x == 0)
     return 0;
  
  if (x < 0)
     return -1;
  else 
     return 1;
} 

int main() {
  int a;
  klee_make_symbolic(&a, sizeof(a), "a");
  return get_sign(a);
} 

Generated by GNU Enscript 1.6.5.2.
enscript -Ec --color -w html get_sign.c -o get_sign.c.html