Unifying Theories of Programming with Monads
نویسنده
چکیده
The combination of probabilistic and nondeterministic choice in program calculi is a notoriously tricky problem, and one with a long history. We present a simple functional programming approach to this challenge, based on algebraic theories of computational effects. We make use of the powerful abstraction facilities of modern functional languages, to introduce the choice operations as a little embedded domain-specific language rather than having to define a language extension; we rely on referential transparency, to justify straightforward equational reasoning about program behaviour.
منابع مشابه
Monads with arities and their associated theories
After a review of the concept of ‘‘monad with arities’’ we show that the category of algebras for such a monad has a canonical dense generator. This is used to extend the correspondence between finitary monads on sets and Lawvere’s algebraic theories to a general correspondence between monads and theories for a given category with arities. As an application we determine arities for the free gro...
متن کاملPOWERSET OPERATORS OF EXTENSIONAL FUZZY SETS
Powerset structures of extensional fuzzy sets in sets with similarity relations are investigated. It is proved that extensional fuzzy sets have powerset structures which are powerset theories in the category of sets with similarity relations, and some of these powerset theories are defined also by algebraic theories (monads). Between Zadeh's fuzzy powerset theory and the classical powerset theo...
متن کاملAlgebraic theories, monads, and arities
Monads are of interest both in semantics and in higher dimensional algebra. It turns out that the idea behind usual notion finitary monads (whose values on all sets can be computed from their values on finite sets) extends to a more general class of monads called monads with arities, so that not only algebraic theories can be computed from a proper set of arities, but also more general structur...
متن کاملExploring the Boundaries of Monad Tensorability on Set
We study a composition operation on monads, equivalently presented as large equational theories. Specifically, we discuss the existence of tensors, which are combinations of theories that impose mutual commutation of the operations from the component theories. As such, they extend the sum of two theories, which is just their unrestrained combination. Tensors of theories arise in several context...
متن کاملUnifying Guarded and Unguarded Iteration
Models of iterated computation, such as (completely) iterative monads, often depend on a notion of guardedness, which guarantees unique solvability of recursive equations and requires roughly that recursive calls happen only under certain guarding operations. On the other hand, many models of iteration do admit unguarded iteration. Solutions are then no longer unique, and in general not even de...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012