public class LabelTypeCheckUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected JifTypeSystem |
ts |
Constructor and Description |
---|
LabelTypeCheckUtil(JifTypeSystem ts) |
Modifier and Type | Method and Description |
---|---|
PathMap |
labelCheckType(polyglot.types.Type t,
LabelChecker lc,
java.util.List<polyglot.types.Type> throwTypes,
polyglot.util.Position pos) |
java.util.List<PathMap> |
labelCheckTypeParams(polyglot.types.Type t,
LabelChecker lc,
java.util.List<polyglot.types.Type> throwTypes,
polyglot.util.Position pos) |
java.util.Collection<Label> |
labelComponents(Label L) |
java.util.Set<polyglot.types.LocalInstance> |
localInstancesUsed(JifClassType type)
Returns a set of local instances that are used in the type.
|
java.util.List<polyglot.types.Type> |
throwTypes(JifClassType type)
Return the types that may be thrown by a runtime evalution
of the type
type . |
void |
typeCheckLabel(polyglot.visit.TypeChecker tc,
Label Lbl)
Check that all access paths occurring in label Lbl have the appropriate type.
|
void |
typeCheckPolicy(polyglot.visit.TypeChecker tc,
Policy p) |
void |
typeCheckPrincipal(polyglot.visit.TypeChecker tc,
Principal principal)
Check the type of any access path contained in a dynamic principal.
|
void |
typeCheckType(polyglot.visit.TypeChecker tc,
polyglot.types.Type t) |
protected void |
updateContextForParam(LabelChecker lc,
JifContext A,
PathMap Xprev)
Utility method for updating the context for checking a parameter for the
type.
|
protected final JifTypeSystem ts
public LabelTypeCheckUtil(JifTypeSystem ts)
public void typeCheckPrincipal(polyglot.visit.TypeChecker tc, Principal principal) throws polyglot.types.SemanticException
tc
- principal
- polyglot.types.SemanticException
public void typeCheckLabel(polyglot.visit.TypeChecker tc, Label Lbl) throws polyglot.types.SemanticException
tc
- Lbl
- polyglot.types.SemanticException
public void typeCheckPolicy(polyglot.visit.TypeChecker tc, Policy p) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public void typeCheckType(polyglot.visit.TypeChecker tc, polyglot.types.Type t) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public PathMap labelCheckType(polyglot.types.Type t, LabelChecker lc, java.util.List<polyglot.types.Type> throwTypes, polyglot.util.Position pos) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public java.util.List<PathMap> labelCheckTypeParams(polyglot.types.Type t, LabelChecker lc, java.util.List<polyglot.types.Type> throwTypes, polyglot.util.Position pos) throws polyglot.types.SemanticException
t
- lc
- PathMap
s, one for each parameter of the subst type.polyglot.types.SemanticException
protected void updateContextForParam(LabelChecker lc, JifContext A, PathMap Xprev)
public java.util.List<polyglot.types.Type> throwTypes(JifClassType type)
type
.type
- type
.public java.util.Set<polyglot.types.LocalInstance> localInstancesUsed(JifClassType type)