Package-level declarations

Types

Link copied to clipboard

A ProtocolComposer with sensible defaults.

Link copied to clipboard
Link copied to clipboard
data class CommunicationEvent(val send: OutputPort, val recv: InputPort)
Link copied to clipboard
data class Cost<C : CostMonoid<C>>(val features: PersistentMap<CostFeature, C>) : CostMonoid<Cost<C>> , Map<CostFeature, C> , PrettyPrintable

The cost of executing a piece of code or sending a message. Consists of a map of features over some cost monoid.

Link copied to clipboard
data class CostAdd(val lhs: SymbolicCost, val rhs: SymbolicCost) : SymbolicCost
Link copied to clipboard

Cost determined by which guard is true. Exactly one guard must be true.

Link copied to clipboard
interface CostEstimator<C : CostMonoid<C>>

A modular cost model for estimating the cost of executing a program given a protocol assignment.

Link copied to clipboard
typealias CostFeature = String
Link copied to clipboard
data class CostLiteral(val cost: Int) : SymbolicCost
Link copied to clipboard
data class CostMax(val lhs: SymbolicCost, val rhs: SymbolicCost) : SymbolicCost
Link copied to clipboard

A commutative monoid that represents a notion of cost for a feature.

Link copied to clipboard
data class CostMul(val lhs: Int, val rhs: SymbolicCost) : SymbolicCost

Multiply cost expression with a scalar. Restrict to scalar multiplication to keep constraint problem linear.

Link copied to clipboard
Link copied to clipboard
data class FunctionVariable(val function: FunctionName, val variable: Variable) : PrettyPrintable
Link copied to clipboard
data class GuardVisibilityFlag(val variable: String) : SelectionConstraint
Link copied to clipboard
data class HostVariable(val variable: String) : SelectionConstraint
Link copied to clipboard
Link copied to clipboard
class IntegerCost(val cost: Int) : CostMonoid<IntegerCost>
Link copied to clipboard
data class Literal(val literalValue: Boolean) : SelectionConstraint
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ProtocolAssignment(val assignment: Map<FunctionVariable, Protocol>, val propModel: Map<String, Boolean>, val problem: SelectionProblem)
Link copied to clipboard
Link copied to clipboard
abstract class ProtocolComposer
Link copied to clipboard
interface ProtocolFactory

Generates a list of Protocols that can implement a given Node, along with constraints that specify when using these protocols is valid.

Link copied to clipboard
class ProtocolSelection(solver: SelectionProblemSolver, protocolFactory: ProtocolFactory, protocolComposer: ProtocolComposer, costEstimator: CostEstimator<IntegerCost>)
Link copied to clipboard

Custom selection constraints specified for constraint solving during splitting.

Link copied to clipboard
class SelectionConstraintGenerator(program: ProgramNode, protocolFactory: ProtocolFactory, protocolComposer: ProtocolComposer, costEstimator: CostEstimator<IntegerCost>)
Link copied to clipboard
data class SelectionProblem(val constraints: Set<SelectionConstraint>, val cost: SymbolicCost, val costMap: Map<Node, SymbolicCost> = mapOf())

A constrained optimization problem defined by a set of selection constraints and a cost expression to minimize.

Link copied to clipboard
Link copied to clipboard

Cost estimator for Local, Replication and ABY protocols.

Link copied to clipboard
Link copied to clipboard

Symbolic cost that will be minimized by a solver.

Link copied to clipboard
Link copied to clipboard

Protocols for v1 and v2 are equal.

Link copied to clipboard
data class VariableIn(val variable: FunctionVariable, val protocol: Protocol) : SelectionConstraint

VariableIn(v, P) holds when v is selected to be a protocol in P

Link copied to clipboard

Constraint problem using Z3. Z3 has an optimization module that can return models with minimal cost.

Functions

Link copied to clipboard

Caches values returned by ProtocolComposer.communicateOrNull so it is called once per source/destination pair.

Link copied to clipboard

Restricts the given factory to protocols that satisfy predicate.

Link copied to clipboard

Some convenience functions.

Link copied to clipboard
Link copied to clipboard

States whether an expression reads only from the protocols in protocols.


States that if the let node is stored at any protocol in to, it reads from only the protocols in from.

Link copied to clipboard

States that if the let node is stored at any protocol in from, it sends to only the protocols in to.

Link copied to clipboard

Combines given factories into a single factory that returns protocols from all of them.

Combines multiple protocol composers into one.

Link copied to clipboard
fun validateProtocolAssignment(program: ProgramNode, protocolFactory: ProtocolFactory, protocolComposer: ProtocolComposer, costEstimator: CostEstimator<IntegerCost>, protocolAssignment: ProtocolAssignment)

This function provides a sanity check to ensure that a given protocol assignment satisfies all constraints required on it by the selector.

Link copied to clipboard

Properties