coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: andré hirschowitz <ah AT unice.fr>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] API documentation for Coq libraries
- Date: Wed, 27 Sep 2017 23:41:30 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mphmphmph AT gmail.com; spf=Pass smtp.mailfrom=mphmphmph AT gmail.com; spf=None smtp.helo=postmaster AT mail-it0-f43.google.com
- Ironport-phdr: 9a23:Rf2dRBxDXXqHzYLXCy+O+j09IxM/srCxBDY+r6Qd0uITIJqq85mqBkHD//Il1AaPBtqLra8cw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2TxTor3az9T8fHAnkfUowf7ytW92as8Pi/Oers7bXfg8A0DG6ePZ5KAi8hQTXrMgfx4V4fPUf0BzM93JOd/7X8mNpP0mYnxHj59uitMpq8wxNvfMq+ohOS/OpLOwDUbVEAWF+YCgO78rxuEyGFFPX6w==
Hello,
I do not know if there is
an agreement on this question, but I have a very modest idea, and here
it is. My point of view aims to help the reader who wants to understand
what is going on in the development, rather than to help the user who
wants to execute the (certified) code.
It is the
responsability of the developer to extract from the code the (minimal?)
part which he considers sufficient for the reader who wants to check
that what is stated formally reflects correctly what is claimed
informally. This (minimal?) part is in general not unique. Typically, a
definition may be justified by its body or by a (sufficiently?)
characteristic statement.2017-09-27 19:11 GMT+02:00 Benjamin C. Pierce <bcpierce AT cis.upenn.edu>:
We have a largeish Coq development (https://github.com/QuickChick/QuickChick) that is gaining users and deserves to be better documented.
In the OCaml world, we’d do this by making a small number of .mli files containing just type declarations and signatures of all the externally useful functions. Function bodies, auxiliary definitions, etc. are all hidden in .ml files that users of the library never look at.
On the other hand, in Coq, this seems not to be the default style, even for the standard library and thoughtfully packaged libraries like ExtLib; instead, library writers just sprinkle coqdoc comments near the main definitions in their .v files and nothing more — no separate interface files collecting just the user-facing bits.
Is there agreement in the community about how a library should best be structured so that its API is easy for users to grok, search, etc.? Are there examples illustrating best practices?
Thanks!
- Benjamin (and Leo and Zoe)
- [Coq-Club] API documentation for Coq libraries, Benjamin C. Pierce, 09/27/2017
- Re: [Coq-Club] API documentation for Coq libraries, andré hirschowitz, 09/27/2017
Archive powered by MHonArc 2.6.18.