-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add multi-language documentation #334
base: develop
Are you sure you want to change the base?
Add multi-language documentation #334
Conversation
Update the README to reflect that SMACK now supports many languages Add a short tutorial on how to compile a new language into SMACK.
README.md
Outdated
(and experimentally, C++ and Objective-C) via the [Clang](http://clang.llvm.org) compiler. | ||
We are in the process of adding support for FORTRAN | ||
(via [Flang](https://github.com/flang-compiler/flang)), Rust, and Swift. | ||
In general, any AoT comipler that targets LLVM can be used with SMACK |
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.
Expand AoT into what it actually means.
docs/language.md
Outdated
|
||
### Prerequisites | ||
|
||
- An AoT compiler that targets the same version of LLVM as SMACK. |
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.
Say what AoT means.
docs/language.md
Outdated
@@ -0,0 +1,50 @@ | |||
|
|||
# How to use SMACK with your own programming language. |
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.
Maybe change to: Using SMACK with your Favorite Programming Language
docs/language.md
Outdated
|
||
# How to use SMACK with your own programming language. | ||
|
||
SMACK can be used to verify any langauge that comiples to LLVM IR. Because there are so many languages, we are unable to provide out-of-the-box for the majority of LLVM languages. However, you can still verify code by manually compiling to LLVM and running SMACK on the LLVM IR. |
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.
In theory, SMACK can be used... In practice, how well SMACK would work on your favorite language is not always clear. Our experience though has been positive, and currently we have rudimentary SMACK extensions for ...
You also have a typo here - comiples
docs/language.md
Outdated
|
||
For compatibility, SMACK version == LLVM version - 2. So, for LLVM 3.9, you want SMACK 1.9, etc. | ||
|
||
- A working C interop |
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.
It is unclear what interop
means.
docs/language.md
Outdated
|
||
Step 2: Compile to LLVM IR | ||
|
||
Compile your code to either a .ll or a .bc file (the two formats are equivalent). Most compilers provide a command-line option like `-emit-llvm` or `-output-ll`. You should also add debug symbols, which is `-g` on most compilers. Disabling optimizations may also be useful, with `-O0` or similar. |
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.
Please keep all lines of text under 80 columns wide.
Update the README to reflect that SMACK now supports
many languages
Add a short tutorial on how to compile a new language
into SMACK.