0

I am a beginner user of Z3. How do I verify a loop (C code) with a loop invariant in Z3?

For ex:

int a[10],i;
for(i = 0; i<10; i++)
{    
  a[i] = 0;
}
jonsca
  • 10,218
  • 26
  • 54
  • 62

1 Answers1

1

Z3 only supports first-order logic with theories. You can use a program verification tool to map programs with assertions to logic. For example http://rise4fun.com/dafny or http://rise4fun.com/fstar. Reasonable courses on logic in computer science will also contain material on how to write a verification condition generator. These are better starting points for this question.

Nikolaj Bjorner
  • 8,229
  • 14
  • 15