-
Notifications
You must be signed in to change notification settings - Fork 1
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
LLVM parser in Vellvm? #10
Comments
The AST is generated from the ott definitions in src/Vellvm/syntax_base.ott. If you have ott in your path, you can generate the Coq file with There is, unfortunately, no parser in the repository. Previously, Vellvm used a (heavily) modified version of the LLVM OCaml bindings to generate an AST from the in-memory C++ representation of the IR. Due to changes in LLVM's interals, these will only compile against LLVM 3.0, which itself doesn't compile with relatively new versions of GCC or Clang! I actually started writing an updated AST/parser without dependencies on the rest of the project based on the AST of the llvm-general library but haven't gotten very far. I can update this issue if that ever becomes usable. |
Thanks for the info. So I guess the ott definitions allow Vellvm to recognize LLVM IR code written in the syntax defined e.g. in the POPL12 paper, so there isn't a practical need for a parser to experiment with non-trivial code examples. |
I don't think Ott really helps us with parsing, though I haven't kept up with new versions. Like I mentioned above, the OCaml bindings that were used to generate the AST from LLVM bitcode don't work with newer versions of LLVM. If we would like to, for example, test the Vellvm interpreter using recent versions of LLVM we really do need a replacement. Writing a standalone parser and new AST seems better from a maintenance and code reuse perspective than trying to update Vellvm's AST and the OCaml bindings. |
This is also a question, not an issue (is there a better place to post questions?): I assume there is a Vellvm parser somewhere in the repo, to allow transformation of source code to some sort of AST representation. If so, could someone identify its location for me? Thanks, -chris
The text was updated successfully, but these errors were encountered: