(0) Obligation:

JBC Problem based on JBC Program:
Manifest-Version: 1.0 Created-By: 1.6.0_16 (Sun Microsystems Inc.) Main-Class: Round3
public class Random {
static String[] args;
static int index = 0;

public static int random() {
String string = args[index];
index++;
return string.length();
}
}


public class Round3{
public static void main(String[] args) {
Random.args = args;
int x = Random.random();

while (x % 3 != 0) {
x++;
}
}
}


(1) JBC2FIG (SOUND transformation)

Constructed FIGraph.

(2) Obligation:

FIGraph based on JBC Program:
Graph of 124 nodes with 1 SCC.

(3) FIGtoITRSProof (SOUND transformation)

Transformed FIGraph to ITRS rules

(4) Obligation:

ITRS problem:

The following function symbols are pre-defined:
!=~Neq: (Integer, Integer) -> Boolean
*~Mul: (Integer, Integer) -> Integer
>=~Ge: (Integer, Integer) -> Boolean
-1~UnaryMinus: (Integer) -> Integer
|~Bwor: (Integer, Integer) -> Integer
/~Div: (Integer, Integer) -> Integer
=~Eq: (Integer, Integer) -> Boolean
~Bwxor: (Integer, Integer) -> Integer
||~Lor: (Boolean, Boolean) -> Boolean
!~Lnot: (Boolean) -> Boolean
<~Lt: (Integer, Integer) -> Boolean
-~Sub: (Integer, Integer) -> Integer
<=~Le: (Integer, Integer) -> Boolean
>~Gt: (Integer, Integer) -> Boolean
~~Bwnot: (Integer) -> Integer
%~Mod: (Integer, Integer) -> Integer
&~Bwand: (Integer, Integer) -> Integer
+~Add: (Integer, Integer) -> Integer
&&~Land: (Boolean, Boolean) -> Boolean

The TRS R consists of the following rules:
Load416(i17) → Cond_Load416(!(i17 % 3 = 0), i17)
Cond_Load416(TRUE, i17) → Load416(i17 + 1)
The set Q consists of the following terms:
Load416(x0)
Cond_Load416(TRUE, x0)

(5) ITRStoIDPProof (EQUIVALENT transformation)

Added dependency pairs

(6) Obligation:

IDP problem:
The following function symbols are pre-defined:
!=~Neq: (Integer, Integer) -> Boolean
*~Mul: (Integer, Integer) -> Integer
>=~Ge: (Integer, Integer) -> Boolean
-1~UnaryMinus: (Integer) -> Integer
|~Bwor: (Integer, Integer) -> Integer
/~Div: (Integer, Integer) -> Integer
=~Eq: (Integer, Integer) -> Boolean
~Bwxor: (Integer, Integer) -> Integer
||~Lor: (Boolean, Boolean) -> Boolean
!~Lnot: (Boolean) -> Boolean
<~Lt: (Integer, Integer) -> Boolean
-~Sub: (Integer, Integer) -> Integer
<=~Le: (Integer, Integer) -> Boolean
>~Gt: (Integer, Integer) -> Boolean
~~Bwnot: (Integer) -> Integer
%~Mod: (Integer, Integer) -> Integer
&~Bwand: (Integer, Integer) -> Integer
+~Add: (Integer, Integer) -> Integer
&&~Land: (Boolean, Boolean) -> Boolean


The following domains are used:

Boolean, Integer


The ITRS R consists of the following rules:
Load416(i17) → Cond_Load416(!(i17 % 3 = 0), i17)
Cond_Load416(TRUE, i17) → Load416(i17 + 1)

The integer pair graph contains the following rules and edges:
(0): LOAD416(i17[0]) → COND_LOAD416(!(i17[0] % 3 = 0), i17[0])
(1): COND_LOAD416(TRUE, i17[1]) → LOAD416(i17[1] + 1)

(0) -> (1), if ((i17[0]* i17[1])∧(!(i17[0] % 3 = 0) →* TRUE))


(1) -> (0), if ((i17[1] + 1* i17[0]))



The set Q consists of the following terms:
Load416(x0)
Cond_Load416(TRUE, x0)

(7) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(8) Obligation:

IDP problem:
The following function symbols are pre-defined:
!=~Neq: (Integer, Integer) -> Boolean
*~Mul: (Integer, Integer) -> Integer
>=~Ge: (Integer, Integer) -> Boolean
-1~UnaryMinus: (Integer) -> Integer
|~Bwor: (Integer, Integer) -> Integer
/~Div: (Integer, Integer) -> Integer
=~Eq: (Integer, Integer) -> Boolean
~Bwxor: (Integer, Integer) -> Integer
||~Lor: (Boolean, Boolean) -> Boolean
!~Lnot: (Boolean) -> Boolean
<~Lt: (Integer, Integer) -> Boolean
-~Sub: (Integer, Integer) -> Integer
<=~Le: (Integer, Integer) -> Boolean
>~Gt: (Integer, Integer) -> Boolean
~~Bwnot: (Integer) -> Integer
%~Mod: (Integer, Integer) -> Integer
&~Bwand: (Integer, Integer) -> Integer
+~Add: (Integer, Integer) -> Integer
&&~Land: (Boolean, Boolean) -> Boolean


The following domains are used:

Boolean, Integer


R is empty.

The integer pair graph contains the following rules and edges:
(0): LOAD416(i17[0]) → COND_LOAD416(!(i17[0] % 3 = 0), i17[0])
(1): COND_LOAD416(TRUE, i17[1]) → LOAD416(i17[1] + 1)

(0) -> (1), if ((i17[0]* i17[1])∧(!(i17[0] % 3 = 0) →* TRUE))


(1) -> (0), if ((i17[1] + 1* i17[0]))



The set Q consists of the following terms:
Load416(x0)
Cond_Load416(TRUE, x0)

(9) IDPtoQDPProof (SOUND transformation)

Represented integers and predefined function symbols by Terms

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LOAD416(i17[0]) → COND_LOAD416(not(equal_int(mod_int(i17[0], pos(s(s(s(01))))), pos(01))), i17[0])
COND_LOAD416(true, i17[1]) → LOAD416(plus_int(pos(s(01)), i17[1]))

The TRS R consists of the following rules:

