arXiv:2609.04904cs.PLSep 2026

Manuscript Offprint

arXiv:2609.04904

CPL: A Compact C-like Systems Language with Explicit Low-Level Control

Nikolay Fot, Alexander Vinarsky

Abstract

This paper presents Cordell Programming Language (CPL), a compact C-like systems language that retains C's direct access to memory, layout, and machine interfaces while experimenting with a smaller grammar and selected conveniences from newer languages. Also this paper studies whether C-like are more convenient to use for compiler experiments than modern approaches and paradigms. While the language and compiler provide primitive values, pointers, arrays, containers with methods, unions, generic functions, overloads, entry-point and section control, system calls, and inline assembly, they do not provide high-level constructs such as classes, built-in methods, a standard library, or memory protection. The article describes the language design, compiler pipeline, target backends, static-analysis architecture, and OS-facing use cases, then evaluates the prototype backend with reproducible x86_64 and i386 microbenchmarks against C compiler baselines. The obtained results suggest that the compiler can produce code comparable to that produced by production compilers such as GCC and Clang, as well as by small compilers such as TinyC and SmallerC.

1 Introduction

Systems programming languages expose machine-level details while attempting to keep programs tractable. Mature languages such as C [13, 7], C++ [14, 15], Rust [8, 6], and Zig [18] provide large ecosystems, but the full syntactic and semantic complexity makes them expensive targets for compiler experiments. Conversely, many teaching compilers are intentionally small but do not expose enough low-level mechanisms for studying system-oriented code generation, platform-specific interfaces, and optimization under realistic constraints.

To address this issue building a new small compiler (and a language) is a promising approach to create a convenient testbed for learning and experiments. A new compiler provides more opportunities for experimentation, given the nature of optimizations, and a new language can reflect modern syntax common among languages such as Rust, C, C++, and Zig. The motivation for a new grammar lays in a fact, that a faithful C-like, Rust-like or Zig-like subset would either require a substantially more complex parser and semantic model, or create misleading expectations that the rest of the language should also be supported. The design instead favors a compact parser-friendly grammar, explicit syntax for functions and pointer-like operations, and compiler-supported low-level constructs.

The central research problem is the trade-off between implementation compactness and systems-level adequacy. Reducing a language and compiler makes experimentation and inspection easier, but can remove the layout controls, ABI mechanisms, analyses, and back-end structure needed for realistic low-level programs. This article studies CPL as a C-like language design that keeps the directness of C while experimenting with a smaller grammar and selected modern conveniences.