Skip to content

Commit

Permalink
remove/update KANI_TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
EIRNf committed Nov 7, 2024
1 parent 536f0e3 commit c141ad8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
4 changes: 0 additions & 4 deletions src/lib/twizzler-abi/src/object.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
//! Low-level object APIs, mostly around IDs and basic things like protection definitions and metadata.
/*
KANI_TODO
*/

use core::fmt::{LowerHex, UpperHex};
/// The maximum size of an object, including null page and meta page(s).
pub const MAX_SIZE: usize = 1024 * 1024 * 1024;
Expand Down
20 changes: 0 additions & 20 deletions src/lib/twizzler-abi/src/runtime/simple_mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ use core::{
sync::atomic::{AtomicU64, Ordering},
};

/*
KANI_TODO
*/

#[cfg(kani)]
#[kani::proof]
pub fn it_locks(){
// let var:bool = kani::any();
// assert!(var | !var);

let mutex = MutexImp::new();
unsafe {
mutex.lock();
}
kani::assert(mutex.is_locked(), "mutex must be locked");
unsafe {
mutex.unlock();
}
kani::assert(!mutex.is_locked(), "mutex must not be locked");
}


use crate::syscall::{
Expand Down
12 changes: 9 additions & 3 deletions src/lib/twizzler-abi/src/thread.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! Functions for manipulating threads.
/*
KANI_TODO
*/


use core::sync::atomic::{AtomicU64, Ordering};
#[cfg(not(feature = "kernel"))]
Expand Down Expand Up @@ -79,6 +77,13 @@ impl ExecutionState {
}



/*
KANI_TODO:
- Explore more thread behavior/states
- Finish syscall stub
*/

#[cfg(kani)]
mod thread_verif{
use super::ExecutionState;
Expand Down Expand Up @@ -109,6 +114,7 @@ mod thread_verif{

}

#[cfg(kani)]
#[kani::proof]
#[kani::stub(crate::arch::syscall::raw_syscall, stub_raw_syscall)]
pub fn fixme_thread_set_state(){
Expand Down

0 comments on commit c141ad8

Please sign in to comment.