Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers'
Accompannying material for _No value restriction is needed for algebraic effects and handlers_ ============================================================================================== [Ohad Kammar](http://www.cs.ox.ac.uk/people/ohad.kammar) and [Matija Pretnar](http://matija.pretnar.info/) Th...
Main Author: | |
---|---|
Format: | Dataset |
Language: | English |
Published: |
University of Oxford
2016
|
Subjects: |
_version_ | 1797088011276517376 |
---|---|
author | Pretnar, M |
author2 | Pretnar, M |
author_facet | Pretnar, M Pretnar, M |
author_sort | Pretnar, M |
collection | OXFORD |
description | Accompannying material for _No value restriction is needed for algebraic effects and handlers_
==============================================================================================
[Ohad Kammar](http://www.cs.ox.ac.uk/people/ohad.kammar) and [Matija Pretnar](http://matija.pretnar.info/)
This code (value-restriction.tar.gz) formalises the basic meta-theoretic properties of the different variations of the calculus presented in the aforementioned article.
The code is based on [Matija Pretnar and Andrej Bauer's formalisation](https://github.com/matijapretnar/twelf-eff/) of the core of the [Eff](http://www.eff-lang.org/) programming language. For an explanation of the basic concepts of core Eff, please refer to the aforementioned article, and to the article [An Effect System for Algebraic Effects and Handlers (http://arxiv.org/abs/1306.6316) as the comments in the code serve only to highlight implementation details.
## Running the code
The formalization is written in [Twelf](http://www.twelf.org/). To install it, please see the [official instructions](http://www.twelf.org/wiki/Download).
The simplest way to run the code is to open any `.elf` file in Emacs, and load the configuration by entering `Ctrl-C Ctrl-C` and confirming the default locations (unless you moved them to a different location).
Alternatively, you can run `twelf-server` in the main directory, and type `make`.
## The formalisations
* `local-sig`: the calculus in the article, with fully annotated local
signatures
* `shallow`: a variation on the local-sig calculus, where handlers are shallow
* `global-sig`: a coarsely-annotated variation of the calculus, with a single,
global, effect signature
* `jumbo`: the coarsely-annotated calculus extended with fixed-points,
structural subtyping, and static effect instances
## The structure of each formalisation
Each sub-directory has approximately the same structure:
* `sources.cfg`: Twelf configuration file determining the order of files
### Core language
* `effects.elf`: definitions involving operations, regions and dirt
* `effects-lemmas.elf`: various lemmas about the above definitions
* `syntax.elf`: abstract syntax
Since types and dirts are mutually defined in `local-sig`, the files
`effects.elf` and `syntax.elf` are merged, and `effects-lemmas.elf` is
named `syntax-lemmas.elf`.
### Static semantics
* `typing.elf`: definition of typing judgments
* `typing-lemmas.elf`: various typing lemmas, mainly substitution lemma
The formalisation `jumbo` also contains files `subtyping.elf` and
`subtyping-lemmas.elf` that contain appropriate definitions and lemmas for
subtyping.
### Dynamic semantics
* `operational.elf`: definition of small step and big step operational semantics
### Safety theorems
* `progress-lemmas.elf`: lemmas used in `progress.elf`
* `progress.elf`: the progress theorem
* `preservation-lemmas.elf`: lemmas used in `preservation.elf`
* `preservation.elf`: the preservation theorem We present a straightforward, sound, Hindley-Milner polymorphic type system for algebraic effects and handlers in a call-by-value calculus, which, to our surprise, allows type variable generalisation of arbitrary computations, and not just values. The soundness of unrestricted call-by-value Hindley-Milner polymorphism is known to fail in the presence of computational effects such as reference cells and continuations, and many programming examples can be recast to use effect handlers instead of these effects. This file formalises in Twelf the calculus and its soundness proof. |
first_indexed | 2024-03-07T02:43:47Z |
format | Dataset |
id | oxford-uuid:ab54ef8d-373e-448b-8466-dbb12e6b644e |
institution | University of Oxford |
language | English |
last_indexed | 2024-03-07T02:43:47Z |
publishDate | 2016 |
publisher | University of Oxford |
record_format | dspace |
spelling | oxford-uuid:ab54ef8d-373e-448b-8466-dbb12e6b644e2022-03-27T03:21:19ZAccompanying material for the article 'no value restriction is needed for algebraic effects and handlers'Datasethttp://purl.org/coar/resource_type/c_ddb1uuid:ab54ef8d-373e-448b-8466-dbb12e6b644eProgramming languages (Electronic computers)--SemanticsEnglishORA DepositUniversity of Oxford2016Pretnar, MPretnar, MPretnar, MPretnar, MKammar, OAccompannying material for _No value restriction is needed for algebraic effects and handlers_ ============================================================================================== [Ohad Kammar](http://www.cs.ox.ac.uk/people/ohad.kammar) and [Matija Pretnar](http://matija.pretnar.info/) This code (value-restriction.tar.gz) formalises the basic meta-theoretic properties of the different variations of the calculus presented in the aforementioned article. The code is based on [Matija Pretnar and Andrej Bauer's formalisation](https://github.com/matijapretnar/twelf-eff/) of the core of the [Eff](http://www.eff-lang.org/) programming language. For an explanation of the basic concepts of core Eff, please refer to the aforementioned article, and to the article [An Effect System for Algebraic Effects and Handlers (http://arxiv.org/abs/1306.6316) as the comments in the code serve only to highlight implementation details. ## Running the code The formalization is written in [Twelf](http://www.twelf.org/). To install it, please see the [official instructions](http://www.twelf.org/wiki/Download). The simplest way to run the code is to open any `.elf` file in Emacs, and load the configuration by entering `Ctrl-C Ctrl-C` and confirming the default locations (unless you moved them to a different location). Alternatively, you can run `twelf-server` in the main directory, and type `make`. ## The formalisations * `local-sig`: the calculus in the article, with fully annotated local signatures * `shallow`: a variation on the local-sig calculus, where handlers are shallow * `global-sig`: a coarsely-annotated variation of the calculus, with a single, global, effect signature * `jumbo`: the coarsely-annotated calculus extended with fixed-points, structural subtyping, and static effect instances ## The structure of each formalisation Each sub-directory has approximately the same structure: * `sources.cfg`: Twelf configuration file determining the order of files ### Core language * `effects.elf`: definitions involving operations, regions and dirt * `effects-lemmas.elf`: various lemmas about the above definitions * `syntax.elf`: abstract syntax Since types and dirts are mutually defined in `local-sig`, the files `effects.elf` and `syntax.elf` are merged, and `effects-lemmas.elf` is named `syntax-lemmas.elf`. ### Static semantics * `typing.elf`: definition of typing judgments * `typing-lemmas.elf`: various typing lemmas, mainly substitution lemma The formalisation `jumbo` also contains files `subtyping.elf` and `subtyping-lemmas.elf` that contain appropriate definitions and lemmas for subtyping. ### Dynamic semantics * `operational.elf`: definition of small step and big step operational semantics ### Safety theorems * `progress-lemmas.elf`: lemmas used in `progress.elf` * `progress.elf`: the progress theorem * `preservation-lemmas.elf`: lemmas used in `preservation.elf` * `preservation.elf`: the preservation theorem We present a straightforward, sound, Hindley-Milner polymorphic type system for algebraic effects and handlers in a call-by-value calculus, which, to our surprise, allows type variable generalisation of arbitrary computations, and not just values. The soundness of unrestricted call-by-value Hindley-Milner polymorphism is known to fail in the presence of computational effects such as reference cells and continuations, and many programming examples can be recast to use effect handlers instead of these effects. This file formalises in Twelf the calculus and its soundness proof. |
spellingShingle | Programming languages (Electronic computers)--Semantics Pretnar, M Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers' |
title | Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers' |
title_full | Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers' |
title_fullStr | Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers' |
title_full_unstemmed | Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers' |
title_short | Accompanying material for the article 'no value restriction is needed for algebraic effects and handlers' |
title_sort | accompanying material for the article no value restriction is needed for algebraic effects and handlers |
topic | Programming languages (Electronic computers)--Semantics |
work_keys_str_mv | AT pretnarm accompanyingmaterialforthearticlenovaluerestrictionisneededforalgebraiceffectsandhandlers |