type ref; type realVar; type classConst; // type Field x; // var $HeapVar : [ref, Field x]x; const unique $null : ref ; const unique $intArrNull : [int]int ; const unique $realArrNull : [int]realVar ; const unique $refArrNull : [int]ref ; const unique $arrSizeIdx : int; var $intArrSize : [int]int; var $realArrSize : [realVar]int; var $refArrSize : [ref]int; var $stringSize : [ref]int; //built-in axioms axiom ($arrSizeIdx == -1); //note: new version doesn't put helpers in the perlude anymore//Prelude finished var java.lang.String$lp$$rp$$Random$args254 : [int]ref; var int$Random$index0 : int; // procedure is generated by joogie. function {:inline true} $neref(x : ref, y : ref) returns (__ret : int) { if (x != y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $realarrtoref($param00 : [int]realVar) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $modreal($param00 : realVar, $param11 : realVar) returns (__ret : realVar); // procedure is generated by joogie. function {:inline true} $leref($param00 : ref, $param11 : ref) returns (__ret : int); // @line: 2 // procedure void$AProVEMathRecursive$main$2229($param_0 : [int]ref) modifies java.lang.String$lp$$rp$$Random$args254, $stringSize; { var i16 : int; var i04 : int; var r02 : [int]ref; //temp local variables var $freshlocal0 : int; Block17: r02 := $param_0; // @line: 3 java.lang.String$lp$$rp$$Random$args254 := r02; // @line: 4 call i04 := int$Random$random$2232(); // @line: 5 call i16 := int$Random$random$2232(); // @line: 6 call $freshlocal0 := int$AProVEMathRecursive$power$2230((i04), (i16)); return; } // procedure is generated by joogie. function {:inline true} $modint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $gtref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $eqrealarray($param00 : [int]realVar, $param11 : [int]realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $addint(x : int, y : int) returns (__ret : int) { (x + y) } // ()> procedure void$java.lang.Object$$la$init$ra$$28(__this : ref); // procedure is generated by joogie. function {:inline true} $subref($param00 : ref, $param11 : ref) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $inttoreal($param00 : int) returns (__ret : realVar); // procedure is generated by joogie. function {:inline true} $shrint($param00 : int, $param11 : int) returns (__ret : int); // @line: 5 // procedure int$Random$random$2232() returns (__ret : int) modifies $stringSize, int$Random$index0; { var $i529 : int; var $r121 : [int]ref; var $i428 : int; var $i327 : int; var $i022 : int; var $i123 : int; var $r225 : [int]ref; var $i224 : int; var r026 : ref; // @line: 6 Block37: // @line: 6 $r121 := java.lang.String$lp$$rp$$Random$args254; // @line: 6 $i123 := $refArrSize[$r121[$arrSizeIdx]]; // @line: 6 $i022 := int$Random$index0; goto Block38; // @line: 6 Block38: goto Block39, Block41; // @line: 6 Block39: assume ($gtint(($i123), ($i022))==1); goto Block40; // @line: 6 Block41: // @line: 6 assume ($negInt(($gtint(($i123), ($i022))))==1); // @line: 7 __ret := 0; return; // @line: 9 Block40: // @line: 9 $r225 := java.lang.String$lp$$rp$$Random$args254; goto Block42; // @line: 9 Block42: // @line: 9 $i224 := int$Random$index0; assert ($geint(($i224), (0))==1); assert ($ltint(($i224), ($refArrSize[$r225[$arrSizeIdx]]))==1); // @line: 9 r026 := $r225[$i224]; // @line: 10 $i327 := int$Random$index0; // @line: 10 $i428 := $addint(($i327), (1)); // @line: 10 int$Random$index0 := $i428; goto Block43; // @line: 11 Block43: goto Block46, Block44; // @line: 11 Block46: // @line: 11 assume ($negInt(($neref((r026), ($null))))==1); // @line: 12 __ret := 0; return; // @line: 11 Block44: assume ($neref((r026), ($null))==1); goto Block45; // @line: 14 Block45: $i529 := $stringSize[r026]; goto Block47; // @line: 14 Block47: // @line: 14 __ret := $i529; return; } // procedure is generated by joogie. function {:inline true} $negReal($param00 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $ushrint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $refarrtoref($param00 : [int]ref) returns (__ret : ref); // @line: 2 // ()> procedure void$Random$$la$clinit$ra$$2233() modifies int$Random$index0; { // @line: 3 Block48: // @line: 3 int$Random$index0 := 0; return; } // procedure is generated by joogie. function {:inline true} $divref($param00 : ref, $param11 : ref) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $mulref($param00 : ref, $param11 : ref) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $neint(x : int, y : int) returns (__ret : int) { if (x != y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $ltreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $reftorefarr($param00 : ref) returns (__ret : [int]ref); // procedure is generated by joogie. function {:inline true} $gtint(x : int, y : int) returns (__ret : int) { if (x > y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $reftoint($param00 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $addref($param00 : ref, $param11 : ref) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $xorreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $andref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $cmpreal(x : realVar, y : realVar) returns (__ret : int) { if ($ltreal((x), (y)) == 1) then 1 else if ($eqreal((x), (y)) == 1) then 0 else -1 } // procedure is generated by joogie. function {:inline true} $addreal($param00 : realVar, $param11 : realVar) returns (__ret : realVar); // procedure is generated by joogie. function {:inline true} $gtreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // ()> procedure void$Random$$la$init$ra$$2231(__this : ref) requires ($neref((__this), ($null))==1); { var r020 : ref; Block36: r020 := __this; assert ($neref((r020), ($null))==1); // @line: 1 call void$java.lang.Object$$la$init$ra$$28((r020)); return; } // procedure is generated by joogie. function {:inline true} $eqreal(x : realVar, y : realVar) returns (__ret : int) { if (x == y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $ltint(x : int, y : int) returns (__ret : int) { if (x < y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $newvariable($param00 : int) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $divint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $geint(x : int, y : int) returns (__ret : int) { if (x >= y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $mulint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $leint(x : int, y : int) returns (__ret : int) { if (x <= y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $shlref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $eqrefarray($param00 : [int]ref, $param11 : [int]ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $reftointarr($param00 : ref) returns (__ret : [int]int); // procedure is generated by joogie. function {:inline true} $ltref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $mulreal($param00 : realVar, $param11 : realVar) returns (__ret : realVar); // procedure is generated by joogie. function {:inline true} $shrref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $ushrreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $shrreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $divreal($param00 : realVar, $param11 : realVar) returns (__ret : realVar); // procedure is generated by joogie. function {:inline true} $orint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $reftorealarr($param00 : ref) returns (__ret : [int]realVar); // procedure is generated by joogie. function {:inline true} $cmpref(x : ref, y : ref) returns (__ret : int) { if ($ltref((x), (y)) == 1) then 1 else if ($eqref((x), (y)) == 1) then 0 else -1 } // procedure is generated by joogie. function {:inline true} $realtoint($param00 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $geref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $orreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $eqint(x : int, y : int) returns (__ret : int) { if (x == y) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $ushrref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $modref($param00 : ref, $param11 : ref) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $eqintarray($param00 : [int]int, $param11 : [int]int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $negRef($param00 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $lereal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $nereal(x : realVar, y : realVar) returns (__ret : int) { if (x != y) then 1 else 0 } // @line: 9 // procedure int$AProVEMathRecursive$power$2230($param_0 : int, $param_1 : int) returns (__ret : int) { var $i1019 : int; var $i615 : int; var i18 : int; var $i817 : int; var $i514 : int; var i213 : int; var $i918 : int; var $i716 : int; var i09 : int; var $i310 : int; var $i411 : int; Block18: i09 := $param_0; i18 := $param_1; goto Block19; // @line: 10 Block19: goto Block20, Block22; // @line: 10 Block20: assume ($gtint((i18), (0))==1); goto Block21; // @line: 10 Block22: // @line: 10 assume ($negInt(($gtint((i18), (0))))==1); // @line: 11 __ret := 1; return; // @line: 12 Block21: goto Block25, Block23; // @line: 12 Block25: // @line: 12 assume ($negInt(($neint((i18), (1))))==1); goto Block26; // @line: 12 Block23: assume ($neint((i18), (1))==1); goto Block24; // @line: 13 Block26: // @line: 13 __ret := i09; return; // @line: 14 Block24: goto Block27, Block29; // @line: 14 Block27: assume ($neint((i09), (2))==1); goto Block28; // @line: 14 Block29: // @line: 14 assume ($negInt(($neint((i09), (2))))==1); goto Block30; // @line: 16 Block28: // @line: 16 $i310 := $modint((i18), (2)); goto Block31; // @line: 15 Block30: // @line: 15 $i918 := $subint((i18), (1)); // @line: 15 $i1019 := $shlint((i09), ($i918)); // @line: 15 __ret := $i1019; return; // @line: 16 Block31: goto Block32, Block34; // @line: 16 Block32: assume ($neint(($i310), (1))==1); goto Block33; // @line: 16 Block34: // @line: 16 assume ($negInt(($neint(($i310), (1))))==1); // @line: 17 $i615 := $subint((i18), (1)); // @line: 17 call $i716 := int$AProVEMathRecursive$power$2230((i09), ($i615)); // @line: 17 $i817 := $mulint((i09), ($i716)); // @line: 17 __ret := $i817; return; // @line: 19 Block33: assert ($neint((2), (0))==1); // @line: 19 $i411 := $divint((i18), (2)); goto Block35; // @line: 19 Block35: // @line: 19 call i213 := int$AProVEMathRecursive$power$2230((i09), ($i411)); // @line: 20 $i514 := $mulint((i213), (i213)); // @line: 20 __ret := $i514; return; } // procedure is generated by joogie. function {:inline true} $instanceof($param00 : ref, $param11 : classConst) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $xorref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $orref($param00 : ref, $param11 : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $intarrtoref($param00 : [int]int) returns (__ret : ref); // procedure is generated by joogie. function {:inline true} $subreal($param00 : realVar, $param11 : realVar) returns (__ret : realVar); // procedure is generated by joogie. function {:inline true} $shlreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $negInt(x : int) returns (__ret : int) { if (x == 0) then 1 else 0 } // procedure is generated by joogie. function {:inline true} $gereal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure int$java.lang.String$length$59(__this : ref) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $eqref(x : ref, y : ref) returns (__ret : int) { if (x == y) then 1 else 0 } // ()> procedure void$AProVEMathRecursive$$la$init$ra$$2228(__this : ref) requires ($neref((__this), ($null))==1); { var r01 : ref; Block16: r01 := __this; assert ($neref((r01), ($null))==1); // @line: 1 call void$java.lang.Object$$la$init$ra$$28((r01)); return; } // procedure is generated by joogie. function {:inline true} $cmpint(x : int, y : int) returns (__ret : int) { if (x < y) then 1 else if (x == y) then 0 else -1 } // procedure is generated by joogie. function {:inline true} $andint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $andreal($param00 : realVar, $param11 : realVar) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $shlint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $xorint($param00 : int, $param11 : int) returns (__ret : int); // procedure is generated by joogie. function {:inline true} $subint(x : int, y : int) returns (__ret : int) { (x - y) }