Skip to content
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

Concrete syntax for the LLVM language extension #920

Closed
langston-barrett opened this issue Nov 9, 2021 · 3 comments
Closed

Concrete syntax for the LLVM language extension #920

langston-barrett opened this issue Nov 9, 2021 · 3 comments

Comments

@langston-barrett
Copy link
Contributor

The only representation of Crucible programs using the LLVM language extension is as an in-memory data structure. Here are a few reasons we might want to have concrete, textual syntax for these programs:

  • Tests of LLVM-related functionality are all currently integration tests involving llvm-pretty{,-bc-parser}. Not only is this not ideal from an isolation and modularity perspective, it is also slow.
  • Furthermore, all of our tests have to decide between including binary blobs (.bc files) or depending on tools being present in the environment (clang or llvm-as), and executing those tools during the test suite (which is also unnecessarily slow).
  • Textual test cases benefit from a sizable number of generic development tools (think fuzzers, delta debuggers, and tools like llvm-lit). With a some additional investment, very powerful tools like grammar-based fuzzers and test-case reducers become possible (e.g., llvm-reduce).
  • Higher-level tools like SAW could cache Crucible-LLVM programs to disk for repeated/interactive use.

A reasonable outcome here (i.e., the ability to serialize reasonably-sized Crucible-LLVM programs that result from translation from LLVM modules) might depend on #74.

@bboston7
Copy link
Contributor

bboston7 commented Nov 9, 2021

What a coincidence! I'm currently working on adding support for arbitrary language extensions to Crucible Syntax. After that work is done you'll only need to write a small parser hook into Crucible Syntax for the LLVM extension.

@bboston7
Copy link
Contributor

What a coincidence! I'm currently working on adding support for arbitrary language extensions to Crucible Syntax. After that work is done you'll only need to write a small parser hook into Crucible Syntax for the LLVM extension.

I just opened pull request #923 adding support for arbitrary language extensions.

@langston-barrett
Copy link
Contributor Author

A bare-bones version of this is done, additional work can be tracked in other tickets (e.g., #1117, #1118).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants