Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] z3 failure



A problem is double. The same program with int arrays for arguments is
successfully proved by Z3.


---
Eugene Kornykhin,
Lomonosov Moscow State University

On 7 October 2013 01:06, Stephen Siegel <siegel at udel.edu> wrote:

> I have a very simple example (below) which I want to verify with frama-c +
> Jessie.  The VCs are discharged easily by Alt-Ergo, CVC3, and CVC4.
>  However they are not discharged by Z3.  This is surprising since Z3 is a
> very powerful prover.   I'm wondering if anyone has any idea what is going
> on, or how to look into it.
>
> I am using Z3 4.3.1.  There are two VCs.  One, "copy_safety" is discharged
> by Z3 very quickly.  The other, "copy_ensures_default" runs forever. I've
> moved the timeout to 60 seconds, and it still times out.
>
> BTW, this warning appears with both VCs:
>
> WARNING: '=' cannot be used in patterns
>
> Here is the program copy.c:
>
> /*@
>   @ requires n>=0 && \valid(a+(0..n-1)) && \valid(b+(0..n-1)) ;
>   @ ensures \forall integer i ; 0 <= i < n ==> a[i] == b[i] ;
>   @ assigns b[0..n-1] ;
>   @*/
> void copy(int n, double a[], double b[]) {
>   int i = 0;
>
>   /*@
>     @ loop invariant 0<=i<=n;
>     @ loop invariant \forall integer j ; 0<=j<i ==> b[j] == a[j] ;
>     @ loop variant n - i ;
>     @*/
>   while (i < n) {
>     b[i] = a[i];
>     i++;
>   }
> }
>
>
> _______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20131007/43228ace/attachment.html>