comp.lang.ada
 help / color / mirror / Atom feed
From: Paul Rubin <no.email@nospam.invalid>
Subject: Re: Why not Coq2Ada program extraction?
Date: Wed, 02 May 2018 10:12:02 -0700
Date: 2018-05-02T10:12:02-07:00	[thread overview]
Message-ID: <87h8nq3rtp.fsf@nightsong.com> (raw)
In-Reply-To: pccq3q$gdj$1@dont-email.me

"G.B." <bauhaus@notmyhomepage.invalid> writes:
> I imagine that proofs of algorithms involving arbitrarily large
> integers might be more tricky than expected as their representations
> incur complexity WRT execution time and memory requirements. Unless,
> of course, one is free to ignore space and time, which, AIUI is
> not typical of (idealized) Ada programs.

Right, this is why I'm taken slightly aback by the concept of extracting
Ada or Rust from Coq.  I wonder how stylized the Coq proofs have to be
for the extraction to work usefully.  Usually in extracted Coq proofs,
space and time are indeed ignored: the proof is only that the right
answer is eventually reached, space permitting.

Fwiw, Coq proofs extracted to (say) Haskell is crazy ugly, with unsafe
casts all over the place.  Coq can prove that the casts are safe, but
Haskell's type system isn't precise enough to understand the proofs, so
Coq has to tell it "trust me".  Extracted code in Rust or Ada might have
similar issues.

> One of the things that this dilettante likes about Haskell is
> that it doen't ignore distinct types of number as essential.

I'm not sure what you mean, but Haskell has separate Int (machine sized)
and Integer (arbitrary size) integers.  That they are separate types is
annoying and I think Haskell might have been better off handling the
issue some different way.

  reply	other threads:[~2018-05-02 17:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01  3:38 Why not Coq2Ada program extraction? Dan'l Miller
2018-05-01  3:59 ` Paul Rubin
2018-05-01  6:59   ` Chris M Moore
2018-05-01  7:41     ` Paul Rubin
2018-05-01 11:44   ` Jere
2018-05-02 16:47   ` G.B.
2018-05-02 17:12     ` Paul Rubin [this message]
2018-05-01  8:21 ` Jeffrey R. Carter
2018-05-01 17:30   ` Dan'l Miller
2018-05-01  9:12 ` Paul Rubin
2018-05-07  2:30 ` Dan'l Miller
2018-05-07  2:37   ` Paul Rubin
2018-05-07  3:50     ` Dan'l Miller
2018-05-07  4:01     ` Dan'l Miller
2018-05-07  4:20       ` Paul Rubin
2018-05-07 16:33         ` Dan'l Miller
2018-05-07 13:27   ` Dan'l Miller
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox