If I have a c file that contains more than one function, and I want to run the cbmc with z3 solver on the preprocessed version of the program (using gcc) and there are some other files(c files) in the header section. How will the cbmc see those files? because I tried to run it and he gives some errors about some variables as not declared where it's, in fact, they are declared in one of the header files.
could anyone explain how this works?
UPDATE:
int test(int x) {
for (int i = 2; i < sqrt(x); i++) {
if (x%i == 0)
return 0;
}
First of all, I preprocess the program using gcc
Then parse the program by pycparser
then instrument (add print statement after 4 to see the value of x)
Then I ran the cbmc on the instrumented version of file and I got this error: function `sqrt' is not declared