|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object polyglot.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.Copy
copy
in class polyglot.types.TypeObject_c
public java.lang.String description()
description
in interface Label
public void setDescription(java.lang.String d)
setDescription
in interface Label
public boolean hasVariableComponents()
Label
hasVariableComponents
in interface Label
public final boolean hasVariables()
Label
hasVariables
in interface Label
public boolean hasWritersToReaders()
Label
hasWritersToReaders
in interface Label
public java.util.Set variables()
Label
variables
in interface Label
public polyglot.ast.Expr toJava(JifToJavaRewriter rw) throws polyglot.types.SemanticException
toJava
in interface Label
polyglot.types.SemanticException
public boolean isBottom()
isBottom
in interface Label
public boolean isTop()
Label
For example, a JoinLabel with two components, one of which is Top, would return true for this method.
isTop
in interface Label
public boolean isInvariant()
Label
isInvariant
in interface Label
protected abstract boolean isDisambiguatedImpl()
public final boolean isDisambiguated()
Label
isDisambiguated
in interface Label
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.util.Set printedLabels)
toString
in interface Label
public java.lang.String componentString()
componentString
in interface Label
public abstract java.lang.String componentString(java.util.Set printedLabels)
componentString
in interface Label
public abstract boolean equalsImpl(polyglot.types.TypeObject t)
equalsImpl
in interface polyglot.types.TypeObject
equalsImpl
in class polyglot.types.TypeObject_c
public final Label simplify()
Label
simplify
in interface Label
protected Label simplifyImpl()
public Label normalize()
Label
normalize
in interface Label
public ConfPolicy confProjection()
confProjection
in interface Label
public IntegPolicy integProjection()
integProjection
in interface Label
public 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 Label
substitution
- 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 Label
Jif.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 |