Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Fwd: coqdoc autoinsert query results

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Fwd: coqdoc autoinsert query results


Chronological Thread 
  • From: Jim Fehrle <jim.fehrle AT gmail.com>
  • To: coq-club AT inria.fr, abhishek.anand.iitg AT gmail.com
  • Subject: [Coq-Club] Fwd: coqdoc autoinsert query results
  • Date: Wed, 4 Mar 2020 13:18:44 -0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jim.fehrle AT gmail.com; spf=Pass smtp.mailfrom=jim.fehrle AT gmail.com; spf=None smtp.helo=postmaster AT mail-io1-f54.google.com
  • Ironport-phdr: 9a23:ZwvUWRW5JGGCk/Jz1e9+ez9SYFTV8LGtZVwlr6E/grcLSJyIuqrYZRyCt8tkgFKBZ4jH8fUM07OQ6P+wHzFYqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aSV3DMl9+If2wEYrPhey20fqz8tvdeUEAjTC9YKhyIRbwpAPYsMVQgIp+JY4+zxLIpj1DfOEF63lvIAexnhO0yMqw5ppuu3BSuvdn+cNAS6H3V6s9RL1cSj8hNjZmt4XQqRDfQF7XtTMnWWIMn08QWlSX3FTBRp709xDCmK9lwiDDZJ/5SLk1XXKp6KI5EEa12hdCDCYw9STssuI1jK9fp0j89Rl2woqRYYbMcfQjIuXSetQVQWcHVcFUBXQYU9GMKrAXBu9EBt526oz0pl8Atxy7XFD+C+bmyzsOjXjzj/Q3

There is such a feature for processing the examples that appear in the documentation, part of our Sphinx customization.  For example:
.. coqtop:: reset none
   Parameters (A : Prop) (B: nat -> Prop) (C: Prop).
.. coqtop:: out
   Goal A /\ (exists x:nat, B x /\ C) -> True.
.. coqtop:: all
   intros (a & x & b & c).
"none", "in", "out" control whether to display the input and output.

Perhaps some of this could be adapted for your use case.  No idea how much work that would require.

Jim

On Wed, Mar 4, 2020 at 12:56 PM Abhishek Anand <abhishek.anand.iitg AT gmail.com> wrote:
Is there a way in coqdoc or a similar tool to automatically include query results in the generated document, especially HTML document?
For example, if I have the following source file,
(**
[[ 
Check Nat.add_0_l.
]]
*)

the HTML output should be:

Check Nat.add_0_l.
Nat.add_0_l
     : ∀ n : nat, 0 + n = n

If coqdoc can't do this, some sort of a .v file preprocessor could use coqtop to convert 
(**
[[ 
Check Nat.add_0_l.
]]
*)
 into 
(**
[[ 
Check Nat.add_0_l.
]]
[[
Nat.add_0_l
     : ∀ n : nat, 0 + n = n
]]
*)

before invoking coqdoc?



Archive powered by MHonArc 2.6.18.

Top of Page