kTVM: A Packed-Wire Execution Model and Compiler for K

K: the programming language defines computation as first-order partial functions (relations) over finite, rooted, edge-labeled trees paired with a self-delimiting binary wire format (k-wire). This sequel presents a self-contained description of kTVM (the K Transducer Virtual Machine), a packed-wire execution model and multi-target compiler that evaluates K relations on packed k-wire payloads without materializing pointer-linked heap trees. We formalize the closed schema algebra, wire equivalence, and prefix derivatives. The Dual-Schema Suffix Invariant specifies how single-producer, single-consumer BitDeque channels preserve their schema obligations under splice. We define the iterative pull semantics of K's combinators, including barriers for strict partiality and scoped replay for ordered choice. We then describe direct specialization of KIR-P and boundary specialization of kTVM-P templates, the two-tier network/kernel optimization pipeline with Minimum Weight-to-Time Ratio (MWTR) multi-bit lookup tables, the JavaScript interpreter and code generation for WebAssembly and C/LLVM, and the principal qualitative trade-offs observed against K's heap-allocated register machine (kVM).

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-29
DOI
https://doi.org/10.5281/zenodo.24653604
Primary Topic
Logic, programming, and type systems
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

kTVM: A Packed-Wire Execution Model and Compiler for K

Wojciech Frączak
2 links
Zenodo (CERN European Organization for Nuclear Research)
Logic, programming, and type systems
preprint

kTVM: A Packed-Wire Execution Model and Compiler for K

Wojciech Frączak
preprint en

Abstract

K: the programming language defines computation as first-order partial functions (relations) over finite, rooted, edge-labeled trees paired with a self-delimiting binary wire format (k-wire). This sequel presents a self-contained description of kTVM (the K Transducer Virtual Machine), a packed-wire execution model and multi-target compiler that evaluates K relations on packed k-wire payloads without materializing pointer-linked heap trees. We formalize the closed schema algebra, wire equivalence, and prefix derivatives. The Dual-Schema Suffix Invariant specifies how single-producer, single-consumer BitDeque channels preserve their schema obligations under splice. We define the iterative pull semantics of K's combinators, including barriers for strict partiality and scoped replay for ordered choice. We then describe direct specialization of KIR-P and boundary specialization of kTVM-P templates, the two-tier network/kernel optimization pipeline with Minimum Weight-to-Time Ratio (MWTR) multi-bit lookup tables, the JavaScript interpreter and code generation for WebAssembly and C/LLVM, and the principal qualitative trade-offs observed against K's heap-allocated register machine (kVM).

Zenodo (CERN European Organization for Nuclear Research)
Université du Québec en Outaouais (CA)
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon