public final class ScopeChain
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ScopeChain |
add(ScopeChain s1,
ScopeChain s2)
Returns the least upper bound of the two scope chains.
|
static void |
clearCache()
Clears the canonicalization cache.
|
static boolean |
containsObjectLabels(ScopeChain scope,
ObjectLabel objlabel)
Checks whether the scope chain contains the given object label.
|
boolean |
equals(java.lang.Object x)
Checks whether the given scope chain is equal to this one.
|
static int |
getCacheSize()
Returns the canonicalization cache size.
|
static int |
getNumberOfCacheHits()
Returns the number of cache hits.
|
static int |
getNumberOfCacheMisses()
Returns the number of cache misses.
|
java.util.Set<ObjectLabel> |
getObject()
Returns the top-most object in this scope chain.
|
static java.util.Set<ObjectLabel> |
getObjectLabels(ScopeChain scope)
Returns the set of object labels appearing in the given scope chain.
|
int |
hashCode()
Computes the hash code for this scope chain.
|
static boolean |
isEmpty(ScopeChain s)
Checks whether there are no objects in the scope chain.
|
static java.lang.Iterable<java.util.Set<ObjectLabel>> |
iterable(ScopeChain s)
Returns a object label set iterable for the given scope chain (where null represents empty).
|
static ScopeChain |
make(ObjectLabel obj)
Creates a scope chain with a single element.
|
static ScopeChain |
make(java.util.Set<ObjectLabel> obj,
ScopeChain next)
Creates a scope chain.
|
ScopeChain |
next()
Returns the tail of this scope chain, or null if none.
|
static ScopeChain |
remove(ScopeChain s1,
ScopeChain s2)
Returns a copy of s1 where s2 has been removed.
|
static ScopeChain |
replaceObjectLabel(ScopeChain sc,
ObjectLabel oldlabel,
ObjectLabel newlabel,
java.util.Map<ScopeChain,ScopeChain> replace_cache)
Replaces all occurrences of oldlabel by newlabel.
|
static void |
reset()
Resets the cache numbers.
|
static ScopeChain |
summarize(ScopeChain sc,
Summarized s)
Constructs a scope chain as a copy of the given one but with object labels summarized.
|
static ScopeChain |
summarize(ScopeChain sc,
Summarized s,
java.util.Map<ScopeChain,ScopeChain> summarize_cache)
Summarizes this scope chain.
|
java.lang.String |
toString()
Returns a string representation of this scope chain.
|
public static ScopeChain add(ScopeChain s1, ScopeChain s2)
public static void clearCache()
public static boolean containsObjectLabels(ScopeChain scope, ObjectLabel objlabel)
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object
public static int getCacheSize()
public static int getNumberOfCacheHits()
public static int getNumberOfCacheMisses()
public java.util.Set<ObjectLabel> getObject()
public static java.util.Set<ObjectLabel> getObjectLabels(ScopeChain scope)
public int hashCode()
hashCode
in class java.lang.Object
public static boolean isEmpty(ScopeChain s)
public static java.lang.Iterable<java.util.Set<ObjectLabel>> iterable(ScopeChain s)
public static ScopeChain make(ObjectLabel obj)
public static ScopeChain make(java.util.Set<ObjectLabel> obj, ScopeChain next)
public ScopeChain next()
public static ScopeChain remove(ScopeChain s1, ScopeChain s2)
public static ScopeChain replaceObjectLabel(ScopeChain sc, ObjectLabel oldlabel, ObjectLabel newlabel, java.util.Map<ScopeChain,ScopeChain> replace_cache)
public static void reset()
public static ScopeChain summarize(ScopeChain sc, Summarized s)
public static ScopeChain summarize(ScopeChain sc, Summarized s, java.util.Map<ScopeChain,ScopeChain> summarize_cache)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009-2019 Aarhus University