Title: λλ: A Programming Language for Silicon Photonics
Authors: Vaibhav Mehta, Arjun Devraj, Justin Hsu, Rachee Singh (Cornell University); Bill Owens (NYSERNet)
Reviewer: Liu Yipeng (first-year master’s student, SNG)
Introduction
Silicon photonic switches use optical waveguides and programmable optical units (PUCs) to provide high-bandwidth, low-energy signal routing and transformation, but programming them still sits at the device-specific mesh level. Programmers must manually choose waveguide paths, configure large numbers of 2 × 2 units, and ensure that optical signals are not illegally duplicated, that the same wavelength does not share conflicting paths, and that ports are not driven by multiple sources at the same time. As photonic integrated circuits (PICs) grow larger, this workflow becomes hard to maintain and cannot express higher-level intent such as optical multicast or analog computation.
λλ proposes a programming language and compiler for silicon photonic switches. The language uses a linear type system to express optical signals and ports as resources that cannot be implicitly copied. The compiler lowers type-checked programs to a graph-based intermediate representation, embeds it into an arbitrary target photonic mesh, and finally generates the concrete configuration for each PUC.
Core Idea and Contributions
The core idea of this paper is to treat optical signals as linear resources that cannot be copied at will. The programmer only describes where a signal should go, from which inputs to which outputs, and what optical operations should be performed along the way; the compiler is responsible for finding the concrete paths in the mesh. A type system first checks how ports and optical signals are used, and a constraint solver then handles waveguide connectivity, same-wavelength path conflicts, and the state of each PUC. In this way, physical constraints are brought into the language and compilation flow instead of being left to manual troubleshooting during device configuration.
The contribution of the paper is a set of language abstractions that can express routing, phase, amplitude, and beam-splitting operations, together with a linear type system that rejects programs which copy light or drive ports multiple times at compile time. The compiler lowers programs into a graph IR and maps them to different photonic meshes through constraint-based embedding, generating PUC configurations. The synthesizer can also automatically generate λλ programs from higher-level specifications such as circuit switching, rotor switching, or analog computation, so users do not need to write low-level optical primitives directly.
Experimental Evaluation
The paper evaluates λλ from four angles: language expressiveness, hardware correctness, compiler scalability, and automatic synthesis.
-
On a commercial photonic switch, λλ programs cover applications such as circuit switching, time-varying rotor switching, optical multicast, and analog in-network computation, and the paper compares compiler-generated configurations with manually tuned ones to verify functional correctness.
-
Linear type checking can catch impossible resource usages at compile time; for programs that pass checking, the constraint embedder generates configurations that satisfy the mesh topology and optical resource constraints.
-
The compiler scales to more than 100,000 programmable units and can handle switch programs with 128 input-output port pairs, showing that the graph representation and constraint solving can support large photonic meshes.
-
The synthesizer automatically generates programs for multiple high-level benchmarks, with a 100-second timeout for each synthesis run. The experiments show different scaling curves for different benchmarks, but the automated approach avoids requiring users to reason directly about low-level optical primitives.
Q&A
Q1: “Scalability” can mean many different things here. For example, how does the compiler itself scale? As the program size and mesh size grow, how long does compilation take?
A1: The paper actually includes fairly extensive experiments. For programs with hundreds of PUCs, compilation takes about a few hundred milliseconds. But for the synthetic graphs we generated, which contain hundreds of thousands of PUCs, compilation takes on the order of a few hundred seconds. Overall, compilation time does grow with scale. We did run scalability experiments, and that is roughly what they show.
Q2: As circuits get larger, optical loss also increases. How does optical loss scale with size?
A2: We do not have sufficiently systematic experiments on circuits that keep growing in size, so we cannot give a precise scaling law. It also depends on the structure of the specific program. That said, our compiler tries to minimize optical loss as much as possible.
Q3: The current experiments seem to be based on only one device and one setup. If waveguide loss, materials, and other factors differ, how should that be handled?
A3: I think one strength of the compiler is that it is parameterized in many ways. If a silicon photonic circuit exposes different primitives or different functions, our compiler can take that into account. Likewise, if you have specific information about loss along the waveguides, you can feed those parameters into the compiler and have it account for them during compilation.
Personal View
λλ lifts the physical constraints of optical hardware into the static semantics of a language, which is a much more durable abstraction than “write a config script for each device.” The linear type system is especially well suited to optical resources that cannot be duplicated, and it lets the compiler give a clear guarantee of program realizability. The current limits are mainly the computational complexity of constraint embedding, the precision and noise model of analog optical operations, and how unified the interfaces of different vendors’ PUCs can become. If formal verification, calibration feedback, and runtime reconfiguration are further integrated, λλ could become a general software layer connecting network intent to programmable photonic hardware.