Instruction graph

De Software testing
Ir para: navegação, pesquisa


  • The instruction graph IG of a method m is defined as a directed graph IG(m) = (NI, EI, si, TI), which:
    • NI represents the non-empty set of reachable instruction nodes of the graph.
    • EI is the set of edges, representing regular edges (EIr) and exception edges (EIe). The sets EIr and EIe are distinct sets, which:
      • EIr is the set of edges {(ni, nj)} where the instruction in nj can be executed immediately after the instruction in ni and (ni, nj) does not belong to EIe.
      • EIe is the set of edges {(ni, nj)} where the instruction in ni is in the scope of the exception handler and the instruction nj is the first instruction of the exception handler.
    • si is a instruction node in IG which has the first instruction node of the method m. The first instruction is that one that has no incoming edge to it, i.e., IN(si) = 0.
    • TI is a subset of NI (possibly empty) of output instruction nodes. The output instructions are those that has no outcome edge to it, i.e., OUT(ni) = 0. <bib>vincenzi:2004, 73</bib>