public class JoinLabel_c extends Label_c implements JoinLabel
JoinLabel interface.description, toJava, variables| Constructor and Description |
|---|
JoinLabel_c(java.util.Set<Label> components,
JifTypeSystem ts,
polyglot.util.Position pos,
LabelToJavaExpr trans) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
componentString(java.util.Set<Label> printedLabels)
return a string s such that {s} is a label
|
ConfPolicy |
confProjection() |
JoinLabel_c |
copy() |
boolean |
equalsImpl(polyglot.types.TypeObject o) |
int |
hashCode() |
boolean |
hasWritersToReaders()
Does the label contain any writersToReaders constructs?
|
IntegPolicy |
integProjection() |
boolean |
isBottom()
By default, a label is not Bottom
|
boolean |
isCanonical() |
boolean |
isComparable()
Is this label comparable to other labels?
|
boolean |
isCovariant()
Is this label covariant?
|
protected boolean |
isDisambiguatedImpl()
Check if the label is disambiguated, without recursing into child labels.
|
boolean |
isEnumerable()
Are the components of this label enumerable?
|
boolean |
isRuntimeRepresentable() |
boolean |
isTop()
Is this label equivalent to top?
|
java.util.Collection<Label> |
joinComponents() |
PathMap |
labelCheck(JifContext A,
LabelChecker lc)
Label check the label, which will determine how much information may be
gained if the label is evaluated at runtime.
|
boolean |
leq_(Label L,
LabelEnv env,
LabelEnv.SearchState state)
Implementation of leq, should only be called by JifTypeSystem
|
Label |
normalize()
Normalize the label.
|
protected Label |
simplifyImpl() |
Label |
subst(LabelSubstitution substitution) |
java.util.List<polyglot.types.Type> |
throwTypes(polyglot.types.TypeSystem ts)
If the label is runtime representable, when it is evaluated at runtime it
may throw exceptions.
|
java.lang.String |
toString()
Equivalent to toString(emptySet).
|
protected void |
updateContextForComp(LabelChecker lc,
JifContext A,
PathMap Xprev)
Utility method for updating the context for checking a join component.
|
java.util.Set<Variable> |
variableComponents()
The set of variables that this label contains as components.
|
componentString, description, hasVariableComponents, hasVariables, isDisambiguated, isInvariant, setDescription, simplify, toJava, toJava, toString, variablestypeSystemclone, finalize, getClass, notify, notifyAll, wait, wait, waitcomponentString, description, hasVariableComponents, hasVariables, isDisambiguated, isInvariant, setDescription, simplify, toJava, toString, variablestoJavatypeSystempublic JoinLabel_c(java.util.Set<Label> components, JifTypeSystem ts, polyglot.util.Position pos, LabelToJavaExpr trans)
public boolean isRuntimeRepresentable()
isRuntimeRepresentable in interface LabelisRuntimeRepresentable in interface Parampublic boolean isCanonical()
isCanonical in interface ParamisCanonical in interface polyglot.types.TypeObjectprotected boolean isDisambiguatedImpl()
Label_cisDisambiguatedImpl in class Label_cpublic boolean isCovariant()
LabelisCovariant in interface Labelpublic boolean isComparable()
LabelFor example, an UnknownLabel is not comparable to others, neither is a VarLabel. Most other labels are.
isComparable in interface Labelpublic boolean isEnumerable()
LabelFor example, Singletons are enumerable, JoinLabels are enumerable, RuntimeLabel (the label of all runtime representable components) is not enumerable. NOTE: The components of a label are not neccessarily stuck together with a join operation. For example, the MeetLabel uses the meet operation between its components.
isEnumerable in interface Labelpublic boolean isBottom()
Label_cpublic boolean isTop()
LabelFor example, a JoinLabel with two components, one of which is Top, would return true for this method.
public boolean equalsImpl(polyglot.types.TypeObject o)
equalsImpl in interface polyglot.types.TypeObjectequalsImpl in class Label_cpublic int hashCode()
hashCode in class polyglot.types.TypeObject_cpublic java.lang.String toString()
Labelpublic java.lang.String componentString(java.util.Set<Label> printedLabels)
LabelcomponentString in interface LabelcomponentString in class Label_cprintedLabels - the set of labels for which auxiliary information should be
omitted.public boolean leq_(Label L, LabelEnv env, LabelEnv.SearchState state)
Labelpublic java.util.Collection<Label> joinComponents()
joinComponents in interface JoinLabelpublic JoinLabel_c copy()
public Label normalize()
Labelprotected Label simplifyImpl()
simplifyImpl in class Label_cpublic ConfPolicy confProjection()
confProjection in interface LabelconfProjection in class Label_cpublic IntegPolicy integProjection()
integProjection in interface LabelintegProjection in class Label_cpublic java.util.List<polyglot.types.Type> throwTypes(polyglot.types.TypeSystem ts)
LabelthrowTypes in interface LabelthrowTypes in class Label_cpublic Label subst(LabelSubstitution substitution) throws polyglot.types.SemanticException
public java.util.Set<Variable> variableComponents()
LabelvariableComponents in interface LabelvariableComponents in class Label_cpublic boolean hasWritersToReaders()
LabelhasWritersToReaders in interface LabelhasWritersToReaders in class Label_cpublic PathMap labelCheck(JifContext A, LabelChecker lc)
Label
boolean{Alice:} secret = ...;
final label{Alice:} lb = secret?new label{}:new label{Bob:};
boolean{} leak = false;
if ((*lb} <= new label{}) { // evaluation of lb reveals
// information at level {Alice:}
leak = true;
}
labelCheck in interface LabellabelCheck in class Label_cJifExt.labelCheck(LabelChecker),
Principal.labelCheck(JifContext, LabelChecker)protected void updateContextForComp(LabelChecker lc, JifContext A, PathMap Xprev)