(0) Obligation:
Need to prove time_complexity of the following program:
public class IntPath {
public static void main(String[] args) {
Random.args = args;
int i = Random.random();
int x = 0;
int y = 0;
if (i > 10) {
x = 1;
} else {
y = 1;
}
while (x == y);
}
}
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:
IntPath.main([Ljava/lang/String;)V: Graph of 118 nodes with 0 SCCs.
(3) TerminationGraphToComplexityProof (EQUIVALENT transformation)
Proven constant complexity by absence of SCCs and edges with non-constant weight
(4) BOUNDS(CONSTANT, 99)
(5) JBCToGraph (BOTH CONCRETE BOUNDS(ID, ID) transformation)
Constructed TerminationGraph.
(6) Obligation:
Termination Graph based on JBC Program:
IntPath.main([Ljava/lang/String;)V: Graph of 117 nodes with 0 SCCs.
(7) TerminationGraphToComplexityProof (BOTH CONCRETE BOUNDS(ID, ADD(59)) transformation)
Extracted set of 56 edges for the analysis of TIME complexity. Kept leaves.
(8) Obligation:
Set of 56 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