I had a question regarding the use of VST and switch statements.
I am having trouble writing a proof that steps through the switch statement when there is a matching case for the switch variable. For example:
I CAN write a proof for something like this:
int switchTest(int x){
switch (x){
case(0): return 0;
default: return 1;
}
}
However I CANNOT write a proof for something like this:
int switchTest(){
int x = 5;
switch (x){
case(0): return 0;
case(1): return 1;
case(5): return 5; //The matching case for x - causes my problem
default: return 8;
}
}
Whenever there is a matching case for "x" (like my second code example), then I run into a "No matching clauses for match" error when trying to write a tactic for the switch statement.
Normally I could write something like: "forward_if", "forward_if True", "forward_if (PROP() LOCAL() SEP())", and they would work for my first code example, but not for my second code example.
In summary: what should the next line(s) in my proof be for the second code example?
Lemma body_switchTest: semax body Vprog Gprog f_switchTest switchTest_spec.
Proof.
start_function.
forward.
???
Thanks in advance!