Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Potential Code Bloat with Extraction

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Potential Code Bloat with Extraction


Chronological Thread 
  • From: Helmut Brandl <helmut.brandl AT gmx.net>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Potential Code Bloat with Extraction
  • Date: Sun, 12 Nov 2017 16:40:01 -0600
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=helmut.brandl AT gmx.net; spf=Pass smtp.mailfrom=helmut.brandl AT gmx.net; spf=None smtp.helo=postmaster AT mout.gmx.net
  • Ironport-phdr: 9a23:MSli+hz+3qma59fXCy+O+j09IxM/srCxBDY+r6Qd0u8eIJqq85mqBkHD//Il1AaPBtqLra8cw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2NBXupSi56idXERHiPyJ0IP70E8jclZeZzee3rr3eZwBVmHKXe7p0IBH++QXcsswLnc1oMK83xh/hrX5YPeJb2TU7dhqogx/g65Lor9ZY+CNKtqd5+g==

I have observed a potential code bloat when extracting from Coq to OCaml.

I want to use modules extensively to structure my code. E.g. I have written a module ‘Binary_tree.v’ which defines the basic data types and access function for binary trees.

The basic module ‘Binary_tree.v’ is used by another module called ‘Avl_tree.v’. The ‘Avl_tree’ uses the basic services of ‘Binary_tree’ by including it.

In the extracted code of ‘Avl_tree’ I see the module ‘Binary_tree’ physically copied into the module ‘Avl_tree’ i.e. all data type definitions and functions are copied.

Since it is often the case that one module extends the functionality of another more basic module I am worried that in the end I will get OCaml code which is very bloated.

Can anybody comment on this observation? Are there experiences with code extraction using modules extensively to structure the code? Thanks for any hint.

The code can be found at http://github.com/hbr/coqlib.

Regards
Helmut


  • [Coq-Club] Potential Code Bloat with Extraction, Helmut Brandl, 11/12/2017

Archive powered by MHonArc 2.6.18.

Top of Page