Skip to content
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

Enrich unit tests with symbolic proofs #846

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7aafa1f
feat: kani verification
Aug 7, 2023
b84ee5b
feat: CI
Aug 7, 2023
0dda501
feat: symbolic Repr
Aug 8, 2023
2b06c58
feat: prove invertible Repr
Aug 8, 2023
589fafd
feat: prove_header_len_multiple_of_4
Aug 8, 2023
df1123a
feat: prove_header_len_multiple_of_4
Aug 8, 2023
98cd41b
feat: CI parallel
Aug 8, 2023
4a2a809
feat: CI parallel
Aug 9, 2023
74d7b23
feat: tcpoptions
Aug 10, 2023
723cc1c
feat: custom ci runner
Aug 11, 2023
7bdf46e
feat: move symbolic implementations to source
Aug 11, 2023
48fe5a1
feat: bump Kani ci version
Aug 11, 2023
47f146a
feat: symbolic sockets
Aug 12, 2023
9cfdbf9
feat: prove_listen_sack_option
Aug 31, 2023
42acf7d
feat: prove_listen_syn_win_scale_buffers
Sep 10, 2023
f56c04e
Merge branch 'main' into feat/verification
Sep 10, 2023
879d17d
feat: merge
Sep 10, 2023
bdb82c5
chore: fix new interface mocking
Sep 10, 2023
bbcc25e
feat: Listen state proofs
Sep 10, 2023
793922b
chore: reduce parallelism
Sep 11, 2023
a805a35
feat: prove_syn_received_ack
Sep 14, 2023
19873d1
feat: prove_syn_received_fin
Sep 15, 2023
97bae57
feat: all SYN-RECEIVED state proofs
Sep 21, 2023
f22240b
feat: ci
Sep 22, 2023
0fc4b31
feat: ci
Sep 23, 2023
8f34e67
feat: ci
Sep 23, 2023
10ce229
Merge branch 'main' into feat/verification
Sep 23, 2023
2a67e58
chore: CI disable prove_repr_intertible
Sep 25, 2023
b698f5a
chore: CI disable prove_repr_intertible
Sep 25, 2023
73cfc69
chore: CI try on ubuntu
Sep 25, 2023
4fdce8f
chore: CI try on github macos
Sep 27, 2023
0d1c097
chore: CI try on kani 33
Sep 27, 2023
85deebd
chore: cleanup
Sep 28, 2023
c668114
fix: import Ipv4Address
Sep 28, 2023
b17329e
chore: tweak prove_repr_intertible scope for CI
Sep 29, 2023
12ed17d
chore: tweak prove_repr_intertible scope for CI
Sep 29, 2023
8eb956b
chore: format et al
Sep 29, 2023
1cb548a
chore: restrict TcpOption sack_ranges
Sep 29, 2023
a440600
chore: Bring TcpRepr specifics into proofs
Sep 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Verification
on:
pull_request:
merge_group:

jobs:
verify-wire:
runs-on: [macos-latest]
steps:
- name: 'Checkout your code.'
uses: actions/checkout@v3

- name: 'Run Kani on TCP wire.'
uses: model-checking/kani-github-action@v0.33
with:
args: '--output-format=terse --verbose --harness wire::tcp::verification'
verify-socket:
runs-on: [macos-latest]
steps:
- name: 'Checkout your code.'
uses: actions/checkout@v3

- name: 'Run Kani on TCP socket.'
uses: model-checking/kani-github-action@v0.33
with:
args: '--output-format=terse --verbose --harness socket::tcp::verification'
2 changes: 1 addition & 1 deletion src/iface/interface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ impl InterfaceInner {
None
}

#[cfg(test)]
#[cfg(any(test, kani))]
#[allow(unused)] // unused depending on which sockets are enabled
pub(crate) fn set_now(&mut self, now: Instant) {
self.now = now
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ mod macros;
mod parsers;
mod rand;

#[cfg(test)]
#[cfg(any(test, kani))]
mod config {
#![allow(unused)]
pub const ASSEMBLER_MAX_SEGMENT_COUNT: usize = 4;
Expand All @@ -149,7 +149,7 @@ mod config {
pub const IPV6_HBH_MAX_OPTIONS: usize = 2;
}

#[cfg(not(test))]
#[cfg(not(any(test, kani)))]
mod config {
#![allow(unused)]
include!(concat!(env!("OUT_DIR"), "/config.rs"));
Expand All @@ -170,7 +170,7 @@ pub mod time;
pub mod wire;

#[cfg(all(
test,
any(test, kani),
any(
feature = "medium-ethernet",
feature = "medium-ip",
Expand Down