/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 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, 349 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 0 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 117 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 47 ms] (12) IRSwT (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] (14) IRSwT (15) TempFilterProof [SOUND, 58 ms] (16) IntTRS (17) RankingReductionPairProof [EQUIVALENT, 0 ms] (18) IntTRS (19) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (20) 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 PastaC2 { public static void main(String[] args) { Random.args = args; int x = Random.random(); while (x >= 0) { x = x+1; int y = 1; while (x >= y) { y++; } x = x-2; } } } 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 PastaC2 { public static void main(String[] args) { Random.args = args; int x = Random.random(); while (x >= 0) { x = x+1; int y = 1; while (x >= y) { y++; } x = x-2; } } } 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: PastaC2.main([Ljava/lang/String;)V: Graph of 127 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: PastaC2.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 27 IRulesP rules: f716_0_main_LT(EOS(STATIC_716), i49, i49) -> f718_0_main_LT(EOS(STATIC_718), i49, i49) :|: TRUE f718_0_main_LT(EOS(STATIC_718), i49, i49) -> f720_0_main_Load(EOS(STATIC_720), i49) :|: i49 >= 0 f720_0_main_Load(EOS(STATIC_720), i49) -> f723_0_main_ConstantStackPush(EOS(STATIC_723), i49) :|: TRUE f723_0_main_ConstantStackPush(EOS(STATIC_723), i49) -> f725_0_main_IntArithmetic(EOS(STATIC_725), i49, 1) :|: TRUE f725_0_main_IntArithmetic(EOS(STATIC_725), i49, matching1) -> f728_0_main_Store(EOS(STATIC_728), i49 + 1) :|: i49 >= 0 && matching1 = 1 f728_0_main_Store(EOS(STATIC_728), i50) -> f731_0_main_ConstantStackPush(EOS(STATIC_731), i50) :|: TRUE f731_0_main_ConstantStackPush(EOS(STATIC_731), i50) -> f733_0_main_Store(EOS(STATIC_733), i50, 1) :|: TRUE f733_0_main_Store(EOS(STATIC_733), i50, matching1) -> f734_0_main_Load(EOS(STATIC_734), i50, 1) :|: TRUE && matching1 = 1 f734_0_main_Load(EOS(STATIC_734), i50, matching1) -> f780_0_main_Load(EOS(STATIC_780), i50, 1) :|: TRUE && matching1 = 1 f780_0_main_Load(EOS(STATIC_780), i50, i51) -> f806_0_main_Load(EOS(STATIC_806), i50, i51) :|: TRUE f806_0_main_Load(EOS(STATIC_806), i50, i54) -> f849_0_main_Load(EOS(STATIC_849), i50, i54) :|: TRUE f849_0_main_Load(EOS(STATIC_849), i50, i58) -> f850_0_main_Load(EOS(STATIC_850), i50, i58, i50) :|: TRUE f850_0_main_Load(EOS(STATIC_850), i50, i58, i50) -> f851_0_main_LT(EOS(STATIC_851), i50, i58, i50, i58) :|: TRUE f851_0_main_LT(EOS(STATIC_851), i50, i58, i50, i58) -> f860_0_main_LT(EOS(STATIC_860), i50, i58, i50, i58) :|: i50 < i58 f851_0_main_LT(EOS(STATIC_851), i50, i58, i50, i58) -> f862_0_main_LT(EOS(STATIC_862), i50, i58, i50, i58) :|: i50 >= i58 f860_0_main_LT(EOS(STATIC_860), i50, i58, i50, i58) -> f867_0_main_Load(EOS(STATIC_867), i50) :|: i50 < i58 f867_0_main_Load(EOS(STATIC_867), i50) -> f875_0_main_ConstantStackPush(EOS(STATIC_875), i50) :|: TRUE f875_0_main_ConstantStackPush(EOS(STATIC_875), i50) -> f879_0_main_IntArithmetic(EOS(STATIC_879), i50, 2) :|: TRUE f879_0_main_IntArithmetic(EOS(STATIC_879), i50, matching1) -> f889_0_main_Store(EOS(STATIC_889), i50 - 2) :|: i50 > 0 && matching1 = 2 f889_0_main_Store(EOS(STATIC_889), i62) -> f891_0_main_JMP(EOS(STATIC_891), i62) :|: TRUE f891_0_main_JMP(EOS(STATIC_891), i62) -> f896_0_main_Load(EOS(STATIC_896), i62) :|: TRUE f896_0_main_Load(EOS(STATIC_896), i62) -> f715_0_main_Load(EOS(STATIC_715), i62) :|: TRUE f715_0_main_Load(EOS(STATIC_715), i47) -> f716_0_main_LT(EOS(STATIC_716), i47, i47) :|: TRUE f862_0_main_LT(EOS(STATIC_862), i50, i58, i50, i58) -> f872_0_main_Inc(EOS(STATIC_872), i50, i58) :|: i50 >= i58 f872_0_main_Inc(EOS(STATIC_872), i50, i58) -> f877_0_main_JMP(EOS(STATIC_877), i50, i58 + 1) :|: TRUE f877_0_main_JMP(EOS(STATIC_877), i50, i60) -> f886_0_main_Load(EOS(STATIC_886), i50, i60) :|: TRUE f886_0_main_Load(EOS(STATIC_886), i50, i60) -> f849_0_main_Load(EOS(STATIC_849), i50, i60) :|: TRUE Combined rules. Obtained 2 IRulesP rules: f851_0_main_LT(EOS(STATIC_851), i50:0, i58:0, i50:0, i58:0) -> f851_0_main_LT(EOS(STATIC_851), i50:0 - 1, 1, i50:0 - 1, 1) :|: i50:0 > 1 && i58:0 > i50:0 f851_0_main_LT(EOS(STATIC_851), i50:0, i58:0, i50:0, i58:0) -> f851_0_main_LT(EOS(STATIC_851), i50:0, i58:0 + 1, i50:0, i58:0 + 1) :|: i58:0 <= i50:0 Filtered constant ground arguments: f851_0_main_LT(x1, x2, x3, x4, x5) -> f851_0_main_LT(x2, x3, x4, x5) EOS(x1) -> EOS Filtered duplicate arguments: f851_0_main_LT(x1, x2, x3, x4) -> f851_0_main_LT(x3, x4) Finished conversion. Obtained 2 rules.P rules: f851_0_main_LT(i50:0, i58:0) -> f851_0_main_LT(i50:0 - 1, 1) :|: i50:0 > 1 && i58:0 > i50:0 f851_0_main_LT(i50:0, i58:0) -> f851_0_main_LT(i50:0, i58:0 + 1) :|: i58:0 <= i50:0 ---------------------------------------- (8) Obligation: Rules: f851_0_main_LT(i50:0, i58:0) -> f851_0_main_LT(i50:0 - 1, 1) :|: i50:0 > 1 && i58:0 > i50:0 f851_0_main_LT(x, x1) -> f851_0_main_LT(x, x1 + 1) :|: x1 <= x ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f851_0_main_LT(i50:0, i58:0) -> f851_0_main_LT(arith, 1) :|: i50:0 > 1 && i58:0 > i50:0 && arith = i50:0 - 1 f851_0_main_LT(x2, x3) -> f851_0_main_LT(x2, x4) :|: x3 <= x2 && x4 = x3 + 1 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f851_0_main_LT(i50:0, i58:0) -> f851_0_main_LT(arith, 1) :|: i50:0 > 1 && i58:0 > i50:0 && arith = i50:0 - 1 (2) f851_0_main_LT(x2, x3) -> f851_0_main_LT(x2, x4) :|: x3 <= x2 && x4 = x3 + 1 Arcs: (1) -> (2) (2) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (12) Obligation: Termination digraph: Nodes: (1) f851_0_main_LT(i50:0, i58:0) -> f851_0_main_LT(arith, 1) :|: i50:0 > 1 && i58:0 > i50:0 && arith = i50:0 - 1 (2) f851_0_main_LT(x2, x3) -> f851_0_main_LT(x2, x4) :|: x3 <= x2 && x4 = x3 + 1 Arcs: (1) -> (2) (2) -> (1), (2) This digraph is fully evaluated! ---------------------------------------- (13) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (14) Obligation: Rules: f851_0_main_LT(x2:0, x3:0) -> f851_0_main_LT(x2:0, x3:0 + 1) :|: x3:0 <= x2:0 f851_0_main_LT(i50:0:0, i58:0:0) -> f851_0_main_LT(i50:0:0 - 1, 1) :|: i50:0:0 > 1 && i58:0:0 > i50:0:0 ---------------------------------------- (15) TempFilterProof (SOUND) Used the following sort dictionary for filtering: f851_0_main_LT(INTEGER, VARIABLE) Replaced non-predefined constructor symbols by 0. ---------------------------------------- (16) Obligation: Rules: f851_0_main_LT(x2:0, x3:0) -> f851_0_main_LT(x2:0, c) :|: c = x3:0 + 1 && x3:0 <= x2:0 f851_0_main_LT(i50:0:0, i58:0:0) -> f851_0_main_LT(c1, c2) :|: c2 = 1 && c1 = i50:0:0 - 1 && (i50:0:0 > 1 && i58:0:0 > i50:0:0) ---------------------------------------- (17) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f851_0_main_LT ] = 4*f851_0_main_LT_1 The following rules are decreasing: f851_0_main_LT(i50:0:0, i58:0:0) -> f851_0_main_LT(c1, c2) :|: c2 = 1 && c1 = i50:0:0 - 1 && (i50:0:0 > 1 && i58:0:0 > i50:0:0) The following rules are bounded: f851_0_main_LT(i50:0:0, i58:0:0) -> f851_0_main_LT(c1, c2) :|: c2 = 1 && c1 = i50:0:0 - 1 && (i50:0:0 > 1 && i58:0:0 > i50:0:0) ---------------------------------------- (18) Obligation: Rules: f851_0_main_LT(x2:0, x3:0) -> f851_0_main_LT(x2:0, c) :|: c = x3:0 + 1 && x3:0 <= x2:0 ---------------------------------------- (19) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f851_0_main_LT(x, x1)] = x - x1 The following rules are decreasing: f851_0_main_LT(x2:0, x3:0) -> f851_0_main_LT(x2:0, c) :|: c = x3:0 + 1 && x3:0 <= x2:0 The following rules are bounded: f851_0_main_LT(x2:0, x3:0) -> f851_0_main_LT(x2:0, c) :|: c = x3:0 + 1 && x3:0 <= x2:0 ---------------------------------------- (20) YES