Commit dd556464 authored by MARCHE Claude's avatar MARCHE Claude

Jessie3: support for loops and related constructs

parent 35cff9e2
This diff is collapsed.
......@@ -13,10 +13,11 @@ int isqrt(int x) {
/*@ loop invariant count >= 0 && x >= sqr(count) && sum == sqr(count+1);
@ loop variant x - count;
@*/
while (sum <= x) sum += 2 * ++count + 1;
while (sum <= x) { ++count; sum += 2 * count + 1; }
return count;
}
#if 0
//@ ensures \result == 4;
int main () {
int r;
......@@ -26,6 +27,8 @@ int main () {
return r;
}
#endif
/*
Local Variables:
compile-command: "frama-c -add-path ../.. -jessie3 isqrt.c"
......
......@@ -24,7 +24,8 @@
goal WP_parameter_f : (6 * 7) = 42
goal WP_parameter_g : true
goal WP_parameter_g :
forall us_retres:int. us_retres = (6 * 7) -> us_retres = 42
end
[jessie3] Alt-Ergo 0.94, Alt-Ergo 0.95, CVC3 2.2, CVC3 2.4.1, Z3 3.2, Z3 4.2
[jessie3] Task 1: Valid, Valid, Valid, Valid, Valid, Valid
......
......@@ -2,26 +2,6 @@
[jessie3] user error: WARNING: Variable Frama_C_bzero not translated
[jessie3] user error: WARNING: Variable Frama_C_copy_block not translated
[jessie3] processing function f
[jessie3] found 0 logic decl(s)
[jessie3] made 0 theory(ies)
[jessie3] made 1 function(s)
[jessie3] running theory 1:
[jessie3] theory C_Functions
(* use why3.BuiltIn *)
(* use why3.Bool *)
(* use why3.Unit *)
(* use why3.Prelude *)
(* use int.Int *)
(* use real.Real *)
(* use ref.Ref *)
goal WP_parameter_f : true
end
[jessie3] Alt-Ergo 0.94, Alt-Ergo 0.95, CVC3 2.2, CVC3 2.4.1, Z3 3.2, Z3 4.2
[jessie3] Task 1: Valid, Valid, Valid, Valid, Valid, Valid
[kernel] Plug-in jessie3 aborted: unimplemented feature.
You may send a feature request at http://bts.frama-c.com with:
'[Plug-in jessie3] term_node Tat/Old'.
......@@ -5,4 +5,4 @@
[jessie3] processing function isqrt
[kernel] Plug-in jessie3 aborted: unimplemented feature.
You may send a feature request at http://bts.frama-c.com with:
'[Plug-in jessie3] stmt Loop'.
'[Plug-in jessie3] term_node Tat/Old'.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment