Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Finite Maps

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Finite Maps


chronological Thread 
  • From: Ashish Darbari <ashish_darbariuk AT yahoo.co.uk>
  • To: coq-club AT pauillac.inria.fr
  • Cc: ashish AT darbari.org
  • Subject: [Coq-Club] Finite Maps
  • Date: Sun, 11 Jan 2009 18:58:44 +0000 (GMT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=kowmQsnSrXU58A1afBIuzgEBM8g2VKO0dMu2wKhocqZzKVbvAQrvb6V4TCkzciT/oHAIgI0s4taws5YyC1kaSkIbCj9hKsfgd93iGq+n99lDz2fY6hBfHDgCuuS9RVG3B1+idkhEt4dExOMP+05OvgqAv+fNeYuMyvYruPY5je8=;
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>


In my application I need to use an IntMap essentially a table of key-bindings 

where keys are always (positive) integers, currently  in ocaml I use the following 


module myMap = Map.Make

(struct type t = int

let compare = compare end);;


This exposes me to the full API for the IntMaps and I can 

use add, delete, find etc for it.  I wanted to be able to get 

a similar if not exactly the same functionality from extraction in Coq. I'd

a look at the FMapAVL library and from the documentation it

appears that executing it in extracted world is reasonably fast.

(well as best as one gets from a Balanced Binary Tree) 

I wanted to test the extracted ocaml code, so I did the following

to extract it in Coq 8.1pl4 :


Coq > Require Import FMapAVL.

Coq > Recursive Extraction Library FMapAVL.


and I get the following blurb:


The file logic.ml has been created by extraction.

The file logic.mli has been created by extraction.

The file datatypes.ml has been created by extraction.

.

.

.

The file fMapAVL.ml has been created by extraction.

The file fMapAVL.mli has been created by extraction.


However having compiled these using ocaml compilers and loading (#use)

the fMapAVL.ml I get an error message 


The file ocaml and fMapList.cmi make inconsistent assumptions over interface List


How to fix this? 


Is there an example somewhere I can see on how FMapAVL has been used

in practice for extraction? Can someone point me to any efficiency results for

the extracted FMaps in ocaml?



Thank you

Ashish









Archive powered by MhonArc 2.6.16.

Top of Page