reward
fun reward(source: ResponseCIfc, rate: Double, sense: RewardSense = RewardSense.COST, alias: String? = null, kind: RewardKind? = null): RewardRef(source)
Declare a reward term: a rate times an accumulated quantity, differenced between epochs (§4.2.5).
The source type is ResponseCIfc, not ResponseIfc. Only the former carries withinReplicationStatistic, which is what "accumulated" means for a response — so a source that cannot answer is refused by the compiler rather than at construction. See the Counter overload: it needs one because a counter accumulates somewhere else entirely.
kind is normally omitted and inferred from the source. Stating it turns an assumption about the source's type into a claim build() checks.
fun reward(source: CounterCIfc, rate: Double, sense: RewardSense = RewardSense.COST, alias: String? = null, kind: RewardKind? = null): RewardRef(source)
As above, for a Counter — whose accumulation is its value (§4.2.5).