import BaseEdge from "@specs-feup/flow/graph/BaseEdge"; import Edge from "@specs-feup/flow/graph/Edge"; /** * This edge type is used to connect two {@link ControlFlowNode | ControlFlowNodes}. * It represents that, immediately after the execution of the incoming node, the * outgoing node may be executed. */ declare namespace ControlFlowEdge { const TAG = "__lara_flow__control_flow_edge"; const VERSION = "1"; class Class extends BaseEdge.Class { /** * @returns Whether this edge is {@link ControlFlowEdge.Data.isFake | fake}. */ get isFake(): boolean; /** * Sets whether this edge is {@link ControlFlowEdge.Data.isFake | fake}. * * @param value Whether this edge is fake. */ set isFake(value: boolean); } class Builder implements Edge.Builder { #private; constructor(); /** * Marks this edge as {@link ControlFlowEdge.Data.isFake | fake}. */ fake(): this; buildData(data: BaseEdge.Data): Data; buildScratchData(scratchData: BaseEdge.ScratchData): ScratchData; } const TypeGuard: Edge.TypeGuard; interface Data extends BaseEdge.Data { [TAG]: { version: typeof VERSION; /** * Whether the edge is fake. Fake edges guarantee that * this control flow path is actually never followed in runtime, * even though the edge might be needed for algorithms to work * properly (for instance, to maintain post-dominance properties). * * For a concrete example, consider the following code: * * ```c * if (true) { * ... * } else { * ... * } * ``` * * Although it may make sense to represent this as a conditional node * with two outgoing control flow edges, in practice, the `else` branch * is never executed. Therefore, it may make sense to mark the edge * connecting the `if` branch to the `else` branch as fake. * * Another example is the following code: * * ```c * goback: * ... * goto goback; * ... * ``` * * This is effectively an infinite loop. However, to ensure that the end * of the function post-dominates the loop, it may be necessary to have * a fake edge connecting the `goto` statement to the next statement. */ isFake: boolean; }; } interface ScratchData extends BaseEdge.ScratchData { } } export default ControlFlowEdge; //# sourceMappingURL=ControlFlowEdge.d.ts.map