arXiv Science⌕ Search

arXiv · 2610.12911

Coexponential Exploration in the Clef Programming Language

Abstract

Clef was created as a concurrent programming language whose compiler tracks state ownership, waiting computations and request dependencies. We develop a coexponential account of stateful services and their client pools within this design. Delimited continuations retain the computation and resources needed to complete each interaction. These structures give our compiler premises for verifying service composition and preserving it through native lowering to multiple hardware targets. We connect finite actor state transitions to the initial, service and final rules of a coexponential server. A separate operational account relates actor dispatch to single-use continuation frames. We prove state-ownership and reply preservation for that translation, give a finite communication-summary analysis, and circular-wait exclusion from the conditions needed. A further result identifies when changing service order preserves both state and replies. Our Program Semantic Graph retains these facts through compilation. We are researching reusable proofs to confirm the ownership and communication interfaces, while our BAREWire implementation connects message meaning to its unboxed representation across respective endpoints. A distributed worker example preserves request identity across suspension, reordered replies and boundary conversion. Urschel's elimination-growth bounds supply quantitative premises for a solver service, whose accuracy and failure budget compose with the protocol contract. The design we envision connects automatic structural analysis, reusable proof terms and native realization. Protocols determine the admissible interactions, continuations expose their storage requirements, and retained dependencies support differential compilation. Developers can express ordinary stateful services while the compiler carries the conditions for their correct composition across execution targets.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Houston Haynes. 2026-10-09. Coexponential Exploration in the Clef Programming Language. https://arxiv.org/abs/2610.12911

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

A Simplified Layout Algebra for GPU Kernels

The layout algebra behind NVIDIA's CuTe library describes how tensor tiles map onto threads and memory. A layout is a shape with a stride for each entry, so a coordinate's address is the sum of its indices times their strides. As formalized by Shah and by Cecka, its central operations (e.g., composition, complement, division, product) are guarded by at least six interacting admissibility conditions. We show that this complexity is an artifact of a representational choice, not of the domain. We present a layout algebra in which every layout names the space its inputs and outputs live in: logical, physical, or thread-value indices. A layout into logical or thread-value space must be a bijection from its $N$ coordinates onto $[0,N)$. A layout into physical space must be alias-free: distinct coordinates land on distinct addresses, except under broadcast, where many threads read one value on purpose and the layout must mark where. Nothing maps out of a physical index. Composing $f$ with $g$ requires only that $f$'s range be exactly $g$'s flattened coordinate set. The index arithmetic can always be emitted naively: compute $f$, split the result by division and remainder into $g$'s coordinates, and apply $g$. Often the composite simplifies to a layout; we show that when it does, there is a coarsest such form, whose digits every other one refines, and we emit that. A warp's or thread's slice is a \emph{restriction}. A restricted layout is no longer composable, which forces the user to settle the whole view of a tile before taking slices. We validate the algebra by reproducing within it CuTe's operations, such as composition, complement, and division. We implement it in OCaml and use the implementation to rederive CuTe's atoms and usage patterns. The decision procedure is proved correct in Rocq.

cs.PL↗

Two Birds One Stone: Effective Static Detection of Resource and Communication Deadlocks in Rust Programs

Although Rust claims to enable fearless concurrency, concurrency errors remain prevalent in practical applications, with deadlocks particularly prominent and harmful. Current static deadlock detection techniques either do not cater to Rust programs without incorporating Rust semantics or solely concentrate on resource deadlocks, disregarding communication deadlocks. In this paper, we present RcChecker, the first static detection method that simultaneously targets resource and communication deadlocks for Rust. At its core, RcChecker introduces the signal-lock graph to characterize the interactions between threads through lock variables and condition variables. The construction of the signal-lock graph involves utilizing flow-sensitive and context-sensitive analyses to track variable lifetime details and abstracting actions associated with condition variables into signal resource holdings and requests. By examining cycles within the signal-lock graph, we can effectively identify resource and communication deadlocks in a unified way. Compared to the existing Rust deadlock detection tool, RcChecker effectively eliminates eight resource deadlock false positives and detects seventeen errors that the existing tool fails to identify. Furthermore, RcChecker reports seven previously undiscovered issues in real-world Rust applications, including two resource deadlocks and five communication deadlocks.

cs.PL↗

Dimensional Type Systems and Deterministic Memory Management

We present a dimensional type system whose annotations remain available through the stages that require them, allowing numeric representation and deterministic memory management to be resolved within a single Program Semantic Graph (PSG). Based on Andrew Kennedy's Units of Measure, dimensions constrain admissible operations and the application of domain laws, forming our Native Type Universe (NTU). Range analysis combines those constraints with values, guards, and declared boundaries. A covering representation then determines word width and memory footprint, which participate in allocation and transfer decisions alongside lifetime and target constraints. Our Dimensional Type System (DTS) extends Hindley-Milner inference with abelian-group unification. Within that algebraic fragment, inference is decidable and admits principal types. Measures form part of source-level type identity, while numeric width and storage layout are coeffects resolved from context. A known range that exceeds every available representation produces an error at representation commitment. During program elaboration, unresolved facts can remain pending while further context is supplied. Deterministic Memory Management (DMM) uses the same graph to relate escape paths to storage lifetimes. Closure capture, return, and by-reference use supply different lifetime requirements. Allocation follows the lifetime classification and the platform's declared storage capabilities. Our unique implementation of a posit quire illustrates the interaction: exact accumulation requires a suitable numeric format, adequate capacity, and storage that persists across the accumulation. We also examine how these constraints would apply to automatic differentiation. A shared graph would allow language services to present dimensional resolution and proof status alongside the reasons for representation and placement decisions.

cs.PL↗