Difference between revisions of "Concurrency with oracles"

From HaskellWiki
Jump to: navigation, search
(Original remarks transferred out)
(References finally added)
Line 2: Line 2:
   
 
Solutions tend to involve infinite trees of oracles, so you can pull one out whenever you need one, and pass an infinite subtree to future computations. Of course once an oracle has been used, it can't be reused. [[Referential transparency]] demands that the outcome of applying the oracle is fixed.
 
Solutions tend to involve infinite trees of oracles, so you can pull one out whenever you need one, and pass an infinite subtree to future computations. Of course once an oracle has been used, it can't be reused. [[Referential transparency]] demands that the outcome of applying the oracle is fixed.
  +
  +
References:
  +
  +
* [http://www.cse.chalmers.se/~peterd/papers/FACS1989.pdf A Functional Programming Approach to the Specification and Verification of Concurrent Systems], Peter Dybjer and Herbert Sander.
  +
  +
* [https://www.ru.nl/publish/pages/682191/massinkm.pdf Functional Techniques in Concurrency], Mieke Massink.
  +
  +
* [https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.13.9123&rep=rep1&type=pdf Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell], Simon Peyton Jones.
   
 
[[Category:Concurrency]]
 
[[Category:Concurrency]]

Revision as of 05:02, 18 March 2021

An oracle is a value that "knows", by magic predictive power, which of two computations will finish first or which input event will arrive first, or whether a computation will finish before an input event arrives. In practice the predictive power is unnecessary, but the oracle, by seeming to contain the prediction, will preserve the referential transparency of a language while allowing expression of computations whose outcomes depend on execution time and arrival time.

Solutions tend to involve infinite trees of oracles, so you can pull one out whenever you need one, and pass an infinite subtree to future computations. Of course once an oracle has been used, it can't be reused. Referential transparency demands that the outcome of applying the oracle is fixed.

References: