Class Completion::BreakNormalCompletion

A completion that represents evaluation of a statement or expression resulting in a loop break.

This completion is added for technical reasons only: when a loop body can complete with a break completion, the loop itself completes normally. However, if we choose TNormalCompletion as the completion of the loop, we lose the information that the last element actually completed with a break, meaning that the control flow edge out of the breaking node cannot be marked with a break label.

Example:

while (...) {
   ...
   break;
}
return;

The break on line 3 completes with a TBreakCompletion, therefore the while loop can complete with a TBreakNormalCompletion, so we get an edge break --break--> return. (If we instead used a TNormalCompletion, we would get a less precise edge break --normal--> return.)

Direct supertypes

Indirect supertypes

Predicates

toString

Gets a textual representation of this completion.

Inherited predicates

continuesLoop

Holds if this completion will continue a loop when it is the completion of a loop body.

from Completion
isValidFor

Holds if this completion is valid for control flow element cfe.

from Completion