/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, 97 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 206 ms] (4) JBCTerminationGraph (5) TerminationGraphToSCCProof [SOUND, 0 ms] (6) JBCTerminationSCC (7) SCCToIRSProof [SOUND, 106 ms] (8) IRSwT (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] (10) IRSwT (11) IRSwTTerminationDigraphProof [EQUIVALENT, 38 ms] (12) TRUE ---------------------------------------- (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 PastaB5 { public static void main(String[] args) { Random.args = args; int x = Random.random(); while (x > 0 && (x % 2) == 0) { x--; } } } 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 PastaB5 { public static void main(String[] args) { Random.args = args; int x = Random.random(); while (x > 0 && (x % 2) == 0) { x--; } } } 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: PastaB5.main([Ljava/lang/String;)V: Graph of 114 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: PastaB5.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 11 IRulesP rules: f313_0_main_LE(EOS(STATIC_313), i47, i47) -> f327_0_main_LE(EOS(STATIC_327), i47, i47) :|: TRUE f327_0_main_LE(EOS(STATIC_327), i47, i47) -> f337_0_main_Load(EOS(STATIC_337), i47) :|: i47 > 0 f337_0_main_Load(EOS(STATIC_337), i47) -> f344_0_main_ConstantStackPush(EOS(STATIC_344), i47, i47) :|: TRUE f344_0_main_ConstantStackPush(EOS(STATIC_344), i47, i47) -> f348_0_main_IntArithmetic(EOS(STATIC_348), i47, i47, 2) :|: TRUE f348_0_main_IntArithmetic(EOS(STATIC_348), i47, i47, matching1) -> f356_0_main_NE(EOS(STATIC_356), i47, i47 % 2) :|: TRUE && matching1 = 2 f356_0_main_NE(EOS(STATIC_356), i47, matching1) -> f365_0_main_NE(EOS(STATIC_365), i47, 0) :|: TRUE && matching1 = 0 f365_0_main_NE(EOS(STATIC_365), i47, matching1) -> f371_0_main_Inc(EOS(STATIC_371), i47) :|: TRUE && matching1 = 0 f371_0_main_Inc(EOS(STATIC_371), i47) -> f372_0_main_JMP(EOS(STATIC_372), i47 + -1) :|: TRUE f372_0_main_JMP(EOS(STATIC_372), i55) -> f401_0_main_Load(EOS(STATIC_401), i55) :|: TRUE f401_0_main_Load(EOS(STATIC_401), i55) -> f298_0_main_Load(EOS(STATIC_298), i55) :|: TRUE f298_0_main_Load(EOS(STATIC_298), i38) -> f313_0_main_LE(EOS(STATIC_313), i38, i38) :|: TRUE Combined rules. Obtained 2 IRulesP rules: f313_0_main_LE(EOS(STATIC_313), i47:0, i47:0) -> f313_0_main_LE'(EOS(STATIC_313), i47:0, i47:0) :|: i47:0 - 2 * div = 0 && i47:0 > 0 f313_0_main_LE'(EOS(STATIC_313), i47:0, i47:0) -> f313_0_main_LE(EOS(STATIC_313), i47:0 - 1, i47:0 - 1) :|: i47:0 > 0 && i47:0 - 2 * div = 0 && i47:0 - 2 * div < 2 && i47:0 - 2 * div > -2 Filtered constant ground arguments: f313_0_main_LE(x1, x2, x3) -> f313_0_main_LE(x2, x3) f313_0_main_LE'(x1, x2, x3) -> f313_0_main_LE'(x2, x3) EOS(x1) -> EOS Filtered duplicate arguments: f313_0_main_LE(x1, x2) -> f313_0_main_LE(x2) f313_0_main_LE'(x1, x2) -> f313_0_main_LE'(x2) Finished conversion. Obtained 2 rules.P rules: f313_0_main_LE(i47:0) -> f313_0_main_LE'(i47:0) :|: i47:0 - 2 * div = 0 && i47:0 > 0 f313_0_main_LE'(i47:0) -> f313_0_main_LE(i47:0 - 1) :|: i47:0 - 2 * div = 0 && i47:0 > 0 && i47:0 - 2 * div > -2 && i47:0 - 2 * div < 2 ---------------------------------------- (8) Obligation: Rules: f313_0_main_LE(x) -> f313_0_main_LE'(x) :|: x - 2 * x1 = 0 && x > 0 f313_0_main_LE'(x2) -> f313_0_main_LE(x2 - 1) :|: x2 - 2 * x3 = 0 && x2 > 0 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 ---------------------------------------- (9) IRSFormatTransformerProof (EQUIVALENT) Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). ---------------------------------------- (10) Obligation: Rules: f313_0_main_LE(x) -> f313_0_main_LE'(x) :|: x - 2 * x1 = 0 && x > 0 f313_0_main_LE'(x2) -> f313_0_main_LE(arith) :|: x2 - 2 * x3 = 0 && x2 > 0 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 && arith = x2 - 1 ---------------------------------------- (11) IRSwTTerminationDigraphProof (EQUIVALENT) Constructed termination digraph! Nodes: (1) f313_0_main_LE(x) -> f313_0_main_LE'(x) :|: x - 2 * x1 = 0 && x > 0 (2) f313_0_main_LE'(x2) -> f313_0_main_LE(arith) :|: x2 - 2 * x3 = 0 && x2 > 0 && x2 - 2 * x3 > -2 && x2 - 2 * x3 < 2 && arith = x2 - 1 Arcs: (1) -> (2) This digraph is fully evaluated! ---------------------------------------- (12) TRUE