aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfilliatr2001-02-06 15:02:00 +0000
committerfilliatr2001-02-06 15:02:00 +0000
commit9c662cf9e8f4065ab354dc9c55c3e819f0db1fbe (patch)
treeb48820b8f0dea11a1156305c49a1f51e0f8effdc
parent17ca87d5de9a232fc056c1bac85134094b03cd21 (diff)
mise en place extraction
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1339 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--.depend7
-rw-r--r--Makefile3
-rw-r--r--contrib/extraction/extraction.ml11
-rw-r--r--contrib/extraction/extraction.mli8
-rw-r--r--contrib/extraction/miniml.mli44
5 files changed, 72 insertions, 1 deletions
diff --git a/.depend b/.depend
index 9bd70e865d..df840572c7 100644
--- a/.depend
+++ b/.depend
@@ -199,6 +199,9 @@ toplevel/vernacentries.cmi: kernel/names.cmi kernel/term.cmi \
toplevel/vernacinterp.cmi
toplevel/vernacinterp.cmi: parsing/coqast.cmi lib/dyn.cmi kernel/names.cmi \
proofs/proof_type.cmi
+contrib/extraction/extraction.cmi: contrib/extraction/miniml.cmi \
+ kernel/names.cmi
+contrib/extraction/miniml.cmi: kernel/names.cmi
contrib/xml/xmlcommand.cmi: kernel/names.cmi
config/coq_config.cmo: config/coq_config.cmi
config/coq_config.cmx: config/coq_config.cmi
@@ -1204,6 +1207,10 @@ toplevel/vernacinterp.cmx: parsing/ast.cmx parsing/astterm.cmx \
kernel/names.cmx library/nametab.cmx lib/options.cmx lib/pp.cmx \
pretyping/pretype_errors.cmx proofs/proof_type.cmx proofs/tacinterp.cmx \
lib/util.cmx toplevel/vernacinterp.cmi
+contrib/extraction/extraction.cmo: contrib/extraction/miniml.cmi \
+ kernel/names.cmi kernel/term.cmi contrib/extraction/extraction.cmi
+contrib/extraction/extraction.cmx: contrib/extraction/miniml.cmi \
+ kernel/names.cmx kernel/term.cmx contrib/extraction/extraction.cmi
contrib/omega/coq_omega.cmo: parsing/ast.cmi proofs/clenv.cmi \
kernel/closure.cmi library/declare.cmi kernel/environ.cmi \
tactics/equality.cmi kernel/evd.cmi library/global.cmi \
diff --git a/Makefile b/Makefile
index 33a7321e9b..0f2323cb5b 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,8 @@ noargument:
LOCALINCLUDES= -I config -I tools -I scripts -I lib -I kernel -I library \
-I proofs -I tactics -I pretyping -I parsing -I toplevel \
- -I contrib/omega -I contrib/ring -I contrib/xml
+ -I contrib/omega -I contrib/ring -I contrib/xml \
+ -I contrib/extraction
INCLUDES=$(LOCALINCLUDES) -I $(CAMLP4LIB)
BYTEFLAGS=$(INCLUDES) $(CAMLDEBUG)
diff --git a/contrib/extraction/extraction.ml b/contrib/extraction/extraction.ml
new file mode 100644
index 0000000000..f7ff1af88b
--- /dev/null
+++ b/contrib/extraction/extraction.ml
@@ -0,0 +1,11 @@
+
+(*i $Id$ i*)
+
+open Names
+open Term
+open Miniml
+
+let extract spl =
+ failwith "TODO"
+
+
diff --git a/contrib/extraction/extraction.mli b/contrib/extraction/extraction.mli
new file mode 100644
index 0000000000..71c9c9be27
--- /dev/null
+++ b/contrib/extraction/extraction.mli
@@ -0,0 +1,8 @@
+
+(*i $Id$ i*)
+
+open Names
+open Miniml
+
+val extract : section_path list -> ml_decl list
+
diff --git a/contrib/extraction/miniml.mli b/contrib/extraction/miniml.mli
new file mode 100644
index 0000000000..2a2a5c83d8
--- /dev/null
+++ b/contrib/extraction/miniml.mli
@@ -0,0 +1,44 @@
+
+(*i $Id$ i*)
+
+open Names
+
+(* identifiers of type are either parameters or type names. *)
+
+type ml_typeid =
+ | Tparam of identifier
+ | Tname of identifier
+
+(* ML type expressions. *)
+
+type ml_type =
+ | Tvar of ml_typeid
+ | Tapp of ml_type list
+ | Tarr of ml_type * ml_type
+ | Tglob of identifier
+
+(* ML inductive types. *)
+
+type ml_ind = identifier list * identifier * (identifier * ml_type list) list
+
+(* ML terms. *)
+
+type ml_ast =
+ | MLrel of int
+ | MLapp of ml_ast * ml_ast list
+ | MLlam of identifier * ml_ast
+ | MLglob of identifier
+ | MLcons of int * identifier * ml_ast list
+ | MLcase of ml_ast * (identifier * identifier list * ml_ast) array
+ | MLfix of int * bool * (identifier list) * (ml_ast list)
+ | MLexn of identifier
+ | MLcast of ml_ast * ml_type
+ | MLmagic of ml_ast
+
+(* ML declarations. *)
+
+type ml_decl =
+ | Dtype of ml_ind list
+ | Dabbrev of identifier * (identifier list) * ml_type
+ | Dglob of identifier * ml_ast
+