Skip to content

SageInterface::CheckedCanonicalLoopPlan

Immutable, fully checked description of one transformable C/C++ loop.

Synopsis

Declared in <SageIII/sageInterface/sageInterface.h>

Private Member Functions

Name

CheckedCanonicalLoopPlan [constructor]

Friends

Name

Description

SageInterface::requireCheckedCanonicalLoopPlan

Build a checked loop plan without modifying or allocating into the AST.

Non-Member Functions

Name

Description

exactCanonicalLoopTripCount

Return an exact constant trip count when both bounds are exact integer constants in the induction type's domain and the terminal increment cannot overflow or wrap. Dynamic bounds, an unsafe terminal increment, and an unrepresentable count return nullopt; a consumer requiring a constant count must reject nullopt.

Description

Construction validates exact reciprocal ownership for every header/body edge, an acyclic structural owner chain, a side‐effect‐free and loop‐ invariant bound/stride surface, a positive nonzero constant stride magnitude, and the absence of induction‐variable mutation or escape from the body. Every reference is a borrowed snapshot; transformation commits revalidate the snapshot before changing the AST. Only the checked factory can construct a plan.

Created with MrDocs