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 int$Random$index0 : int; var java.lang.String$lp$$rp$$Random$args254 : [int]ref; // 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); // 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); // @line: 9 // procedure void$AckermannR$main$2230($param_0 : [int]ref) modifies $stringSize, java.lang.String$lp$$rp$$Random$args254; { var $i012 : int; var r011 : [int]ref; var $i113 : int; //temp local variables var $freshlocal0 : int; Block27: r011 := $param_0; // @line: 10 java.lang.String$lp$$rp$$Random$args254 := r011; // @line: 11 call $i012 := int$Random$random$2232(); // @line: 11 call $i113 := int$Random$random$2232(); // @line: 11 call $freshlocal0 := int$AckermannR$ack$2229(($i012), ($i113)); return; } // 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 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); // 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); // 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 r015 : ref; Block28: r015 := __this; assert ($neref((r015), ($null))==1); // @line: 1 call void$java.lang.Object$$la$init$ra$$28((r015)); 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); // @line: 3 // procedure int$AckermannR$ack$2229($param_0 : int, $param_1 : int) returns (__ret : int) { var i13 : int; var $i810 : int; var $i35 : int; var $i68 : int; var $i46 : int; var i02 : int; var $i24 : int; var $i79 : int; var $i57 : int; Block17: i02 := $param_0; i13 := $param_1; goto Block18; // @line: 4 Block18: goto Block19, Block21; // @line: 4 Block19: assume ($gtint((i02), (0))==1); goto Block20; // @line: 4 Block21: // @line: 4 assume ($negInt(($gtint((i02), (0))))==1); // @line: 6 $i810 := $addint((i13), (1)); // @line: 6 __ret := $i810; return; // @line: 5 Block20: goto Block24, Block22; // @line: 5 Block24: // @line: 5 assume ($negInt(($gtint((i13), (0))))==1); goto Block25; // @line: 5 Block22: assume ($gtint((i13), (0))==1); goto Block23; // @line: 6 Block25: // @line: 6 $i68 := $subint((i02), (1)); // @line: 6 call $i79 := int$AckermannR$ack$2229(($i68), (1)); // @line: 6 __ret := $i79; return; // @line: 6 Block23: // @line: 6 $i35 := $subint((i02), (1)); goto Block26; // @line: 6 Block26: // @line: 6 $i24 := $subint((i13), (1)); // @line: 6 call $i46 := int$AckermannR$ack$2229((i02), ($i24)); // @line: 6 call $i57 := int$AckermannR$ack$2229(($i35), ($i46)); // @line: 6 __ret := $i57; return; } // 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 int$java.lang.String$length$59(__this : ref) returns (__ret : int); // @line: 5 // procedure int$Random$random$2232() returns (__ret : int) modifies int$Random$index0, $stringSize; { var $i017 : int; var $r116 : [int]ref; var $r220 : [int]ref; var r021 : ref; var $i322 : int; var $i423 : int; var $i219 : int; var $i118 : int; var $i524 : int; // @line: 6 Block29: // @line: 6 $i118 := int$Random$index0; // @line: 6 $r116 := java.lang.String$lp$$rp$$Random$args254; // @line: 6 $i017 := $refArrSize[$r116[$arrSizeIdx]]; goto Block30; // @line: 6 Block30: goto Block31, Block33; // @line: 6 Block31: assume ($ltint(($i118), ($i017))==1); goto Block32; // @line: 6 Block33: // @line: 6 assume ($negInt(($ltint(($i118), ($i017))))==1); // @line: 7 __ret := 0; return; // @line: 9 Block32: // @line: 9 $r220 := java.lang.String$lp$$rp$$Random$args254; goto Block34; // @line: 9 Block34: // @line: 9 $i219 := int$Random$index0; assert ($geint(($i219), (0))==1); assert ($ltint(($i219), ($refArrSize[$r220[$arrSizeIdx]]))==1); // @line: 9 r021 := $r220[$i219]; // @line: 10 $i322 := int$Random$index0; // @line: 10 $i423 := $addint(($i322), (1)); // @line: 10 int$Random$index0 := $i423; $i524 := $stringSize[r021]; // @line: 11 __ret := $i524; return; } // 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 } // 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 void$AckermannR$$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} $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 is generated by joogie. function {:inline true} $eqref(x : ref, y : ref) returns (__ret : int) { if (x == y) then 1 else 0 } // 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 void$java.lang.Object$$la$init$ra$$28(__this : ref); // @line: 2 // ()> procedure void$Random$$la$clinit$ra$$2233() modifies int$Random$index0; { // @line: 3 Block35: // @line: 3 int$Random$index0 := 0; return; } // 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) }