ergo icon indicating copy to clipboard operation
ergo copied to clipboard

Add support for "ErgoDoc"

Open dselman opened this issue 6 years ago • 9 comments

Provide a command line tool that can extract documentation metadata from structured comments for Ergo functions.

dselman avatar May 01 '19 20:05 dselman

Please assign this to me. I will give my full on it. I only need little guidance.

codetronaut avatar Oct 02 '19 22:10 codetronaut

Great! @jeromesimeon you could probably point out a path forward.

jolanglinais avatar Oct 02 '19 22:10 jolanglinais

Is this a better idea if I use "exiftool" for the metadata extraction for this issue. Please bear with me i am little new to this.

codetronaut avatar Oct 02 '19 22:10 codetronaut

@codetronaut Great that you're interested to help!

I'm not really familiar with exiftool. My understanding of the suggested change was to support something along the lines of JSDoc for JavaScript: https://jsdoc.app

Maybe @dselman can elaborate a bit on what he was imagining?

jeromesimeon avatar Oct 03 '19 12:10 jeromesimeon

A few initial pointers:

  • Extracting metadata from Ergo functions (e.g., names, type signatures) will require getting familiar with the Ergo AST which is in Coq (https://github.com/accordproject/ergo/blob/master/mechanization/Ergo/Lang/Ergo.v)
  • If we add annotations to the language in the @jsdoc style, this will mean making changes to that AST and to the Ergo parser which is on OCaml (https://github.com/accordproject/ergo/blob/master/extraction/src/ErgoParser.mly)
  • This issue could be addressed jointly with https://github.com/accordproject/cicero/issues/140

As a first step, I would make sure you can build Ergo from source following the DEVELOPERS instructions (those haven't been looked at in a while, so please open an issue if you have any difficulty!).

jeromesimeon avatar Oct 03 '19 13:10 jeromesimeon

I will try my best.

codetronaut avatar Oct 03 '19 16:10 codetronaut

@jeromesimeon I am little confused. I build the Ergo and after that, I am stuck. Basically, please tell me what should I do next. Because for the command-line tool i have to integrate the "https://github.com/accordproject/ergo/blob/master/mechanization/Ergo/Lang/Ergo.v" and check for the annotations add in @jsdoc right.

codetronaut avatar Oct 06 '19 05:10 codetronaut

Hi @codetronaut I think it would be good to have a description for what the feature should be from a user point of view first? Depending on that we can then decide on the best implementation plan.

Note that this is not the easier first issue to try and tackle (which is why it was labelled as challenging). There are probably a few lower-hanging fruits in this repositories or in the other Accord Project repositories.

jeromesimeon avatar Oct 06 '19 20:10 jeromesimeon

@codetronaut what is the status of this? I'm opening it back up in the meantime.

jolanglinais avatar Oct 17 '19 14:10 jolanglinais