Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 67 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,73 @@ tracked in `STATUS.md`, `README.md`, and
`docs/COMPILER_WIND_DOWN_ASSESSMENT_2026-06-15.md`; historical counts such as
`108/108` or `132/132` are not the current release gate.

## 1.2.0 - 2026-07-07 - general GPU compute

BuildLang programs now run real work on the GPU: `#[compute]` kernels compile
to valid SPIR-V, dispatch on an actual Vulkan device, and seal a re-checkable
GPU receipt. Minor release (backward compatible; programs that do not use the
GPU path or the new flags are unaffected).

- **General GPU execution path (Layers A/B/C)**: Layer A emits valid,
dispatchable compute SPIR-V for `#[compute]` kernels; Layer B/C perform a
real Vulkan dispatch on the device and seal a GPU receipt. A NUL-byte entry
name is now a typed error instead of a panic.
- **GPU Phase 1 (arbitrary elementwise f32 kernels)**: dispatch and CPU
cross-check generalized from a fixed demo to arbitrary elementwise kernels,
with writability inference, scalar push constants in the SPIR-V interface,
and a clear diagnostic refusing `f64` on the f32-only GPU path.
- **GPU Phase 2 (2D grids + matmul)**: per-kernel 2D workgroup size, a 2D
dispatch grid, matmul shape validation in the Vulkan host, an in-kernel
bounds guard for arbitrary dims, and rejection of non-workgroup-multiple
matmul dims (out-of-bounds guard). Cross-checked against an identity
closed-form sanity case.
- **GPU Phase 3 (1D stencil)**: a 3-point clamped-blur stencil kernel with a
u32-length 1D driver, clamped-edge sanity checks, and Layer A emit + device
match + boundary + negative tests.
- **GPU Phase 4a (workgroup shared memory + barrier)**: device-free machinery
for workgroup-shared scratch memory and barriers, a distinct `Workgroup`
`OpVariable` per scratch local, effect-gating tests, and a dead
Function-storage variable skipped for workgroup-slot locals.
- **SPIR-V correctness fixes**: nested structured control flow corrected via
dominator analysis (selection-in-loop nesting covered), void/unit stores
skipped, constant-operand signedness reconciled in integer binops, and
integer binops typed from the non-constant operand (const-left case).
- **Dimensional analysis (typed physical units), first slice**: a pure,
dependency-free core (`compiler/src/units.rs`, public as `buildlang::units`)
models a physical dimension as integer exponents over the seven SI base
dimensions, with the checked algebra (multiply/divide/power; add, subtract,
and compare require equal dimensions), a parser for a compact unit grammar
(`m/s`, `kg*m/s^2`, `1/s`, `J`), and a canonical formatter.
`buildc run --emit-receipt --units <UNIT>` canonicalizes the declared unit
through this core: a malformed or unknown unit is a hard error before any
compilation, and a valid unit is sealed into the scientific-runtime
receipt's `measurement.units` in its checked canonical form (so `m*s^-1`
and `m/s` seal identically and the receipt still re-verifies). Honest
scope: unit annotation and receipt-label checking only; `f64<m/s>` is not
yet a first-class type in the checker (integration specced in
`docs/DIMENSIONAL-ANALYSIS.md`). Backward compatible: `run` without
`--units` is byte-identical. Coverage: 18 core unit tests plus 2 CLI
integration tests.
- **Receipt Wave 4**: `receipt verify --self-test` proves the verifier can
FAIL; `receipt chain build` / `chain verify` seal a tamper-evident receipt
bundle (the index is bound into the chain seal; all 4 failure classes
covered); `receipt corpus` gates the example suite on declared
classifications. Non-byte-reproducible receipt seals documented as
by-design.
- **Invariant family grown to seven members**: added `non-negative`
(algorithmic accountability), a reaction invariant checker (chemistry
demo), a Born-rule normalization kernel (quantum conservation), and a
funnel-hashing probe-bound kernel (algorithmic). README and STATUS synced
to the family.
- **Typed `Array<T,N>` as function parameter and return type**: fixed-size
arrays can now be passed to and returned from functions (returns lower via
an out-param). Documented in the math-syntax guide.
- **Docs and visual identity**: spectrum banner and feature-first README
header and body, a current introduction, and a live crates.io version badge
plus a downloads badge (replacing the hardcoded version badge). Stale
stencil exclusions dropped from host and packer comments.
- Sealed receipt corpus regenerated for corrected `&mut` MIR mutability.

