I have a module structure inside this module I declare a variable use for some function inside module A
.
Module A.
Variable a : nat.
End A.
Then I use extraction mechanism.
Extraction Language Ocaml.
Set Extraction Optimize.
Set Extraction AccessOpaque.
Extraction A.
or just
Extraction A.
It generated for me the code with a warning: "The following axiom must be realized in the extracted code: A.a"
type nat =
| O
| S of nat
module A =
struct
(** val a : nat **)
let a =
failwith "AXIOM TO BE REALIZED"
end
Here I received a
with the failwith "AXIOM TO BE REALIZED"
I couldn't run my function success because of this failwith
Because I have to use the variable a
inside the module.
I want to know is there a way to define a module that it won't generate failwith
after the extraction? or something to do with the extraction that will not generate this failwith
function?