coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Trevor Elliott <awesomelyawesome AT gmail.com>
- To: Wouter Swierstra <w.swierstra AT cs.ru.nl>, Pierre <pierre.letouzey AT inria.fr>, coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Haskell Extraction
- Date: Tue, 12 Apr 2011 10:09:28 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TlRx1K7JPLQZBDARfXKV2LCEOVeoIdqTaTd48Joww9TE8Ga2wG0UCVfXBY3SzcXOWE JP6Dy4yywzPMrXuW3Xto/vLGq6WuAoWyT9glp8dlzQJo1Udce3dOj05X4x6c4CwjteQc 1clKNjQO/DxBxgizS3oQYVY7W9q7K9yLlzcT4=
Hi Wouter,
> Using the following commands produces pretty much what I'd expect to see:
>
>> Extraction Language Haskell.
>> Extract Inductive Datatypes.nat => "Integer" ["0" "succ"]
>> "(\fO fS n -> if n==0 then fO () else fS (n-1))".
>> Extract Inlined Constant plus => "(+)".
>> Extract Inlined Constant mult => "(*)".
>> Extraction fact_body.
>> Extraction fact.
This extracts the right program, but I think that's because it's not
trying to do anything with plus and mult.
> But using "Recursive Extraction fact" seems to generate too much code:
> it also produces code for mult and plus, which is exactly what the
> Extract Inlined Constant commands should avoid... Is that the same
> behaviour you're seeing?
Yes, Recursive Extraction is what is generating additional code for
plus and mult. I've tried using Extract Inlined Constant for plus and
mult, but that just performs a global renaming of plus and mult to (+)
and (*) respectively. Additionally, if I just use Extract Constant
for plus and mult, the rhs is never used in my recursively extracted
program; the symbol mult is still used in fact_body.
--trevor
- [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Wouter Swierstra
- Re: [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction, Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Wouter Swierstra
Archive powered by MhonArc 2.6.16.