
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://seahorn.github.io
| Windows | Ubuntu | OS X | Chat with us | Stories |
|---|---|---|---|---|
| TBD | https://travis-ci.org/seahorn/seahorn | TBD | https://gitter.im/seahorn/seahorn?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge |
http://seahorn.github.io/ is an automated analysis framework for LLVM-based languages. LLVM version is 3.8.
http://seahorn.github.io/ is distributed under a modified BSD license. See license.txt for details.
cd seahorn ; mkdir build ; cd buildcmake -DCMAKE_INSTALL_PREFIX=run ../ cmake --build . to build dependencies (Z3 and LLVM)cmake --build . --target extra && cmake .. to download extra packagescmake --build . --target crab && cmake .. to configure crab-llvm (if extra target was run)cmake --build . --target install to build seahorn and install everything in run directoryNote that the install target is required!
The install target installs SeaHorn all of it dependencies under build/run.
The main executable is build/run/bin/sea.
SeaHorn provides several components that are installed via the extra
target. These components can be used by other projects outside of
SeaHorn.
https://github.com/seahorn/llvm-dsa: git clone https://github.com/seahorn/llvm-dsa.git
llvm-dsa is the legacy DSA implementation
from https://llvm.org/svn/llvm-project/poolalloc/. DSA
is a heap analysis used by SeaHorn to disambiguate the heap.
https://github.com/seahorn/sea-dsa: git clone https://github.com/seahorn/sea-dsa.git
sea-dsa is a new DSA-based heap analysis. Unlike llvm-dsa,
sea-dsa is context-sensitive and therefore, a finer-grained
partition of the heap can be generated in presence of function
calls.
https://github.com/seahorn/crab-llvm: git clone https://github.com/seahorn/crab-llvm.git
crab-llvm provides inductive invariants using abstract
interpretation techniques to the rest of SeaHorn's backends.
https://github.com/seahorn/llvm-seahorn: git clone https://github.com/seahorn/llvm-seahorn.git
llvm-seahorn provides tailored-to-verification versions of
InstCombine and IndVarSimplify LLVM passes as well as a LLVM
pass to convert undefined values into nondeterministic calls, among
other things.
SeaHorn doesn't come with its own version of Clang and expects to find it
either in the build directory (run/bin) or in PATH. Make sure that the
version of Clang matches the version of LLVM that comes with SeaHorn
(currently 3.8). The easiest way to provide the right version of Clang is
to download it from http://releases.llvm.org/download.html,
unpact it somewhere and create a symbolic link to clang and clang++
in run/bin.
cd seahorn/build/run/bin ln -s place_where_you_unpacked_clang/bin/clang clang ln -s place_where_you_unpacked_clang/bin/clang++ clang++
Running tests require several python packages:
shellpip install lit OutputCheck easy_install networkx apt-get install libgraphviz-dev easy_install pygraphviz
Tests can be run using:
shell$ EXPORT SEAHORN=<install_dir>/bin/sea $ cmake --build . --target test-all
SeaHorn provides a python script called sea to interact with
users. Given a C program annotated with assertions, users just need to
type: sea pf file.c
This will output unsat if all assertions hold or otherwise sat if
any of the assertions is violated.
The option pf tells SeaHorn to translate file.c into LLVM
bitecode, generate a set of verification conditions (VCs), and
finally, solve them. The main back-end solver
is https://bitbucket.org/spacer/.
The command pf provides, among others, the following options:
--show-invars: display computed invariants if answer was unsat.
--cex=FILE : stores a counter-example in FILE if answer was sat.
-g : compiles with debug information for more trackable
counterexamples.
--step=large: large-step encoding. Each transition relation
corresponds to a loop-free fragments.
--step=small: small-step encoding. Each transition relation
corresponds to a basic block.
--track=reg : model (integer) registers only.
--track=ptr : model registers and pointers (but not memory content)
--track=mem: model both scalars, pointers, and memory contents
--inline : inlines the program before verification
--crab : inject invariants in spacer generated by the Crab
abstract-interpretation-based
tool. Read
https://github.com/seahorn/crab-llvm/tree/master#crab-options for
details about all Crab options (prefix --crab). You can see which
invariants are inferred by Crab by typing option --log=crab.
--bmc: use BMC engine.
sea pf is a pipeline that runs multiple commands. Individual parts
of the pipeline can be run separately as well:
sea fe file.c -o file.bc: SeaHorn frontend translates a C program
into optimized LLVM bitcode including mixed-semantics
transformation.
sea horn file.bc -o file.smt2: SeaHorn generates the verification
conditions from file.bc and outputs them into SMT-LIB v2 format. Users
can choose between different encoding styles with several levels of
precision by adding:
--step={small,large,fsmall,flarge} where small is small step
encoding, large is block-large encoding, fsmall is small
step encoding producing flat Horn clauses (i.e., it generates a
transition system with only one predicate), and flarge:
block-large encoding producing flat Horn clauses.
--track={reg,ptr,mem} where reg only models integer
scalars, ptr models reg and pointer addresses, and mem
models ptr and memory contents.
sea smt file.c -o file.smt2: Generates CHC in SMT-LIB2 format. Is
an alias for sea fe followed by sea horn. The command sea pf
is an alias for sea smt --prove.
sea clp file.c -o file.clp: Generates CHC in CLP format.
sea lfe file.c -o file.ll : runs the legacy front-end
To see all the commands, type sea --help. To see options for each
individual command CMD (e.g, horn), type sea CMD --help (e.g.,
sea horn --help).
This is an example of a C program annotated with a safety property:
c/* verification command: sea pf --horn-stats test.c */ #include "seahorn/seahorn.h" extern int nd(); int main(void){ int k=1; int i=1; int j=0; int n = nd(); while(i<n) { j=0; while(j<i) { k += (i-j); j++; } i++; } sassert(k>=n); }
SeaHorn follows SV-COMP convention of
encoding error locations by a call to the designated error function
__VERIFIER_error(). SeaHorn returns unsat when
__VERIFIER_error() is unreachable, and the program is ***ed
safe. SeaHorn returns sat when __VERIFIER_error() is reachable and
the program is unsafe. sassert() method is defined in
seahorn/seahorn.h.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务