Normal-Order Direct-Style Beta-Evaluator with Syntax-Rules and Repeated call/cc

2025-09-17

This paper explores less-frequently mentioned applications of call/cc within hygienic Scheme macros, particularly its use in assisting tedious lambda-calculations. The author presents a normal-order direct-style beta-normalizer cleverly combining syntax-rules and repeated applications of call/cc, proving its correctness via CPS transformation and an ingenious direct-style lambda-calculator. The paper also delves into delimited continuations, showing how simple macros can implement various delimited continuation operators like prompt and control. A call/cc-based factorial function implementation and discussion of delimited continuations highlight the elegance and practicality of the approach.

Read more
Development

Incremental Compiler Course: From Tiger to x86-64 Assembly in OCaml

2025-04-05

This is a highly practical compiler course aiming to build a compiler that translates the high-level Tiger language into x86-64 machine code. The course uses OCaml and emphasizes test-driven development, version control, and code reuse. It employs an iterative, incremental development approach, gradually extending language and compiler features, leveraging the tagless-final style for enhanced extensibility. The course covers standard compiler topics like parsing, type checking, optimization, and assembly generation, but in a non-traditional way.

Read more