00001 package gov.nasa.arc.ase.jpf; 00002 00003 public class TransitionResult { 00004 static public int atomicLevel = 0; 00005 static boolean notified = false; 00006 static boolean random = false; 00007 static boolean assertViolation = false; 00008 00009 static public void assertionViolation(boolean b) { 00010 assertViolation = b; 00011 } 00012 static public void clearAtomic() { 00013 if (atomicLevel > 0) 00014 atomicLevel--; 00015 } 00016 static public void clearNotified() { 00017 notified = false; 00018 } 00019 static public void clearRandom() { 00020 random = false; 00021 } 00022 static public void clearViolation() { 00023 assertViolation = false; 00024 } 00025 static public int getAtomicLevel() { 00026 return atomicLevel; 00027 } 00028 static public void initialize() { 00029 clearNotified(); 00030 clearRandom(); 00031 } 00032 static public boolean isAssertionViolated() { 00033 return assertViolation; 00034 } 00035 static public boolean isAtomic() { 00036 return atomicLevel > 0; 00037 } 00038 static public boolean isNotified() { 00039 return notified; 00040 } 00041 static public boolean isRandom() { 00042 return random; 00043 } 00044 static public void resetAtomic() { 00045 atomicLevel = 0; 00046 } 00047 static public void setAtomic() { 00048 atomicLevel++; 00049 } 00050 static public void setNotified() { 00051 notified = true; 00052 } 00053 static public void setRandom() { 00054 random = true; 00055 } 00056 }