CompositeLocation constraint) {
ClassDescriptor cd = md.getClassDesc();
- MethodDescriptor calleeMD = min.getMethod();
+ MethodDescriptor calleeMethodDesc = min.getMethod();
NameDescriptor baseName = min.getBaseName();
boolean isSystemout = false;
isSystemout = baseName.getSymbol().equals("System.out");
}
- if (!ssjava.isSSJavaUtil(calleeMD.getClassDesc()) && !ssjava.isTrustMethod(calleeMD)
- && !calleeMD.getModifiers().isNative() && !isSystemout) {
+ if (!ssjava.isSSJavaUtil(calleeMethodDesc.getClassDesc())
+ && !ssjava.isTrustMethod(calleeMethodDesc) && !calleeMethodDesc.getModifiers().isNative()
+ && !isSystemout) {
CompositeLocation baseLocation = null;
if (min.getExpression() != null) {
// setup the location list of caller's arguments
List<CompositeLocation> callerArgList = new ArrayList<CompositeLocation>();
+ // setup the location list of callee's parameters
+ MethodLattice<String> calleeLattice = ssjava.getMethodLattice(calleeMethodDesc);
+ List<CompositeLocation> calleeParamList = new ArrayList<CompositeLocation>();
+
if (min.numArgs() > 0) {
- // setup caller args set
- // first, add caller's base(this) location
- callerArgList.add(baseLocation);
- // second, add caller's arguments
+ if (!calleeMethodDesc.isStatic()) {
+ callerArgList.add(baseLocation);
+ }
for (int i = 0; i < min.numArgs(); i++) {
ExpressionNode en = min.getArg(i);
CompositeLocation callerArgLoc =
constraint, false);
callerArgList.add(callerArgLoc);
}
- }
- // setup the location list of callee's parameters
- MethodDescriptor calleemd = min.getMethod();
- MethodLattice<String> calleeLattice = ssjava.getMethodLattice(calleemd);
- CompositeLocation calleeThisLoc =
- new CompositeLocation(new Location(calleemd, calleeLattice.getThisLoc()));
- List<CompositeLocation> calleeParamList = new ArrayList<CompositeLocation>();
- // first, add callee's this location
- calleeParamList.add(calleeThisLoc);
- // second, add callee's parameters
- for (int i = 0; i < calleemd.numParameters(); i++) {
- VarDescriptor calleevd = (VarDescriptor) calleemd.getParameter(i);
- CompositeLocation calleeLoc = d2loc.get(calleevd);
- calleeParamList.add(calleeLoc);
+ if (!calleeMethodDesc.isStatic()) {
+ CompositeLocation calleeThisLoc =
+ new CompositeLocation(new Location(calleeMethodDesc, calleeLattice.getThisLoc()));
+ calleeParamList.add(calleeThisLoc);
+ }
+
+ for (int i = 0; i < calleeMethodDesc.numParameters(); i++) {
+ VarDescriptor calleevd = (VarDescriptor) calleeMethodDesc.getParameter(i);
+ CompositeLocation calleeLoc = d2loc.get(calleevd);
+ calleeParamList.add(calleeLoc);
+ }
}
if (constraint != null) {
// annotation that declares the program counter that is higher than
// corresponding parameter
- CompositeLocation calleePCLOC = ssjava.getPCLocation(calleemd);
+ CompositeLocation calleePCLOC = ssjava.getPCLocation(calleeMethodDesc);
for (int idx = 0; idx < callerArgList.size(); idx++) {
CompositeLocation argLocation = callerArgList.get(idx);
- int compareResult =
- CompositeLattice
- .compare(argLocation, constraint, true, generateErrorMessage(cd, min));
-
// need to check that param is higher than PCLOC
- if (compareResult == ComparisonResult.GREATER) {
+ if (!argLocation.get(0).isTop()
+ && CompositeLattice.compare(argLocation, constraint, true,
+ generateErrorMessage(cd, min)) == ComparisonResult.GREATER) {
CompositeLocation paramLocation = calleeParamList.get(idx);
+ argLocation
+ ". Need to specify that the initial PC location of the callee, which is currently set to "
+ calleePCLOC + ", is lower than " + paramLocation + " in the method "
- + calleeMD.getSymbol() + ":" + min.getNumLine());
+ + calleeMethodDesc.getSymbol() + ":" + min.getNumLine());
}
}
* @return true if this region was classified as face, else false
*/
@LATTICE("OUT<V,V<C,C<THIS,THIS<IN,C*,V*,THISLOC=THIS,RETURNLOC=OUT")
+ @PCLOC("THIS,Classifier.C")
public boolean classifyFace(@LOC("THIS,Classifier.C") IntegralImageData image,
@LOC("THIS,Classifier.C") float scaleFactor, @LOC("THIS,Classifier.C") int translationX,
@LOC("THIS,Classifier.C") int translationY, @LOC("THIS,Classifier.C") float borderline) {
+import SSJava.PCLOC;
+
/*
* Copyright 2009 (c) Florian Frankenberger (darkblue.de)
*
* null if no face could be detected
*/
@LATTICE("OUT<CXY,CXY<THIS,THIS<V,V<IMG,IMG<C,C<IN,C*,V*,FACTOR*,CXY*,THISLOC=THIS,RETURNLOC=OUT,GLOBALLOC=IN")
+ @PCLOC("C")
public Rectangle2D locateFaceRadial(@LOC("IN") Image smallImage,
@LOC("THIS,ClassifierTree.C") Rectangle2D lastCoordinates) {
}
- @LATTICE("OUT<IN,OUT<THIS,THISLOC=THIS,RETURNLOC=OUT")
+ @LATTICE("OUT<IN,OUT<P,P<THIS,THISLOC=THIS,RETURNLOC=OUT")
+ @PCLOC("P")
private static int sgn(@LOC("IN") float value) {
return (value < 0 ? -1 : (value > 0 ? +1 : 1));
}
}
@LATTICE("OUT<V,V<THIS,THIS<IN,V*,THISLOC=THIS,RETURNLOC=OUT")
+ @PCLOC("THIS")
public FaceAndEyePosition getEyePosition(@LOC("IN") Image image) {
if (image == null)
return null;
return new FaceAndEyePosition(lastRectangle, eyePosition);
}
- @LATTICE("OUT<IN,OUT<THIS,THISLOC=THIS,RETURNLOC=OUT")
+ @LATTICE("OUT<P,P<IN,OUT<THIS,THISLOC=THIS,RETURNLOC=OUT")
+ @PCLOC("P")
private Point readEyes(@LOC("IN") Image image, @LOC("IN") Rectangle2D rect) {
@LOC("OUT") EyeDetector ed = new EyeDetector(image, rect);
return ed.detectEye();
* @param N\r
* the number of\r
*/\r
+ @PCLOC("THIS,BitReserve.BIT")\r
public int hgetbits(@LOC("THIS,BitReserve.BIT") int N) {\r
\r
totbit += N;\r
* \r
*/\r
@RETURNLOC("C")\r
+ @PCLOC("C")\r
float getBandFactor(@LOC("IN") float eq) {\r
if (eq == BAND_NOT_PRESENT)\r
return 0.0f;\r
*
*/
@LATTICE("THIS<IN,THISLOC=THIS,GLOBALLOC=IN")
+ @PCLOC("THIS,LayerIIIDecoder.SF15")
private void get_scale_factors(@LOC("THIS,LayerIIIDecoder.SF1") Header header,
@LOC("THIS,LayerIIIDecoder.SF1") int ch, @LOC("THIS,LayerIIIDecoder.SF1") int gr) {
// ssjava
@LATTICE("M<THIS,THIS<IN,THIS<C,C*,M*,THISLOC=THIS,GLOBALLOC=THIS")
+ @PCLOC("THIS,LayerIIIDecoder.SI0")
private void get_LSF_scale_data(@LOC("THIS,LayerIIIDecoder.SF15") Header header,
@LOC("THIS,LayerIIIDecoder.SF15") int ch, @LOC("THIS,LayerIIIDecoder.SF15") int gr) {
*
*/
@LATTICE("THIS<IN,THISLOC=THIS,GLOBALLOC=IN")
+ @PCLOC("THIS,LayerIIIDecoder.SF15")
private void get_LSF_scale_factors(@LOC("THIS,LayerIIIDecoder.SF1") Header header,
@LOC("THIS,LayerIIIDecoder.SF1") int ch, @LOC("THIS,LayerIIIDecoder.SF1") int gr) {
/**
*
*/
+ @PCLOC("THIS,LayerIIIDecoder.LR")
private void i_stereo_k_values(@LOC("THIS,LayerIIIDecoder.LR") int is_pos,
@LOC("THIS,LayerIIIDecoder.LR") int io_type, @LOC("THIS,LayerIIIDecoder.LR") int i) {
if (is_pos == 0) {
0x000000FF, 0x000001FF, 0x000003FF, 0x000007FF, 0x00000FFF, 0x00001FFF, 0x00003FFF,
0x00007FFF, 0x0000FFFF, 0x0001FFFF };
- @LATTICE("OUT<THIS,THIS<IN,OUT*,THISLOC=THIS,RETURNLOC=OUT")
+ @LATTICE("OUT<THIS,THIS<P,P<IN,OUT*,THISLOC=THIS,RETURNLOC=OUT")
+ @PCLOC("P")
public int get_bits(@LOC("IN") int number_of_bits) {
@LOC("OUT") int returnvalue = 0;
@LOC("THIS,SideInfoBuffer.IDX") int sum = bitindex + number_of_bits;
*/\r
@LATTICE("OUT<V1,THIS<V1,V1<V,V<IN,IN<C,C*,V*,THISLOC=THIS,GLOBALLOC=IN")\r
@RETURNLOC("OUT,BitReserve.BIT")\r
+ @PCLOC("OUT,BitReserve.BIT")\r
public static int huffman_decoder(@LOC("THIS,LayerIIIDecoder.SI2") int htIdx,\r
@LOC("OUT,BitReserve.BIT") int[] x, @LOC("OUT,BitReserve.BIT") int[] y,\r
@LOC("OUT,BitReserve.BIT") int[] v, @LOC("OUT,BitReserve.BIT") int[] w,\r
}
@RETURNLOC("OUT")
+ @PCLOC("IN")
public static int min(@LOC("IN") int a, @LOC("IN") int b) {
return (a < b) ? a : b;
}