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] Problem with aggregate objects

  • Subject: [Frama-c-discuss] Problem with aggregate objects
  • From: hollas at (Boris Hollas)
  • Date: Wed, 09 Feb 2011 14:10:03 +0100


this code doesn't verify with Jessie:

typedef struct {
	int v;
} A;

typedef struct {
	A a;
} B;

//@ requires \valid(this);
void bar(A* this);

//@ requires \valid(this);
void foo(B* this) {
	bar(&this->a);  // call doesn't verify

Why does the precondition \valid(this) in foo not imply
\valid(&this->a)? Shouldn't pointer b of type B be valid iff the span of
b is valid?