|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.types.TypeObject_c
jif.types.label.Label_c
public abstract class Label_c
An abstract implementation of the Label interface.
| Field Summary | |
|---|---|
protected java.lang.String |
description
|
protected LabelToJavaExpr |
toJava
|
protected java.util.Set |
variables
|
| Fields inherited from class polyglot.types.TypeObject_c |
|---|
position, ts |
| Constructor Summary | |
|---|---|
protected |
Label_c()
|
|
Label_c(JifTypeSystem ts,
polyglot.util.Position pos)
|
|
Label_c(JifTypeSystem ts,
polyglot.util.Position pos,
LabelToJavaExpr toJava)
|
| Method Summary | |
|---|---|
java.lang.String |
componentString()
|
abstract java.lang.String |
componentString(java.util.Set printedLabels)
|
ConfPolicy |
confProjection()
|
java.lang.Object |
copy()
|
java.lang.String |
description()
|
abstract boolean |
equalsImpl(polyglot.types.TypeObject t)
|
boolean |
hasVariableComponents()
Does the label contain any variables as components? This does not include variables that are in bounds of arg labels. |
boolean |
hasVariables()
Does the label contain any variables at all? This includes variables that are in bounds of arg labels. |
boolean |
hasWritersToReaders()
Does the label contain any writersToReaders constructs? |
IntegPolicy |
integProjection()
|
boolean |
isBottom()
By default, a label is not Bottom |
boolean |
isDisambiguated()
Are the components of this label all disambiguated? |
protected abstract boolean |
isDisambiguatedImpl()
Check if the label is disambiguated, without recursing into child labels. |
boolean |
isInvariant()
Is this label invariant? |
boolean |
isTop()
Is this label equivalent to top? |
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. |
Label |
normalize()
Normalize the label. |
void |
setDescription(java.lang.String d)
|
Label |
simplify()
Simplify the label, using leq if needed |
protected Label |
simplifyImpl()
|
Label |
subst(LabelSubstitution substitution)
|
java.util.List |
throwTypes(polyglot.types.TypeSystem ts)
If the label is runtime representable, when it is evaluated at runtime it may throw exceptions. |
polyglot.ast.Expr |
toJava(JifToJavaRewriter rw)
|
java.lang.String |
toString()
|
java.lang.String |
toString(java.util.Set printedLabels)
|
java.util.Set |
variableComponents()
The set of variables that this label contains as components. |
java.util.Set |
variables()
The set of variables that this label contains including variables contained in upper bounds of arg labels. |
| Methods inherited from class polyglot.types.TypeObject_c |
|---|
equals, hashCode, position, typeSystem |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jif.types.label.Label |
|---|
isComparable, isCovariant, isEnumerable, isRuntimeRepresentable, leq_ |
| Methods inherited from interface jif.types.Param |
|---|
isCanonical |
| Methods inherited from interface polyglot.types.TypeObject |
|---|
position, typeSystem |
| Field Detail |
|---|
protected java.lang.String description
protected LabelToJavaExpr toJava
protected java.util.Set variables
| Constructor Detail |
|---|
protected Label_c()
public Label_c(JifTypeSystem ts,
polyglot.util.Position pos,
LabelToJavaExpr toJava)
public Label_c(JifTypeSystem ts,
polyglot.util.Position pos)
| Method Detail |
|---|
public java.lang.Object copy()
copy in interface polyglot.util.Copycopy in class polyglot.types.TypeObject_cpublic java.lang.String description()
description in interface Labelpublic void setDescription(java.lang.String d)
setDescription in interface Labelpublic boolean hasVariableComponents()
Label
hasVariableComponents in interface Labelpublic final boolean hasVariables()
Label
hasVariables in interface Labelpublic boolean hasWritersToReaders()
Label
hasWritersToReaders in interface Labelpublic java.util.Set variables()
Label
variables in interface Label
public polyglot.ast.Expr toJava(JifToJavaRewriter rw)
throws polyglot.types.SemanticException
toJava in interface Labelpolyglot.types.SemanticExceptionpublic boolean isBottom()
isBottom in interface Labelpublic boolean isTop()
LabelFor example, a JoinLabel with two components, one of which is Top, would return true for this method.
isTop in interface Labelpublic boolean isInvariant()
Label
isInvariant in interface Labelprotected abstract boolean isDisambiguatedImpl()
public final boolean isDisambiguated()
Label
isDisambiguated in interface Labelpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.util.Set printedLabels)
toString in interface Labelpublic java.lang.String componentString()
componentString in interface Labelpublic abstract java.lang.String componentString(java.util.Set printedLabels)
componentString in interface Labelpublic abstract boolean equalsImpl(polyglot.types.TypeObject t)
equalsImpl in interface polyglot.types.TypeObjectequalsImpl in class polyglot.types.TypeObject_cpublic final Label simplify()
Label
simplify in interface Labelprotected Label simplifyImpl()
public Label normalize()
Label
normalize in interface Labelpublic ConfPolicy confProjection()
confProjection in interface Labelpublic IntegPolicy integProjection()
integProjection in interface Labelpublic java.util.List throwTypes(polyglot.types.TypeSystem ts)
Label
throwTypes in interface Label
public Label subst(LabelSubstitution substitution)
throws polyglot.types.SemanticException
subst in interface Labelsubstitution - The LabelSubstitution to apply to this
label
polyglot.types.SemanticException
public 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 LabelJif.labelCheck(LabelChecker),
Principal.labelCheck(JifContext, LabelChecker)public java.util.Set variableComponents()
Label
variableComponents in interface Label
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||