jif.types
Class PathMap

java.lang.Object
  extended by jif.types.PathMap

public class PathMap
extends java.lang.Object

Implements the mapping from paths to labels. All updates are functional, so that old path maps are still accessible. This means that all updates, etc. create clones of the pathmap. There may be a more efficient way to do this sharing, with "lazy" copying of the necessary entries, but this is easy to implement.


Field Summary
protected  java.util.Map map
           
protected  JifTypeSystem ts
           
 
Constructor Summary
PathMap(JifTypeSystem ts)
           
 
Method Summary
 java.util.Set allPaths()
          Return all paths in the map including NV.
 void dump(polyglot.util.CodeWriter w)
           
 PathMap exc(Label label, polyglot.types.Type type)
           
 PathMap exception(polyglot.types.Type type, Label label)
           
 Label get(Path p)
           
 PathMap join(PathMap m)
           
 Label N()
           
 PathMap N(Label label)
           
 Label NV()
           
 PathMap NV(Label label)
           
 java.util.Set paths()
          Return all paths in the map except NV (which isn't really a path).
 Label R()
           
 PathMap R(Label label)
           
 PathMap set(Path p, Label L)
           
 PathMap subst(LabelSubstitution subst)
           
 PathMap subst(VarMap bounds)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

map

protected java.util.Map map

ts

protected JifTypeSystem ts
Constructor Detail

PathMap

public PathMap(JifTypeSystem ts)
Method Detail

get

public Label get(Path p)

set

public PathMap set(Path p,
                   Label L)

N

public Label N()

N

public PathMap N(Label label)

NV

public Label NV()

NV

public PathMap NV(Label label)

R

public Label R()

R

public PathMap R(Label label)

exception

public PathMap exception(polyglot.types.Type type,
                         Label label)

exc

public PathMap exc(Label label,
                   polyglot.types.Type type)

paths

public java.util.Set paths()
Return all paths in the map except NV (which isn't really a path).


allPaths

public java.util.Set allPaths()
Return all paths in the map including NV.


join

public PathMap join(PathMap m)

subst

public PathMap subst(LabelSubstitution subst)
              throws polyglot.types.SemanticException
Throws:
polyglot.types.SemanticException

subst

public PathMap subst(VarMap bounds)

toString

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

dump

public void dump(polyglot.util.CodeWriter w)