Sums of oracle interfaces #
A program may call two interfaces at once: a query of spec₁ ⊕ₒ spec₂ is a query of either,
answered as there. A program with private coins is the main instance (probOracleSpec), with
uniform sampling on the left; a forger calling a signer and a hash function, and the prover and
verifier oracles of an interactive protocol, are others.
OracleComp.sumHandler left right answers the two kinds of call with handlers in the same monad,
and OracleComp.liftLeft and OracleComp.liftRight embed a program over one side. Interpreting
an embedded program uses only the corresponding handler (interpret_sumHandler_liftLeft).
Main definitions #
Cslib.OracleSpec.sum, notationspec₁ ⊕ₒ spec₂: the disjoint sum of two interfaces.Cslib.OracleSpec.empty: the interface without queries.Cslib.OracleComp.sumHandler: answer the two sides with separate handlers.Cslib.OracleComp.liftLeft,Cslib.OracleComp.liftRight: embed a program over one side.
Main results #
Cslib.OracleComp.interpret_sumHandler_liftLeft,.interpret_sumHandler_liftRight: an embedded program uses only its own side's handler.Cslib.OracleComp.interpret_sumHandler: interpretation distributes over the two sides.
The disjoint sum of two interfaces: a query of either, answered as there.
Instances For
The disjoint sum of two interfaces: a query of either, answered as there.
Instances For
The interface without queries, for a party that uses no oracle.
Instances For
Answer the calls of the left interface with left and those of the right with right.
Instances For
A program over the left interface, as a program over the sum.
Instances For
A program over the right interface, as a program over the sum.
Instances For
An embedded left program uses only the left handler.
An embedded right program uses only the right handler.
Interpretation distributes over the two sides of a combined handler.