coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jianzhou Zhao <jianzhou AT seas.upenn.edu>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Extracting integers from Coq to OCaml
- Date: Mon, 16 Aug 2010 11:17:52 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=F0UP2je9S90ihhp+DGv9sN1upU9ZEOvFmpwXiFURzN7rsVVbbOx8vLnBZmngKvNBVV OBuOL7YJsYulJV6uR2/wU5PoKpXyAkGxSEb8vz1Spi3kOdUWm9to8GSkCo4Jls2K4w1E apljUdeu54s4GlIwXdUaMMcmX0wVfXUcHvg3Y=
Hi List,
I wanted to represent arbitrary-precision integers in Coq, and
eventually also expect to extract them into OCaml's integers. My
questions are:
1) Can we use Z (http://coq.inria.fr/stdlib/Coq.ZArith.BinInt.html) to
present such arbitrary-precision integers in Coq? Z is defined
inductively. I think Coq extraction
(http://coq.inria.fr/refman/Reference-Manual027.html#toc139) only
allows to realize inductive Coq types into inductive OCaml types. But
OCaml's int or big_bit is only primitive.
2) Coq.ZArith.Int defined an int, with comments :
(http://coq.inria.fr/stdlib/Coq.ZArith.Int.html)
"We define a signature for an integer datatype based on Z. The goal is
to allow a switch after extraction to ocaml's big_int or even int when
finiteness isn't a problem (typically : when mesuring the height of an
AVL tree). "
Do we have examples about how to use this int and extract it into OCaml?
Thanks in advance
--
Jianzhou
- [Coq-Club] Extracting integers from Coq to OCaml, Jianzhou Zhao
- Re: [Coq-Club] Extracting integers from Coq to OCaml,
Evgeny Makarov
- Re: [Coq-Club] Extracting integers from Coq to OCaml,
Jianzhou Zhao
- Re: [Coq-Club] Extracting integers from Coq to OCaml, Jianzhou Zhao
- Re: [Coq-Club] Extracting integers from Coq to OCaml,
Pierre Letouzey
- Re: [Coq-Club] Extracting integers from Coq to OCaml, Jianzhou Zhao
- Re: [Coq-Club] Extracting integers from Coq to OCaml,
Jianzhou Zhao
- Re: [Coq-Club] Extracting integers from Coq to OCaml,
Evgeny Makarov
Archive powered by MhonArc 2.6.16.