izlatkin / HornLauncher

scripts and reports for executions seahorn and test generation
0 stars 0 forks source link

[TG] feature-request for testget_X.h #36

Open izlatkin opened 2 years ago

izlatkin commented 2 years ago

Add print method

void print_value(int v){
    FILE * fptr;
    char str[20];
    sprintf(str, "%d ", v);
    fptr = fopen("values.txt", "a");
    fputs(str, fptr);
}

and update nondet methods following way

const int nondet_4260(){
  if (cnt_4260 < tot_4260){
    print_value(inp_4260[cnt_4260]);
    return inp_4260[cnt_4260++];
    }
  else {
  int rr = rand();
  print_value(rr);
  return rr;
  }
}

example: testgen.h.txt :

izlatkin commented 2 years ago

image