Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

EduKsuCisBanderaAbstractionAbstractionReflection.java

00001 package gov.nasa.arc.ase.jpf.jvm.reflection;
00002 
00003 import gov.nasa.arc.ase.jpf.InternalErrorException;
00004 import gov.nasa.arc.ase.jpf.jvm.Types;
00005 import gov.nasa.arc.ase.jpf.jvm.MethodInfo;
00006 import gov.nasa.arc.ase.jpf.jvm.bytecode.Instruction;
00007 
00008 public class EduKsuCisBanderaAbstractionAbstractionReflection extends Reflection {
00009   public Instruction executeStaticMethod(MethodInfo mi) {
00010     String name = mi.getFullName();
00011 
00012     if(name.equals("choose(I)I")) {
00013       return exit(ss.random(getIntArgument(0)));
00014     }
00015 
00016     if(name.equals("choose()Z")) {
00017        return exit(ss.random(2) != 0);
00018    }
00019 
00020     return super.executeStaticMethod(mi);
00021   }  
00022   public boolean isStaticMethodDeterministic(MethodInfo mi) {
00023     String name = mi.getFullName();
00024 
00025     if(name.equals("choose()Z")) {
00026       return false;
00027     }
00028 
00029     return super.isStaticMethodDeterministic(mi);
00030   }  
00031 }

Generated at Thu Feb 7 06:45:02 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001