Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
90974b18
Commit
90974b18
authored
11 years ago
by
MARCHE Claude
Browse files
Options
Downloads
Patches
Plain Diff
improved bench for extraction
parent
93815f83
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bench/bench
+22
-12
22 additions, 12 deletions
bench/bench
examples/euler001/Makefile.in
+12
-11
12 additions, 11 deletions
examples/euler001/Makefile.in
examples/sudoku/Makefile
+3
-1
3 additions, 1 deletion
examples/sudoku/Makefile
with
37 additions
and
24 deletions
bench/bench
+
22
−
12
View file @
90974b18
...
...
@@ -81,19 +81,29 @@ execute () {
extract_and_run
()
{
echo
-n
"
$1
... "
rm
-f
$1
/
$2
if
make
-C
$1
>
/dev/null 2>&1
;
then
if
$1
/main.opt
$3
>
/dev/null 2>&1
;
then
echo
"ok"
else
echo
"execution failed!"
echo
$1
/main.opt
$3
$1
/main.opt
$3
exit
1
fi
echo
-n
"extract... "
if
make
-C
$1
extract
>
/dev/null 2>&1
;
then
echo
-n
"compile... "
if
make
-C
$1
>
/dev/null 2>&1
;
then
echo
-n
"execute... "
if
$1
/main.opt
$3
>
/dev/null 2>&1
;
then
echo
"ok"
else
echo
"execution failed!"
echo
$1
/main.opt
$3
$1
/main.opt
$3
exit
1
fi
else
echo
"compilation failed!"
echo
make
-C
$1
make
-C
$1
exit
1
fi
else
echo
"extract
or compilation
failed!"
echo
make
-C
$1
make
-C
$1
echo
"extract failed!"
echo
make
-C
$1
extract
make
-C
$1
extract
exit
1
fi
}
...
...
This diff is collapsed.
Click to expand it.
examples/euler001/Makefile.in
+
12
−
11
View file @
90974b18
OBJ
=
euler001__Euler001 main
MAIN
=
main
OBJ
=
euler001__Euler001
ML
=
$(
addsuffix .ml,
$(
OBJ
))
CMO
=
$(
addsuffix .cmo,
$(
OBJ
))
CMX
=
$(
addsuffix .cmx,
$(
OBJ
))
NAME
=
main
OCAMLOPT
=
ocamlopt
-noassert
-inline
1000
INCLUDE
=
@BIGINTINCLUDE@
-I
../../lib/why3
all
:
$(NAME).@OCAMLBEST@
all
:
$(MAIN).@OCAMLBEST@
extract
:
$(ML)
$(
NAME
).byte
:
$(CMO)
$(
MAIN
).byte
:
$(CMO)
$(MAIN).cmo
ocamlc
$(
INCLUDE
)
@BIGINTLIB@.cma why3extract.cma
-o
$@
$^
$(
NAME
).opt
:
$(CMX)
$(
MAIN
).opt
:
$(CMX)
$(MAIN).cmx
$(
OCAMLOPT
)
$(
INCLUDE
)
@BIGINTLIB@.cmxa why3extract.cmxa
-o
$@
$^
main.cmx
:
euler001__Euler001.cmx
$(MAIN).cmx
:
$(CMX)
euler001__Euler001.ml
:
../euler001.mlw
$(ML)
:
../euler001.mlw
../../bin/why3
-E
ocaml ../euler001.mlw
-o
.
%.cmx
:
%.ml
ocamlopt
$(
INCLUDE
)
-annot
-c
$<
$(
OCAMLOPT
)
$(
INCLUDE
)
-annot
-c
$<
%.cmo
:
%.ml
ocamlc
$(
INCLUDE
)
-annot
-c
$<
...
...
@@ -33,8 +35,7 @@ euler001__Euler001.ml: ../euler001.mlw
ocamlc
$(
INCLUDE
)
-annot
-c
$<
clean
::
rm
-f
*
.cm[xio]
*
.o
*
.annot
$(
NAME
)
.opt
rm
-f
euler001__
*
.ml euler001__
*
.ml.bak
rm
-f
$(
ML
)
*
.cm[xio]
*
.o
*
.annot
$(
MAIN
)
.opt
$(
MAIN
)
.byte
Makefile
:
Makefile.in ../../config.status
cd
../..
;
./config.status
chmod
--file
examples/euler001/Makefile
...
...
This diff is collapsed.
Click to expand it.
examples/sudoku/Makefile
+
3
−
1
View file @
90974b18
...
...
@@ -15,6 +15,8 @@ OCAMLOPT = ocamlopt -noassert -inline 1000
all
:
$(MAIN).opt
extract
:
$(ML)
doc
:
../../bin/why3doc ../sudoku.mlw
../../bin/why3session html ../sudoku.mlw
...
...
@@ -40,5 +42,5 @@ $(ML): ../sudoku.mlw
ocamlc
$(
WHY3
)
-annot
-g
-c
$<
clean
::
rm
-f
$(
ML
)
*
.cm[xio]
$(
MAIN
)
.opt
rm
-f
$(
ML
)
*
.cm[xio]
$(
MAIN
)
.opt
$(
MAIN
)
.byte
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment