public class DynamicPrincipal_c extends Principal_c implements DynamicPrincipal
DynamicPrincipal
interface.variables
Constructor and Description |
---|
DynamicPrincipal_c(AccessPath path,
JifTypeSystem ts,
polyglot.util.Position pos,
PrincipalToJavaExpr toJava) |
Modifier and Type | Method and Description |
---|---|
boolean |
equalsImpl(polyglot.types.TypeObject o) |
int |
hashCode() |
boolean |
isCanonical() |
boolean |
isRuntimeRepresentable() |
PathMap |
labelCheck(JifContext A,
LabelChecker lc)
Label check the principal, which will determine how much information may be
gained if the principal is evaluated at runtime.
|
AccessPath |
path() |
Principal |
subst(LabelSubstitution substitution) |
java.util.List<polyglot.types.Type> |
throwTypes(polyglot.types.TypeSystem ts)
If the principal is runtime representable, when it is evaluated at
runtime it may throw exceptions.
|
java.lang.String |
toString() |
hasVariables, isBottomPrincipal, isTopPrincipal, simplify, toJava, variables
typeSystem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
hasVariables, isBottomPrincipal, isTopPrincipal, simplify, variables
toJava
typeSystem
public DynamicPrincipal_c(AccessPath path, JifTypeSystem ts, polyglot.util.Position pos, PrincipalToJavaExpr toJava)
public AccessPath path()
path
in interface DynamicPrincipal
public boolean isRuntimeRepresentable()
isRuntimeRepresentable
in interface Param
isRuntimeRepresentable
in class Principal_c
public boolean isCanonical()
isCanonical
in interface Param
isCanonical
in interface polyglot.types.TypeObject
isCanonical
in class Principal_c
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equalsImpl(polyglot.types.TypeObject o)
equalsImpl
in interface polyglot.types.TypeObject
equalsImpl
in class Principal_c
public int hashCode()
hashCode
in class Principal_c
public java.util.List<polyglot.types.Type> throwTypes(polyglot.types.TypeSystem ts)
Principal
throwTypes
in interface Principal
throwTypes
in class Principal_c
public Principal subst(LabelSubstitution substitution) throws polyglot.types.SemanticException
subst
in interface ActsForParam
subst
in interface Principal
subst
in class Principal_c
substitution
- The LabelSubstitution
to apply to this
principalpolyglot.types.SemanticException
public PathMap labelCheck(JifContext A, LabelChecker lc)
Principal
boolean{Alice:} secret = ...; final principal{Alice:} p = secret?Bob:Chuck; boolean{} leak = false; if (p actsfor Bob) { // evaluation of p reveals // information at level {Alice:} leak = true; }
labelCheck
in interface Principal
labelCheck
in class Principal_c
JifExt.labelCheck(LabelChecker)
,
Label.labelCheck(JifContext, LabelChecker)