🤖 AI Summary
This work addresses the lack of type-safe, verifiable, and parallel-friendly formal implementations of Interaction Nets in functional languages. We present the first complete encoding in OCaml of Lafont’s original type system and Interaction Net primitives. Methodologically, we leverage algebraic data types, pattern matching, and modular design to lift interaction rules and type constraints into the type system—ensuring that rewriting steps are inherently parallel and semantically correct. Our contributions are threefold: (1) the first executable, type-safe, and reasoning-ready core implementation of Interaction Nets in OCaml; (2) static type guarantees for rule well-formedness and rewriting consistency; and (3) a concise, transparent codebase amenable to formal verification and parallel execution. This implementation establishes a novel paradigm bridging the formal foundations of interaction-based computation with practical, deployable systems.
📝 Abstract
Interaction nets constitute a visual programming language grounded in graph transformation. Owing to their distinctive properties, they inherently facilitate parallelism in the rewriting step. This paper showcases a simple and concise approach to encoding interaction nets within the programming language OCaml, emphasising correctness guarantees. To achieve this objective, we encode not only the interaction net primitives, but also Lafont's original type system.