Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 20, 2026·3 min de lecture

HVM — Massively Parallel Runtime for Functional Programs

HVM (Higher-order Virtual Machine) is a parallel runtime that executes functional programs across all available CPU and GPU cores automatically, using a novel interaction-net reduction model.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
HVM Overview
Commande CLI universelle
npx tokrepo install a1e05da1-5447-11f1-9bc6-00163e2b0d79

Introduction

HVM (Higher-order Virtual Machine) is a runtime and compiler for functional programming that automatically parallelizes programs across CPU cores and GPUs. Built by HigherOrderCO, HVM uses interaction nets — a computation model from the theory of linear logic — that enables safe parallel reduction without locks, mutexes, or manual concurrency annotations. Programs written in the Bend language compile to HVM for execution.

What HVM Does

  • Executes functional programs in parallel across all available CPU cores automatically
  • Compiles programs to C or CUDA code for native and GPU execution
  • Reduces interaction nets using a lock-free, garbage-collection-free algorithm
  • Supports higher-order functions, pattern matching, and algebraic data types
  • Serves as the backend for the Bend programming language

Architecture Overview

HVM is based on interaction combinators, a model of computation where programs are represented as graphs of interacting nodes. Reduction rules are local — each node pair can be reduced independently — which makes the model inherently parallel. The runtime dispatches interaction-net reductions across threads without synchronization. HVM compiles to C with pthreads for CPU parallelism and to CUDA for GPU execution. The absence of a garbage collector is fundamental to the design: interaction nets naturally deallocate memory as nodes are consumed during reduction.

Self-Hosting & Configuration

  • Install the HVM binary via Cargo (Rust toolchain required)
  • Write programs directly in HVM's core syntax or use the Bend language as a frontend
  • Compile to standalone C executables for deployment without the Rust toolchain
  • Control thread count with the -t flag for CPU execution
  • Use hvm compile --cuda to target GPU execution via CUDA

Key Features

  • Automatic parallelism with no manual thread management or async annotations
  • Lock-free and garbage-collection-free design for predictable performance
  • Compiles to standalone C or CUDA code for deployment
  • Optimal beta-reduction via interaction nets based on Lamping's algorithm
  • Supports the Bend language for a Python-like high-level programming experience

Comparison with Similar Tools

  • GHC (Haskell) — mature compiler with sophisticated optimizations but limited automatic parallelism; HVM parallelizes by default through its computation model
  • Erlang BEAM — process-level concurrency with message passing; HVM provides instruction-level parallelism without explicit process management
  • Futhark — functional GPU language for array computations; HVM targets general-purpose functional programs, not just numerical workloads
  • Chapel — parallel programming language; HVM achieves parallelism through its computation model rather than language-level parallel constructs

FAQ

Q: Do I need to write parallel code to get parallelism from HVM? A: No. HVM automatically parallelizes any functional program. The interaction-net model is inherently parallel without annotations.

Q: What is Bend and how does it relate to HVM? A: Bend is a high-level programming language with Python-like syntax that compiles to HVM. It is the recommended way to write programs for the HVM runtime.

Q: Does HVM support GPU execution? A: Yes. HVM can compile programs to CUDA for execution on NVIDIA GPUs.

Q: Is HVM production-ready? A: HVM is under active development and is suitable for experimentation and research. Production readiness depends on the specific workload.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires