Browse Source

Code tidy.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1709 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 16 years ago
parent
commit
d7c8d84ae2
  1. 32
      prism/src/pta/DB.java

32
prism/src/pta/DB.java

@ -30,7 +30,7 @@ package pta;
* Helper class for encapsulation of difference bound as an integer. * Helper class for encapsulation of difference bound as an integer.
* We use the least significant bit to encode strictness in the bound * We use the least significant bit to encode strictness in the bound
* (1 = non-strict, 0 = strict); the rest is for the (integer) bound. * (1 = non-strict, 0 = strict); the rest is for the (integer) bound.
* Upper bound of if infinity is encoded as Integer.MAX_VALUE.
* Upper bound of infinity is encoded as Integer.MAX_VALUE.
*/ */
public class DB public class DB
{ {
@ -60,13 +60,6 @@ public class DB
return (DIFF_MASK & d) >> 1; return (DIFF_MASK & d) >> 1;
} }
// Is the (value of the) bound non-negative?
// TODO: get rid of this?
protected static boolean isNonNegative(int d)
{
return d > 0;
}
// Is bound strict? // Is bound strict?
protected static boolean isStrict(int d) protected static boolean isStrict(int d)
{ {
@ -89,20 +82,6 @@ public class DB
return d1 + d2 - ((d1 & NON_STRICT) | (d2 & NON_STRICT)); return d1 + d2 - ((d1 & NON_STRICT) | (d2 & NON_STRICT));
} }
// Compare two bounds: d1 < d2?
protected static boolean lessThan(int d1, int d2)
{
// TODO: get rid of this?
return d1 < d2;
}
// Compare two bounds: d1 == d2?
protected static boolean equals(int d1, int d2)
{
// TODO: get rid of this?
return (d1 == d2);
}
// Compute dual bound: flip both strictness and sign // Compute dual bound: flip both strictness and sign
protected static int dual(int d) protected static int dual(int d)
{ {
@ -120,15 +99,6 @@ public class DB
return (isStrict(d) ? "<" : "<=") + getSignedDiff(d); return (isStrict(d) ? "<" : "<=") + getSignedDiff(d);
} }
// Get as string, multiplied by -1 and so converted to upper bound, e.g. "<v" -> ">-v"
/*protected static String toStringUpperBound(int d)
{
if (d == INFTY)
return ">-inf";
return (((RELOP_MASK & d) != 0) ? ">" : ">=") + (-getSignedDiff(d));
}*/
//TODO:need?
// Get bound as a string, multiplied by -1 and flipped, e.g. "<v" -> "-v<" // Get bound as a string, multiplied by -1 and flipped, e.g. "<v" -> "-v<"
protected static String toStringFlipped(int d) protected static String toStringFlipped(int d)
{ {

Loading…
Cancel
Save