@@ -96,7 +96,7 @@ will effectively be no-ops at this level).
9696``` k
9797
9898 // all memory accesses relegated to another module (to be added)
99- rule <k> #execStmt(statement(statementKindAssign(PLACE, RVAL), _SPAN))
99+ rule [execStmt]: <k> #execStmt(statement(statementKindAssign(PLACE, RVAL), _SPAN))
100100 =>
101101 #setLocalValue(PLACE, RVAL)
102102 ...
@@ -139,7 +139,7 @@ function call, pushing a new stack frame and returning to a different
139139block after the call returns.
140140
141141``` k
142- rule <k> #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) ~> _CONT
142+ rule [termGoto]: <k> #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) ~> _CONT
143143 =>
144144 #execBlockIdx(I)
145145 </k>
@@ -154,7 +154,7 @@ will be `129`.
154154``` k
155155 syntax KItem ::= #selectBlock ( SwitchTargets , Evaluation ) [strict(2)]
156156
157- rule <k> #execTerminator(terminator(terminatorKindSwitchInt(DISCR, TARGETS), _SPAN)) ~> _CONT
157+ rule [termSwitchInt]: <k> #execTerminator(terminator(terminatorKindSwitchInt(DISCR, TARGETS), _SPAN)) ~> _CONT
158158 =>
159159 #selectBlock(TARGETS, DISCR)
160160 </k>
@@ -188,7 +188,7 @@ NB that a stack height of `0` cannot occur here, because the compiler prevents l
188188If the local ` _0 ` does not have a value (i.e., it remained uninitialised), the function returns unit and writing the value is skipped.
189189
190190``` k
191- rule <k> #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _
191+ rule [termReturnSome]: <k> #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _
192192 =>
193193 #setLocalValue(DEST, #decrementRef(VAL)) ~> #execBlockIdx(TARGET)
194194 </k>
@@ -205,7 +205,7 @@ If the local `_0` does not have a value (i.e., it remained uninitialised), the f
205205 <stack> ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK </stack>
206206
207207 // no value to return, skip writing
208- rule <k> #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _
208+ rule [termReturnNone]: <k> #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _
209209 =>
210210 #execBlockIdx(TARGET)
211211 </k>
@@ -279,14 +279,14 @@ where the returned result should go.
279279
280280``` k
281281 // Intrinsic function call - execute directly without state switching
282- rule <k> #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, _UNWIND), _SPAN)) ~> _
282+ rule [termCallIntrinsic]: <k> #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, _UNWIND), _SPAN)) ~> _
283283 =>
284284 #execIntrinsic(lookupFunction(#tyOfCall(FUNC)), ARGS, DEST) ~> #continueAt(TARGET)
285285 </k>
286286 requires isIntrinsicFunction(lookupFunction(#tyOfCall(FUNC)))
287287
288288 // Regular function call - full state switching and stack setup
289- rule <k> #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _
289+ rule [termCallFunction]: <k> #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _
290290 =>
291291 #setUpCalleeData(lookupFunction(#tyOfCall(FUNC)), ARGS)
292292 </k>
@@ -324,7 +324,7 @@ An operand may be a `Reference` (the only way a function could access another fu
324324 syntax KItem ::= #setUpCalleeData(MonoItemKind, Operands)
325325
326326 // reserve space for local variables and copy/move arguments from old locals into their place
327- rule [call ]: <k> #setUpCalleeData(
327+ rule [setupCalleeData ]: <k> #setUpCalleeData(
328328 monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))),
329329 ARGS
330330 )
@@ -403,7 +403,7 @@ Otherwise the provided message is passed to a `panic!` call, ending the program
403403``` k
404404 syntax MIRError ::= AssertError ( AssertMessage )
405405
406- rule <k> #execTerminator(terminator(assert(COND, EXPECTED, MSG, TARGET, _UNWIND), _SPAN)) ~> _CONT
406+ rule [termAssert]: <k> #execTerminator(terminator(assert(COND, EXPECTED, MSG, TARGET, _UNWIND), _SPAN)) ~> _CONT
407407 =>
408408 #expect(COND, EXPECTED, MSG) ~> #execBlockIdx(TARGET)
409409 </k>
@@ -430,15 +430,15 @@ Other terminators that matter at the MIR level "Runtime" are `Drop` and `Unreach
430430Drops are elaborated to Noops but still define the continuing control flow. Unreachable terminators lead to a program error.
431431
432432``` k
433- rule <k> #execTerminator(terminator(terminatorKindDrop(_PLACE, TARGET, _UNWIND), _SPAN))
433+ rule [termDrop]: <k> #execTerminator(terminator(terminatorKindDrop(_PLACE, TARGET, _UNWIND), _SPAN))
434434 =>
435435 #execBlockIdx(TARGET)
436436 ...
437437 </k>
438438
439439 syntax MIRError ::= "ReachedUnreachable"
440440
441- rule <k> #execTerminator(terminator(terminatorKindUnreachable, _SPAN))
441+ rule [termUnreachable]: <k> #execTerminator(terminator(terminatorKindUnreachable, _SPAN))
442442 =>
443443 ReachedUnreachable
444444 ...
0 commit comments