-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sertop] Add sername program for serialization of terms #207
Conversation
…module on initialization
… de Bruijn indexed constrs
…ot just constant types)
Note that compilation of the File "serapi/serapi_protocol.mli", line 293, characters 23-32:
Error (warning 3): deprecated: Sexplib.Conv.sexp_list
[since 2019-03] use [@sexp.list] instead ... unless one compiles with |
I'm aware of this problem, and some other problems that newer toolchains do introduce. Not sure what we should do here. I'd like to avoid an upper constraint if necessary. |
It's not directly related, but both fit into an overall plan on learning and suggesting code conventions for Coq. The work on lemma name suggestions (primary use of sername) doesn't use tactic or proof state serialization at all. However, the extended abstract recently accepted at the Coq workshop looks at suggesting spacing, which does use tactic/proof data for learning, but does not use sername at all. |
I see, thanks for the explanation, adjust #174 plans as you think then; I will prepare a release shortly [actually for both v8.11 and v8.10] |
Ah, so you think you can forward port to v8.11 easily? That would be great. Let me know if I can help in some way, e.g., writing release notes. |
I can give the forward porting a go myself; I don't expect any particular trouble. I will do 8.10 first, then 8.11 |
sdoc | ||
*) | ||
let doc,sid = Stm.new_doc ndoc in | ||
let sent = Printf.sprintf "Require %s." l in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you not adding this to require_libs
above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mention a problem in the commit, but with no further details given it is hard to say more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I like the way this PR is going; the batch tools are meant to process files, we cannot affort to add a binary for every possible query system.
For this use case, there is little improvement of this solution vs using the standard query protocol from sertop.
I understand the current query system is not featureful enough as to support this use case, see #155 and #196 for example, but I'm working on fixing those right now.
This is thus a tool that in principle, I'm not willing to support in future releases [I'm very open to be convinced to do so tho] .
Instead, improved printing options will be added so sertop
can do what sername
does using the query language.
For the 0.7 branch; I'm OK merging this PR, as long as the tool documentation states that this tool won't be available in future releases and sertop
must be used.
What do you think @palmskog ? Am I off in my point of view?
1.4 is required for fmt 1.0
Pushed a fix for Travis and warning on newer sexplib, let's see how it goes. |
This should fix Travis on newer sexplib, and still keep compat with 0.12. We also fix Coq's Travis install [wrong version picked for this branch]
This is fine by me. Do you want the statement about future releases in As for the |
Thanks @palmskog , I can add a small note myself.
That's fine then. Something it would be very useful to have tho is a small test case that covers all the things this tool does; this way we can be sure |
Thinking a bit about it, I propose we mark |
See ejgallego/coq-lsp#331 and #196 , they request precisely that. |
@palmskog this is ready IMO, can you have a look to the two latest commits? Maybe I do push a few tweaks to ease forward-porting, but no code changes themselves. |
@ejgallego the last two commits look good to me. |
CHANGES: * [sertop ] Add `sername` program for batch serialization elaborated terms Note that this utility will be deprecated in future versions, to be subsumed by `Query`. (rocq-archive/coq-serapi#207, @palmskog, with help from @ejgallego) * [serlib ] Expose `QueryUtil.info_of_id` and `gen_pp_obj` in `serapi_protocol.mli` to enable using them in `sername` to retrieve serialized body-type pairs (@palmskog) * [general] Improved compat with Jane Street v0.13 toolchain * [serlib ] Only use `ssreflect` from Coq in tests (@ejgallego)
CHANGES: * [sertop ] Add `sername` program for batch serialization elaborated terms Note that this utility will be deprecated in future versions, to be subsumed by `Query`. (rocq-archive/coq-serapi#207, @palmskog, with help from @ejgallego) * [serlib ] Expose `QueryUtil.info_of_id` and `gen_pp_obj` in `serapi_protocol.mli` to enable using them in `sername` to retrieve serialized body-type pairs (@palmskog) * [general] Improved compat with Jane Street v0.13 toolchain * [serlib ] Only use `ssreflect` from Coq in tests (@ejgallego)
This targets the
v8.10
branch and is intended for inclusion in the 0.7.1 release of SerAPI for Coq 8.10. The sername program is used by our Roosterize toolchain for suggesting Coq lemma names. The sername program will be forward-ported to thev8.11
branch after the Roosterize toolchain is released.cc: @pengyunie