aboutsummaryrefslogtreecommitdiff
path: root/contrib/correctness/ProgramsExtraction.v
diff options
context:
space:
mode:
authorfilliatr2001-03-29 14:27:11 +0000
committerfilliatr2001-03-29 14:27:11 +0000
commit02d7ec75988e2cd13ebf233b364e400309c605a3 (patch)
tree8fefa05c13d2b01bde733253a9fb890576753215 /contrib/correctness/ProgramsExtraction.v
parent6c543b9a2d6b14e083649a74511de192e65ca51a (diff)
mise en place de Correctness (ne compile pas encore)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1501 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/correctness/ProgramsExtraction.v')
-rw-r--r--contrib/correctness/ProgramsExtraction.v30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/correctness/ProgramsExtraction.v b/contrib/correctness/ProgramsExtraction.v
new file mode 100644
index 0000000000..23394dc18c
--- /dev/null
+++ b/contrib/correctness/ProgramsExtraction.v
@@ -0,0 +1,30 @@
+(***********************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
+(* \VV/ *************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(***********************************************************************)
+
+(* Certification of Imperative Programs / Jean-Christophe Filliātre *)
+
+(* $Id$ *)
+
+Require Export Extraction.
+
+Extract Inductive unit => unit [ "()" ].
+Extract Inductive bool => bool [ true false ].
+Extract Inductive sumbool => bool [ true false ].
+
+Require Export Programs.
+
+Declare ML Module "prog_extract".
+
+Grammar vernac vernac :=
+ imperative_ocaml [ "Write" "Caml" "File" stringarg($file)
+ "[" ne_identarg_list($idl) "]" "." ]
+ -> [ (IMPERATIVEEXTRACTION $file (VERNACARGLIST ($LIST $idl))) ]
+
+| initialize [ "Initialize" identarg($id) "with" comarg($c) "." ]
+ -> [ (INITIALIZE $id $c) ]
+.