CostEstimator

interface CostEstimator<C : CostMonoid<C>>

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

The cost model is modular because it is local: it cannot look at the entire program, instead, it is restricted to viewing a single computation or a message at a time.

Functions

Link copied to clipboard
abstract fun communicationCost(source: Protocol, destination: Protocol, host: Host? = null): Cost<C>

Estimated cost of sending a message from source to destination relative to host in destination. If host is null, then computes the cost for all the hosts in destination.

Link copied to clipboard
abstract fun executionCost(stmt: SimpleStatementNode, protocol: Protocol): Cost<C>

Estimated cost of executing stmt at protocol.

Link copied to clipboard
abstract fun featureWeights(): Cost<C>

Cost weights of features.

Link copied to clipboard
abstract fun zeroCost(): Cost<C>

"Identity" cost.

Inheritors

Link copied to clipboard