Linking is oracle interpretation #
A client of a state-transition specification is an oracle program over the specification's
signature: both are PFunctor.FreeM over the operations and their answer types. Linking a client
through methods over a lower interface is interpreting the program in the lower interface's client
monad, answering each call with its method (link_eq_interpret). The lemmas about
OracleComp.interpret (sequencing, composition of interpretations, interpretation into PMF
and state monads) therefore apply to linked clients, and refinement and cost results about link
apply to interpreted programs.
This bridge is its own module so that the state-transition layer does not import probability.
Main results #
link_eq_interpret: linking is interpretation by the methods.
Linking a client through methods is interpreting it as an oracle program, answering each call with its method.