jltools.ext.jif.types
Class TopLabel_c

java.lang.Object
  |
  +--jltools.ext.jl.types.TypeObject_c
        |
        +--jltools.ext.jif.types.Label_c
              |
              +--jltools.ext.jif.types.TopLabel_c
All Implemented Interfaces:
java.lang.Cloneable, Copy, Label, Param, java.io.Serializable, TopLabel, TypeObject

public class TopLabel_c
extends Label_c
implements TopLabel

An implementation of the TopLabel interface.

See Also:
Serialized Form

Fields inherited from class jltools.ext.jl.types.TypeObject_c
position, ts
 
Constructor Summary
protected TopLabel_c()
           
  TopLabel_c(JifTypeSystem ts, Position pos)
           
 
Method Summary
 Label bound(VarMap ub, java.util.Set visited)
          Gets the upper bound of this label.
 java.util.Collection components()
           
 java.lang.String componentString()
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isCanonical()
           
 boolean isComparable()
           
 boolean isCovariant()
           
 boolean isEnumerable()
           
 boolean isRuntimeRepresentable()
           
 boolean isTop()
           
 Label labelOf()
          Gets labelOf this label.
 boolean leq_(Label L, PrincipalHierarchy ph)
           
 Label meet_(Label L, PrincipalHierarchy ph)
          These should only be called by JifTypeSystem
 Label subst(UID uid, Label L)
          Substitutes any occurences of for L.
 java.lang.String toString()
           
 void translate(Context c, CodeWriter w)
           
 java.util.Collection variables()
           
 
Methods inherited from class jltools.ext.jif.types.Label_c
description, description, fold, hasVariables, isBottom, isEquiv, isInvariant, isMeetable, isSingleton, join, leq, meet, minus, simplify, singletonComponent, substArg
 
Methods inherited from class jltools.ext.jl.types.TypeObject_c
copy, position, restore_, restore, typeSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jltools.ext.jif.types.Label
description, description, fold, hasVariables, isBottom, isEquiv, isInvariant, isMeetable, isSingleton, join, leq, meet, minus, simplify, singletonComponent, substArg
 
Methods inherited from interface jltools.types.TypeObject
position, restore, typeSystem
 
Methods inherited from interface jltools.util.Copy
copy
 

Constructor Detail

TopLabel_c

protected TopLabel_c()

TopLabel_c

public TopLabel_c(JifTypeSystem ts,
                  Position pos)
Method Detail

isComparable

public boolean isComparable()
Specified by:
isComparable in interface Label

isEnumerable

public boolean isEnumerable()
Specified by:
isEnumerable in interface Label
Overrides:
isEnumerable in class Label_c

components

public java.util.Collection components()
Specified by:
components in interface Label
Overrides:
components in class Label_c

isTop

public boolean isTop()
Specified by:
isTop in interface Label
Overrides:
isTop in class Label_c

isCanonical

public boolean isCanonical()
Specified by:
isCanonical in interface Param
Overrides:
isCanonical in class Label_c

isRuntimeRepresentable

public boolean isRuntimeRepresentable()
Specified by:
isRuntimeRepresentable in interface Param
Overrides:
isRuntimeRepresentable in class Label_c

componentString

public java.lang.String componentString()
Specified by:
componentString in interface Label
Overrides:
componentString in class Label_c

toString

public java.lang.String toString()
Overrides:
toString in class Label_c

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

labelOf

public Label labelOf()
Description copied from interface: Label
Gets labelOf this label. Refer to Andrew's thesis, Figure 5.4
Specified by:
labelOf in interface Label
Overrides:
labelOf in class Label_c

subst

public Label subst(UID uid,
                   Label L)
Description copied from interface: Label
Substitutes any occurences of for L. Refer to Andrew's thesis, Figure 5.5
Specified by:
subst in interface Label
Overrides:
subst in class Label_c

variables

public java.util.Collection variables()
Specified by:
variables in interface Label
Overrides:
variables in class Label_c

isCovariant

public boolean isCovariant()
Specified by:
isCovariant in interface Label
Overrides:
isCovariant in class Label_c

meet_

public Label meet_(Label L,
                   PrincipalHierarchy ph)
Description copied from interface: Label
These should only be called by JifTypeSystem
Specified by:
meet_ in interface Label
Overrides:
meet_ in class Label_c

leq_

public boolean leq_(Label L,
                    PrincipalHierarchy ph)
Specified by:
leq_ in interface Label
Overrides:
leq_ in class Label_c

bound

public Label bound(VarMap ub,
                   java.util.Set visited)
Description copied from interface: Label
Gets the upper bound of this label.
Specified by:
bound in interface Label
Overrides:
bound in class Label_c
Following copied from interface: jltools.ext.jif.types.Label
Parameters:
ub - the upper bound map for variable labels
visited - the set of UIDs visited. if the upper bound is ,
  • if uid is contained in visited, will be returned;
  • otherwise, uid is added into visited.

translate

public void translate(Context c,
                      CodeWriter w)
Specified by:
translate in interface Label
Overrides:
translate in class Label_c