Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
f4a1e81b
Commit
f4a1e81b
authored
May 20, 2011
by
Jean-Christophe Filliâtre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
binary search added to the nightly bench
parent
4991a657
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
16 deletions
+20
-16
.gitignore
.gitignore
+0
-1
examples/programs/binary_search/why3session.xml
examples/programs/binary_search/why3session.xml
+13
-0
examples/programs/list_rev.mlw
examples/programs/list_rev.mlw
+2
-1
src/programs/TODO
src/programs/TODO
+2
-0
src/programs/pgm_typing.ml
src/programs/pgm_typing.ml
+2
-0
tests/test-pgm-jcf.mlw
tests/test-pgm-jcf.mlw
+1
-14
No files found.
.gitignore
View file @
f4a1e81b
...
...
@@ -158,7 +158,6 @@ why.conf
/examples/programs/vstte10_aqueue/
/examples/programs/insertion_sort_list/
/examples/programs/mergesort_list/
/examples/programs/binary_search/
/examples/programs/same_fringe/
/examples/programs/quicksort/
/examples/programs/algo63/
...
...
examples/programs/binary_search/why3session.xml
0 → 100644
View file @
f4a1e81b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE why3session SYSTEM "why3session.dtd">
<why3session
name=
"examples/programs/binary_search/why3session.xml"
>
<file
name=
"../binary_search.mlw"
verified=
"true"
expanded=
"true"
>
<theory
name=
"M"
verified=
"true"
expanded=
"true"
>
<goal
name=
"WP_parameter binary_search"
expl=
"correctness of parameter binary_search"
sum=
"19c8c227fa34ac77ac920a032e72d19f"
proved=
"true"
expanded=
"true"
>
<proof
prover=
"alt-ergo"
timelimit=
"10"
edited=
""
obsolete=
"false"
>
<result
status=
"valid"
time=
"0.06"
/>
</proof>
</goal>
</theory>
</file>
</why3session>
examples/programs/list_rev.mlw
View file @
f4a1e81b
...
...
@@ -330,10 +330,11 @@ module M2
let old_next = !next in
let old_p = !p in
let q = ref null in
label Init:
while !p <> null do
invariant { is_list !next !p /\ is_list !next !q
/\ sep_list_list !next !p !q /\
reverse (model (
old !nex
t) (old_p)) =
reverse (model (
at !next Ini
t) (old_p)) =
(reverse (model !next !p)) ++ (model !next !q)}
let tmp = get !next !p in
let bak_next = !next in
...
...
src/programs/TODO
View file @
f4a1e81b
o pas de old dans les invariants
o e <- e
o {| e with x1 = e1; ...; xn = en |}
...
...
src/programs/pgm_typing.ml
View file @
f4a1e81b
...
...
@@ -1181,6 +1181,8 @@ and itriple gl env (p, e, q) =
let
rec
ty_effect
ef
ty
=
match
ty
.
ty_node
with
|
Ty
.
Tyvar
_
->
ef
|
Ty
.
Tyapp
(
ts
,
_
)
when
ts_equal
ts
ts_arrow
->
ef
|
Ty
.
Tyapp
(
ts
,
tyl
)
->
let
mt
=
get_mtsymbol
ts
in
let
rl
=
regions_tyapp
ts
mt
.
mt_regions
tyl
in
...
...
tests/test-pgm-jcf.mlw
View file @
f4a1e81b
...
...
@@ -46,20 +46,6 @@ let test_all_1 () =
(!x >= 0 && not (!x = 0) || !x >= 1)
{ result=True <-> !x>=1 }
(* from Cesar Munoz's CD3D *)
logic d : int
parameter vx : ref int
parameter vy : ref int
parameter sq : x:int -> {} int { result = x*x }
let test_cd3d () =
{ true }
if !vx=0 && !vy=0 && sq !vx + sq !vy < sq d then 1 else 2
{ result=1 -> !vx=0 and !vy=0 }
end
(*
...
...
@@ -70,6 +56,7 @@ End:
(***
module TestArray
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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