/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.jar /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty termination of the given Bare JBC problem could be proven: (0) Bare JBC problem (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 344 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 0 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 53 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 33 ms] (12) AND (13) IRSwT (14) IntTRSCompressionProof [EQUIVALENT, 0 ms] (15) IRSwT (16) IntTRSUnneededArgumentFilterProof [EQUIVALENT, 0 ms] (17) IRSwT (18) TempFilterProof [SOUND, 4 ms] (19) IntTRS (20) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (21) YES (22) IRSwT (23) IntTRSCompressionProof [EQUIVALENT, 0 ms] (24) IRSwT (25) TempFilterProof [SOUND, 24 ms] (26) IntTRS (27) RankingReductionPairProof [EQUIVALENT, 0 ms] (28) YES ---------------------------------------- (0) Obligation: need to prove termination of the following program: /** * Example taken from "A Term Rewriting Approach to the Automated Termination * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) * and converted to Java. */ public class PastaB12 { public static void main(String[] args) { Random.args = args; int x = Random.random(); int y = Random.random(); while (x > 0 || y > 0) { if (x > 0) { x--; } else if (y > 0) { y--; } else { continue; } } } } public class Random { static String[] args; static int index = 0; public static int random() { String string = args[index]; index++; return string.length(); } } ---------------------------------------- (1) BareJBCToJBCProof (EQUIVALENT) initialized classpath ---------------------------------------- (2) Obligation: need to prove termination of the following program: /** * Example taken from "A Term Rewriting Approach to the Automated Termination * Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf) * and converted to Java. */ public class PastaB12 { public static void main(String[] args) { Random.args = args; int x = Random.random(); int y = Random.random(); while (x > 0 || y > 0) { if (x > 0) { x--; } else if (y > 0) { y--; } else { continue; } } } } public class Random { static String[] args; static int index = 0; public static int random() { String string = args[index]; index++; return string.length(); } } ---------------------------------------- (3) JBCToGraph (EQUIVALENT) Constructed TerminationGraph. ---------------------------------------- (4) Obligation: Termination Graph based on JBC Program: PastaB12.main([Ljava/lang/String;)V: Graph of 186 nodes with 1 SCC. ---------------------------------------- (5) TerminationGraphToSCCProof (SOUND) Splitted TerminationGraph to 1 SCCs. ---------------------------------------- (6) Obligation: SCC of termination graph based on JBC Program. SCC contains nodes from the following methods: PastaB12.main([Ljava/lang/String;)V SCC calls the following helper methods: Performed SCC analyses: *Used field analysis yielded the following read fields: *Marker field analysis yielded the following relations that could be markers: ---------------------------------------- (7) SCCToIRSProof (SOUND) Transformed FIGraph SCCs to intTRSs. Log: Generated rules. Obtained 20 IRulesP rules: f340_0_main_GT(EOS(STATIC_340), matching1, i46, matching2) -> f350_0_main_GT(EOS(STATIC_350), 0, i46, 0) :|: TRUE && matching1 = 0 && matching2 = 0 f340_0_main_GT(EOS(STATIC_340), i52, i46, i52) -> f351_0_main_GT(EOS(STATIC_351), i52, i46, i52) :|: TRUE f350_0_main_GT(EOS(STATIC_350), matching1, i46, matching2) -> f364_0_main_Load(EOS(STATIC_364), 0, i46) :|: 0 <= 0 && matching1 = 0 && matching2 = 0 f364_0_main_Load(EOS(STATIC_364), matching1, i46) -> f377_0_main_LE(EOS(STATIC_377), 0, i46, i46) :|: TRUE && matching1 = 0 f377_0_main_LE(EOS(STATIC_377), matching1, i58, i58) -> f394_0_main_LE(EOS(STATIC_394), 0, i58, i58) :|: TRUE && matching1 = 0 f394_0_main_LE(EOS(STATIC_394), matching1, i58, i58) -> f415_0_main_Load(EOS(STATIC_415), 0, i58) :|: i58 > 0 && matching1 = 0 f415_0_main_Load(EOS(STATIC_415), matching1, i58) -> f434_0_main_LE(EOS(STATIC_434), 0, i58, 0) :|: TRUE && matching1 = 0 f434_0_main_LE(EOS(STATIC_434), matching1, i58, matching2) -> f512_0_main_Load(EOS(STATIC_512), 0, i58) :|: 0 <= 0 && matching1 = 0 && matching2 = 0 f512_0_main_Load(EOS(STATIC_512), matching1, i58) -> f1321_0_main_LE(EOS(STATIC_1321), 0, i58, i58) :|: TRUE && matching1 = 0 f1321_0_main_LE(EOS(STATIC_1321), matching1, i58, i58) -> f1324_0_main_Inc(EOS(STATIC_1324), 0, i58) :|: i58 > 0 && matching1 = 0 f1324_0_main_Inc(EOS(STATIC_1324), matching1, i58) -> f1327_0_main_JMP(EOS(STATIC_1327), 0, i58 + -1) :|: TRUE && matching1 = 0 f1327_0_main_JMP(EOS(STATIC_1327), matching1, i199) -> f2486_0_main_Load(EOS(STATIC_2486), 0, i199) :|: TRUE && matching1 = 0 f2486_0_main_Load(EOS(STATIC_2486), matching1, i199) -> f329_0_main_Load(EOS(STATIC_329), 0, i199) :|: TRUE && matching1 = 0 f329_0_main_Load(EOS(STATIC_329), i19, i46) -> f340_0_main_GT(EOS(STATIC_340), i19, i46, i19) :|: TRUE f351_0_main_GT(EOS(STATIC_351), i52, i46, i52) -> f366_0_main_Load(EOS(STATIC_366), i52, i46) :|: i52 > 0 f366_0_main_Load(EOS(STATIC_366), i52, i46) -> f380_0_main_LE(EOS(STATIC_380), i52, i46, i52) :|: TRUE f380_0_main_LE(EOS(STATIC_380), i52, i46, i52) -> f397_0_main_Inc(EOS(STATIC_397), i52, i46) :|: i52 > 0 f397_0_main_Inc(EOS(STATIC_397), i52, i46) -> f418_0_main_JMP(EOS(STATIC_418), i52 + -1, i46) :|: TRUE f418_0_main_JMP(EOS(STATIC_418), i62, i46) -> f493_0_main_Load(EOS(STATIC_493), i62, i46) :|: TRUE f493_0_main_Load(EOS(STATIC_493), i62, i46) -> f329_0_main_Load(EOS(STATIC_329), i62, i46) :|: TRUE Combined rules. Obtained 2 IRulesP rules: f340_0_main_GT(EOS(STATIC_340), i52:0, i46:0, i52:0) -> f340_0_main_GT(EOS(STATIC_340), i52:0 - 1, i46:0, i52:0 - 1) :|: i52:0 > 0 f340_0_main_GT(EOS(STATIC_340), 0, i46:0, 0) -> f340_0_main_GT(EOS(STATIC_340), 0, i46:0 - 1, 0) :|: i46:0 > 0 Filtered constant ground arguments: f340_0_main_GT(x1, x2, x3, x4) -> f340_0_main_GT(x2, x3, x4) EOS(x1) -> EOS Filtered duplicate arguments: f340_0_main_GT(x1, x2, x3) -> f340_0_main_GT(x2, x3) Finished conversion. Obtained 2 rules.P rules: f340_0_main_GT(i46:0, i52:0) -> f340_0_main_GT(i46:0, i52:0 - 1) :|: i52:0 > 0 f340_0_main_GT(i46:0, cons_0) -> f340_0_main_GT(i46:0 - 1, 0) :|: i46:0 > 0 && cons_0 = 0 ---------------------------------------- (8) Obligation: Rules: f340_0_main_GT(i46:0, i52:0) -> f340_0_main_GT(i46:0, i52:0 - 1) :|: i52:0 > 0 f340_0_main_GT(x, x1) -> f340_0_main_GT(x - 1, 0) :|: x > 0 && x1 = 0 ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f340_0_main_GT(i46:0, i52:0) -> f340_0_main_GT(i46:0, arith) :|: i52:0 > 0 && arith = i52:0 - 1 f340_0_main_GT(x2, x3) -> f340_0_main_GT(x4, 0) :|: x2 > 0 && x3 = 0 && x4 = x2 - 1 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f340_0_main_GT(i46:0, i52:0) -> f340_0_main_GT(i46:0, arith) :|: i52:0 > 0 && arith = i52:0 - 1 (2) f340_0_main_GT(x2, x3) -> f340_0_main_GT(x4, 0) :|: x2 > 0 && x3 = 0 && x4 = x2 - 1 Arcs: (1) -> (1), (2) (2) -> (2) This digraph is fully evaluated! ---------------------------------------- (12) Complex Obligation (AND) ---------------------------------------- (13) Obligation: Termination digraph: Nodes: (1) f340_0_main_GT(i46:0, i52:0) -> f340_0_main_GT(i46:0, arith) :|: i52:0 > 0 && arith = i52:0 - 1 Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (14) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (15) Obligation: Rules: f340_0_main_GT(i46:0:0, i52:0:0) -> f340_0_main_GT(i46:0:0, i52:0:0 - 1) :|: i52:0:0 > 0 ---------------------------------------- (16) IntTRSUnneededArgumentFilterProof (EQUIVALENT) Some arguments are removed because they cannot influence termination. We removed arguments according to the following replacements: f340_0_main_GT(x1, x2) -> f340_0_main_GT(x2) ---------------------------------------- (17) Obligation: Rules: f340_0_main_GT(i52:0:0) -> f340_0_main_GT(i52:0:0 - 1) :|: i52:0:0 > 0 ---------------------------------------- (18) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f340_0_main_GT(INTEGER) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (19) Obligation: Rules: f340_0_main_GT(i52:0:0) -> f340_0_main_GT(c) :|: c = i52:0:0 - 1 && i52:0:0 > 0 ---------------------------------------- (20) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f340_0_main_GT(x)] = x The following rules are decreasing: f340_0_main_GT(i52:0:0) -> f340_0_main_GT(c) :|: c = i52:0:0 - 1 && i52:0:0 > 0 The following rules are bounded: f340_0_main_GT(i52:0:0) -> f340_0_main_GT(c) :|: c = i52:0:0 - 1 && i52:0:0 > 0 ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Termination digraph: Nodes: (1) f340_0_main_GT(x2, x3) -> f340_0_main_GT(x4, 0) :|: x2 > 0 && x3 = 0 && x4 = x2 - 1 Arcs: (1) -> (1) This digraph is fully evaluated! ---------------------------------------- (23) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (24) Obligation: Rules: f340_0_main_GT(x2:0, cons_0) -> f340_0_main_GT(x2:0 - 1, 0) :|: x2:0 > 0 && cons_0 = 0 ---------------------------------------- (25) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f340_0_main_GT(INTEGER, VARIABLE) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (26) Obligation: Rules: f340_0_main_GT(x2:0, c) -> f340_0_main_GT(c1, c2) :|: c2 = 0 && (c1 = x2:0 - 1 && c = 0) && (x2:0 > 0 && cons_0 = 0) ---------------------------------------- (27) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f340_0_main_GT ] = f340_0_main_GT_1 The following rules are decreasing: f340_0_main_GT(x2:0, c) -> f340_0_main_GT(c1, c2) :|: c2 = 0 && (c1 = x2:0 - 1 && c = 0) && (x2:0 > 0 && cons_0 = 0) The following rules are bounded: f340_0_main_GT(x2:0, c) -> f340_0_main_GT(c1, c2) :|: c2 = 0 && (c1 = x2:0 - 1 && c = 0) && (x2:0 > 0 && cons_0 = 0) ---------------------------------------- (28) YES