Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jif.types.principal
Interface Principal

All Superinterfaces:
  java.lang.Cloneable, polyglot.util.Copy, Param, java.io.Serializable, polyglot.types.TypeObject

All Known Subinterfaces:
  DynamicPrincipal, ExternalPrincipal, ParamPrincipal, UnknownPrincipal

All Known Implementing Classes:
  DynamicPrincipal_c, ExternalPrincipal_c, ParamPrincipal_c, Principal_c, UnknownPrincipal_c

    public interface Principal

extends Param

The root interface of all kinds of Jif principals.

Method Summary
`PathMap` | `labelCheck(JifContext A)` Label check the principal, which will determine how much information may be gained if the principal is evaluated at runtime.
`Principal` | `subst(LabelSubstitution labelSubst)`
`java.util.List` | `throwTypes(polyglot.types.TypeSystem ts)` If the principal is runtime representable, when it is evaluated at runtime it may throw exceptions.
`polyglot.ast.Expr` | `toJava(JifToJavaRewriter rw)`

Methods inherited from interface jif.types.Param
`isCanonical, isRuntimeRepresentable`

Methods inherited from interface polyglot.types.TypeObject
`equalsImpl, position, typeSystem`

Methods inherited from interface polyglot.util.Copy
`copy`

Method Detail

### subst

    Principal subst(LabelSubstitution labelSubst)
                    throws polyglot.types.SemanticException

  Parameters:
    `labelSubst` - The `LabelSubstitution` to apply to this principal
  Returns:
    the result of applying labelSubst to this principal.
  Throws:
    `polyglot.types.SemanticException`

### labelCheck

    PathMap labelCheck(JifContext A)

  Label check the principal, which will determine how much information may be gained if the principal is evaluated at runtime. For example, given the dynamic principal p, where p is a local variable, evaluation of this label at runtime will reveal as much information as the label of p. For example, the following code is illegal, as the runtime evaluation of the principal reveals too much information

       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;
              }

  See Also:
    `Jif.labelCheck(LabelChecker)`, `Label.labelCheck(JifContext)`

### toJava

    polyglot.ast.Expr toJava(JifToJavaRewriter rw)
                             throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### throwTypes

    java.util.List throwTypes(polyglot.types.TypeSystem ts)

  If the principal is runtime representable, when it is evaluated at runtime it may throw exceptions. This method returns a list of the exceptions that the runtime evaluation of the principal may produce. If the principal cannot be evaluated at runtime, an empty list should be returned.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD