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
17
Merge Requests
17
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
e1147a13
Commit
e1147a13
authored
Aug 22, 2019
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Insert tests in bench, but only if mpfr is installed
parent
abc83363
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
9 deletions
+27
-9
bench/bench
bench/bench
+17
-0
bench/interp/real.mlw
bench/interp/real.mlw
+9
-9
src/config.sh.in
src/config.sh.in
+1
-0
No files found.
bench/bench
View file @
e1147a13
...
...
@@ -7,6 +7,8 @@
# export WHY3DATA=.
# export WHY3LOADPATH=theories
has_mpfr
=
`
sed
-n
-e
's/MPFRLIB *= *\([^ ]\+\)/\1/p'
share/Makefile.config
`
shopt
-s
nullglob
suffix
=
$1
...
...
@@ -382,6 +384,21 @@ execute examples/vstte10_queens.mlw NQueens.test8
# examples/queens.mlw NQueensBits.test8
# fails: cannot find definition of routine eq
# examples/residual.mlw Test.test_astar
# test of execution on real numbers; only if mpfr installed
if
test
-n
"
$has_mpfr
"
;
then
execute bench/interp/real.mlw R.test0
execute bench/interp/real.mlw R.test1
execute bench/interp/real.mlw R.test2
execute bench/interp/real.mlw R.test3
execute bench/interp/real.mlw R.test_exp
execute bench/interp/real.mlw R.test_log
execute bench/interp/real.mlw R.test_exp_log
execute bench/interp/real.mlw R.bench1
execute bench/interp/real.mlw R.bench2
execute bench/interp/real.mlw R.bench3
else
echo
"MPFR not installed, skipping tests"
fi
echo
""
echo
"=== Checking extraction to OCaml ==="
...
...
bench/interp/real.mlw
View file @
e1147a13
...
...
@@ -35,6 +35,15 @@ module R
if z < 0.99999 || z > 1.00001 then raise BenchFailure;
(x, y, z)
let test3 ()
raises { BenchFailure -> false }
=
let ref x : real = 2.0 in
for i=1 to 14 do x <- x * x done;
let y : real = 0.0 * x in
if y <> 0.0 then raise BenchFailure;
(x,y)
let test_exp ()
raises { BenchFailure -> false }
=
...
...
@@ -79,15 +88,6 @@ module R
if r <> 4.0 then raise BenchFailure;
r
let test3 ()
raises { BenchFailure -> false }
=
let ref x : real = 2.0 in
for i=1 to 14 do x <- x * x done;
let y : real = 0.0 * x in
if y <> 0.0 then raise BenchFailure;
(x,y)
use real.Trigonometry
let bench3 () =
...
...
src/config.sh.in
View file @
e1147a13
...
...
@@ -34,6 +34,7 @@ let localdir = $localdir
echo
"
OCAMLBEST = @OCAMLBEST@
BIGINTLIB = @BIGINTLIB@
MPFRLIB = @MLMPFR@
INCLUDE = @BIGINTINCLUDE@ -I
\"
$ocamllib
\"
INCLUDEALL = @BIGINTINCLUDE@ @ZIPINCLUDE@ @MENHIRINCLUDE@ -I
\"
$ocamllib
\"
"
>
$makefileconfig
...
...
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