Linear Continuations in SCC
The Sequent Calculus Compiler (SCC) uses sequent-calculus-based intermediate representations to compile a functional programming language to native machine code. Within the SCC, control flow is explicitly encoded using consumers. A continuation is a consumer that represents the remainder of a computation. In standard functional programs, each continuation is used linearly, i.e. exactly once. However, the SCC also supports control operators that break this linearity assumption. This thesis investigates how to statically track the linearity of continuations and exploit it to generate more efficient machine code, reducing both runtime overhead and memory usage. To achieve that, the memory allocation mechanisms are extended for linear usage of data. In this work, these improvements are only applied specifically to continuations, but serve as a foundation for more general use cases.