aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2013-12-20 18:02:19 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-01-04 17:07:15 +0100
commitecda2159a3c3176fb871bbc27b7c6b56d9f0830c (patch)
tree8fa3a8ae6f9bb5cf8378cd9c8752fd0cffa94885 /kernel
parent2541662136c24a209dbbd71366aa77788120434f (diff)
.vi files: .vo files without proofs
File format: The .vo file format changed: - after the magic number there are 3 segments. A segment is made of 3 components: bynary int, an ocaml value, a digest. The binary int is the position of the digest, so that one can skip the value without unmarshalling it - the first segment is the library, as before - the second segment is the STM task list - the third segment is the opaque table, as before A .vo file has a complete opaque table (all proof terms are there). A .vi file follows the same format of a .vo file, but some entries in the opaque table are missing. A proof task is stocked instead. Utilities: coqc: option -quick generates a .vi insted of a .vo coq_makefile: target quick to generate all .vi coqdep: generate deps for .vi files too votour: can browse .vi files too, the first question is which segment should be read coqchk: rejects .vi files
Diffstat (limited to 'kernel')
-rw-r--r--kernel/safe_typing.ml6
-rw-r--r--kernel/safe_typing.mli6
2 files changed, 8 insertions, 4 deletions
diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml
index 66bc90789..3e9b646c1 100644
--- a/kernel/safe_typing.ml
+++ b/kernel/safe_typing.ml
@@ -657,9 +657,11 @@ let start_library dir senv =
modvariant = LIBRARY;
imports = senv.imports }
-let export senv dir =
+let export compilation_mode senv dir =
let senv =
- try join_safe_environment senv
+ try
+ if compilation_mode = Flags.BuildVi then senv (* FIXME: cleanup future*)
+ else join_safe_environment senv
with e -> Errors.errorlabstrm "future" (Errors.print e)
in
let () = check_current_library dir senv in
diff --git a/kernel/safe_typing.mli b/kernel/safe_typing.mli
index dcdb866bf..e2d1e37e9 100644
--- a/kernel/safe_typing.mli
+++ b/kernel/safe_typing.mli
@@ -115,8 +115,10 @@ type native_library = Nativecode.global list
val start_library : DirPath.t -> module_path safe_transformer
-val export : safe_environment -> DirPath.t ->
- module_path * compiled_library * native_library
+val export :
+ Flags.compilation_mode ->
+ safe_environment -> DirPath.t ->
+ module_path * compiled_library * native_library
val import : compiled_library -> Digest.t ->
(module_path * Nativecode.symbol array) safe_transformer