jltools.ext.jif.types
Class VarLabel_c

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

public class VarLabel_c
extends Label_c
implements VarLabel

An implementation of the VarLabel interface.

See Also:
Serialized Form

Fields inherited from class jltools.ext.jl.types.TypeObject_c
position, ts
 
Constructor Summary
protected VarLabel_c()
           
  VarLabel_c(JifTypeSystem ts, Position pos, UID uid)
           
 
Method Summary
 Label bound(VarMap ub, java.util.Set visited)
          Gets the upper bound of this label.
 java.lang.String componentString()
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isCanonical()
           
 boolean isComparable()
           
 boolean isCovariant()
           
 boolean isRuntimeRepresentable()
           
 Label labelOf()
          Gets labelOf this label.
 boolean leq_(Label jc, 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.
 void translate(Context c, CodeWriter w)
           
 UID uid()
           
 VarLabel uid(UID uid)
           
 java.util.Collection variables()
           
 
Methods inherited from class jltools.ext.jif.types.Label_c
components, description, description, fold, hasVariables, isBottom, isEnumerable, isEquiv, isInvariant, isMeetable, isSingleton, isTop, join, leq, meet, minus, simplify, singletonComponent, substArg, toString
 
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
components, description, description, fold, hasVariables, isBottom, isEnumerable, isEquiv, isInvariant, isMeetable, isSingleton, isTop, 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

VarLabel_c

protected VarLabel_c()

VarLabel_c

public VarLabel_c(JifTypeSystem ts,
                  Position pos,
                  UID uid)
Method Detail

isComparable

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

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

uid

public VarLabel uid(UID uid)
Specified by:
uid in interface VarLabel

uid

public UID uid()
Specified by:
uid in interface VarLabel

componentString

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

variables

public java.util.Collection variables()
Specified by:
variables in interface Label
Overrides:
variables 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.

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

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 jc,
                    PrincipalHierarchy ph)
Specified by:
leq_ in interface Label
Overrides:
leq_ in class Label_c

translate

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