Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Suggestions for Proof General?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Suggestions for Proof General?


Chronological Thread 
  • From: James Wilcox <wilcoxjay AT gmail.com>
  • To: coq-club AT inria.fr
  • Cc: jrw12 AT cs.washington.edu
  • Subject: Re: [Coq-Club] Suggestions for Proof General?
  • Date: Thu, 16 Jun 2016 09:30:29 -0700
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=wilcoxjay AT gmail.com; spf=Pass smtp.mailfrom=wilcoxjay AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f175.google.com
  • Ironport-phdr: 9a23:h3i4wRXJsiBdgGGdvaeG8PcSVObV8LGtZVwlr6E/grcLSJyIuqrYZheCt8tkgFKBZ4jH8fUM07OQ6PCxHzxQqsff+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8yVM1UD1WT1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdfFXEtN30/zMztrxjKCwWVtVUGVWBDsBNNDhON0xD+VZDh+n/lt+523zmYNNzeQrU9WDDk5KBuHky7wBwbPiI0pTmEwvd7i7hW9Uqs

Hi Gabriel,

I'm glad you think it looks nice. I can assure you the way it's produced is not nice at all :)

You can find the python script on github.

The input format is a Coq file with special comments. Content of the blog itself appears in comments starting with "(**". Coq code that should appear in the blog should be surrounded by "(*begin code*)" ... "(*end code*)". All other code and comments are left out of the blog post. This is enough to render the basic code and prose without the fancy hover over contexts. Note: these special comments must appear at the beginning of a line.

If you want the contexts as well, then you have to do quite a bit of manual work. At each line of proof, you copy-paste Coq's display of the goal into a special "(*context ... *)" comment. I usually do this by setting up an emacs macro to repeatedly step Proof General forward one, change buffer to the goal display, copy the goal, change buffer back to the file, paste the goal, and then step again, etc. I can try to share the macro if you are interested, but it's probably best if you just record it yourself using C-x (

There is a python script that understands all of these special comments and generates a (horribly ugly) markdown file that can be processed by pandoc to generate the final html. It also does very stupid syntax highlighting, using a technique that is somewhat analogous to parsing HTML with regular expressions :)

Here is the Coq file that generates the dep-destruct blog post (also the CSS). 

It's pretty embarrassing to show this dirty hack in public. Surely there is a better way! 

James

On Wed, Jun 15, 2016 at 7:45 PM, Clément Pit--Claudel <clement.pit AT gmail.com> wrote:
On 2016-06-15 21:41, Gabriel Scherer wrote:
> Tramp support is super-useful: one can connect to a beefy server from our laptop (or phone!) and it magically does the right thing.
>
> (Re. PG-movie, proviola, etc.: I would love to use these tools if
> they were easy to use and there was good documentation on how to. If
> anyone knows for example how to get a rendering as nice as
> http://homes.cs.washington.edu/~jrw12/dep-destruct.html for a
> Coq-using blog post, I'm all ears.)

Well, why not ask the author? (cc'ed) :) James is also a company-coq contributor, btw ^^

Clément.

> On Wed, Jun 15, 2016 at 5:26 PM, Clément Pit--Claudel <clement.pit AT gmail.com <mailto:clement.pit AT gmail.com>> wrote:
>
>     I think it would also be useful to know which less-common features of Proof General people use, so we can test them and make sure they work well for the final release (examples include Proof Tree, PG-movie (recording and replaying scripts), PG-PBRPM (proof by rules), ML4PG, Tramp support, PG-unicode-tokens, and possibly others that I forget about).
>
>     Cheers,
>     Clément.
>
>     On 2016-06-15 15:59, Paul A. Steckler wrote:
>     > I'm in the process of reworking Proof General to support async
>     > processing in coqtop.
>     >
>     > As part of that exercise, I'll be doing quite a bit of code
>     > reorganization. In particular, I'll be discarding support for the Coq
>     > REPL (as well as other REPLs). This may be a good time to consider
>     > adding other features, or at least accommodating their future
>     > implementation.
>     >
>     > One such feature might be the ability to run multiple coqtop's.
>     >
>     > Anything else that others can suggest?
>     >
>     > -- Paul
>     >
>
>





Archive powered by MHonArc 2.6.18.

Top of Page