3.85/1.86 YES
3.85/1.87 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar
3.85/1.87 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty
3.85/1.87
3.85/1.87
3.85/1.87 termination of the given Bare JBC problem could be proven:
3.85/1.87
3.85/1.87 (0) Bare JBC problem
3.85/1.87 (1) BareJBCToJBCProof [EQUIVALENT, 95 ms]
3.85/1.87 (2) JBC problem
3.85/1.87 (3) JBCToGraph [EQUIVALENT, 162 ms]
3.85/1.87 (4) JBCTerminationGraph
3.85/1.87 (5) TerminationGraphToSCCProof [SOUND, 0 ms]
3.85/1.87 (6) TRUE
3.85/1.87
3.85/1.87
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (0)
3.85/1.87 Obligation:
3.85/1.87 need to prove termination of the following program:
3.85/1.87 /**
3.85/1.87 * A loop that might potentially throw a NullPointerException
3.85/1.87 * because of the instance field access exc.f. If that happened,
3.85/1.87 * the loop would diverge since the exception handler does not include any
3.85/1.87 * progress statement. However, Julia can prove that exc is not
3.85/1.87 * null at the point where exc.f is accessed, so that
3.85/1.87 * no exception can be thrown there. Hence the loop is proved to terminate.
3.85/1.87 *
3.85/1.87 * All calls terminate.
3.85/1.87 *
3.85/1.87 * Julia + BinTerm prove that all calls terminate.
3.85/1.87 *
3.85/1.87 * Note: without a preliminary nullness analysis, termination could not
3.85/1.87 * be proved.
3.85/1.87 *
3.85/1.87 * @author Fausto Spoto
3.85/1.87 */
3.85/1.87
3.85/1.87 public class Exc {
3.85/1.87 private int f;
3.85/1.87
3.85/1.87 public static void main(String[] args) {
3.85/1.87 Exc exc = new Exc();
3.85/1.87 int i = 0;
3.85/1.87
3.85/1.87 while (i < 20) {
3.85/1.87 try {
3.85/1.87 if (i > 10) exc.f = 5;
3.85/1.87 i += 2;
3.85/1.87 }
3.85/1.87 catch (NullPointerException e) {
3.85/1.87 }
3.85/1.87 }
3.85/1.87 }
3.85/1.87 }
3.85/1.87
3.85/1.87
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (1) BareJBCToJBCProof (EQUIVALENT)
3.85/1.87 initialized classpath
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (2)
3.85/1.87 Obligation:
3.85/1.87 need to prove termination of the following program:
3.85/1.87 /**
3.85/1.87 * A loop that might potentially throw a NullPointerException
3.85/1.87 * because of the instance field access exc.f. If that happened,
3.85/1.87 * the loop would diverge since the exception handler does not include any
3.85/1.87 * progress statement. However, Julia can prove that exc is not
3.85/1.87 * null at the point where exc.f is accessed, so that
3.85/1.87 * no exception can be thrown there. Hence the loop is proved to terminate.
3.85/1.87 *
3.85/1.87 * All calls terminate.
3.85/1.87 *
3.85/1.87 * Julia + BinTerm prove that all calls terminate.
3.85/1.87 *
3.85/1.87 * Note: without a preliminary nullness analysis, termination could not
3.85/1.87 * be proved.
3.85/1.87 *
3.85/1.87 * @author Fausto Spoto
3.85/1.87 */
3.85/1.87
3.85/1.87 public class Exc {
3.85/1.87 private int f;
3.85/1.87
3.85/1.87 public static void main(String[] args) {
3.85/1.87 Exc exc = new Exc();
3.85/1.87 int i = 0;
3.85/1.87
3.85/1.87 while (i < 20) {
3.85/1.87 try {
3.85/1.87 if (i > 10) exc.f = 5;
3.85/1.87 i += 2;
3.85/1.87 }
3.85/1.87 catch (NullPointerException e) {
3.85/1.87 }
3.85/1.87 }
3.85/1.87 }
3.85/1.87 }
3.85/1.87
3.85/1.87
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (3) JBCToGraph (EQUIVALENT)
3.85/1.87 Constructed TerminationGraph.
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (4)
3.85/1.87 Obligation:
3.85/1.87 Termination Graph based on JBC Program:
3.85/1.87 Exc.main([Ljava/lang/String;)V: Graph of 106 nodes with 0 SCCs.
3.85/1.87
3.85/1.87
3.85/1.87
3.85/1.87
3.85/1.87
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (5) TerminationGraphToSCCProof (SOUND)
3.85/1.87 Proven termination by absence of SCCs
3.85/1.87 ----------------------------------------
3.85/1.87
3.85/1.87 (6)
3.85/1.87 TRUE
3.85/1.90 EOF