| Sheng Liang. Modular Monadic Semantics and Compilation. PhD thesis, Graduate School of Yale University, May 1998. |
....to f [82, 83] The same principle works for both recursive functions and circular data structures, a rather pleasing situation. Handling of e#ects in the denotational framework, however, proved to be much more problematic, often summed up by the phrase denotational semantics is not modular [53, 64]. Briefly, addition of new e#ects require substantial changes to the existing semantic description. For instance, exceptions can be modeled by adding a special failure element to each domain, representing the result of a failed computation. But then, even such a simple thing as the meaning of an ....
....Intuitively, every value of type Maybe # can be considered as a value of type [# ] mapping Nothing to [ and Just x to [x] In a certain sense, the list monad is rich enough to capture the features of the maybe monad. Formally, this relation is captured by monad homomorphisms and embeddings [53, 89]: Definition 3.5.1 (Monad homomorphisms and embeddings. Let m and n be two monads. A monad homomorphism, # : m n, is a family of functions, one for each type # , # # : m # n # , such that: return m = return n (3.11) # # (k f) # # k n # # where k : m # and f : # m #. An ....
[Article contains additional citation context not shown here]
Liang, S. Modular Monadic Semantics and Compilation. PhD thesis, Yale University, 1998. (1, 31, 33, 53, 54, 55, 61)
....a new one adding 1 Email: labra,candi,cueva,guti lsi.uniovi.es c #2001 Published by Elsevier Science B. V. Labra et al. new operations [38] The use of monads and monad transformers to specify the semantics of programming languages was called modular monadic semantics by S. Liang et al. [37,36]. The close relationship between modular monadic semantics and action semantics was described in [54] where they present a system that combines both approaches. In a di#erent context, the definition of recursive datatypes as least fixpoints of pattern functors and the calculating properties that ....
....of monad morphism that appeared in Moggi s work [43] and was later proposed in [38] The definition of a monad transformer is not straightforward because there can be some interactions between the intervening operations of the di#erent monads. These interactions are considered in more detail in [36,37,38] and in [17] it is shown how to derive a backtracking monad transformer from its specification. Our system contains a library of predefined monad transformers corresponding to each class of monad and the user can also define new monad transformers. When defining a monad transformer T over a ....
Sheng Liang. Modular Monadic Semantics and Compilation. PhD thesis, Graduate School of Yale University, May 1998.
....both composes computations, and makes clear the order in which the computations are to be run. 2.1 Which Monad The de nition of our monad in Haskell can be found in Figure 1. We call our computational monad M. It is an environment monad with errors. We de ne it in the monad transformer style[16,15,3]. First de ning a pure Error monad, and then laying the environment features on top. The monad abstracts away the additional structure necessary to build compositional interpreters. In Haskell, this additional structure must deal correctly with two features: suspended computation, and the ....
....monad to encode sharing. 5 Using the interpreter: adding call by need evaluation With a few simple changes, the interpreter developed here can be made callby need rather than call by name. This is a happy consequence of parameterizing our interpreter by a monad structured with monad transformers[16,15]. The only changes necessary are adding a heap structure to the monad M and replacing the closures that are formed through function application with selfupdating thunks. In this section, we outline these changes. Our treatment follows Liang s dissertation[15] closely. Previously, we de ned M as: ....
[Article contains additional citation context not shown here]
Liang, S., \Modular Monadic Semantics and Compilation," Ph.D. thesis, Yale University (1997).
....language features like continuations, state, exceptions, etc. Multiple monad transformers can be composed to form the underlying monad used by all the semantic building blocks. We do not go into the details of monad transformers and their composition, which can be consulted in [14] 15] and [16]. With regard to semantic building blocks, L. Duponcheel [3] presents a modular way to compose different blocks using folds. We present his approach to define the semantics of our simple language. First, we need a monad supports exceptions (to handle division by zero) so we use ErrMonad defined ....
S. Liang, Modular Monadic Semantics and Compilation, PhD. Thesis. Computer Science, Yale (Yale University, 1998).
....in Section 5 that using metacomputations results in vastly simpler compiler speci cations than in [8] and that this naturally makes them easier to reason about. 3 Related work Espinosa [7] and Hudak, Liang, and Jones [13] use monad transformers to create modular, extensible interpreters. Liang [12, 14] addresses the question of whether compilers can be developed similarly, but since he does not compile to machine language, many of the issues we confront especially staging do not arise. A syntactic form of metacomputation can be found in the two level calculus of Nielson[19] Two level ....
....adding new source language features and the speci cation 2 The interested reader may consult the rst author s forthcoming doctoral dissertation. 13 would still hold 3 . So, the use of monad transformers in this work yields a kind of proof reuse for metacomputation based compiler correctness[14]. 8 Conclusions and Future Work This paper presents a modular and extensible style of language speci cation based on metacomputation. This style uses two monads to factor the static and dynamic parts of the speci cation, thereby staging the speci cation and achieving strong binding time ....
S. Liang, \Modular Monadic Semantics and Compilation," Doctoral Thesis, Yale University, 1997.
....Work Hudak, Liang, and Jones [16] Espinosa [6] and Wadler [26] use monads and monad transformers to create modular, extensible interpreters. This work shows how interpreters can be developed in a modular way, leaving open the question of whether compilers can be developed similarly. Liang [15, 17] addresses that question, proposing that monadic semantics constructed from monad transformers and monadic specifications provide a modular and extensible basis for semanticsdirected compilation. He describes an experiment in [17] wherein the Glasgow Haskell compiler is retargeted to the SML NJ ....
....question of whether compilers can be developed similarly. Liang [15, 17] addresses that question, proposing that monadic semantics constructed from monad transformers and monadic specifications provide a modular and extensible basis for semanticsdirected compilation. He describes an experiment in [17] wherein the Glasgow Haskell compiler is retargeted to the SML NJ back end, and develops many examples of reasoning about monadic specifications. Liangs work is the most closely related to ours, but since he does not compile to machine language, many of the issues we confront especially pass ....
[Article contains additional citation context not shown here]
S. Liang. Modular Monadic Semantics and Compilation. Doctoral Thesis, Yale University, 1997.
....Moggi [18] Hudak, Liang, and Jones [16] Espinosa [6] and Wadler [27] use monads and monad transformers to create modular, extensible interpreters. This work shows how interpreters can be developed in a modular way, leaving open the question of whether compilers can be developed similarly. Liang [15, 17] addresses that question, proposing that monadic semantics constructed from monad transformers and monadic specifications provide a modular and extensible basis for semantics directed compilation. As an example of reasoning in monadic style, he axiomatizes the environment combinators rdEnv and ....
....basis for semantics directed compilation. As an example of reasoning in monadic style, he axiomatizes the environment combinators rdEnv and inEnv, shows that these axioms hold in any monad constructed with standard monad transformers, and proves a small theorem. He describes an experiment in [17] wherein the Glasgow Haskell compiler is retargeted to the SML NJ back end, and develops many examples of reasoning about monadic specifications. Liang s work is the most closely related to ours, but since he does not compile to machine language, many of the issues we confront especially pass ....
[Article contains additional citation context not shown here]
S. Liang. Modular Monadic Semantics and Compilation. Doctoral Thesis, Yale University, 1997.
....a compiler for 3 the combined language, and presents a compiler and an example compilation. Finally, Section 6 summarizes this work and outlines future research. 2 Related work Espinosa [7] and Hudak, Liang, and Jones [13] use monad transformers to create modular, extensible interpreters. Liang [12, 14] addresses the question of whether compilers can be developed similarly, but since he does not compile to machine language, many of the issues we confront especially staging do not arise. A syntactic form of metacomputation can be found in the two level calculus of Nielson[19] Two level ....
S. Liang, "Modular Monadic Semantics and Compilation," Doctoral Thesis, Yale University, 1997.
....language features like continuations, state, exceptions, etc. Multiple monad transformers can be composed to form the underlying monad used by all the semantic building blocks. We do not go into the details of monad transformers and their composition, which can be consulted in [18] 19] and [20]. With regard to semantic building blocks, L. Duponcheel [3] presents a modular way to compose different blocks using folds. We present his approach to define the semantics of a simple language. First, we need a monad that supports exceptions (to handle division by zero) so we use ErrMonad ....
S. Liang, Modular Monadic Semantics and Compilation, PhD. Thesis. Computer Science, Yale (Yale University, 1998).
....[0] halt; Figure 2: Algol Example Espinosa [6] and Hudak, Liang, and Jones [12] use monad transformers to create modular, extensible interpreters. This work shows how interpreters can be developed in a modular way, leaving open the question of whether compilers can be developed similarly. Liang [11, 13] addresses that question, proposing that monadic semantics constructed from monad transformers and monadic specifications provide a modular and extensible basis for semantics directed compilation. He describes an experiment in [13] wherein the Glasgow Haskell compiler is retargeted to the SML NJ ....
....question of whether compilers can be developed similarly. Liang [11, 13] addresses that question, proposing that monadic semantics constructed from monad transformers and monadic specifications provide a modular and extensible basis for semantics directed compilation. He describes an experiment in [13] wherein the Glasgow Haskell compiler is retargeted to the SML NJ back end, and develops many examples of reasoning about monadic specifications. Since Liang does not compile to machine language, many of the issues we confront especially pass separation do not arise. Jorring and Scherlis [9] ....
[Article contains additional citation context not shown here]
S. Liang, "Modular Monadic Semantics and Compilation, " Doctoral Thesis, Yale University, 1997.
No context found.
Sheng Liang. Modular Monadic Semantics and Compilation. PhD thesis, Graduate School of Yale University, May 1998.
No context found.
S. Liang, #Modular Monadic Semantics and Compilation," Doctoral Thesis, Yale University, 1997.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC