Skip to content

Commit

Permalink
fixup! Add some SMT properties for CSetBoundsRoundDown
Browse files Browse the repository at this point in the history
  • Loading branch information
nwf committed Nov 20, 2024
1 parent 0251e38 commit d778b84
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions properties/props_setboundsrounddown.sail
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ $property
function prop_setboundsrounddown_exact(reqBase : CapAddrBits, reqLen : CapAddrBits) -> bool = {
let cRD = setCapBoundsRoundDown(root_cap_mem, reqBase, reqLen);
let (exact, cSB) = setCapBounds(root_cap_mem, reqBase, reqLen);
exact --> (cRD == cSB)
let threshold : CapAddrBits = zero_extend(ones(cap_mantissa_width)) << 14;
(exact & (reqLen <=_u threshold)) --> (cRD == cSB)
}

/*!
Expand Down Expand Up @@ -50,5 +51,7 @@ function prop_setboundsrounddown_precise(reqBase1 : CapAddrBits, reqLen1 : CapAd
let validBase = b2 == reqBase1;
let validTop = t2 <=_u reqTop1;
let betterTop = t1 <_u t2;
(saneTop1) --> not(validBase & validTop & betterTop)
let threshold : CapAddrBits = zero_extend(ones(cap_mantissa_width)) << 14;
(saneTop1 & (reqLen1 <=_u threshold))
--> not(validBase & validTop & betterTop)
}

0 comments on commit d778b84

Please sign in to comment.