17.1 Generating ML code

The next two commands are meant to be used for rapid preview of extraction. They both display extracted term(s) inside Coq.

Extraction term.  

Extracts one term in the Coq toplevel.

Recursive Extraction qualid1 ... qualidn.  

Recursive extraction of all the globals qualid1 ... qualidn and all their dependencies in the Coq toplevel.
All the following commands produce real ML files. User can choose to produce one monolithic file or one file per Coq module.

Extraction "file" qualid1 ... qualidn.  

Recursive extraction of all the globals qualid1 ... qualidn and all their dependencies in one monolithic file file. Global and local identifiers are renamed according to the choosen ML language to fullfill its syntactic conventions, keeping original names as much as possible.

Extraction Module ident.  

Extraction of the Coq module ident to an ML module ident.ml. In case of name clash, identifiers are here renamed using prefixes coq_ or Coq_ to ensure a session-independent renaming.

Recursive Extraction Module ident.  

Extraction of the Coq module ident and all other modules ident depends on.
The list of globals qualidi does not need to be exhaustive: it is automatically completed into a complete and minimal environment. Extraction will fail if it encounters an informative axiom not realized (see section 17.2.3). A warning will be issued if it encounters an logical axiom, to remind user that inconsistant logical axioms may lead to incorrect or non-terminating extracted terms.