diff --git a/kmir/src/kmir/kdist/mir-semantics/symbolic/p-token.md b/kmir/src/kmir/kdist/mir-semantics/symbolic/p-token.md index 6bf3dc8c9..2c803453a 100644 --- a/kmir/src/kmir/kdist/mir-semantics/symbolic/p-token.md +++ b/kmir/src/kmir/kdist/mir-semantics/symbolic/p-token.md @@ -559,12 +559,12 @@ An `AccountInfo` reference is passed to the function. #toPAcc(P_ACC), PRent( U64(?LMP_PER_BYTEYEAR), - F64(?_EXEMPT_THRESHOLD), + F64(2.0), // fixed exempt_threshold 2.0 (default) U8(?BURN_PCT) ) ) - ensures 0 <=Int ?LMP_PER_BYTEYEAR andBool ?LMP_PER_BYTEYEAR requires #functionName(lookupFunction(#tyOfCall(FUNC))) ==String "::get" - ensures 0 <=Int ?SYS_LMP_PER_BYTEYEAR andBool ?SYS_LMP_PER_BYTEYEAR #projectionsFor(CTXTS, PROJS) ``` +### `Rent` specific evaluation for `Float` (Exempt threshold) + +THe pinocchio library contains special code to perform rent compuation in `u64` instead of `Float` +when the rent exempt threshold parameter is the default of 2.0. +The default is assumed in the cheat code throughout all our proofs so the test for the default is implemented as a special rule. + +```k + rule #applyBinOp ( + binOpEq, + thunk(#cast(Float(VAL, 64), castKindTransmute, _, _)), + Integer ( 4611686018427387904 , 64 , false ), + false + ) => BoolVal(true) + ... + + requires VAL ==Float 2.0 +``` + ### Reading and Writing the Second Component The access to the second component of the `PAccount` value is implemented with a special projection.