-
Notifications
You must be signed in to change notification settings - Fork 14
Transition to ndjson export format #10
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
base: master
Are you sure you want to change the base?
Conversation
format_ndjson.md
Outdated
| Expr.lit (Literal.strVal) | ||
| ``` | ||
| { | ||
| "lit": { |
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.
This does not seem to be what your program currently actually prints?
| .lit (.natVal i) => return .mkObj [("natVal", s!"{i}")]
| .lit (.strVal s) => return .mkObj [("strVal", s)]
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.
Thanks, I've pushed a correction for the format specification.
format_ndjson.md
Outdated
| "levelParams": Array<integer>, | ||
| "type": integer, | ||
| "value": integer, | ||
| "hints": Array<"opaque" | "abbrev" | integer> |
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.
This is also incorrectly documented afaict?
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.
Ditto.
Corrects two errors in the format specification for string literals and reducibility hints.
Correct a typo of `deBruijnIndex`
|
The open comments should be resolved, and I believe I addressed the remaining points in #10 |
+ Namespaces backreferences from a generic "i" to "in", "il", and "ie" for name, level, and expr. + Abbreviates some json attribute names
|
Thanks! (Seeing how slow lean4export is I’m inclined to rewrite the exporter to use simple string interpolation into hardcoded JSON lines, at least for everything that only contains numbers, but that can wait until other dust has settled.) |
When ready, will close #3 (also see that issue for relevant discussion).
The format is described in
format_ndjsonand the README has been updated accordingly, along with the recommended command for invocation; the old README recommended invokinglake exe, which will not correctly set up the lake env in the most common use case, something like exporting mathlib.