Dear team, We are opening this issue to obtain feedback on our initial proposal. The tool idea started as a discussion with
@feliperodri at ETAPS and it would be great to see it moving forward.
Tool Name
Goto-transcoder (ESBMC)
Description
The goto-transcoder is an initiative to add a compatibility layer between GOTO programs generated from CPROVER tools (e.g., CBMC and goto-instrument). Specifically, we are interested in adding support to ESBMC. The main difference between ESBMC and CBMC is that ESBMC focuses on SMT and has support for other proof strategies such as incremental bounded model checking. For this proposal, we are concentrating in the conversion between CBMC goto -> ESBMC goto so that we can improve code reuse. Therefore, we can make use of Kani to generate a GOTO program for CBMC which can then be converted into an equivalent ESBMC input.
flowchart LR
R[Rust source] --> K[Kani]
K -->|CBMC GBF| G[goto-transcoder]
G -->|ESBMC GBF| ESBMC
CBMC focuses on SAT-based encodings of unrolled programs, while ESBMC targets SMT-based encodings. The SMT support of ESBMC includes sending the full formula or using incremental-SMT.
CBMC's concurrency support is an entirely symbolic encoding of a concurrent program in one SAT formula, while ESBMC explores each interleaving individually using context-bounded verification.
ESBMC implements incremental-BMC and k-induction strategies.
Tool Information
[X] Does the tool perform Rust verification?
Yes, by converting the Kani goto program into an ESBMC-compatible one.
[X] Does the tool deal with unsafe Rust code?
Yes. Similarly to CBMC, ESBMC's main use is for the verification of C programs, it has support for checking classical memory properties such as buffer overflow, dangling pointers, and memory leaks.
[X] Does the tool run independently in CI?
ESBMC is already integrated into the CI of industrial partners and it is also available in the GitHub actions marketplace for easy use. The transcoder is an independent Rust project that generates a binary that can be easily integrated into CI. We will need to work on the integration of Kani, goto-transcoder and ESBMC into a single CI job.
[X] Is the tool open source?
Both ESBMC and goto-transcoder have public development under permissive licenses, i.e., MIT and Apache 2.0.
[X] Is the tool under development?
ESBMC is a mature tool with active development, goto-transcoder is still in the initial phase (we have a list of what is currently supported).
[X] Will you or your team be able to provide support for the tool?
Yes. ESBMC is a joint project of the Federal University of Amazonas (Brazil), the University of Manchester (UK), the University of Southampton (UK), and the University of Stellenbosch (South Africa).
The ESBMC development was supported by various research funding agencies, including CNPq (Brazil), CAPES (Brazil), FAPEAM (Brazil), EPSRC (UK), Royal Society (UK), British Council (UK), European Commission (Horizon 2020), and companies including ARM, Intel, Motorola Mobility, Nokia Institute of Technology and Samsung. The ESBMC development is currently funded by ARM, EPSRC grants EP/T026995/1 and EP/V000497/1, Ethereum Foundation, EU H2020 ELEGANT 957286, Intel, Motorola Mobility (through Agreement N° 4/2021), Soteria project awarded by the UK Research and Innovation for the Digital Security by Design (DSbD) Programme, and XC5 Hong Kong Limited.
Licenses
goto-transcoder: MIT
ESBMC: Apache License 2.0.
Steps to Use the Tool
For these steps let's verify a Rust hello world, we will assume that you have Kani available in your system. We will start with
the Hello World from the Kani tutorial:
Invoke Kani and ask it to keep the intermediate files: kani test.rs --keep-temps. This generates a .out file that is in the GBF
format. We can double-check this by invoking it with CBMC: cbmc *test4main.out --show-goto-functions:
[...]
main /* _RNvCshu9GRFEWjwO_4test4main */
// 12 file test.rs line 3 column 10 function main
DECL _RNvCshu9GRFEWjwO_4test4main::1::var_0 : struct tag-Unit
// 13 file /Users/runner/work/kani/kani/library/std/src/lib.rs line 44 column 9 function main
DECL _RNvCshu9GRFEWjwO_4test4main::1::var_1 : struct tag-Unit
// 14 file /Users/runner/work/kani/kani/library/std/src/lib.rs line 44 column 22 function main
DECL _RNvCshu9GRFEWjwO_4test4main::1::var_2 : c_bool[8]
[...]
Invoke ESBMC with the program: esbmc --binary file-esbmc.goto.
Solving with solver Z3 v4.13.0
Runtime decision procedure: 0.001s
Building error trace
[Counterexample]
State 1 file test.rs line 4 column 5 function main thread 0
----------------------------------------------------
Violated property:
file test.rs line 4 column 5 function main
KANI_CHECK_ID_test.cbacc14fa409fc10::test_0
0
VERIFICATION FAILED
Artifacts
ESBMC originally came from the idea of using SMT to improve the performance of BMC tools. The original work was awarded at ASE'23 with
the Most Influential Paper award.
Awards
35 awards from international competitions on software verification (SV-COMP) and testing (Test-Comp) 2012-2024 at TACAS/FASE (Strength: Bug Finding and Code Coverage).
Felipe R. Monteiro, Mikhail R. Gadelha, Lucas C. Cordeiro. Model checking C++ programs. In Softw. Test. Verification Reliab. 32(1), 2022. DOI, Video, Open access.
Dear team, We are opening this issue to obtain feedback on our initial proposal. The tool idea started as a discussion with @feliperodri at ETAPS and it would be great to see it moving forward.
Tool Name
Goto-transcoder (ESBMC)
Description
The goto-transcoder is an initiative to add a compatibility layer between GOTO programs generated from CPROVER tools (e.g., CBMC and goto-instrument). Specifically, we are interested in adding support to ESBMC. The main difference between ESBMC and CBMC is that ESBMC focuses on SMT and has support for other proof strategies such as incremental bounded model checking. For this proposal, we are concentrating in the conversion between CBMC goto -> ESBMC goto so that we can improve code reuse. Therefore, we can make use of Kani to generate a GOTO program for CBMC which can then be converted into an equivalent ESBMC input.
ESBMC has a few differences to CBMC, including:
Tool Information
Yes, by converting the Kani goto program into an ESBMC-compatible one.
Yes. Similarly to CBMC, ESBMC's main use is for the verification of C programs, it has support for checking classical memory properties such as buffer overflow, dangling pointers, and memory leaks.
ESBMC is already integrated into the CI of industrial partners and it is also available in the GitHub actions marketplace for easy use. The transcoder is an independent Rust project that generates a binary that can be easily integrated into CI. We will need to work on the integration of Kani, goto-transcoder and ESBMC into a single CI job.
Both ESBMC and goto-transcoder have public development under permissive licenses, i.e., MIT and Apache 2.0.
ESBMC is a mature tool with active development, goto-transcoder is still in the initial phase (we have a list of what is currently supported).
Yes. ESBMC is a joint project of the Federal University of Amazonas (Brazil), the University of Manchester (UK), the University of Southampton (UK), and the University of Stellenbosch (South Africa).
The ESBMC development was supported by various research funding agencies, including CNPq (Brazil), CAPES (Brazil), FAPEAM (Brazil), EPSRC (UK), Royal Society (UK), British Council (UK), European Commission (Horizon 2020), and companies including ARM, Intel, Motorola Mobility, Nokia Institute of Technology and Samsung. The ESBMC development is currently funded by ARM, EPSRC grants EP/T026995/1 and EP/V000497/1, Ethereum Foundation, EU H2020 ELEGANT 957286, Intel, Motorola Mobility (through Agreement N° 4/2021), Soteria project awarded by the UK Research and Innovation for the Digital Security by Design (DSbD) Programme, and XC5 Hong Kong Limited.
Licenses
Steps to Use the Tool
For these steps let's verify a Rust hello world, we will assume that you have Kani available in your system. We will start with the Hello World from the Kani tutorial:
Use Kani to generate the CBMC GOTO program
Invoke Kani and ask it to keep the intermediate files:
kani test.rs --keep-temps
. This generates a.out
file that is in the GBF format. We can double-check this by invoking it with CBMC:cbmc *test4main.out --show-goto-functions
:Convert the CBMC goto into ESBMC goto
git clone https://github.com/rafaelsamenezes/goto-transcoder.git
cargo run -- --mode 0 --input <kani-out>.out --output file-esbmc.goto
This will generate the
file-esbmc.goto
, which can be used as the ESBMC input.Invoke ESBMC
esbmc --binary file-esbmc.goto
.Artifacts
ESBMC originally came from the idea of using SMT to improve the performance of BMC tools. The original work was awarded at ASE'23 with the Most Influential Paper award.
Awards
Links
Documentation
Selected publications
Users
CI & Versioning
ESBMC and goto-transcoder are both developed at GitHub using Git.
For CI pipelines the tools can either be invoked directly or integrated into a custom action. ESBMC already has an action.