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 SharingPair$SharingPair$next296 : Field ref; 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); // 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 int$java.lang.String$length$59(__this : ref) returns (__ret : int); // @line: 4 // procedure void$SharingPair$main$2454($param_0 : [int]ref) modifies $stringSize, $HeapVar, java.lang.String$lp$$rp$$Random$args254; { var $r618 : ref; var $r517 : ref; var r09 : [int]ref; var $r412 : ref; var r719 : ref; var i015 : int; var r111 : ref; var r213 : ref; var $r310 : ref; Block20: r09 := $param_0; // @line: 5 java.lang.String$lp$$rp$$Random$args254 := r09; // @line: 6 $r310 := $newvariable((21)); assume ($neref(($newvariable((21))), ($null))==1); assert ($neref(($r310), ($null))==1); // @line: 6 call void$SharingPair$$la$init$ra$$2453(($r310)); // @line: 6 r111 := $r310; // @line: 7 $r412 := $newvariable((22)); assume ($neref(($newvariable((22))), ($null))==1); assert ($neref(($r412), ($null))==1); // @line: 7 call void$SharingPair$$la$init$ra$$2453(($r412)); // @line: 7 r213 := $r412; // @line: 9 call i015 := int$Random$random$2229(); goto Block23; // @line: 10 Block23: goto Block24, Block26; // @line: 10 Block24: assume ($neint((i015), (0))==1); goto Block25; // @line: 10 Block26: // @line: 10 assume ($negInt(($neint((i015), (0))))==1); assert ($neref((r111), ($null))==1); // @line: 11 $HeapVar[r111, SharingPair$SharingPair$next296] := r213; // @line: 12 r719 := r111; goto Block27; // @line: 14 Block25: assert ($neref((r213), ($null))==1); // @line: 14 $HeapVar[r213, SharingPair$SharingPair$next296] := r111; goto Block28; // @line: 19 Block27: goto Block31, Block29; // @line: 15 Block28: // @line: 15 r719 := r213; goto Block27; // @line: 19 Block31: // @line: 19 assume ($negInt(($neint((i015), (0))))==1); // @line: 20 $r618 := $newvariable((32)); assume ($neref(($newvariable((32))), ($null))==1); assert ($neref(($r618), ($null))==1); // @line: 20 call void$SharingPair$$la$init$ra$$2453(($r618)); assert ($neref((r111), ($null))==1); // @line: 20 $HeapVar[r111, SharingPair$SharingPair$next296] := $r618; assert ($neref((r719), ($null))==1); // @line: 21 r719 := $HeapVar[r719, SharingPair$SharingPair$next296]; goto Block27; // @line: 19 Block29: assume ($neint((i015), (0))==1); goto Block30; // @line: 23 Block30: // @line: 23 $r517 := $newvariable((33)); assume ($neref(($newvariable((33))), ($null))==1); goto Block34; // @line: 23 Block34: assert ($neref(($r517), ($null))==1); // @line: 23 call void$SharingPair$$la$init$ra$$2453(($r517)); assert ($neref((r213), ($null))==1); // @line: 23 $HeapVar[r213, SharingPair$SharingPair$next296] := $r517; assert ($neref((r719), ($null))==1); // @line: 24 r719 := $HeapVar[r719, SharingPair$SharingPair$next296]; goto Block27; } // 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 void$Random$$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} $negReal($param00 : realVar) returns (__ret : int); // ()> procedure void$java.lang.Object$$la$init$ra$$28(__this : ref); // 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: 5 // procedure int$Random$random$2229() returns (__ret : int) modifies $stringSize, int$Random$index0; { var $i37 : int; var $i15 : int; var $i02 : int; var $i26 : int; var $r13 : [int]ref; var r04 : ref; // @line: 6 Block17: // @line: 6 $r13 := java.lang.String$lp$$rp$$Random$args254; // @line: 6 $i02 := int$Random$index0; assert ($geint(($i02), (0))==1); assert ($ltint(($i02), ($refArrSize[$r13[$arrSizeIdx]]))==1); // @line: 6 r04 := $r13[$i02]; // @line: 7 $i15 := int$Random$index0; // @line: 7 $i26 := $addint(($i15), (1)); // @line: 7 int$Random$index0 := $i26; $i37 := $stringSize[r04]; // @line: 8 __ret := $i37; 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$SharingPair$$la$init$ra$$2453(__this : ref) requires ($neref((__this), ($null))==1); { var r08 : ref; Block19: r08 := __this; assert ($neref((r08), ($null))==1); // @line: 1 call void$java.lang.Object$$la$init$ra$$28((r08)); 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 } // 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 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); // @line: 2 // ()> procedure void$Random$$la$clinit$ra$$2230() modifies int$Random$index0; { // @line: 3 Block18: // @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) }