:- module('BinarySearch_search_pe',[main/2],[]).

:- discontiguous bytecode/5, class/2.

bytecode(0,'0',0,aload(0),1).
bytecode(1,'0',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'0',0,return,1).
bytecode(0,'0',1,const(primitiveType(int),0),1).
bytecode(1,'0',1,istore(2),1).
bytecode(2,'0',1,aload(0),1).
bytecode(3,'0',1,arraylength,1).
bytecode(4,'0',1,istore(3),1).
bytecode(5,'0',1,const(primitiveType(int),0),1).
bytecode(6,'0',1,istore(4),2).
bytecode(8,'0',1,iload(3),1).
bytecode(9,'0',1,istore(5),2).
bytecode(11,'0',1,const(primitiveType(int),0),1).
bytecode(12,'0',1,istore(6),2).
bytecode(14,'0',1,iload(3),1).
bytecode(15,'0',1,if0(neInt,5),3).
bytecode(18,'0',1,const(primitiveType(int),0),1).
bytecode(19,'0',1,ireturn,1).
bytecode(20,'0',1,iload(1),1).
bytecode(21,'0',1,aload(0),1).
bytecode(22,'0',1,iload(3),1).
bytecode(23,'0',1,const(primitiveType(int),1),1).
bytecode(24,'0',1,ibinop(subInt),1).
bytecode(25,'0',1,iaload,1).
bytecode(26,'0',1,if_icmp(leInt,5),3).
bytecode(29,'0',1,iload(3),1).
bytecode(30,'0',1,ireturn,1).
bytecode(31,'0',1,iload(1),1).
bytecode(32,'0',1,aload(0),1).
bytecode(33,'0',1,iload(3),1).
bytecode(34,'0',1,const(primitiveType(int),1),1).
bytecode(35,'0',1,ibinop(subInt),1).
bytecode(36,'0',1,iaload,1).
bytecode(37,'0',1,if_icmp(neInt,7),3).
bytecode(40,'0',1,iload(3),1).
bytecode(41,'0',1,const(primitiveType(int),1),1).
bytecode(42,'0',1,ibinop(subInt),1).
bytecode(43,'0',1,ireturn,1).
bytecode(44,'0',1,iload(1),1).
bytecode(45,'0',1,aload(0),1).
bytecode(46,'0',1,const(primitiveType(int),0),1).
bytecode(47,'0',1,iaload,1).
bytecode(48,'0',1,if_icmp(gtInt,5),3).
bytecode(51,'0',1,const(primitiveType(int),0),1).
bytecode(52,'0',1,ireturn,1).
bytecode(53,'0',1,iload(6),2).
bytecode(55,'0',1,const(primitiveType(int),1),1).
bytecode(56,'0',1,ibinop(addInt),1).
bytecode(57,'0',1,iload(5),2).
bytecode(59,'0',1,if_icmp(eqInt,34),3).
bytecode(62,'0',1,iload(6),2).
bytecode(64,'0',1,iload(5),2).
bytecode(66,'0',1,ibinop(addInt),1).
bytecode(67,'0',1,const(primitiveType(int),2),1).
bytecode(68,'0',1,ibinop(divInt),1).
bytecode(69,'0',1,istore(4),2).
bytecode(71,'0',1,iload(1),1).
bytecode(72,'0',1,aload(0),1).
bytecode(73,'0',1,iload(4),2).
bytecode(75,'0',1,iaload,1).
bytecode(76,'0',1,if_icmp(leInt,10),3).
bytecode(79,'0',1,iload(4),2).
bytecode(81,'0',1,istore(6),2).
bytecode(83,'0',1,goto(-30),3).
bytecode(86,'0',1,iload(4),2).
bytecode(88,'0',1,istore(5),2).
bytecode(90,'0',1,goto(-37),3).
bytecode(93,'0',1,iload(5),2).
bytecode(95,'0',1,istore(2),1).
bytecode(96,'0',1,iload(2),1).
bytecode(97,'0',1,ireturn,1).
class('0',class(className(packageName(''),shortClassName('BinarySearch')),final(false),public(true),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName(''),shortClassName('BinarySearch')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('0',0),[]),final(false),static(false),public),method(methodSignature(methodName(className(packageName(''),shortClassName('BinarySearch')),shortMethodName(search)),[refType(arrayType(primitiveType(int))),primitiveType(int)],primitiveType(int)),bytecodeMethod(7,4,0,methodId('0',1),[]),final(false),static(true),public)])).

bytecode(0,'Object',0,return,1).
class('Object',class(className(packageName('java/lang/'),shortClassName('Object')),final(false),public(false),abstract(false),none,[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('Object',0),[]),final(false),static(false),public)])).

bytecode(0,'String',0,aload(0),1).
bytecode(1,'String',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'String',0,return,1).
class('String',class(className(packageName('java/lang/'),shortClassName('String')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('String')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('String',0),[]),final(false),static(false),private)])).

