@@ -283,7 +283,7 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
283283 .ProjectionElems
284284
285285 rule [cheatcode-is-spl-account]:
286- <k> #execTerminator(terminator(terminatorKindCall( FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
286+ <k> #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND) ~> _CONT
287287 => #forceSetPlaceValue(
288288 place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer
289289 SPLDataBuffer(
@@ -306,11 +306,10 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
306306 place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init
307307 #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 165)
308308 )
309- ~> #execBlockIdx(TARGET)
310- ...
309+ ~> #continueAt(TARGET)
311310 </k>
312- requires #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "spl_token::entrypoint::cheatcode_is_spl_account"
313- orBool #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "cheatcode_is_spl_account"
311+ requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_account"
312+ orBool #functionName(FUNC) ==String "cheatcode_is_spl_account"
314313 ensures #isSplPubkey(?SplMintKey)
315314 andBool #isSplPubkey(?SplTokenOwnerKey)
316315 andBool 0 <=Int ?SplHasDelegateKey andBool ?SplHasDelegateKey <=Int 1
@@ -355,7 +354,7 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
355354 </k>
356355
357356 rule [cheatcode-is-spl-mint]:
358- <k> #execTerminator(terminator(terminatorKindCall( FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
357+ <k> #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND) ~> _CONT
359358 => #forceSetPlaceValue(
360359 place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer
361360 SPLDataBuffer(
@@ -376,11 +375,10 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
376375 place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init
377376 #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 82)
378377 )
379- ~> #execBlockIdx(TARGET)
380- ...
378+ ~> #continueAt(TARGET)
381379 </k>
382- requires #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "spl_token::entrypoint::cheatcode_is_spl_mint"
383- orBool #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "cheatcode_is_spl_mint"
380+ requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_mint"
381+ orBool #functionName(FUNC) ==String "cheatcode_is_spl_mint"
384382 ensures 0 <=Int ?SplMintHasAuthKey andBool ?SplMintHasAuthKey <=Int 1
385383 andBool (0 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, ?SplMintHasAuthKey) orBool 1 ==Int #lookupDiscrAux(discriminant(0) discriminant(1) .Discriminants, ?SplMintHasAuthKey))
386384 andBool #isSplPubkey(?SplMintAuthorityKey)
@@ -392,7 +390,7 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
392390 [priority(30), preserves-definedness]
393391
394392 rule [cheatcode-is-spl-rent]:
395- <k> #execTerminator(terminator(terminatorKindCall( FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
393+ <k> #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, _DEST, TARGET, _UNWIND) ~> _CONT
396394 => #forceSetPlaceValue(
397395 place(LOCAL, appendP(PROJS, DATA_BUFFER_PROJS)), // navigate to [u8] data buffer
398396 SPLDataBuffer(
@@ -407,11 +405,10 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
407405 place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init
408406 #initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 17)
409407 )
410- ~> #execBlockIdx(TARGET)
411- ...
408+ ~> #continueAt(TARGET)
412409 </k>
413- requires #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "spl_token::entrypoint::cheatcode_is_spl_rent"
414- orBool #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "cheatcode_is_spl_rent"
410+ requires #functionName(FUNC) ==String "spl_token::entrypoint::cheatcode_is_spl_rent"
411+ orBool #functionName(FUNC) ==String "cheatcode_is_spl_rent"
415412 ensures 0 <=Int ?SplRentLamportsPerByteYear andBool ?SplRentLamportsPerByteYear <Int (1 <<Int 32)
416413 andBool 0 <=Int ?SplRentBurnPercent andBool ?SplRentBurnPercent <=Int 100
417414 [priority(30), preserves-definedness]
@@ -422,12 +419,11 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
422419``` k
423420 // RefCell::<&mut [u8]>::borrow / borrow_mut - returns Ref/RefMut wrapper with pointer to data
424421 rule [spl-borrow-data]:
425- <k> #execTerminator(terminator(terminatorKindCall( FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
422+ <k> #execTerminatorCall(_, FUNC, operandCopy(place(LOCAL, PROJS)) .Operands, DEST, TARGET, _UNWIND) ~> _CONT
426423 => #setSPLBorrowData(DEST, operandCopy(place(LOCAL, PROJS)))
427- ~> #execBlockIdx(TARGET)
428- ...
424+ ~> #continueAt(TARGET)
429425 </k>
430- requires #isSPLBorrowFunc(#functionName(lookupFunction(#tyOfCall( FUNC)) ))
426+ requires #isSPLBorrowFunc(#functionName(FUNC))
431427 [priority(30), preserves-definedness]
432428
433429 syntax KItem ::= #setSPLBorrowData ( Place , Evaluation ) [seqstrict(2)]
@@ -443,12 +439,11 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
443439``` k
444440 // Account/Mint::unpack_from_slice - extracts struct from SPLDataBuffer
445441 rule [spl-account-unpack]:
446- <k> #execTerminator(terminator(terminatorKindCall( FUNC, OP:Operand .Operands, DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
442+ <k> #execTerminatorCall(_, FUNC, OP:Operand .Operands, DEST, TARGET, _UNWIND) ~> _CONT
447443 => #splUnpack(DEST, #withDeref(OP))
448- ~> #execBlockIdx(TARGET)
449- ...
444+ ~> #continueAt(TARGET)
450445 </k>
451- requires #isSPLUnpackFunc(#functionName(lookupFunction(#tyOfCall( FUNC)) ))
446+ requires #isSPLUnpackFunc(#functionName(FUNC))
452447 [priority(30), preserves-definedness]
453448
454449 syntax KItem ::= #splUnpack ( Place , Evaluation ) [seqstrict(2)]
@@ -458,10 +453,10 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
458453
459454 // Account/Mint::pack_into_slice - writes struct into SPLDataBuffer
460455 rule [spl-account-pack]:
461- <k> #execTerminator(terminator(terminatorKindCall( FUNC, SRC:Operand DST:Operand .Operands, _DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
462- => #splPack(#withDeref(SRC), #withDeref(DST)) ~> #execBlockIdx (TARGET) ...
456+ <k> #execTerminatorCall(_, FUNC, SRC:Operand DST:Operand .Operands, _DEST, TARGET, _UNWIND) ~> _CONT
457+ => #splPack(#withDeref(SRC), #withDeref(DST)) ~> #continueAt (TARGET)
463458 </k>
464- requires #isSPLPackFunc(#functionName(lookupFunction(#tyOfCall( FUNC)) ))
459+ requires #isSPLPackFunc(#functionName(FUNC))
465460 [priority(30), preserves-definedness]
466461
467462 syntax KItem ::= #splPack ( Evaluation , Operand ) [seqstrict(1)]
@@ -474,22 +469,20 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
474469``` {.k .symbolic}
475470 // Rent::from_account_info - navigates to data buffer using DATA_BUFFER_PROJS
476471 rule [spl-rent-from-account-info]:
477- <k> #execTerminator(terminator(terminatorKindCall( FUNC, OP:Operand .Operands, DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
472+ <k> #execTerminatorCall(_, FUNC, OP:Operand .Operands, DEST, TARGET, _UNWIND) ~> _CONT
478473 => #splUnpack(DEST, #appendProjsOp(OP, DATA_BUFFER_PROJS))
479- ~> #execBlockIdx(TARGET)
480- ...
474+ ~> #continueAt(TARGET)
481475 </k>
482- requires #isSPLRentFromAccountInfoFunc(#functionName(lookupFunction(#tyOfCall( FUNC)) ))
476+ requires #isSPLRentFromAccountInfoFunc(#functionName(FUNC))
483477 [priority(30), preserves-definedness]
484478
485479 // Rent::get - returns stable value, cached in outermost frame
486480 rule [spl-rent-get]:
487- <k> #execTerminator(terminator(terminatorKindCall( FUNC, .Operands, DEST, someBasicBlockIdx( TARGET) , _UNWIND), _SPAN))
481+ <k> #execTerminatorCall(_, FUNC, .Operands, DEST, TARGET, _UNWIND) ~> _CONT
488482 => #writeSPLSysRent(DEST)
489- ~> #execBlockIdx(TARGET)
490- ...
483+ ~> #continueAt(TARGET)
491484 </k>
492- requires #isSPLRentGetFunc(#functionName(lookupFunction(#tyOfCall( FUNC)) ))
485+ requires #isSPLRentGetFunc(#functionName(FUNC))
493486 [priority(30), preserves-definedness]
494487
495488 syntax KItem ::= #writeSPLSysRent ( Place )
@@ -538,17 +531,11 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
538531## Pubkey comparison shortcut
539532``` k
540533 rule [spl-cmp-pubkeys]:
541- <k> #execTerminator(
542- terminator(
543- terminatorKindCall(FUNC, ARG1:Operand ARG2:Operand .Operands, DEST, someBasicBlockIdx(TARGET), _UNWIND),
544- _SPAN
545- )
546- )
534+ <k> #execTerminatorCall(_, FUNC, ARG1:Operand ARG2:Operand .Operands, DEST, TARGET, _UNWIND) ~> _CONT
547535 => #execSPLCmpPubkeys( DEST, #withDeref(ARG1), #withDeref(ARG2))
548- ~> #execBlockIdx(TARGET)
549- ...
536+ ~> #continueAt(TARGET)
550537 </k>
551- requires #functionName(lookupFunction(#tyOfCall( FUNC)) ) ==String "spl_token::processor::Processor::cmp_pubkeys"
538+ requires #functionName(FUNC) ==String "spl_token::processor::Processor::cmp_pubkeys"
552539 [priority(30), preserves-definedness]
553540
554541 syntax KItem ::= #execSPLCmpPubkeys( Place , Evaluation , Evaluation ) [seqstrict(2,3)]
0 commit comments