Abstract
We provide graded extensions of algebraic theories and Lawvere theories that correspond to graded monads. We prove that graded algebraic theories, graded Lawvere theories, and finitary graded monads are equivalent via equivalence of categories, which extends the equivalence for monads. We also give sums and tensor products of graded algebraic theories to combine computational effects as an example of importing techniques based on algebraic theories to graded monads.
Highlights
In the field of denotational semantics of programming languages, monads have been used to express computational effects since Moggi’s seminal work [18]
Graded monads [27] are a refinement of monads and defined as a monadlike structure indexed by a monoidal category
Graded monads are used to give denotational semantics of effect systems [12], which are type systems designed to estimate scopes of computational effects caused by programs
Summary
In the field of denotational semantics of programming languages, monads have been used to express computational effects since Moggi’s seminal work [18]. Graded algebraic theories enable us to estimate (an overapproximation of) the set of memory locations computations may access. The sideeffects theory [21] is given by operations lookupl and updatel,v for each location l ∈ L and value v ∈ V together with several equations, and each term represents a computation with side-effects. Each term has a grade, and substitution of terms must respect the monoidal structure of grades. To characterize this structure of “graded” terms, we consider Lawvere theories enriched in a presheaf category. – We generalize (N-)graded algebraic theories of [17] to M-graded algebraic theories and provide M-graded Lawvere theories where M is a small strict monoidal category. We show a few properties and examples of these constructions
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have