Semantics of value recursion for monadic input/output

被引:3
作者
Erkök, L [1 ]
Launchbury, J [1 ]
Moran, A [1 ]
机构
[1] OHSU, OGI Sch Sci & Engn, Portland, OR 97201 USA
来源
RAIRO-THEORETICAL INFORMATICS AND APPLICATIONS | 2002年 / 36卷 / 02期
关键词
D O I
10.1051/ita:2002008
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Monads have been employed in programming languages for modeling various language features, most importantly those that involve side effects. In particular, Haskell's IO monad provides access to I/O operations and mutable variables, without compromising referential transparency. Cyclic definitions that involve monadic computations give rise to the concept of value - recursion, where the fixed-point computation takes place only over the values, without repeating or losing effects. In this paper, we describe a semantics for a lazy language based on Haskell, supporting monadic I /O, mutable variables, usual recursive definitions, and value recursion. Our semantics is composed of two layers : a natural semantics for the functional layer, and a labeled transition semantics for the IO layer.
引用
收藏
页码:155 / 180
页数:26
相关论文
共 32 条
[11]  
Hasegawa M., 1999, DISTINGUISHED DISSER
[12]   Generalising monads to arrows [J].
Hughes, J .
SCIENCE OF COMPUTER PROGRAMMING, 2000, 37 (1-3) :67-111
[13]  
JEFFREY A, 1997, UNPUB PREMONOIDAL CA
[14]  
JONES MP, 1999, P 1999 HASK WORKSH
[15]  
Jones S. Peyton, 2001, ENG THEORIES SOFTWAR, P47
[16]  
JONES SLP, 1999, REPORT PROGRAMMING L
[17]  
JONES SP, 1993, 20 ACM S PRINC PROGR, P71
[18]   Traced monoidal categories [J].
Joyal, A ;
Street, R ;
Verity, D .
MATHEMATICAL PROCEEDINGS OF THE CAMBRIDGE PHILOSOPHICAL SOCIETY, 1996, 119 :447-468
[19]   On embedding a microarchitectural design language within Haskell [J].
Launchbury, J ;
Lewis, JR ;
Cook, B .
ACM SIGPLAN NOTICES, 1999, 34 (09) :60-69
[20]  
Launchbury J., 1995, LISP and Symbolic Computation, V8, P293, DOI 10.1007/BF01018827