ProtocolFactory

interface ProtocolFactory

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

The factory needs to ensure protocols returned for a node can implement the operations in that node. However, it does not need to ensure the protocols have enough authority to implement the node securely.

Functions

constraint
Link copied to clipboard
open fun constraint(node: DeclarationNode): SelectionConstraint
open fun constraint(node: LetNode): SelectionConstraint
open fun constraint(node: ParameterNode): SelectionConstraint
open fun constraint(node: UpdateNode): SelectionConstraint
guardVisibilityConstraint
Link copied to clipboard
open fun guardVisibilityConstraint(protocol: Protocol, node: IfNode): SelectionConstraint
viableProtocols
Link copied to clipboard
abstract fun viableProtocols(node: DeclarationNode): Set<Protocol>
abstract fun viableProtocols(node: LetNode): Set<Protocol>
abstract fun viableProtocols(node: ParameterNode): Set<Protocol>

Inheritors

ABYProtocolFactory
Link copied to clipboard
LocalProtocolFactory
Link copied to clipboard
ReplicationProtocolFactory
Link copied to clipboard
CommitmentProtocolFactory
Link copied to clipboard
ZKPProtocolFactory
Link copied to clipboard

Extensions

filter
Link copied to clipboard
fun ProtocolFactory.filter(predicate: (Protocol) -> Boolean): ProtocolFactory

Restricts the given factory to protocols that satisfy predicate.