| R. Hughes and A. Moran. Making Choices Lazily. In FPCA'95 --- Intl Conf on Functional Programming Languages and Computer Architecture, pages 108--119, La Jolla, CA, June 1995. ACM Press. |
....are so many alternative semantics that space precludes comprehensive coverage, but we briefly compare with major alternatives. For simplicity we characterise ambND, only distinguishing between it and other members of the family where relevant. Locally angelic: ambND is angelic, or bottom avoiding [9]: it may terminate even when one of its branches is divergent, i.e. ambND x = x ambND x = x However ambND is not Hoare s globally angelic choice [11] the following fragment may diverge because zero is chosen, where an angelic choice would always terminate with value two . x ambND 1 ....
....often focused on the impact of different parameter passing styles [8] Sndergaard and Sestoft [21] give a detailed discussion of semantic properties of functional languages in the presence of non deterministic constructs and present both singular and plural semantics for amb. Hughes and Moran [9] present a singular semantics for normal order calculus with amb, capturing the notion of fairness, and a more detailed discussion of the semantic properties is given in Moran s PhD thesis [15] 6. Conclusions We have implemented and measured a family of parallel bottom avoiding choice ....
R. Hughes and A. Moran. Making Choices Lazily. In FPCA'95 --- Intl Conf on Functional Programming Languages and Computer Architecture, pages 108--119, La Jolla, CA, June 1995. ACM Press.
....are so many alternative semantics that space precludes comprehensive coverage, but we brie y compare with major alternatives. For simplicity we characterise ambND, only distinguishing between it and other members of the family where relevant. Locally angelic: ambND is angelic, or bottom avoiding [11]: it may terminate even when one of its branches is divergent, i.e. ambND x = x ambND x = x However ambND is not Hoare s globally angelic choice [13] the following fragment may diverge because zero is chosen, where an angelic choice would always terminate with value two . x ambND 1 ....
R.J.M. Hughes and A.K. Moran. Making Choices Lazily. In FPCA'95 | Intl Conf on Functional Programming Languages and Computer Architecture, pages 108-119, La Jolla, CA, June 1995. ACM Press.
....We therefore study a variant of Haskell with call byneed semantics and handleable exceptions. This variant of Haskell is reminiscent of the informal Haskell dialect used by some programmers, at their own risk, to implement generation of new names [6] memoization [20] non deterministic choice [21] and other paradigms that are not expressible in a modular way in a purely functional language. It is also reminiscent of the intermediate language of Haskell compilers like the Glasgow Haskell compiler, that implement monadic state by updates on a global shared store. The next section motivates ....
Hughes, J., and Moran, A. Making choices lazily. In Conference on Functional Programming and Computer Architecture (1995). To appear.
....semantics for amb: e 1 e 0 1 e 1 8 e 2 e 0 1 8 e 2 e 2 e 0 2 e 1 8 e 2 e 1 8 e 0 2 v 1 8 e 2 v 1 e 1 8 v 2 v 2 2 Singular choice also arises with call by value parameter passing, since this only allows the substitution of values. 3 The interested reader is referred to [HM95]. 7 However, this allows a diverging branch to lead to the divergence of the choice expression. In fact, these rules de ne erratic choice, not amb. We need a mechanism that will ensure that convergent branches are chosen if their companion is divergent. We do this by assigning to each branch a ....
....for an appropriate class of theories. Most of this work has been carried out for a similar language with call by need parameter passing, giving a semantics that models singular amb and sharing and as such is suitable as a basis for reasoning about non deterministic, lazy, functional languages [HM95]. The next step is to establish an equational theory for this semantics, via operational equivalences as was presented here. This is non trivial, since the sharing is modelled via an abstraction of heaps, which greatly complicates almost every stage of the process. 30 ....
J. Hughes and A. K. Moran. Making Choices Lazily. In FPCA '95 - Conference on Functional Programming Languages and Computer Architecture. ACM Press, June 1995.
.... to call by need e.g. Josephs 1989; Je rey 1994; Seaman and Purushothaman Iyer 1996; Launchbury 1993; Sestoft 1997] Launchbury s natural semantics, and Sestoft s abstract machine(s) have been adopted by a number of researchers as the formal de nition of call by need e.g. Turner et al. 1995; Hughes and Moran 1995; Sansom and Peyton Jones 1997; Gustavsson 1998] Since it appears to be a non controversial choice, we adopt Sestoft s machine essentially a Krivine machine [Curien 1991] with updating of the heap as the operational model underpinning our theory. As others have observed (e.g. Pitts 1997a] ....
Hughes, J. and Moran, A. K. 1995. Making choices lazily. In Proc. FPCA'95, ACM Conference on Functional Programming Languages and Computer Architecture (June 1995), pp. 108-119. ACM Press.
....brie y in section 6. We conclude in section 7. 2 Related Work The imprecise exception mechanism was introduced in [PJRH 99] where it is related to other approaches to exception handling in functional languages. Co inductively de ned operational semantics have appeared before (see e.g. CC91,HM95] but there it has usually been used to de ne divergence or non termination predicates. Our use of co induction to de ne an exceptional convergence relation appears to be new. There is not much prior work on equational reasoning about exceptions. In [Gor94, x6.7] Gordon considers a small ....
J. Hughes and A. K. Moran, Making choices lazily, Proc. FPCA'95, ACM Press, June 1995, pp. 108-119.
....in section 5. We conclude in section 6. 2 Related Work The imprecise exception mechanism was introduced in [PJRH 99] where it is related to other approaches to exception handling in functional languages. Co inductively defined operational semantics have appeared before (see e.g. CC91, HM95] but there it has usually been used to define divergence or non termination predicates. Our use of co induction to define an exceptional convergence relation appear to be new. There is not much prior work on equational reasoning about exceptions. In [Gor94, x6.7] Gordon considers a small ....
J. Hughes and A. K. Moran, Making choices lazily, Proc. FPCA'95, ACM Press, June 1995, pp. 108--119.
....2 v 1 8 e 2 v 1 e 1 8 v 2 v 2 However, this allows a diverging branch to lead to the divergence of the choice expression. In fact, 2 Singular choice also arises with call by value parameter passing, since this only allows the substitution of values. 3 The interested reader is referred to [HM95]. 7 these rules de ne erratic choice, not amb. We need a mechanism that will ensure that convergent branches are chosen if their companion is divergent. We do this by assigning to each branch a nite amount of evaluation resources, allocated by a fair scheduler. The expression e 1 m 8 n e 2 ....
....for an appropriate class of theories. Most of this work has been carried out for a similar language with call by need parameter passing, giving a semantics that models singular amb and sharing and as such is suitable as a basis for reasoning about non deterministic, lazy, functional languages [HM95]. The next step is to establish an equational theory for this semantics, via operational equivalences as was presented here. This is non trivial, since the sharing is modelled via an abstraction of heaps, which greatly complicates almost every stage of the process. 30 ....
J. Hughes and A. Moran. Making Choices Lazily. In FPCA '95 - Conference on Functional Programming Languages and Computer Architecture. ACM Press, June 1995.
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