Languagev0.1

aevia

A functional language with dimensions in its type system

Apache-2.0Aevia · RustLinux · macOS · Windows
0.1
Language release
stable toolchain
3
Toolchain binaries
aevia · aevia-lsp · aevia-pkg
SI
Units
plus affine units
Static
Dimension checks
before execution

Overview

Aevia is a functional language for scientific computing whose type system knows about dimensions. An expression such as 3 m + 2 s is rejected before the program runs, because metres and seconds do not add — and the compiler can say so at the point of the mistake.

The language is small on purpose and leans on RSSN for the hard parts: symbolic transformation, numerical algorithms and physical-unit metadata all come from the library, so an expression can be inspected symbolically in the REPL and evaluated numerically in the same session.

The toolchain is a CLI, a language server and a package manager, with an installer that verifies a SHA-256 checksum and the GitHub release attestation before anything is placed on PATH. The book, the standard-library reference and the language specification are published with the platform.

Capabilities

what it does

Dimensions in the type

3 m + 2 s does not compile. Units are part of the type, so a dimensional error is a type error, not a runtime surprise.

Functional core

Expressions are values; evaluation is rewriting. The same expression can be inspected symbolically or evaluated numerically.

RSSN underneath

Symbolic transformations, numerical algorithms and physical-unit metadata come from RSSN, so the language and the library agree.

REPL and CLI

aevia check, run and test, with an interactive prompt that answers :type for any expression.

Packages

aevia.toml manifests, a lockfile, local dependencies, documentation and signed publishing through aevia-pkg.

Editor support

aevia-lsp provides diagnostics, navigation and tasks, with a published book, standard-library reference and specification.

How it works

design notes
01

The check pipeline

Source is parsed, names resolved, then types and dimensions are checked together: a unit is part of the type, so a dimensional error is reported by the same pass that reports a type error.

02

Lowering to Core IR

Checked code becomes a small core language that the interpreter runs with typed operator dispatch and tail calls — the surface syntax never reaches the evaluator.

03

Module cache

Checked interfaces are cached with bincode-next and a schema fingerprint; an incompatible cache entry is rebuilt rather than misread.

04

Package registry

aevia-pkg resolves dependencies, writes a lockfile, and publishes signed packages: a short-lived publish statement binds name, version and digest, and its nonce is single-use.

05

Documentation without execution

The documentation builder parses source as data and never runs package code, so a published page cannot execute anything on the reader's machine.

06

Sandboxed tutorials

The optional tutorial runner executes examples in a rootless container with no network and no host mounts.

Install

cargo
shell — install
# verify, then install the toolchain
curl -fsSL https://aevia.apich.org/install.sh | sh

# check a model and run it
aevia check examples/kinematics.aev
aevia run examples/kinematics.aev

The platform — registry, book, standard library and playground — lives at aevia.apich.org. The installer requires the GitHub CLI with release attestation support.