CfgEdge: {
    equals(this: void, a: CfgEdge, b: CfgEdge): boolean;
    getCause(this: void, edge: CfgEdge): undefined | NodeId;
    getType(this: void, edge: CfgEdge): CfgEdgeType;
    getWhen(this: void, edge: CfgEdge): undefined | "TRUE" | "FALSE";
    isControlDependency(
        this: void,
        edge: undefined | CfgEdge,
    ): edge is CfgControlDependencyEdge;
    isFlowDependency(this: void, edge: undefined | CfgEdge): edge is Fd;
    isOfType(this: void, edge: CfgEdge, type: CfgEdgeType): boolean;
    makeCd(
        this: void,
        controlId: NodeId,
        whenTrue: "TRUE" | "FALSE",
    ): CfgControlDependencyEdge;
    makeCdFalse(this: void, controlId: NodeId): CfgControlDependencyEdge;
    makeCdTrue(this: void, controlId: NodeId): CfgControlDependencyEdge;
    makeFd(this: void): Fd;
    toString(this: void, edge: CfgEdge): string;
    typeToString(this: void, edge: CfgEdge): string;
    unpackCause(this: void, edge: CfgControlDependencyEdge): NodeId;
    unpackWhen(this: void, edge: CfgControlDependencyEdge): "TRUE" | "FALSE";
}

Helper object for CfgEdge - an edge in the ControlFlowGraph.

Type declaration

  • equals:function
  • getCause:function
    • Get the cause of a control dependency edge, i.e., the id of the vertex that causes the control dependency. If the edge is not a control dependency edge, this returns undefined.

      This is the pendant of CfgEdge#isControlDependency|isControlDependency() on a CfgEdge.

      Parameters

      Returns undefined | NodeId

      CfgEdge#unpackCause|unpackCause() - for a version of this function that assumes the edge is a control dependency edge and hence does not return undefined

  • getType:function
  • getWhen:function
    • Get whether the control dependency edge is satisfied with a true condition or is it negated (e.g., else-branch). If the edge is not a control dependency edge, this returns undefined.

      This is the pendant of CfgEdge#isControlDependency|isControlDependency() on a CfgEdge.

      Parameters

      Returns undefined | "TRUE" | "FALSE"

      CfgEdge#unpackWhen|unpackWhen() - for a version of this function that assumes the edge is a control dependency edge and hence does not return undefined

  • isControlDependency:function
  • isFlowDependency:function
  • isOfType:function
  • makeCd:function
    • Create a control dependency edge with the given cause and condition.

      Parameters

      • this: void
      • controlId: NodeId

        the id of the vertex that causes the control dependency

      • whenTrue: "TRUE" | "FALSE"

        whether the control dependency is satisfied with a true condition or is it negated (e.g., else-branch)

      Returns CfgControlDependencyEdge

      • CfgEdge#makeCdTrue|makeCdTrue() - for a version of this function that assumes the control dependency is satisfied with a true condition
      • CfgEdge#makeCdFalse|makeCdFalse() - for a version of this function that assumes the control dependency is negated (e.g., else-branch)
  • makeCdFalse:function
  • makeCdTrue:function
  • makeFd:function
  • toString:function
    • Provide a string representation of the given edge, including its details (e.g., cause and condition for control dependency edges), e.g., for debugging or visualization purposes.

      Parameters

      Returns string

      CfgEdge#typeToString|typeToString() - for a version of this function that only includes the type of the edge

  • typeToString:function
    • Provide a string representation of the given edge, e.g., for debugging or visualization purposes.

      Parameters

      Returns string

      CfgEdge#toString|toString() - for a version of this function that also includes the details of the edge (e.g., cause and condition for control dependency edges)

  • unpackCause:function
  • unpackWhen:function