Alive2
v0.1.2Prove or refute LLVM IR transformations with Alive2, and read or create alive2.llvm.org links
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_link Create an Alive2 short link
Publish the check as a public alive2.llvm.org/ce/z/... link for an issue or PR, then read it back to confirm it holds the submitted IR. Permanent and public: get the user's agreement first. A src/tgt link holds one function.
| Parameter | Type | Description |
|---|---|---|
function | string | function to link when src and tgt share several; a pair link holds one |
opt | string | opt binary that runs passes, e.g. your patched build; 'upstream' runs them in trunk LLVM on alive2.llvm.org. Default: the server's -opt flag, else upstream |
passes | string | instead of tgt: a -passes pipeline that turns src into tgt, e.g. gvn or instcombine |
src | string | source module as LLVM IR text (or use src_file) |
src_file | string | path to the source .ll file; relative paths resolve against the server's working directory |
tgt | string | transformed module as LLVM IR text; functions are matched to src by name |
tgt_file | string | path to the transformed .ll file |
get_link Read an Alive2 short link
Fetch the IR and options stored in an alive2.llvm.org/ce/z/... link, such as one from an LLVM issue, and optionally re-run its check.
| Parameter | Type | Description |
|---|---|---|
link * | string | an alive2.llvm.org/ce/z/... URL or its id |
max_detail_lines | integer | cap on each counterexample's lines (default 40) |
verify | boolean | also run the link's check again on the website |
verify Verify an LLVM IR transformation with Alive2
Prove or refute that tgt refines src, per function. Give tgt directly, or passes to produce it with opt (your patched build) or opt=upstream (trunk LLVM). Returns each function's verdict and, when not correct, the counterexample.
| Parameter | Type | Description |
|---|---|---|
backend | string | auto (default: local alive-tv if configured, else web), local, or web |
include_tgt | boolean | also return the tgt module that opt produced |
max_detail_lines | integer | cap on each counterexample's lines (default 40) |
opt | string | opt binary that runs passes, e.g. your patched build; 'upstream' runs them in trunk LLVM on alive2.llvm.org. Default: the server's -opt flag, else upstream |
passes | string | instead of tgt: a -passes pipeline that turns src into tgt, e.g. gvn or instcombine |
smt_timeout | integer | seconds per SMT query (default 10) |
src | string | source module as LLVM IR text (or use src_file) |
src_file | string | path to the source .ll file; relative paths resolve against the server's working directory |
tgt | string | transformed module as LLVM IR text; functions are matched to src by name |
tgt_file | string | path to the transformed .ll file |