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] Documentation of \valid
- Subject: [Frama-c-discuss] Documentation of \valid
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- Date: Thu, 12 Nov 2009 17:12:43 +0100
- In-reply-to: <A4D9A80C-4F63-4879-9B09-D22780EFCF8D@cea.fr>
- References: <FC0686BB6178BC43B9DC035287A11A720DBD57FB8C@SI-MBX12.de.bosch.com> <A4D9A80C-4F63-4879-9B09-D22780EFCF8D@cea.fr>
Hello, > > The documentation states "\valid(s) holds if and only if > > dereferencing any p \in s is safe." However, it's not clear what > > dereferencing means wrt structs. > > If p is a pointer to struct B, > > \valid(p) means that it is safe to do > > struct B s; > s = *p; > > in your program. It's not really different from validity for > a pointer to int or char. It's not different if we assume that Frama-C treats a struct as a type, ie knows the internal representation of B - in the same way it knows about int and char. In this example, Jessie can't verify memory safety: typedef int arr3[3]; /*@ requires \valid(a); */ foo(arr3 a) { a[2] = 0; } In this case, arr3 is not treated as type of ist own, ie an array of type int[3]. I feel that this is conceptually different to the struct example. Regards, Boris
- Follow-Ups:
- [Frama-c-discuss] Documentation of \valid
- From: virgile.prevosto at cea.fr (Virgile Prevosto)
- [Frama-c-discuss] Documentation of \valid
- From: Claude.Marche at inria.fr (Claude Marche)
- [Frama-c-discuss] Documentation of \valid
- References:
- [Frama-c-discuss] Documentation of \valid
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Documentation of \valid
- From: Pascal.Cuoq at cea.fr (Pascal Cuoq)
- [Frama-c-discuss] Documentation of \valid
- Prev by Date: [Frama-c-discuss] Documentation of \valid
- Next by Date: [Frama-c-discuss] Documentation of \valid
- Previous by thread: [Frama-c-discuss] Documentation of \valid
- Next by thread: [Frama-c-discuss] Documentation of \valid
- Index(es):