jif.extension

## Class JifCheckedEndorseStmtExt

- java.lang.Object
- - polyglot.ast.Ext_c
  - - jif.ast.JifExt_c
    - - jif.extension.JifStmtExt_c
      - - jif.extension.JifDowngradeStmtExt
        - - jif.extension.JifEndorseStmtExt
          - - jif.extension.JifCheckedEndorseStmtExt

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JifExt, JifStmtExt, polyglot.ast.Ext, polyglot.ast.NodeOps, polyglot.util.Copy<polyglot.ast.Ext>

      public class JifCheckedEndorseStmtExt
      extends JifEndorseStmtExt

  The Jif extension of the `CheckedEndorseStmt` node. A checked endorse is of the form: endorse (x, Lfrom to Lto) if (e) S else S' and is approximately equivalent to T x' = endorse(x, Lfrom to Lto); if (e[x'/x]) S[x'/x] else S' To actually implement this, however, we use a different context for label checking e and S, that gives the local variable x the label Lto.
  See Also:
    `CheckedEndorseStmt`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface polyglot.util.Copy

      `polyglot.util.Copy.Util`

  - ### Field Summary

    - ### Fields inherited from class jif.extension.JifStmtExt_c

      `stmtDel`

    - ### Fields inherited from class jif.ast.JifExt_c

      `toJava, X`

    - ### Fields inherited from class polyglot.ast.Ext_c

      `ext, node, pred`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JifCheckedEndorseStmtExt(ToJavaExt toJava)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected JifContext` | `bodyContext(LabelChecker lc, JifContext A, Label downgradeFrom, Label downgradeTo)`
    `protected void` | `checkAdditionalConstraints(LabelChecker lc, JifContext A, Label labelFrom, Label labelTo, polyglot.util.Position pos)` Check any additional constraints
    `protected void` | `checkAuthority(LabelChecker lc, JifContext A, Label labelFrom, Label labelTo, polyglot.util.Position pos)` Check the authority condition
    `protected polyglot.ast.Stmt` | `checkBody(LabelChecker lc, JifContext A, Label downgradeFrom, Label downgradeTo)`
    `protected void` | `checkOneDimenOnly(LabelChecker lc, JifContext A, Label labelFrom, Label labelTo, polyglot.util.Position pos)` Check that only the integrity/confidentiality is downgraded, and not the other dimension.
    `protected void` | `checkPCconstraint(LabelChecker lc, JifContext A, Label pc, Label downgradeFrom, boolean boundSpecified)`
    `protected void` | `checkRobustness(LabelChecker lc, JifContext A, Label labelFrom, Label labelTo, polyglot.util.Position pos)` Check the robustness condition
    `protected void` | `updateContextForConsequent(LabelChecker lc, JifContext A, PathMap Xexpr)` Utility method for updating the context for the consequent.

    - ### Methods inherited from class jif.extension.JifDowngradeStmtExt

      `declassifyConstraintContext, initPathMap, labelCheckStmt`

    - ### Methods inherited from class jif.extension.JifStmtExt_c

      `copy, init, labelCheck, stmtDel, stmtDel`

    - ### Methods inherited from class jif.ast.JifExt_c

      `checkAndRemoveThrowType, checkThrowTypes, dump, getPathMap, integerBoundsCalculated, toJava, toJava, updatePathMap, X, X`

    - ### Methods inherited from class polyglot.ast.Ext_c

      `addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, ext, ext, extRewrite, extRewriteEnter, extRewriteOverride, initPred, lang, node, pred, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, superLang, throwTypes, toString, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jif.ast.JifExt

      `integerBoundsCalculated, toJava, toJava, X, X`

    - ### Methods inherited from interface polyglot.ast.Ext

      `dump, ext, ext, initPred, node, pred`

    - ### Methods inherited from interface polyglot.ast.NodeOps

      `addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, extRewriteOverride, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList`

- - ### Constructor Detail

    - #### JifCheckedEndorseStmtExt

          public JifCheckedEndorseStmtExt(ToJavaExt toJava)

  - ### Method Detail

    - #### checkBody

          protected polyglot.ast.Stmt checkBody(LabelChecker lc,
                                                JifContext A,
                                                Label downgradeFrom,
                                                Label downgradeTo)
                                         throws polyglot.types.SemanticException

      Overrides:
        `checkBody` in class `JifDowngradeStmtExt`
      Throws:
        `polyglot.types.SemanticException`

    - #### updateContextForConsequent

          protected void updateContextForConsequent(LabelChecker lc,
                                                    JifContext A,
                                                    PathMap Xexpr)

      Utility method for updating the context for the consequent. Useful for overriding in projects like fabric.

    - #### bodyContext

          protected JifContext bodyContext(LabelChecker lc,
                                           JifContext A,
                                           Label downgradeFrom,
                                           Label downgradeTo)

      Overrides:
        `bodyContext` in class `JifDowngradeStmtExt`

    - #### checkPCconstraint

          protected void checkPCconstraint(LabelChecker lc,
                                           JifContext A,
                                           Label pc,
                                           Label downgradeFrom,
                                           boolean boundSpecified)
                                    throws polyglot.types.SemanticException

      Overrides:
        `checkPCconstraint` in class `JifDowngradeStmtExt`
      Throws:
        `polyglot.types.SemanticException`

    - #### checkOneDimenOnly

          protected void checkOneDimenOnly(LabelChecker lc,
                                           JifContext A,
                                           Label labelFrom,
                                           Label labelTo,
                                           polyglot.util.Position pos)
                                    throws polyglot.types.SemanticException

      Description copied from class: `JifDowngradeStmtExt`
      Check that only the integrity/confidentiality is downgraded, and not the other dimension.
      Overrides:
        `checkOneDimenOnly` in class `JifEndorseStmtExt`
      Throws:
        `polyglot.types.SemanticException`

    - #### checkAuthority

          protected void checkAuthority(LabelChecker lc,
                                        JifContext A,
                                        Label labelFrom,
                                        Label labelTo,
                                        polyglot.util.Position pos)
                                 throws polyglot.types.SemanticException

      Description copied from class: `JifDowngradeStmtExt`
      Check the authority condition
      Overrides:
        `checkAuthority` in class `JifEndorseStmtExt`
      Throws:
        `polyglot.types.SemanticException`

    - #### checkRobustness

          protected void checkRobustness(LabelChecker lc,
                                         JifContext A,
                                         Label labelFrom,
                                         Label labelTo,
                                         polyglot.util.Position pos)
                                  throws polyglot.types.SemanticException

      Description copied from class: `JifDowngradeStmtExt`
      Check the robustness condition
      Overrides:
        `checkRobustness` in class `JifEndorseStmtExt`
      Throws:
        `polyglot.types.SemanticException`

    - #### checkAdditionalConstraints

          protected void checkAdditionalConstraints(LabelChecker lc,
                                                    JifContext A,
                                                    Label labelFrom,
                                                    Label labelTo,
                                                    polyglot.util.Position pos)
                                             throws polyglot.types.SemanticException

      Description copied from class: `JifDowngradeStmtExt`
      Check any additional constraints
      Overrides:
        `checkAdditionalConstraints` in class `JifDowngradeStmtExt`
      Throws:
        `polyglot.types.SemanticException`