The paper focuses on optimizing the compilation of polymorphic effectful computations in a language with algebraic effects and handlers. The key contributions are:
The authors start by explaining the problem of explicit subtyping coercions in the presence of polymorphism. Compiling polymorphic effectful computations leads to the introduction of many additional coercion parameters, which can significantly impact performance.
The authors then present their CoreEff language, a fine-grain call-by-value calculus with effects and explicit coercions. They define well-formedness rules for types, coercions, and terms, and introduce the concept of valid substitutions that preserve well-formedness.
The main contribution is the identification of simplification phases that can reduce the number of coercion parameters. These phases include:
The authors prove that these simplifications preserve the denotational semantics of the language. They also present an implementation of the algorithm in the Eff language and evaluate its impact, showing that it can eliminate all coercion parameters, resulting in performance comparable to manually monomorphised code.
To Another Language
from source content
arxiv.org
Principais Insights Extraídos De
by Filip Kopriv... às arxiv.org 04-08-2024
https://arxiv.org/pdf/2404.04218.pdfPerguntas Mais Profundas