Abstract
We propose a formal definition for (valid) speculative computations, which is independent of any implementation technique. By speculative computations we mean optimization mechanisms that rely on relaxing the flow of execution in a given program, and on guessing the values read from pointers in the memory. Our framework for formalizing these computations is the standard operational one that is used to describe the semantics of programming languages. In particular, we introduce speculation contexts, that generalize classical evaluation contexts, and allow us to deal with out of order computations. Regarding concurrent programs, we show that the standard DRF guarantee, asserting that data race free programs are correctly implemented in a relaxed semantics, fails with speculative computations, but that a similar guarantee holds for programs that are free of data races in the speculative semantics.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Work partially supported by the ANR-SETI-06-010 grant.
References
Adve, S.A., Gharachorloo, K.: Shared memory consistency models: a tutorial. IEEE Computer 29(12), 66–76 (1996)
Adve, S., Hill, M.D.: Weak ordering – A new definition. In: ISCA 1990, pp. 2–14 (1990)
Aspinall, D., Ševčík, J.: Java memory model examples: good, bad and ugly. In: VAMP 2007 (2007)
Ševčík, J., Aspinall, D.: On validity of program transformations in the JAVA memory model. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 27–51. Springer, Heidelberg (2008)
Berry, G., Lévy, J.-J.: Minimal and optimal computations of recursive programs. J. of ACM 26, 148–175 (1979)
Boehm, H.-J., Adve, S.V.: Foundations of the C++ concurrency model. In: PLDI 2008, pp. 68–78 (2008)
Boudol, G., Petri, G.: Relaxed memory models: an operational approach. In: POPL 2009, pp. 392–403 (2009)
Burton, F.W.: Speculative computation, parallelism, and functional programming. IEEE Trans. on Computers C-34(12), 1190–1193 (1985)
Felleisen, M., Friedman, D.P.: Control operators, the SECD-machine and the λ-calculus. In: Wirsing, M. (ed.) Formal Description of Programming Concepts III, pp. 193–217. Elsevier, Amsterdam (1986)
Flanagan, C., Felleisen, M.: The semantics of future and its use in program optimization. In: POPL 1995, pp. 209–220 (1995)
Gabbay, F., Mendelson, A.: Using value prediction to increase the power of speculative execution hardware. ACM Trans. on Computer Systems 16(3), 234–270 (1998)
Gharachorloo, K., Lenoski, D., Laudon, J., Gibbons, P., Gupta, A., Hennessy, J.: Memory consistency and event ordering in scalable sharedmemory multiprocessors. ACM SIGARCH Computer Architecture News 18(3a), 15–26 (1990)
Gosling, J., Joy, B., Steele, G.L., Bracha, G.: The JAVA Language Specification, 3rd edn. Prentice Hall, Englewood Cliffs (2005)
Halstead, R.H.: Multilisp: a language for concurrent symbolic computation. ACM TOPLAS 7(4), 501–538 (1985)
Katz, M., Weise, D.: Continuing into the future: on the interaction of futures and first-class continuations. In: ACM Conf. on Lisp and Functional Programming, pp. 176–184 (1990)
Knight, T.: An architecture for mostly functional languages. In: ACM Conf. on Lisp and Functional Programming, pp. 105–112 (1986)
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. on Computers 28(9), 690–691 (1979)
Lévy, J.-J.: Optimal reductions in the lambda calculus. In: To, H.B.C., Seldin, J.P., Hindley, J.R. (eds.) Essays on Combinatory Logic, Lambda Calculus and Formalism, pp. 159–191. Academic Press, London (1980)
Lipasti, M.H., Wilkerson, C.B., Shen, J.P.: Value locality and load value prediction. In: ASPLOS 1996, pp. 138–147 (1996)
Manson, J., Pugh, W., Adve, S.A.: The Java memory model. In: POPL 2005, pp. 378–391 (2005)
Martin, M.K., Sorin, D.J., Cain, H.W., Hill, M.D., Lipasti, M.H.: Correctly implementing value prediction in microprocessors that support multithreading or multiprocessing. In: 34th International Symp. on Microarchitecture, pp. 328–337 (2001)
Moreau, L.: The semantics of Scheme with futures. In: ICFP 1996, pp. 146–156 (1996)
Navabi, A., Jagannathan, S.: Exceptionally safe futures. In: Field, J., Vasconcelos, V.T. (eds.) COORDINATION 2009. LNCS, vol. 5521, pp. 47–65. Springer, Heidelberg (2009)
Saraswat, V., Jagadeesan, R., Michael, M., von Praun, C.: A theory of memorymodels. In: PPoPP 2007, pp. 161–172 (2007)
Sarkar, S., Sewell, P., Zappa Nardelli, F., Owens, S., Ridge, T., Braibant, T., Myreen, M.O., Alglave, J.: The semantics of x86-CC multiprocessor machine code. In: POPL 2009, pp. 379–391 (2009)
Smith, J.E.: A study of branch prediction strategies. In: ISCA 1981, pp. 135–148 (1981)
Welc, A., Jagannathan, S., Hosking, A.: Safe futures for JAVA. In: OOPSLA 2005, pp. 439–453 (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Boudol, G., Petri, G. (2010). A Theory of Speculative Computation. In: Gordon, A.D. (eds) Programming Languages and Systems. ESOP 2010. Lecture Notes in Computer Science, vol 6012. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11957-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-11957-6_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-11956-9
Online ISBN: 978-3-642-11957-6
eBook Packages: Computer ScienceComputer Science (R0)