(0) Obligation:

Need to prove time_complexity of the following program:
public class NonPeriodic {

    public static void main(int i, int j) {
        if (j < 0) return;

	int x = 1, y = 0;

	if (i >= 1) {
	    y = -1*j;
	}

	// does not terminate for x = 1 and y = 1
	while (y > 0)
	    if (x > 0) x = x - 1;
	    else {
		y = y + 1;
		x = y;
	    }
    }
}


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

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
NonPeriodic.main(II)V: Graph of 50 nodes with 0 SCCs.


(3) TerminationGraphToComplexityProof (BOTH CONCRETE BOUNDS(ID, ADD(14)) transformation)

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

(4) Obligation:

Set of 35 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

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

Constructed TerminationGraph.

(6) Obligation:

Termination Graph based on JBC Program:
NonPeriodic.main(II)V: Graph of 50 nodes with 0 SCCs.


(7) TerminationGraphToComplexityProof (EQUIVALENT transformation)

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

(8) BOUNDS(CONSTANT, 37)