Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
7a9c7a06
Commit
7a9c7a06
authored
Jun 12, 2013
by
MARCHE Claude
Browse files
jessie3: isqrt needs additional pre-condition
parent
03a62f9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/jessie/ACSLtoWhy3.ml
View file @
7a9c7a06
...
...
@@ -407,7 +407,12 @@ let rec term_node ~label t =
match
labels
with
|
[]
->
let
ls
=
get_lsymbol
li
in
let
args
=
List
.
map
(
fun
x
->
snd
(
term
~
label
x
))
args
in
let
args
=
List
.
map
(
fun
x
->
let
ty
,
t
=
term
~
label
x
in
Self
.
result
"arg = %a, type = %a"
Cil_printer
.
pp_term
x
Cil_printer
.
pp_logic_type
ty
;
t
)
args
in
t_app
ls
args
|
_
->
Self
.
not_yet_implemented
"term_node Tapp with labels"
...
...
src/jessie/tests/demo/isqrt.c
View file @
7a9c7a06
...
...
@@ -6,6 +6,7 @@
//@ logic integer sqr(integer x) = x * x;
/*@ requires x >= 0;
@ requires x <= 1000000000; // not avoid integer overflow
@ ensures \result >= 0 && sqr(\result+0) <= x && x < sqr(\result + 1);
@*/
int
isqrt
(
int
x
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment