Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alt-romes/linear-core
My master thesis on typechecking linearity in GHC Core, by understanding semantic linearity in the presence of call-by-need evaluation
https://github.com/alt-romes/linear-core
Last synced: 6 days ago
JSON representation
My master thesis on typechecking linearity in GHC Core, by understanding semantic linearity in the presence of call-by-need evaluation
- Host: GitHub
- URL: https://github.com/alt-romes/linear-core
- Owner: alt-romes
- Created: 2022-11-08T10:37:41.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-28T22:55:45.000Z (10 months ago)
- Last Synced: 2024-11-14T14:46:41.836Z (about 2 months ago)
- Language: Haskell
- Homepage:
- Size: 36.1 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linear Core
Linear type systems guarantee linear resources are used *exactly once*.
Traditionally, using a resource is synonymous with its *syntactic*
occurrence in the program, however, under the lens of *lazy* evaluation,
linearity can be further understood *semantically*, where a
syntactic occurrence of a resource does not necessarily entail
*using* that resource when the program is evaluated.Semantic linearity is especially necessary in optimising compilers for
languages combining linearity and laziness: optimisations leverage laziness to
heavily rewrite the source program, pushing the interaction of linearity and
laziness to its limit, regardless of the original program typing linearity
conservatively.We present Linear Core, the first type system that understands semantic
linearity in the presence of laziness, suitable for the Core intermediate
language of the Glasgow Haskell Compiler. We prove Linear Core is both type
safe and that multiple optimising transformations preserve linearity in Linear
Core while failing to do so in Core. We have implemented Linear Core as a
compiler plugin to validate the system against established libraries, including
`linear-base`, in the heart of the compiler.