add a type parameter to TabulationDomain for tabulation solver node type, seen in PathEdges

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2695 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2008-03-12 05:00:50 +00:00
parent dcd1767962
commit d0d0fcdeb2
3 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,7 @@ import com.ibm.wala.util.intset.OrdinalSetMapping;
* @author sfink
*
*/
public interface TabulationDomain<T> extends OrdinalSetMapping<T> {
public interface TabulationDomain<T,U> extends OrdinalSetMapping<T> {
/**
* returns <code>true</code> if p1 should be processed before
@ -27,7 +27,7 @@ public interface TabulationDomain<T> extends OrdinalSetMapping<T> {
*
* return false otherwise
*/
boolean hasPriorityOver(PathEdge p1, PathEdge p2);
boolean hasPriorityOver(PathEdge<U> p1, PathEdge<U> p2);

View File

@ -962,6 +962,7 @@ public class TabulationSolver<T, P> {
super(100);
}
@SuppressWarnings("unchecked")
@Override
protected boolean compareElements(PathEdge<T> p1, PathEdge<T> p2) {
if (p1.d2 != p2.d2) { // TODO should we remove this check?

View File

@ -16,12 +16,12 @@ import com.ibm.wala.util.intset.MutableMapping;
* @author sfink
*
*/
public class UnorderedDomain<T> extends MutableMapping<T> implements TabulationDomain<T> {
public class UnorderedDomain<T,U> extends MutableMapping<T> implements TabulationDomain<T,U> {
/*
* @see com.ibm.wala.dataflow.IFDS.TabulationDomain#isWeakerThan(int, int)
*/
public boolean hasPriorityOver(PathEdge p1, PathEdge p2) {
public boolean hasPriorityOver(PathEdge<U> p1, PathEdge<U> p2) {
return false;
}