org.apache.sysds.runtime.privacy

## Class PrivacyPropagator

- java.lang.Object
- - org.apache.sysds.runtime.privacy.propagation.PrivacyPropagator

-     public class PrivacyPropagator
      extends Object

  Class with static methods merging privacy constraints of operands in expressions to generate the privacy constraints of the output.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrivacyPropagator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PrivacyConstraint` | `matrixMultiplicationPropagation(MatrixBlock input1, PrivacyConstraint privacyConstraint1, MatrixBlock input2, PrivacyConstraint privacyConstraint2)` Return the merged fine-grained privacy constraint of a matrix multiplication with the given privacy constraints.
    `static PrivacyConstraint` | `mergeBinary(PrivacyConstraint privacyConstraint1, PrivacyConstraint privacyConstraint2)`
    `static PrivacyConstraint` | `mergeNary(PrivacyConstraint[] privacyConstraints)`
    `static Data` | `parseAndSetPrivacyConstraint(Data cd, org.apache.wink.json4j.JSONObject mtd)`
    `static void` | `postProcessInstruction(Instruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessBinaryCPInstruction(BinaryCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessBuiltinNary(BuiltinNaryCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessCPInstructionFineGrained(CPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessExternal(FunctionCallCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessInstruction(Instruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessInstructionSimple(Instruction inst, ExecutionContext ec)` Throw exception if privacy constraints are activated or return instruction if privacy is not activated
    `static Instruction` | `preprocessMultiReturn(ComputationCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessParameterizedBuiltin(ParameterizedBuiltinCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessQuaternary(QuaternaryCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessTernaryCPInstruction(ComputationCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessUnaryCPInstruction(UnaryCPInstruction inst, ExecutionContext ec)`
    `static Instruction` | `preprocessVariableCPInstruction(VariableCPInstruction inst, ExecutionContext ec)`

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PrivacyPropagator

          public PrivacyPropagator()

  - ### Method Detail

    - #### parseAndSetPrivacyConstraint

          public static Data parseAndSetPrivacyConstraint(Data cd,
                                                          org.apache.wink.json4j.JSONObject mtd)
                                                   throws org.apache.wink.json4j.JSONException

      Throws:
        `org.apache.wink.json4j.JSONException`

    - #### mergeBinary

          public static PrivacyConstraint mergeBinary(PrivacyConstraint privacyConstraint1,
                                                      PrivacyConstraint privacyConstraint2)

    - #### mergeNary

          public static PrivacyConstraint mergeNary(PrivacyConstraint[] privacyConstraints)

    - #### preprocessInstruction

          public static Instruction preprocessInstruction(Instruction inst,
                                                          ExecutionContext ec)

    - #### preprocessCPInstructionFineGrained

          public static Instruction preprocessCPInstructionFineGrained(CPInstruction inst,
                                                                       ExecutionContext ec)

    - #### preprocessBinaryCPInstruction

          public static Instruction preprocessBinaryCPInstruction(BinaryCPInstruction inst,
                                                                  ExecutionContext ec)

    - #### matrixMultiplicationPropagation

          public static PrivacyConstraint matrixMultiplicationPropagation(MatrixBlock input1,
                                                                          PrivacyConstraint privacyConstraint1,
                                                                          MatrixBlock input2,
                                                                          PrivacyConstraint privacyConstraint2)

      Return the merged fine-grained privacy constraint of a matrix multiplication with the given privacy constraints. The current implementation has a tendency to create small ranges of privacy level private. These ranges could be merged to create fewer ranges spanning the same elements.
      Parameters:
        `input1` - first input matrix block
        `privacyConstraint1` - privacy constraint of the first matrix
        `input2` - second input matrix block
        `privacyConstraint2` - privacy constraint of the second matrix
      Returns:
        merged privacy constraint

    - #### preprocessInstructionSimple

          public static Instruction preprocessInstructionSimple(Instruction inst,
                                                                ExecutionContext ec)

      Throw exception if privacy constraints are activated or return instruction if privacy is not activated
      Parameters:
        `inst` - instruction
        `ec` - execution context
      Returns:
        instruction

    - #### preprocessExternal

          public static Instruction preprocessExternal(FunctionCallCPInstruction inst,
                                                       ExecutionContext ec)

    - #### preprocessMultiReturn

          public static Instruction preprocessMultiReturn(ComputationCPInstruction inst,
                                                          ExecutionContext ec)

    - #### preprocessParameterizedBuiltin

          public static Instruction preprocessParameterizedBuiltin(ParameterizedBuiltinCPInstruction inst,
                                                                   ExecutionContext ec)

    - #### preprocessBuiltinNary

          public static Instruction preprocessBuiltinNary(BuiltinNaryCPInstruction inst,
                                                          ExecutionContext ec)

    - #### preprocessQuaternary

          public static Instruction preprocessQuaternary(QuaternaryCPInstruction inst,
                                                         ExecutionContext ec)

    - #### preprocessTernaryCPInstruction

          public static Instruction preprocessTernaryCPInstruction(ComputationCPInstruction inst,
                                                                   ExecutionContext ec)

    - #### preprocessUnaryCPInstruction

          public static Instruction preprocessUnaryCPInstruction(UnaryCPInstruction inst,
                                                                 ExecutionContext ec)

    - #### preprocessVariableCPInstruction

          public static Instruction preprocessVariableCPInstruction(VariableCPInstruction inst,
                                                                    ExecutionContext ec)

    - #### postProcessInstruction

          public static void postProcessInstruction(Instruction inst,
                                                    ExecutionContext ec)

Copyright © 2020 The Apache Software Foundation. All rights reserved.