(0) Obligation:

Need to prove time_complexity of the following program:
public class NullPair {
	NullPair next;

	public static void main(String[] args) {
		Random.args = args;
		NullPair one = null;
		NullPair two = null;
		int i = Random.random();
		if (i == 0) {
			one = new NullPair();
		} else {
			two = new NullPair();
		}

		while (one == null && two == null);
	}
}


public class Random {
  static String[] args;
  static int index = 0;

  public static int random() {
    String string = args[index];
    index++;
    return string.length();
  }
}


(1) JBCToGraph (BOTH CONCRETE BOUNDS(ID, ID) transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
NullPair.main([Ljava/lang/String;)V: Graph of 127 nodes with 0 SCCs.


(3) TerminationGraphToComplexityProof (EQUIVALENT transformation)

Proven constant complexity by absence of SCCs and edges with non-constant weight

(4) BOUNDS(CONSTANT, 108)

(5) JBCToGraph (BOTH CONCRETE BOUNDS(ID, ID) transformation)

Constructed TerminationGraph.

(6) Obligation:

Termination Graph based on JBC Program:
NullPair.main([Ljava/lang/String;)V: Graph of 126 nodes with 0 SCCs.


(7) TerminationGraphToComplexityProof (BOTH CONCRETE BOUNDS(ID, ADD(69)) transformation)

Extracted set of 55 edges for the analysis of TIME complexity. Kept leaves.

(8) Obligation:

Set of 55 edges based on JBC Program.
Performed SCC analyses:
  • Used field analysis yielded the following read fields:

Considered paths: nonterm paths and paths from start to sinks