Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Proving bounds on data structures in Coq?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Proving bounds on data structures in Coq?


Chronological Thread 
  • From: Xuanrui Qi <xqi01 AT cs.tufts.edu>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Proving bounds on data structures in Coq?
  • Date: Thu, 18 Oct 2018 10:50:02 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=xqi01 AT cs.tufts.edu; spf=None smtp.mailfrom=xqi01 AT cs.tufts.edu; spf=None smtp.helo=postmaster AT vm-delivery1.eecs.tufts.edu
  • Ironport-phdr: 9a23:rxJjmBwfizA5LM7XCy+O+j09IxM/srCxBDY+r6Qd1O4XIJqq85mqBkHD//Il1AaPAd2Eraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HRbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHrlSkJNyA3/m/Vhcx+kK1Urh2uqRNkzo7IY4yYLuZycr/HcN4YQ2dKQ8ZfVzZGAoO5d4YADvcBMvxer4nnulsOrAa1CxKtBOjyzTJJiWb23awm3+g8CgzJwBcgE8gSsHTJotX1KLwSXfqrw6bV0DXOdvVb0irz5ojPdxAuu/CMXbRofMrN1EkvEhnJgUiOpoHjIjib1fwNvnCG4+duSe6jkW8qpg5rrjSxyMogkIfEi4ANxlza6Sl0xJw5KNyiREN0b9OoCoZcuiCYOoZwX8gsWXtnuDwgxb0DoZO7fDYFyJAgxxPHdfyHdpGE7Q/9W+aVIDd4mmxqeKi/hhqv60Sv1PPzWdWv0FpQsipFj9fMtmwW1xDJ9MeIV+Z98l+g2TaJyQ/T9vlJLV06mKbHMZIsw7E9moANvUnNBCP7lkf7gLeTdko+++io7+rnYq/hpp+ZL4J1hRj+MqUylsCiGuk3LhMOU3KH+eSh2r3j4Vb5TK9UgfIrj6nVqIraKtgDpq6lHw9V1Z4u5Aq4Dze/ydgXgX0HLE9edx+clIjoO1TOIOjiAvulglSsli1rx/HcMbH7DJXNNCuLrLC0drFkrkVY1QAbzNZF5psSBKtSDuj0XxrBqdXeFAI4ezW1i7L3EdQlj6sVQiSTH6GFK+XfvULetbFnGPWFeIJA4GW1EPMi/fO71SZoy29YRrGg2N4sUF79G/1nJ0uDZn+13oUKCiEWowQiV6rnhEDQCWcPNUb3ZLo143QAMKzjFZ3KH9z/i6fHwDq1AoYQa2xbWAjVTCXYMr6cUvJJUxq8Z89sljteBOq/Tsot2BWvqgLg2uMhI+ff4WsEqJz/z5546/CBzRw=

Hello Siddharth,

In general, to prove things about complexity, you would define a cost
semantics, i.e. a recursive running function that defines time costs.
Then you'd prove your desired complexity properties against that.

Here's a recent paper about formalizing and proving amortized
complexity in a theorem prover (but Isabelle, not Coq): "Amortized
Complexity Verified", by Tobias Nipkow, in ITP '15 (
http://isabelle.in.tum.de/~nipkow/pubs/itp15.pdf).

Also, for something in Coq, there's Arthur Charguéraud and François
Pottier's 2017 JAR paper, "Verifying the Correctness and Amortized
Complexity of a Union-Find Implementation in Separation Logic with Time
Credits". Those might be helpful.

I'm not an expert in cost semantics, so this is just to get you
started. I suppose the list knows much more about the specifics of
functional cost analysis.

-Ray

--
Xuanrui "Ray" Qi

Department of Computer Science
Tufts University
Halligan Hall, 161 College Ave
Medford, MA 02144, USA

Email:
xqi01 AT cs.tufts.edu

On Thu, 2018-10-18 at 19:49 +0530, Siddharth Bhat wrote:
> Hello,
>
> I was interested in implementing data structures from Okasaki's
> "purely functional data structures", but I'm not sure how to actually
> prove theorems about the amortized analysis -- in terms of the
> banker's method / physicist's method, while still being able to
> extract such a data structure out to Haskell code.
>
> So, TL;DR:
> How do I define data structures in Coq such that it is:
> 1. Extractable to code
> 2. Allows reasoning to prove bounds using Okasaki's methods?
>
> Thanks,
> ~Siddharth
> --
> Sending this from my phone, please excuse any typos!




Archive powered by MHonArc 2.6.18.

Top of Page