not(true) → false
not(false) → true
equal_int(pos(01), pos(01)) → true
equal_int(neg(01), pos(01)) → true
equal_int(neg(01), neg(01)) → true
equal_int(pos(01), neg(01)) → true
equal_int(pos(01), pos(s(y))) → false
equal_int(neg(01), pos(s(y))) → false
equal_int(pos(01), neg(s(y))) → false
equal_int(neg(01), neg(s(y))) → false
equal_int(pos(s(x)), pos(01)) → false
equal_int(pos(s(x)), neg(01)) → false
equal_int(neg(s(x)), pos(01)) → false
equal_int(neg(s(x)), neg(01)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(01, s(x)) → 01
mod_nat(s(x), s(y)) → if(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(true, x, y) → x
if(false, x, y) → y
minus_nat_s(x, 01) → x
minus_nat_s(01, s(y)) → 01
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(01, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(01, 01) → pos(01)
minus_nat(01, s(y)) → neg(s(y))
minus_nat(s(x), 01) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)

The set Q consists of the following terms:

Load416(x0)
Cond_Load416(true, x0)
not(true)
not(false)
equal_int(pos(01), pos(01))
equal_int(neg(01), pos(01))
equal_int(neg(01), neg(01))
equal_int(pos(01), neg(01))
equal_int(pos(01), pos(s(x0)))
equal_int(neg(01), pos(s(x0)))
equal_int(pos(01), neg(s(x0)))
equal_int(neg(01), neg(s(x0)))
equal_int(pos(s(x0)), pos(01))
equal_int(pos(s(x0)), neg(01))
equal_int(neg(s(x0)), pos(01))
equal_int(neg(s(x0)), neg(01))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(01, s(x0))
mod_nat(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
minus_nat_s(x0, 01)
minus_nat_s(01, s(x0))
minus_nat_s(s(x0), s(x1))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(01, x0)
plus_nat(s(x0), x1)
minus_nat(01, 01)
minus_nat(01, s(x0))
minus_nat(s(x0), 01)
minus_nat(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(11) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LOAD416(i17[0]) → COND_LOAD416(not(equal_int(mod_int(i17[0], pos(s(s(s(01))))), pos(01))), i17[0])
COND_LOAD416(true, i17[1]) → LOAD416(plus_int(pos(s(01)), i17[1]))

The TRS R consists of the following rules:

plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(01, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(01, 01) → pos(01)
minus_nat(01, s(y)) → neg(s(y))
minus_nat(s(x), 01) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(01), pos(01)) → true
equal_int(neg(01), pos(01)) → true
equal_int(pos(s(x)), pos(01)) → false
equal_int(neg(s(x)), pos(01)) → false
not(true) → false
not(false) → true
mod_nat(01, s(x)) → 01
mod_nat(s(x), s(y)) → if(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
minus_nat_s(x, 01) → x
minus_nat_s(01, s(y)) → 01
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

Load416(x0)
Cond_Load416(true, x0)
not(true)
not(false)
equal_int(pos(01), pos(01))
equal_int(neg(01), pos(01))
equal_int(neg(01), neg(01))
equal_int(pos(01), neg(01))
equal_int(pos(01), pos(s(x0)))
equal_int(neg(01), pos(s(x0)))
equal_int(pos(01), neg(s(x0)))
equal_int(neg(01), neg(s(x0)))
equal_int(pos(s(x0)), pos(01))
equal_int(pos(s(x0)), neg(01))
equal_int(neg(s(x0)), pos(01))
equal_int(neg(s(x0)), neg(01))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(01, s(x0))
mod_nat(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
minus_nat_s(x0, 01)
minus_nat_s(01, s(x0))
minus_nat_s(s(x0), s(x1))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(01, x0)
plus_nat(s(x0), x1)
minus_nat(01, 01)
minus_nat(01, s(x0))
minus_nat(s(x0), 01)
minus_nat(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(13) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

Load416(x0)
Cond_Load416(true, x0)

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LOAD416(i17[0]) → COND_LOAD416(not(equal_int(mod_int(i17[0], pos(s(s(s(01))))), pos(01))), i17[0])
COND_LOAD416(true, i17[1]) → LOAD416(plus_int(pos(s(01)), i17[1]))

The TRS R consists of the following rules:

plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(01, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(01, 01) → pos(01)
minus_nat(01, s(y)) → neg(s(y))
minus_nat(s(x), 01) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(01), pos(01)) → true
equal_int(neg(01), pos(01)) → true
equal_int(pos(s(x)), pos(01)) → false
equal_int(neg(s(x)), pos(01)) → false
not(true) → false
not(false) → true
mod_nat(01, s(x)) → 01
mod_nat(s(x), s(y)) → if(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
minus_nat_s(x, 01) → x
minus_nat_s(01, s(y)) → 01
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

not(true)
not(false)
equal_int(pos(01), pos(01))
equal_int(neg(01), pos(01))
equal_int(neg(01), neg(01))
equal_int(pos(01), neg(01))
equal_int(pos(01), pos(s(x0)))
equal_int(neg(01), pos(s(x0)))
equal_int(pos(01), neg(s(x0)))
equal_int(neg(01), neg(s(x0)))
equal_int(pos(s(x0)), pos(01))
equal_int(pos(s(x0)), neg(01))
equal_int(neg(s(x0)), pos(01))
equal_int(neg(s(x0)), neg(01))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(01, s(x0))
mod_nat(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
minus_nat_s(x0, 01)
minus_nat_s(01, s(x0))
minus_nat_s(s(x0), s(x1))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(01, x0)
plus_nat(s(x0), x1)
minus_nat(01, 01)
minus_nat(01, s(x0))
minus_nat(s(x0), 01)
minus_nat(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LOAD416(i17[0]) → COND_LOAD416(not(equal_int(mod_int(i17[0], pos(s(s(s(01))))), pos(01))), i17[0])
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

POL(LOAD416(x1)) = 1 +
[0,0]
·x1

POL(COND_LOAD416(x1, x2)) = 0 +
[0,1]
·x1 +
[0,0]
·x2

POL(not(x1)) =
/0\
\0/
+
/01\
\10/
·x1

POL(equal_int(x1, x2)) =
/0\
\0/
+
/01\
\10/
·x1 +
/00\
\00/
·x2

POL(mod_int(x1, x2)) =
/0\
\0/
+
/10\
\00/
·x1 +
/00\
\10/
·x2

POL(pos(x1)) =
/0\
\0/
+
/01\
\10/
·x1

POL(s(x1)) =
/1\
\0/
+
/11\
\00/
·x1

POL(01) =
/0\
\1/

POL(true) =
/0\
\1/

POL(plus_int(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\10/
·x2

POL(mod_nat(x1, x2)) =
/0\
\0/
+
/00\
\01/
·x1 +
/00\
\00/
·x2

POL(neg(x1)) =
/0\
\0/
+
/01\
\10/
·x1

POL(false) =
/1\
\0/

POL(minus_nat(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/01\
\00/
·x2

POL(plus_nat(x1, x2)) =
/0\
\0/
+
/11\
\01/
·x1 +
/00\
\11/
·x2

POL(if(x1, x2, x3)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\00/
·x2 +
/00\
\00/
·x3

POL(greatereq_int(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\00/
·x2

POL(minus_nat_s(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/10\
\00/
·x2

The following usable rules [FROCOS05] were oriented:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(01), pos(01)) → true
equal_int(neg(01), pos(01)) → true
equal_int(pos(s(x)), pos(01)) → false
equal_int(neg(s(x)), pos(01)) → false
not(true) → false
not(false) → true
mod_nat(01, s(x)) → 01
mod_nat(s(x), s(y)) → if(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

COND_LOAD416(true, i17[1]) → LOAD416(plus_int(pos(s(01)), i17[1]))

The TRS R consists of the following rules:

plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(01, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(01, 01) → pos(01)
minus_nat(01, s(y)) → neg(s(y))
minus_nat(s(x), 01) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(01), pos(01)) → true
equal_int(neg(01), pos(01)) → true
equal_int(pos(s(x)), pos(01)) → false
equal_int(neg(s(x)), pos(01)) → false
not(true) → false
not(false) → true
mod_nat(01, s(x)) → 01
mod_nat(s(x), s(y)) → if(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
minus_nat_s(x, 01) → x
minus_nat_s(01, s(y)) → 01
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

not(true)
not(false)
equal_int(pos(01), pos(01))
equal_int(neg(01), pos(01))
equal_int(neg(01), neg(01))
equal_int(pos(01), neg(01))
equal_int(pos(01), pos(s(x0)))
equal_int(neg(01), pos(s(x0)))
equal_int(pos(01), neg(s(x0)))
equal_int(neg(01), neg(s(x0)))
equal_int(pos(s(x0)), pos(01))
equal_int(pos(s(x0)), neg(01))
equal_int(neg(s(x0)), pos(01))
equal_int(neg(s(x0)), neg(01))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(01, s(x0))
mod_nat(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
minus_nat_s(x0, 01)
minus_nat_s(01, s(x0))
minus_nat_s(s(x0), s(x1))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(01, x0)
plus_nat(s(x0), x1)
minus_nat(01, 01)
minus_nat(01, s(x0))
minus_nat(s(x0), 01)
minus_nat(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

(17) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(18) TRUE