@@ -225,6 +225,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f
225225 </k>
226226 <currentFunc> _ => CALLER </currentFunc>
227227 //<currentFrame>
228+ <frameId> _ => FRAMEID </frameId>
228229 <currentBody> _ => #getBlocks(CALLER) </currentBody>
229230 <caller> CALLER => NEWCALLER </caller>
230231 <dest> DEST => NEWDEST </dest>
@@ -233,7 +234,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f
233234 <locals> ListItem(typedValue(VAL:Value, _, _)) _ => NEWLOCALS </locals>
234235 //</currentFrame>
235236 // remaining call stack (without top frame)
236- <stack> ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK </stack>
237+ <stack> ListItem(StackFrame(FRAMEID, NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK </stack>
237238
238239 // no value to return, skip writing
239240 rule [termReturnNone]: <k> #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _
@@ -242,6 +243,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f
242243 </k>
243244 <currentFunc> _ => CALLER </currentFunc>
244245 //<currentFrame>
246+ <frameId> _ => FRAMEID </frameId>
245247 <currentBody> _ => #getBlocks(CALLER) </currentBody>
246248 <caller> CALLER => NEWCALLER </caller>
247249 <dest> _ => NEWDEST </dest>
@@ -250,7 +252,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f
250252 <locals> ListItem(_:NewLocal) _ => NEWLOCALS </locals>
251253 //</currentFrame>
252254 // remaining call stack (without top frame)
253- <stack> ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK </stack>
255+ <stack> ListItem(StackFrame(FRAMEID, NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK </stack>
254256
255257 syntax List ::= #getBlocks( Ty ) [function, total]
256258 | #getBlocksAux( MonoItemKind ) [function, total]
@@ -356,14 +358,15 @@ where the returned result should go.
356358 </k>
357359 <currentFunc> CALLER => FTY </currentFunc>
358360 <currentFrame>
361+ <frameId> OLDFRAMEID => !_NEWFRAMEID:Int </frameId>
359362 <currentBody> _ </currentBody>
360363 <caller> OLDCALLER => CALLER </caller>
361364 <dest> OLDDEST => DEST </dest>
362365 <target> OLDTARGET => TARGET </target>
363366 <unwind> OLDUNWIND => UNWIND </unwind>
364367 <locals> LOCALS </locals>
365368 </currentFrame>
366- <stack> STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK </stack>
369+ <stack> STACK => ListItem(StackFrame(OLDFRAMEID, OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK </stack>
367370 requires notBool isIntrinsicFunction(FUNC)
368371 andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC))
369372
@@ -374,14 +377,15 @@ where the returned result should go.
374377 </k>
375378 <currentFunc> CALLER => FTY </currentFunc>
376379 <currentFrame>
380+ <frameId> OLDFRAMEID => !_NEWFRAMEID:Int </frameId>
377381 <currentBody> _ </currentBody>
378382 <caller> OLDCALLER => CALLER </caller>
379383 <dest> OLDDEST => DEST </dest>
380384 <target> OLDTARGET => TARGET </target>
381385 <unwind> OLDUNWIND => UNWIND </unwind>
382386 <locals> LOCALS </locals>
383387 </currentFrame>
384- <stack> STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK </stack>
388+ <stack> STACK => ListItem(StackFrame(OLDFRAMEID, OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK </stack>
385389 requires notBool isIntrinsicFunction(FUNC)
386390 andBool #functionNameMatchesEnv(getFunctionName(FUNC))
387391
@@ -498,7 +502,7 @@ An operand may be a `Reference` (the only way a function could access another fu
498502 #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef(getValue(CALLERLOCALS, I)))
499503 ...
500504 </k>
501- <stack> ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List </stack>
505+ <stack> ListItem(StackFrame(_, _, _, _, _, CALLERLOCALS)) _:List </stack>
502506 requires 0 <=Int I
503507 andBool I <Int size(CALLERLOCALS)
504508 andBool isTypedValue(CALLERLOCALS[I])
@@ -510,7 +514,7 @@ An operand may be a `Reference` (the only way a function could access another fu
510514 #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef(getValue(CALLERLOCALS, I)))
511515 ...
512516 </k>
513- <stack> (ListItem(StackFrame(_, _, _, _, CALLERLOCALS) #as CALLERFRAME => #updateStackLocal(CALLERFRAME, I, Moved))) _:List
517+ <stack> (ListItem(StackFrame(_, _, _, _, _, CALLERLOCALS) #as CALLERFRAME => #updateStackLocal(CALLERFRAME, I, Moved))) _:List
514518 </stack>
515519 requires 0 <=Int I
516520 andBool I <Int size(CALLERLOCALS)
0 commit comments