added slides
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
@inproceedings{shaikhha_array_dps_2017,
|
||||
author = {Shaikhha, Amir and Fitzgibbon, Andrew and Peyton Jones, Simon and Vytiniotis, Dimitrios},
|
||||
title = {Destination-passing style for efficient memory management},
|
||||
year = {2017},
|
||||
isbn = {9781450351812},
|
||||
publisher = {Association for Computing Machinery},
|
||||
address = {New York, NY, USA},
|
||||
url = {https://doi.org/10.1145/3122948.3122949},
|
||||
doi = {10.1145/3122948.3122949},
|
||||
abstract = {We show how to compile high-level functional array-processing programs, drawn from image processing and machine learning, into C code that runs as fast as hand-written C. The key idea is to transform the program to destination-passing style, which in turn enables a highly-efficient stack-like memory allocation discipline.},
|
||||
booktitle = {Proceedings of the 6th ACM SIGPLAN International Workshop on Functional High-Performance Computing},
|
||||
pages = {12–23},
|
||||
numpages = {12},
|
||||
keywords = {Array Programming, Destination-Passing Style},
|
||||
location = {Oxford, UK},
|
||||
series = {FHPC 2017}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
@article{lh_bernardy_2017,
|
||||
author = {Bernardy, Jean-Philippe and Boespflug, Mathieu and Newton, Ryan R. and Peyton Jones, Simon and Spiwack, Arnaud},
|
||||
title = {Linear Haskell: practical linearity in a higher-order polymorphic language},
|
||||
year = {2017},
|
||||
issue_date = {January 2018},
|
||||
publisher = {Association for Computing Machinery},
|
||||
address = {New York, NY, USA},
|
||||
volume = {2},
|
||||
number = {POPL},
|
||||
url = {https://doi.org/10.1145/3158093},
|
||||
doi = {10.1145/3158093},
|
||||
abstract = {Linear type systems have a long and storied history, but not a clear path forward to integrate with existing languages such as OCaml or Haskell. In this paper, we study a linear type system designed with two crucial properties in mind: backwards-compatibility and code reuse across linear and non-linear users of a library. Only then can the benefits of linear types permeate conventional functional programming. Rather than bifurcate types into linear and non-linear counterparts, we instead attach linearity to function arrows. Linear functions can receive inputs from linearly-bound values, but can also operate over unrestricted, regular values. To demonstrate the efficacy of our linear type system — both how easy it can be integrated in an existing language implementation and how streamlined it makes it to write programs with linear types — we implemented our type system in ghc, the leading Haskell compiler, and demonstrate two kinds of applications of linear types: mutable data with pure interfaces; and enforcing protocols in I/O-performing functions.},
|
||||
journal = {Proc. ACM Program. Lang.},
|
||||
month = dec,
|
||||
articleno = {5},
|
||||
numpages = {29},
|
||||
keywords = {typestate, polymorphism, linear types, linear logic, laziness, Haskell, GHC}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
@article{abel_bernardy_2020,
|
||||
author = {Abel, Andreas and Bernardy, Jean-Philippe},
|
||||
title = {A unified view of modalities in type systems},
|
||||
year = {2020},
|
||||
issue_date = {August 2020},
|
||||
publisher = {Association for Computing Machinery},
|
||||
address = {New York, NY, USA},
|
||||
volume = {4},
|
||||
number = {ICFP},
|
||||
url = {https://doi.org/10.1145/3408972},
|
||||
doi = {10.1145/3408972},
|
||||
abstract = {We propose to unify the treatment of a broad range of modalities in typed lambda calculi. We do so by defining a generic structure of modalities, and show that this structure arises naturally from the structure of intuitionistic logic, and as such finds instances in a wide range of type systems previously described in literature. Despite this generality, this structure has a rich metatheory, which we expose.},
|
||||
journal = {Proc. ACM Program. Lang.},
|
||||
month = aug,
|
||||
articleno = {90},
|
||||
numpages = {28},
|
||||
keywords = {subtyping, modal logic, linear types}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
@article{bagrel_dp_2025,
|
||||
author = {Bagrel, Thomas and Spiwack, Arnaud},
|
||||
title = {Destination Calculus: A Linear $𝜆$-Calculus for Purely Functional Memory Writes},
|
||||
year = {2025},
|
||||
issue_date = {April 2025},
|
||||
publisher = {Association for Computing Machinery},
|
||||
address = {New York, NY, USA},
|
||||
volume = {9},
|
||||
number = {OOPSLA1},
|
||||
url = {https://doi.org/10.1145/3720423},
|
||||
doi = {10.1145/3720423},
|
||||
abstract = {Destination passing —aka. out parameters— is taking a parameter to fill rather than returning a result from a function. Due to its apparently imperative nature, destination passing has struggled to find its way to pure functional programming. In this paper, we present a pure functional calculus with destinations at its core. Our calculus subsumes all the similar systems, and can be used to reason about their correctness or extension. In addition, our calculus can express programs that were previously not known to be expressible in a pure language. This is guaranteed by a modal type system where modes are used to manage both linearity and scopes. Type safety of our core calculus was proved formally with the Coq proof assistant.},
|
||||
journal = {Proc. ACM Program. Lang.},
|
||||
month = apr,
|
||||
articleno = {89},
|
||||
numpages = {27},
|
||||
keywords = {Destination Passing, Functional Programming, Linear Types, Pure Language}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
\bibliography{bibliography/acm_3122948.3122949,bibliography/acm_3158093,bibliography/acm_3408972,bibliography/acm_3720423,bibliography/bour_et_al_2021,bibliography/diss,bibliography/minamide}
|
||||
@@ -0,0 +1,8 @@
|
||||
@article{bour_et_al_tmc_2021,
|
||||
title={Tail Modulo Cons},
|
||||
author={Fr{\'e}d{\'e}ric Bour and Basile Cl{\'e}ment and Gabriel Scherer},
|
||||
journal={ArXiv},
|
||||
year={2021},
|
||||
volume={abs/2102.09823},
|
||||
url={https://api.semanticscholar.org/CorpusID:231967558}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
@ARTICLE{bagrel_thesis_2025,
|
||||
author = {{Bagrel}, Thomas},
|
||||
title = "{Formalization and Implementation of Safe Destination Passing in Pure Functional Programming Settings}",
|
||||
journal = {arXiv e-prints},
|
||||
keywords = {Programming Languages},
|
||||
year = 2026,
|
||||
month = jan,
|
||||
eid = {arXiv:2601.08529},
|
||||
pages = {arXiv:2601.08529},
|
||||
doi = {10.48550/arXiv.2601.08529},
|
||||
archivePrefix = {arXiv},
|
||||
eprint = {2601.08529},
|
||||
primaryClass = {cs.PL},
|
||||
adsurl = {https://ui.adsabs.harvard.edu/abs/2026arXiv260108529B},
|
||||
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
@inproceedings{minamide_holes_1998,
|
||||
author = {Minamide, Yasuhiko},
|
||||
title = {A functional representation of data structures with a hole},
|
||||
year = {1998},
|
||||
isbn = {0897919793},
|
||||
publisher = {Association for Computing Machinery},
|
||||
address = {New York, NY, USA},
|
||||
url = {https://doi.org/10.1145/268946.268953},
|
||||
doi = {10.1145/268946.268953},
|
||||
abstract = {Data structures with a hole, in other words data structures with an uninitialized field, are useful to write efficient programs: they enable us to construct functional data structures flexibly and write functions such as append and map as tail recursive functions. In this paper we present an approach to introducing data structures with a hole into call-by-value functional programming languages like ML. Data structures with a hole are formalized as a new form of λ-abstraction called hole abstraction. The novel features of hole abstraction are that expressions inside hole abstraction are evaluated and application is implemented by destructive update of a hole. We present a simply typed call-by-value λ-calculus extended with hole abstractions. Then we show a compilation method of hole abstraction and prove correctness of the compilation.},
|
||||
booktitle = {Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},
|
||||
pages = {75–84},
|
||||
numpages = {10},
|
||||
location = {San Diego, California, USA},
|
||||
series = {POPL '98}
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
% This is samplepaper.tex, a sample chapter demonstrating the
|
||||
% LLNCS macro package for Springer Computer Science proceedings;
|
||||
% Version 2.21 of 2022/01/12
|
||||
%
|
||||
\documentclass[runningheads]{llncs}
|
||||
%
|
||||
\usepackage[T1]{fontenc}
|
||||
% T1 fonts will be used to generate the final print and online PDFs,
|
||||
% so please use T1 fonts in your manuscript whenever possible.
|
||||
% Other font encodings may result in incorrect characters.
|
||||
%
|
||||
\usepackage{graphicx}
|
||||
% Used for displaying a sample figure. If possible, figure files should
|
||||
% be included in EPS format.
|
||||
%
|
||||
% If you use the hyperref package, please uncomment the following two lines
|
||||
% to display URLs in blue roman font according to Springer's eBook style:
|
||||
%\usepackage{color}
|
||||
%\renewcommand\UrlFont{\color{blue}\rmfamily}
|
||||
%\urlstyle{rm}
|
||||
%
|
||||
|
||||
% My packages:
|
||||
\usepackage{unicode-math}
|
||||
\usepackage{hyperref}
|
||||
|
||||
\begin{document}
|
||||
%
|
||||
\title{Topics in Compilers and Concurrency \\ Seminar Report on\\ Background Materials and Related Work}
|
||||
%
|
||||
%\titlerunning{Abbreviated paper title}
|
||||
% If the paper title is too long for the running head, you can set
|
||||
% an abbreviated paper title here
|
||||
%
|
||||
\author{Julius Fischer}
|
||||
%
|
||||
%
|
||||
\institute{Student at University of Freiburg (ALU)\\
|
||||
\email{julius.fischer@email.uni-freiburg.com}\\
|
||||
Matriculation Number: 5317202
|
||||
}
|
||||
|
||||
|
||||
%
|
||||
\maketitle % typeset the header of the contribution
|
||||
%
|
||||
%\begin{abstract}
|
||||
%The abstract should briefly summarize the contents of the paper in
|
||||
%150--250 words.
|
||||
%
|
||||
%\keywords{First keyword \and Second keyword \and Another keyword.}
|
||||
%\end{abstract}
|
||||
%
|
||||
%
|
||||
%
|
||||
|
||||
\newcommand{\lad}{$\lambda_d$\;}
|
||||
\newcommand{\dpsf}{DPS-$\tilde{F}$\;}
|
||||
|
||||
\section{Introduction}
|
||||
In their work Bagrel and Spiwack \cite{bagrel_dp_2025} build on many prior contributions,
|
||||
both directly in their calculus grammar and semantics, but also in their structural approach regarding typing and evaluation contexts.
|
||||
From now on, the calculus introduced in this specific paper will be referred to as \lad.
|
||||
This report will highlight a number of select works, which are of significance to the \lad calculus.
|
||||
|
||||
\section{A Functional Representation of Data Structures with a Hole - Y. Minamide\cite{minamide_holes_1998}}
|
||||
This paper contributes fundamental work on holes in functional languages.
|
||||
It introduces a hole abstraction $\hat\lambda x. T$ to formalize data structures with a single hole.
|
||||
This, while syntactically different, in principle remains similar to the \lad calculus.
|
||||
Both utilize holes as the core features, where \lad has a type $T_1 \ltimes T_2$ to represent a
|
||||
structure that is missing $T_1$ to complete a $T_2$, Minamide's calculus features $(T_1, T_2) hfun$.
|
||||
In general Minamide focuses more on the similarity of his hole abstraction to the regular $\lambda$ abstraction
|
||||
and the similarity of a structure containing a hole, to a function that returns a type $T_2$, when applied to an argument of type $T_1$.
|
||||
Notably both calculi contain linearity constraints on holes, but Bagrel's work relaxes some of those constraints by allowing for weakening.
|
||||
Overall Minamide lays a lot of groundwork, and influences that can be seen in the \lad formulation and in its discussion, as
|
||||
similar benefits regarding tail recursion are addressed.
|
||||
|
||||
\section{Destination-Passing Style for Efficient Memory Management - Shaikhha et al. \cite{shaikhha_array_dps_2017}}
|
||||
While Bagrel mostly theorizes on the advantages of the \lad calculus,
|
||||
this paper gives empirical evidence on runtime and memory improvements of Destination Passing Style (DPS) in a functional language.
|
||||
Shaikhha et al. demonstrate the benefits of implementing a DPS-transformation step into the compilation of an array-programming language.
|
||||
The authors chose to not give any direct memory control to the programmer, but their intermediate language '\dpsf' still features
|
||||
some similarity to \lad.
|
||||
\dpsf is typed using a shape type, which contains the dimensions of the array, which will be written to a memory location/ destination.
|
||||
Because of the array-programming nature of the language, the shape type is fit only to arrays, but displays some flexibility,
|
||||
which, in a way, is more akin to the constructors used in \lad than to the holes used by Minamide \cite{minamide_holes_1998}.
|
||||
|
||||
\section{Tail Modulo Cons - \cite{bour_et_al_tmc_2021}}
|
||||
This paper proposes a annotation-controlled, compile time transformation of OCaml into a DPS intermediate language.
|
||||
The intermediate language only features structures with single holes/ single destinations.
|
||||
The driving goal of Tail Modulo Cons (TMC) is, as the name suggests, to elevate the issues of constructors wrapping a recursive call.
|
||||
Particularly, TMC allows for tail recursion, even if the recursive call is hidden behind a data constructor.
|
||||
While TMC is an intermediate language it allows for some source level control, as only annotated functions are converted into DPS.
|
||||
|
||||
|
||||
\section{Linear Haskell: practical linearity in a higher-order polymorphic language - Bernardy et al. \cite{lh_bernardy_2017}}
|
||||
Linear logic/ typing stands at the core of the \lad type system, and its concrete form is massively influenced by Linear Haskell.
|
||||
Bernardy et al. give deeper insight into linear typing as it is the sole focus of this paper.
|
||||
They focus on implementing linear typing in Haskell but give good intuition on linear types as a whole.
|
||||
Though unrestricted types are not a core language feature but implemented in the language itself, the type system is
|
||||
very similar to \lad, in fact the calculi even share syntax for the linear function.
|
||||
Bernardy et al. discuss many benefits of linear typing and \lad in its whole is based on the idea of linear types to make
|
||||
multiple writes to data impossible.
|
||||
|
||||
\section{A Unified View of Modalities in Type Systems - Abel and Bernardy \cite{abel_bernardy_2020}}
|
||||
\lad includes a notion of modality using the exponential $!_mT$, of which the ground work is laid by Abel and Bernardy in this work.
|
||||
They discuss modalities not exclusively for linear types in rigorous formality, diving into the precise algebraic and logical background.
|
||||
In fact this paper shows a generalization of the modes used in \lad's type system, to ensure linearity.
|
||||
The main strategy, which is used in \lad, is including the modality in an algebraic structure of the calculus (by indexing the modality $!_m$).
|
||||
Bagrel claims this approach "greatly simplif[ies] [the] context management (especially in the computer-mechanized proofs)" \cite{bagrel_dp_2025} (Page 11).
|
||||
|
||||
|
||||
|
||||
\section{Formalization and Implementation of Safe Destination Passing in Pure Functional Programming Settings - \cite{bagrel_thesis_2025}}
|
||||
Another honorable mention is Bagrel's dissertation, in which the author not only includes the findings of the original paper but
|
||||
also goes into further detail regarding linear typing and the entire intuition behind \lad.
|
||||
It includes a more comprehensive explanation for most of which is covered in the article, as well as further on the usefulness of \lad
|
||||
and an application of it.
|
||||
|
||||
|
||||
\input{./bibliography/all.tex}
|
||||
\bibliographystyle{splncs04}
|
||||
\end{document}
|
||||
@@ -0,0 +1,11 @@
|
||||
.PHONY: clean bib
|
||||
|
||||
all: clean bib compile
|
||||
|
||||
bib:
|
||||
@files=$$(ls -1 bibliography/*.bib | sed 's/\.bib//' | paste -sd, -); \
|
||||
echo "\\bibliography{$$files}" > ./bibliography/all.tex;
|
||||
clean:
|
||||
rm -rf ./out ./bibliography/all.tex
|
||||
compile: bib
|
||||
latexmk -lualatex -output-directory=out main.tex
|
||||
Reference in New Issue
Block a user