The reference documentation extracted by coqdoc.
We describe how the plugin works under the hood.
State.t sig → (A + string) × State.t sig.
Output : list Dynamic.t }.
For non-termination we use the counter NbSteps to bound the fixpoints. We print debugging informations in Output. The memory is divided into two parts: InputMem and TmpMem, both specified by a sig which is the list of types which can appear in the heap. We prefer to make this list explicit because the strong typing policy of Coq makes it hard to have a type-agnostic heap, and because most decision procedures only allocate values using a finite number of types.
Decision procedures written in the monad are extracted to OCaml to be executed efficiently. Since OCaml already provides all these effects, we tune the extraction mechanism to extract the monad to the identity monad and the basic operations to their OCaml equivalents.
: is_computable x p = true → A.
Import : SExpr.t → T}.
The OCaml run does the complex computations and save the result to the reference r which is read in x. The result is serialized in the prophecy and the Coq run can directly read r without re-doing the computations.
An important use case is the backtracking, often used in decision procedures algorithms. The exploration of the space can be done in OCaml saving the successful path in the input memory. Since Coq does not have to do the exploration anymore, the gain can be exponential in time. An other use case is the implementation of provers as unsafe external OCaml plugins generating a Coq certificate. You can simply use our plugin for the extraction and serialization instead of writing OCaml code and all the infrastructure to communicate from OCaml to Coq.
You can look at our technical report for more details.