package soteria
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=22e0fc3f97555ac35b96fae10817a887
sha512=10457c9d1302e3f3018dca652cdf81f0cdfd461a79eca1a8a8b754e964a47f7f35c10a8c07aff8f5193ee7e794440635d788d91925ce75fb8280b60b4f0d6663
Description
Soteria is a toolkit for writing symbolic bug-finding tools
Added to opam-repository:
README
Soteria is an OCaml library for writing efficient symbolic interpreters directly in OCaml.
The core library provides a set of batteries-included abstractions for writing one's own symbolic interpreter. Currently, two symbolic interpreters have been written: Soteria Rust and Soteria C. Our current main focus is Soteria Rust.
Table of Contents
Getting Started
Install Soteria Rust
For users wishing to user Soteria Rust for writing and running symbolic tests, we strongly recommend installing Soteria Rust through cargo on macOS with M-series chips and Linux x86_64:
cargo install soteria
cargo soteria setup # Installs pre-built binaries
# setup can be run again at every nightly release of Soteria Rust (every day).For other architectures, please follow the manual installation instructions in the contributing guide.
Install the Soteria Library
Soteria can be used as an OCaml library to build your own symbolic execution engines. The API documentation provides a complete reference, and includes a tutorial on how to get started building your own analysis tools.
Pin it with opam:
opam pin add soteria git+https://github.com/soteria-tools/soteria.git#<commit>Soteria Rust
Soteria Rust is a symbolic execution engine for Rust. It is in heavy development.
Usage when installed from cargo
Using cargo soteria, the tests inside of the current crate can be run using:
cargo soteriaIf the crate contains Kani harnesses, the Kani compatibility layer can be enabled with:
cargo soteria --kaniThe full help for cargo soteria can be obtained with:
cargo soteria --helpUsage when installed from source
Installing from source install a soteria-rust binary, which can be used as follows.
Run on a standalone Rust file, symbolically executing the main function, or any function with the #[soteria::test] attribute:
soteria-rust exec <file.rs>Run all tests in a crate:
soteria-rust exec <crate-dir>Run in Kani mode to execute any function with the #[kani::proof] attribute, with compatibility with the Kani api (e.g. kani::any):
soteria-rust exec --kani <file.rs>Use --help with any command for a full list of options:
soteria-rust exec --helpLimitations
Soteria Rust supports a large subset of Rust, but some features are not yet supported:
- Concurrency
- Inline assembly
- SIMD intrinsics
Soteria C
Soteria C is an automatic bug finder for C programs. It is in heavy development.
Installatation
Binaries for Linux x86 and MacOS Arm are available in the latest release on this GitHub repository. For other architectures, please follow the manual installation instructions.
Usage
Run on a standalone C file:
soteria-c exec-main <file.c>Run with a compilation database:
soteria-c capture-db compile_commands.jsonUse --help for a full list of options:
soteria-c --helpContributing
We welcome contributions from the community! Soteria is open source and will remain open source.
Soteria is developed and maintained by Soteria Tools Ltd. The core team makes final decisions on project direction, but we value community input and aim to be transparent about our decision-making process.
- Chat with us: Join our Zulip chat to ask questions or discuss ideas
- Submit a PR: Read our contribution guidelines first
- License agreement: Review the Contributor License Agreement before contributing
AI Policy
We welcome contributions assisted by AI, as long as they follow our AI Policy.
Acknowledgements
Soteria relies on many excellent open source libraries and tools, and we are deeply grateful to their authors and contributors.
We would especially like to thank:
- The Charon team for providing the MIR frontend that powers Soteria Rust
- The Cerberus team for providing the C frontend that powers Soteria C
License
Soteria and derived tools in this repository are under the Apache-2.0 license, see LICENSE. Copyright 2024–2025 Imperial College London and 2025–2026 Soteria Tools Ltd.; see the NOTICE file for how copyright is split between the two.
Third-party components linked into or shipped with the Soteria binaries are listed in THIRD_PARTY_NOTICES, with their license texts in third-party-licenses/.
The Soteria logo is a trademark of the Soteria Tools Ltd.
Dependencies (23)
- ppx_deriving_yojson
-
unionFind
>= "20220109" -
yojson
< "3.0" -
hc
>= "0.5" -
ppx_mixins
>= "0.2.0" -
ppxlib
>= "0.38.0" -
dune
>= "3.23" -
zarith
>= "1.13" -
grace
= "0.3.0" -
progress
>= "0.5.0" - htmlit
- printbox-text
- printbox
- fmt
- ppx_deriving_hash
- ppx_deriving
-
ppx_subliner
>= "0.2.1" -
ppx_blob
>= "0.9.0" -
ppx_expect
>= "v0.17.0" -
cmdliner
>= "2.0.0" - iter
-
tsort
>= "2.1.0" -
ocaml
>= "5.5.0"
Dev Dependencies (8)
-
ocaml-lsp-server
with-dev-setup -
ocamlformat
(with-test | with-dev-setup) & = "0.29.0" -
menhir
with-test & >= "20230415" -
qcheck-alcotest
with-test -
qcheck-core
with-test -
alcotest
with-test -
mdx
with-test -
odoc
with-doc
Used by
None
Conflicts
None