Skip to content

Zigma Development Roadmap

This document outlines the planned development trajectory for Zigma, focusing on our goal of delivering zero-overhead physics safety, high-performance tensor math, and seamless empirical data integration.


v0.1.0 - Core Language & The Foundation

Focus on compiler infrastructure, basic syntax, dimensional analysis, and core control flow.

  • [x] CLI & Transpiler (zigma): Command-line frontend that parses .zma files, generates an ATS Tree, and outputs optimized .zig code using the dimal library.
  • [x] Build & Run System: Automatic invocation of the Zig compiler to build native machine-code executables, plus the --run flag for on-the-fly execution.
  • [x] Core Dimensional Engine: Compile-time unit safety. The compiler actively validates math logic (e.g., allowing [m] * [m] = [m2], but throwing errors on [m] + [s]) with zero runtime overhead.
  • [x] Variables & Mutability: Strict default immutability using =. Support for mutable variable updates using := while preserving tensor shapes and base dimensions.
  • [x] Basic Arithmetic: Element-wise math operations (+, -, *, /) enforcing strict dimensional rules (addition/subtraction require matching dimensions, multiplication/division derive new ones).
  • [x] System Utilities (time): Built-in time keyword returning system time in nanoseconds (i96) for benchmarking.
  • [x] Explicit Type Casting (as): Support for overriding default types (e.g., x as f32, as i128) and scoped type blocks (as i128:) for high-precision, fixed-point math.
  • [x] Scale Conversions (in): Safe, explicit scale shifting (e.g., 1 m in mm) while preventing illegal dimensional conversions.
  • [x] Print Formatting: Zig-style string interpolation and formatting (e.g., print "{g: <12.4}") with automatic unit suffixing.
  • [ ] Vectors (1D Tensors): 1D instantiation with dimensional attachment (e.g., [1, 2, 3] m) and index slicing (a[0..2]).
  • [ ] Range Initialization & Vectorization: Implicitly vectorized ranges with units and steps (e.g., t = 0..10 s step 0.1) optimized for SIMD operations.
  • [ ] Matrices (2D Tensors): Multi-dimensional instantiation and 0-based indexing/slicing (e.g., [[1, 2], [3, 4]], m[:, 1]).
  • [ ] Loops (for / while): Range-based for in loops with strict dimension inheritance, and standard while loops requiring mutable := variables.
  • [ ] Conditionals (if/else): Block and inline conditionals with strict dimensional homogeneity checks across branches.
  • [ ] Built-in Tensor Shapes: Initialize empty or uniform tensors easily using the as (shape) syntax (e.g., 0 as (3, 3) for a 3x3 matrix of zeros).
  • [ ] Comments: Support for standalone and trailing // comments.

v0.2.0 - Zigma Engine

Focus on creating an Env and Interpreter for Zigma. Having the option to either create a binary build with Zig or simply run an Engine that hold an Environment And use an Interpreter to run lines of Zigma.

  • [ ] Env: A environment that hold everything, like variables, functions, ect.
  • [ ] Interpreter: Parse Zigma code to generate a Tree then update Env accordingly.
  • [ ] Live interpreter: Be able to, from the CLI, enter an interactive mode that allow to run line by line.
  • [X] Heap-Allocated Tensors (Alloc Tensor): Moving beyond stack limits. Supporting dynamically sized tensors or massive multi-gigabyte datasets safely managed by the underlying Zig memory allocators.

v0.3.0 - Math Engine & Data Ingestion

Focus on IO and custom dimension/scale.

  • [ ] Table Interpolation (table): Native ingestion of .csv datasets. Automatically parse unit headers (e.g., P [bar]) and perform linear interpolation using the in table get X as Y = Z syntax.
  • [ ] Raw Tensor I/O: Load and Dump any tensor from files.
  • [ ] Dimensional Aliases: Create shorthands and formulas for complex dimensional combinations (e.g., alias J as kg.m2/s2 or alias degC as K - 273.15).
  • [ ] Custom Dimensions: Support for non-physical tracking (e.g., dimension usd, dimension eur) to bring compile-time safety to business logic and finances.
  • [ ] Custom Scales: Define custom prefixes (scale milli as 0.001) and unique units bound to base dimensions (scale year as 3.154e7 for s).
  • [ ] Advanced I/O Formats: Expansion of the input/output system to support binary data, standard scientific formats (like HDF5/NetCDF), or deeper integration with the type system.

v0.4.0 - Advanced Physics Safety

Focus on uncertainty and rational dimensions.

  • [ ] Uncertainty Propagation: Native support for confidence intervals and sensor error margins (e.g., 20.0 +/- 0.5 m/s). The compiler will automatically propagate these margins of error through all subsequent tensor math.
  • [ ] Rational Dimensions (Fractional Units): Support for non-integer dimensional exponents. This is crucial for advanced physics, such as Fracture Mechanics (where fracture toughness $K_{Ic}$ is measured in $MPa \cdot m^{1/2}$) and certain areas of electromagnetism.

v0.5.0 - Scale & Hardware Acceleration

GPU integration

  • [ ] GPU Tensors: Pushing operations to WebGPU/Compute pipelines. This will enforce hardware-native type limits (f32, f64, i32, i64) but allow for massively parallel tensor contractions and Einsum operations.
  • [X] WebGPU binding: Create a simple native webgpu binding to zig.
  • [X] GPU Allocator: Make VRAM allocation like RAM by creating an Allocator for VRAM.

v0.6.0 - Errors and documentation

Make every possible error in a formatted way

  • [ ] Errors: Handle any errors with a message to the user. This include errors in sub modules.
  • [ ] Documentation: Finish and finalize the documentation.
  • [ ] Examples: Make some nice examples.

v0.7.0 - Ecosystem & Validation

Validating Zigma's capabilities against industry standards and bringing the language to the browser and Python.

  • [ ] Industry Benchmarks: Comprehensive benchmarking of Zigma's zero-overhead SIMD/comptime execution against industry giants like MATLAB, Python (NumPy), Julia, and Fortran.
  • [ ] Python/Jupyter integration: Link Zigma Env to Python, to be able to run Zigma within Python directly. Use numpy to go from Zigma to Python. Maybe magic cell like %%zigma so the cell run in Zigma Env.