|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.ext.jl.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
|
| Fields inherited from class polyglot.ext.jl.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.util.Collection |
components()
By default, the components of a label is simply the label itself. |
java.lang.String |
componentString()
|
abstract java.lang.String |
componentString(java.util.Set printedLabels)
|
java.lang.String |
description()
|
abstract boolean |
equalsImpl(polyglot.types.TypeObject t)
|
boolean |
hasVariables()
Does the label contain any variables, that is, labels of type VarLabel? |
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 |
isSingleton()
A label is a singleton if it only has a single component. |
boolean |
isTop()
Is this label equivalent to top? |
Label |
join(Label L)
Join this label to L. |
PathMap |
labelCheck(JifContext A)
Label check the label, which will determine how much information may be gained if the label is evaluated at runtime. |
void |
setDescription(java.lang.String d)
|
Label |
simplify()
|
Label |
singletonComponent()
Return the single component. |
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 |
variables()
The set of variables that this contains, i.e., labels of type VarLabel? |
| Methods inherited from class polyglot.ext.jl.types.TypeObject_c |
|---|
copy, 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 |
| Methods inherited from interface polyglot.util.Copy |
|---|
copy |
| Field Detail |
|---|
protected java.lang.String description
protected LabelToJavaExpr toJava
| 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.String description()
description in interface Labelpublic void setDescription(java.lang.String d)
setDescription in interface Labelpublic final boolean hasVariables()
Label
hasVariables in interface Labelpublic final 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 java.util.Collection components()
components in interface Labelpublic 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 Labelpublic boolean isSingleton()
isSingleton in interface Labelpublic Label singletonComponent()
singletonComponent in interface Labelpolyglot.util.InternalCompilerError - if this label is not a singleton.protected abstract boolean isDisambiguatedImpl()
public final boolean isDisambiguated()
Label
isDisambiguated in interface Labelpublic final Label join(Label L)
join 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.ext.jl.types.TypeObject_cpublic Label simplify()
simplify 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.SemanticExceptionpublic PathMap labelCheck(JifContext A)
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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||