@@ -36,11 +36,11 @@ static PAGE_ALLOCATOR: Once<RwLock<PageAllocator>> = Once::new();
3636#[ rr:: invariant( "node_size = node.(max_node_size)" ) ]
3737#[ rr:: invariant( "base_addr = node.(base_address)" ) ]
3838pub struct PageAllocator {
39- #[ rr:: field( "base_addr" ) ]
39+ #[ rr:: field( "#( base_addr) " ) ]
4040 base_address : usize ,
41- #[ rr:: field( "node_size" ) ]
41+ #[ rr:: field( "#( node_size) " ) ]
4242 page_size : PageSize ,
43- #[ rr:: field( "node" ) ]
43+ #[ rr:: field( "#( node) " ) ]
4444 root : PageStorageTreeNode ,
4545}
4646
@@ -312,6 +312,7 @@ impl PageAllocator {
312312 #[ rr:: params( "p" ) ]
313313 #[ rr:: requires( #iris "once_initialized π \" PAGE_ALLOCATOR\" (Some ())" ) ]
314314 #[ rr:: requires( #iris "□ ∀ x, {O::Pre} π p op x" ) ]
315+ #[ rr:: requires( "Hno_unwind" : "closure_may_unwind {O::UnwindCondition} → False" ) ]
315316 #[ rr:: exists( "x" ) ]
316317 #[ rr:: ensures( #iris "{O::Post} π p op x ret" ) ]
317318 fn try_write < F , O > ( op : O ) -> Result < F , Error >
@@ -337,15 +338,15 @@ impl PageAllocator {
337338struct PageStorageTreeNode {
338339 // Page token owned by this node. `None` means that this page token has already been allocated or that it has been divided into smaller
339340 // pages token that were stored in this node's children.
340- #[ rr:: field( "<#>@{{ option }} maybe_page_token" ) ]
341+ #[ rr:: field( "#( <#>@{{ option }} maybe_page_token) " ) ]
341342 page_token : Option < Page < UnAllocated > > ,
342343 // Specifies what size of the page token can be allocated by exploring the tree starting at this node.
343344 // Invariant: if page token exist, then the its size is the max allocable size. Otherwise, the max allocable page size is the max
344345 // allocable page size of children
345- #[ rr:: field( "<#>@{{ option }} max_sz" ) ]
346+ #[ rr:: field( "#( <#>@{{ option }} max_sz) " ) ]
346347 max_allocable_page_size : Option < PageSize > ,
347348 // Invariant: Children store page tokens smaller than the page token stored in the parent node
348- #[ rr:: field( "<#> children" ) ]
349+ #[ rr:: field( "#( <#> children) " ) ]
349350 children : Vec < Self > ,
350351}
351352
0 commit comments