bytecode(0,'NullPointerException',0,aload(0),1).
bytecode(1,'NullPointerException',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'NullPointerException',0,return,1).
class('NullPointerException',class(className(packageName('java/lang/'),shortClassName('NullPointerException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('NullPointerException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('NullPointerException',0),[]),final(false),static(false),private)])).

bytecode(0,'ArrayStoreException',0,aload(0),1).
bytecode(1,'ArrayStoreException',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'ArrayStoreException',0,return,1).
class('ArrayStoreException',class(className(packageName('java/lang/'),shortClassName('ArrayStoreException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ArrayStoreException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ArrayStoreException',0),[]),final(false),static(false),private)])).

bytecode(0,'ArrayIndexOutOfBoundsException',0,aload(0),1).
bytecode(1,'ArrayIndexOutOfBoundsException',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'ArrayIndexOutOfBoundsException',0,return,1).
class('ArrayIndexOutOfBoundsException',class(className(packageName('java/lang/'),shortClassName('ArrayIndexOutOfBoundsException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ArrayIndexOutOfBoundsException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ArrayIndexOutOfBoundsException',0),[]),final(false),static(false),private)])).

bytecode(0,'NegativeArraySizeException',0,aload(0),1).
bytecode(1,'NegativeArraySizeException',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'NegativeArraySizeException',0,return,1).
class('NegativeArraySizeException',class(className(packageName('java/lang/'),shortClassName('NegativeArraySizeException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('NegativeArraySizeException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('NegativeArraySizeException',0),[]),final(false),static(false),private)])).

bytecode(0,'ClassCastException',0,aload(0),1).
bytecode(1,'ClassCastException',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'ClassCastException',0,return,1).
class('ClassCastException',class(className(packageName('java/lang/'),shortClassName('ClassCastException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ClassCastException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ClassCastException',0),[]),final(false),static(false),private)])).

bytecode(0,'ArithmeticException',0,aload(0),1).
bytecode(1,'ArithmeticException',0,invokespecial(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none)),3).
bytecode(4,'ArithmeticException',0,return,1).
class('ArithmeticException',class(className(packageName('java/lang/'),shortClassName('ArithmeticException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ArithmeticException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ArithmeticException',0),[]),final(false),static(false),private)])).

source_program(program([class(className(packageName(''),shortClassName('BinarySearch')),final(false),public(true),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName(''),shortClassName('BinarySearch')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('0',0),[]),final(false),static(false),public),method(methodSignature(methodName(className(packageName(''),shortClassName('BinarySearch')),shortMethodName(search)),[refType(arrayType(primitiveType(int))),primitiveType(int)],primitiveType(int)),bytecodeMethod(7,4,0,methodId('0',1),[]),final(false),static(true),public)]),class(className(packageName('java/lang/'),shortClassName('Object')),final(false),public(false),abstract(false),none,[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('Object')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('Object',0),[]),final(false),static(false),public)]),class(className(packageName('java/lang/'),shortClassName('String')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('String')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('String',0),[]),final(false),static(false),private)]),class(className(packageName('java/lang/'),shortClassName('NullPointerException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('NullPointerException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('NullPointerException',0),[]),final(false),static(false),private)]),class(className(packageName('java/lang/'),shortClassName('ArrayStoreException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ArrayStoreException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ArrayStoreException',0),[]),final(false),static(false),private)]),class(className(packageName('java/lang/'),shortClassName('ArrayIndexOutOfBoundsException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ArrayIndexOutOfBoundsException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ArrayIndexOutOfBoundsException',0),[]),final(false),static(false),private)]),class(className(packageName('java/lang/'),shortClassName('NegativeArraySizeException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('NegativeArraySizeException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('NegativeArraySizeException',0),[]),final(false),static(false),private)]),class(className(packageName('java/lang/'),shortClassName('ClassCastException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ClassCastException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ClassCastException',0),[]),final(false),static(false),private)]),class(className(packageName('java/lang/'),shortClassName('ArithmeticException')),final(false),public(false),abstract(false),className(packageName('java/lang/'),shortClassName('Object')),[],[],[method(methodSignature(methodName(className(packageName('java/lang/'),shortClassName('ArithmeticException')),shortMethodName('<init>')),[],none),bytecodeMethod(1,1,0,methodId('ArithmeticException',0),[]),final(false),static(false),private)])],[])).

:- include(library('jvm_in_ciao/interpreter/pe_i.pl')).

current_mis(mis(methodSignature(methodName(className(packageName(''),shortClassName('BinarySearch')),shortMethodName(search)),[refType(arrayType(primitiveType(int))),primitiveType(int)],primitiveType(int)),[ref(loc(1)),num(int(_))],heap(dynamicHeap([array(locationArray(_,primitiveType(int)),_)]),staticHeap([])))).
current_mis(mis(methodSignature(methodName(className(packageName(''),shortClassName('BinarySearch')),shortMethodName(search)),[refType(arrayType(primitiveType(int))),primitiveType(int)],primitiveType(int)),[null,num(int(_))],heap(dynamicHeap([]),staticHeap([])))).
options([top,heapin]).
