Skip to content
Snippets Groups Projects
copy_visitor.res.oracle 1.21 KiB
[kernel] Parsing copy_visitor.i (no preprocessing)
[eva] Analyzing a complete application starting at main
[eva] Computing initial state
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
  s.a ∈ {1}
   .b ∈ {2}
[eva] copy_visitor.i:22: assertion got status valid.
[eva] computing for function f <- main.
  Called from copy_visitor.i:23.
[eva] copy_visitor.i:23: function f: precondition got status valid.
[eva] Recording results for f
[eva] Done for function f
[eva] Recording results for main
[eva] Done for function main
[eva] ====== VALUES COMPUTED ======
[eva:final-states] Values at end of function f:
  s{.a; .b} ∈ {2}
  __retres ∈ {2}
[eva:final-states] Values at end of function main:
  s{.a; .b} ∈ {2}
  __retres ∈ {0}
/* Generated by Frama-C */
struct S {
   int a ;
   int b ;
};
struct S s = {.a = 1, .b = 2};
/*@ requires \valid(s_0);
    assigns s_0->a; */
int f(struct S *s_0)
{
  int __retres;
  s_0->a = 2;
  __retres = s_0->b;
  return __retres;
}

/*@ assigns s.a; */
int main(void)
{
  int __retres;
  s.a = 2;
  /*@ assert s.a ≡ 2; */ ;
  f(& s);
  __retres = 0;
  return __retres;
}

int g(int x);

int g(int x)
{
  int __retres;
  __retres = 0;
  return __retres;
}