aboutsummaryrefslogtreecommitdiff
path: root/contrib/extraction/test
diff options
context:
space:
mode:
authorletouzey2001-10-26 15:54:12 +0000
committerletouzey2001-10-26 15:54:12 +0000
commit32af9a99872b522add12ef4b7e9a42f64f556c4c (patch)
tree2bef31773d48ce61b860c23ffd2bcfcd66c0e42a /contrib/extraction/test
parent3b55f30c04858c24a3f9ae402a49a5a738273ecb (diff)
Fin de mise en place de l'option Optimize. Reorganisation du pretty-print. ETC etc etc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2141 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/extraction/test')
-rw-r--r--contrib/extraction/test/Makefile4
-rw-r--r--contrib/extraction/test/addReals30
2 files changed, 16 insertions, 18 deletions
diff --git a/contrib/extraction/test/Makefile b/contrib/extraction/test/Makefile
index e3e44e0513..787abb32ac 100644
--- a/contrib/extraction/test/Makefile
+++ b/contrib/extraction/test/Makefile
@@ -31,7 +31,9 @@ CMO:= $(patsubst %.ml,%.cmo,$(ML))
# General rules
#
-all: $(ML) $(CMO) v2ml
+all: ml $(CMO) v2ml
+
+ml: $(ML)
depend: $(ML)
rm -f .depend; ocamldep $(INCL) theories/*/*.ml > .depend
diff --git a/contrib/extraction/test/addReals b/contrib/extraction/test/addReals
index 601592091a..fb73d47b5e 100644
--- a/contrib/extraction/test/addReals
+++ b/contrib/extraction/test/addReals
@@ -1,25 +1,21 @@
+open TypeSyntax
+open Fast_integer
+
+
let total_order_T x y =
-if x = y then
- TypeSyntax.Coq_inleftT TypeSyntax.Coq_rightT
-else if x < y then
- TypeSyntax.Coq_inleftT TypeSyntax.Coq_leftT
-else TypeSyntax.Coq_inrightT
+if x = y then InleftT RightT
+else if x < y then InleftT LeftT
+else InrightT
let rec int_to_positive i =
- if i = 1 then
- Fast_integer.Coq_xH
+ if i = 1 then XH
else
- if (i mod 2) = 0 then
- Fast_integer.Coq_xO (int_to_positive (i/2))
- else
- Fast_integer.Coq_xI (int_to_positive (i/2))
+ if (i mod 2) = 0 then XO (int_to_positive (i/2))
+ else XI (int_to_positive (i/2))
let rec int_to_Z i =
- if i = 0 then
- Fast_integer.ZERO
- else if i > 0 then
- Fast_integer.POS (int_to_positive i)
- else
- Fast_integer.NEG (int_to_positive (-i))
+ if i = 0 then ZERO
+ else if i > 0 then POS (int_to_positive i)
+ else NEG (int_to_positive (-i))
let my_ceil x = int_to_Z (succ (int_of_float (floor x)))