## 1.1.0 - 2026-07-02 - accountable scientific compute

A second, independent receipt family beyond the capability (check) receipts:
Expand Down Expand Up @@ -78,26 +145,6 @@ this cycle (granular entries follow):

## Unreleased

- Dimensional analysis (typed physical units), first slice: a new pure,
dependency-free core (`compiler/src/units.rs`, public as `buildlang::units`)
represents a physical dimension as a vector of integer exponents over the
seven SI base dimensions (metre, kilogram, second, ampere, kelvin, mole,
candela). It provides the checked algebra a type checker needs (multiply /
divide add / subtract exponents; power scales them; ADD / SUBTRACT / COMPARE
require EQUAL dimensions, and a mismatch is a `UnitError::Mismatch`), a parser
for a compact unit grammar (`m/s`, `kg*m/s^2`, `1/s`, `J`), and a canonical
formatter. `buildc run --emit-receipt --units <UNIT>` now canonicalizes the
declared unit through this core: a malformed or unknown unit is a hard error
reported before any compilation (no receipt is written), and a valid unit is
sealed into the scientific-runtime receipt's `measurement.units` as its
CHECKED canonical form (so `m*s^-1` and `m/s` seal identically and the receipt
still re-verifies). Honest scope: this is unit-ANNOTATION and receipt-label
checking; it does NOT yet make `f64<m/s>` a first-class type in the
Hindley-Milner checker (that integration is specced in
`docs/DIMENSIONAL-ANALYSIS.md`), and the C backend carries no unit metadata at
runtime. Backward compatible: `run` without `--units` is byte-identical.
Coverage: 18 core unit tests plus 2 CLI integration tests (a canonicalized
unit sealed and re-verified, and an unknown unit rejected before compile).
- Type system (linear types / no-cloning): an opt-in `#[linear]` attribute on a
struct or enum marks its values as a tracked resource that may be moved /
consumed **at most once**. The type checker now rejects use-after-consume
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ profile and print a receipt:
buildc check examples/quickstart/hello.bld --profile console-only --receipt -
```

Output (excerpt, verified against buildc 1.1.0):
Output (excerpt, verified against buildc 1.2.0):

```
Type checking... OK

No errors found in 'examples/quickstart/hello.bld'
{
"schema": "buildlang-check-receipt/v1",
"compiler_version": "1.1.0",
"compiler_version": "1.2.0",
"status": "passed",
"declared_effects": { "main": ["Console"] },
...
Expand Down
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ with additional experimental backends.

All commands and flags below are taken from the compiler's actual CLI
definition (`compiler/src/main.rs`). The worked examples were run against a
local build of `buildc` 1.1.0 on Windows; the captured output is shown
local build of `buildc` 1.2.0 on Windows; the captured output is shown
verbatim. Output captured from an actual run is marked **(verified)**; any
output that was not run is marked **(illustrative)**.

Expand Down Expand Up @@ -174,7 +174,7 @@ No errors found in 'examples/quickstart/hello.bld'
{
"schema": "buildlang-check-receipt/v1",
"compiler": "buildc",
"compiler_version": "1.1.0",
"compiler_version": "1.2.0",
"language_version": "1.0.0",
...
"status": "passed",
Expand Down
2 changes: 1 addition & 1 deletion compiler/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[package]
name = "buildlang"
version = "1.1.0"
version = "1.2.0"
edition = "2021"
rust-version = "1.70"
authors = ["Zain Dana Harper"]
Expand Down