public final class ScopeChain extends 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.
|
boolean |
equals(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.
|
Set<ObjectLabel> |
getObject()
Returns the top-most object in this 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 Iterable<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(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,
Map<ScopeChain,ScopeChain> replace_cache)
Replaces all occurrences of oldlabel by newlabel.
|
static ScopeChain |
replaceObjectLabels(ScopeChain sc,
Map<ObjectLabel,ObjectLabel> m,
Map<ScopeChain,ScopeChain> replace_cache)
Replaces all object labels according to the given map.
|
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,
Map<ScopeChain,ScopeChain> summarize_cache)
Summarizes this scope chain.
|
String |
toString()
Returns a string representation of this scope chain.
|
public static ScopeChain add(ScopeChain s1, ScopeChain s2)
public static void clearCache()
public boolean equals(Object x)
public static int getCacheSize()
public static int getNumberOfCacheHits()
public static int getNumberOfCacheMisses()
public Set<ObjectLabel> getObject()
public int hashCode()
public static boolean isEmpty(ScopeChain s)
public static Iterable<Set<ObjectLabel>> iterable(ScopeChain s)
public static ScopeChain make(ObjectLabel obj)
public static ScopeChain make(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, Map<ScopeChain,ScopeChain> replace_cache)
public static ScopeChain replaceObjectLabels(ScopeChain sc, Map<ObjectLabel,ObjectLabel> m, 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, Map<ScopeChain,ScopeChain> summarize_cache)
Copyright © 2012 Aarhus University