A Contextual Semantics for Concurrent Haskell with Futures

被引:0
|
作者
Sabel, David [1 ]
Schmidt-Schauss, Manfred [1 ]
机构
[1] Goethe Univ Frankfurt, Dept Comp Sci & Math, D-60054 Frankfurt, Germany
关键词
Contextual equivalence; Concurrency; Functional programming; Futures; Semantics; LAMBDA-CALCULUS; PARALLEL; CORRECTNESS;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In this paper we analyze the semantics of,a higher-order functional language with concurrent threads, monadic 10 and synchronizing variables as in Concurrent Haskell. To assure declarativeness of concurrent programming we extend the language by implicit, monadic, and concurrent futures. As semantic model we introduce and analyze the process calculus CHF, which represents a typed core language of Concurrent Haskell extended by concurrent futures. Evaluation in CHF is defined by a small-step reduction relation. Using contextual equivalence based on may- and should-convergence as program equivalence, we show that various transformations preserve program equivalence. We establish a context lemma easing those correctness proofs. An important result is that call-by-need and call-by-name evaluation are equivalent in CHF, since they induce the same program equivalence. Finally we show that the monad laws hold in CHF under mild restrictions on Haskell's seq-operator, which for instance justifies the use of the do-notation.
引用
收藏
页码:101 / 112
页数:12
相关论文
共 50 条
  • [1] A static semantics for Haskell
    Faxén, KF
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2002, 12 (4-5) : 295 - 357
  • [2] Observational Semantics for a Concurrent Lambda Calculus with Reference Cells and Futures
    Niehren, Joachim
    Sabel, David
    Schmidt-Schau, Manfred
    Schwinghammer, Jan
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2007, 173 : 313 - 337
  • [4] Futures and Promises in Haskell and Scala
    Dauth, Tamino
    Sulzmann, Martin
    [J]. PROCEEDINGS OF THE 2019 ACM SIGPLAN WORKSHOP ON PARTIAL EVALUATION AND PROGRAM MANIPULATION (PEPM '19), 2019, : 68 - 74
  • [5] Concurrent Orchestration in Haskell
    Launchbury, John
    Elliott, Trevor
    [J]. ACM SIGPLAN NOTICES, 2010, 45 (11) : 79 - 90
  • [6] Concurrent ML Library in Concurrent Haskell
    Chaudhuri, Avik
    [J]. ICFP'09: PROCEEDINGS OF THE 2009 ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2009, : 269 - 280
  • [7] A simple semantics for Haskell overloading
    Morris, J. Garrett
    [J]. ACM SIGPLAN Notices, 2014, 49 (12): : 107 - 118
  • [8] A Concurrent ML Library in Concurrent Haskell
    Chaudhuri, Avik
    [J]. ACM SIGPLAN NOTICES, 2009, 44 (8-9) : 269 - 280
  • [9] A Simple Semantics for Haskell Overloading
    Morris, J. Garrett
    [J]. ACM SIGPLAN NOTICES, 2014, 49 (12) : 107 - 118
  • [10] Concurrent Hash Tables for Haskell
    Duarte, Rodrigo Medeiros
    Du Bois, Andre Rauber
    Pilla, Mauricio L.
    Cavalheiro, Gerson G. H.
    Reiser, Renata H. S.
    [J]. PROGRAMMING LANGUAGES (SBLP 2016), 2016, 9889 : 110 - 124