Skip to content

Latest commit

 

History

History
193 lines (183 loc) · 12.4 KB

CHANGELOG.md

File metadata and controls

193 lines (183 loc) · 12.4 KB

Changelog

This file tracks current release-facing changes. Historical review notes belong in git history, not in this log.

Unreleased

Docs, toolchain, and CLI

  • Docs site moves quick-start commands higher on the home page and trims space above mobile setup instructions. Selecting an on-page search result closes the dialog and focuses its heading; Escape closes search in one press.
  • Zig toolchain pin moves from 0.16.0 to 0.17.1 across a7/cli.py, CI and release workflows, archive names (zig0.17.1), docs, and version tests. Emitted array defaults use @splat because Zig 0.17 removed a ** b array multiplication.
  • Docs, site coverage, README, and feature pins align cut-surface and --timings wording with the surface-cut, perf-baseline, and P-MEM tracks, and record the compiler, safety, backend/CLI, and example/test remediation fixes. Broader safety alias and formal-discharge gaps remain open.
  • Language refinements (L79-L81): non-nil scalar ref T values auto-read in typed value contexts (p.?.* in Zig, while io {} formatting keeps reference semantics); cast(u8, ch), cast(char, byte_u8), and 0..=255 range-proven cast(char, int_expr) are supported while keeping char arithmetic without a cast rejected; string.len exposes read-only usize byte length with i < s.len bounds proving.
  • Docs-site lockfile updates markdown-it to 15.0.3 (fixing GHSA-gfr2-rv44-r23c) and source-map-js to 1.2.2 (fixing GHSA-68fv-2mgg-jv7q).
  • a7 check, a7 build, a7 run, a7 doctor, and a7 --version provide the CLI workflow. a7 --help lists modes, exit codes, and short aliases while preferring long flags. a7 doctor --format json reports toolchain status and supported commands, modes, backends, profiles, exit codes, and flags.
  • --timings prints per-stage wall times (tokenize, parse, semantic, safety, codegen, plus Zig on build/run) and populates stages.*.ms in JSON without changing emitted Zig.
  • Verification pipeline updates: scripts/zig_toolchain.py adds Zig 0.17.1 preflight checks and shared local/global caches; verify_examples_e2e.py and build_examples.py accept --jobs; verify_error_stages.py runs checks concurrently; scripts/verify_sources_check.py compile-checks all examples, benches, and modules without Zig; scripts/mutation_harness.py fixes stale targets and adds --validate plus control-mutant checks; run_all_tests.sh gains --no-zig, --fast, per-check timings, shared Zig caching, and failure logs; test/conftest.py consolidates duplicated fixtures; and CI runs parallel pytest (-n 4 --tb=short) after preflight checks.
  • Compiler --format json uses schema 3.0 with exit_code, diagnostics (empty on success, matching error.details on failure, with code and hint on each detail), SafetyError for proof failures, stages.parse message/span on parse failure, and layout for check --layout. Deep programs emit valid JSON, and failures keep stage-specific nonzero exits.
  • a7 check FILE --layout prints each named struct's Zig memory layout (alignment-ordered field offsets, size, 64B cache-line usage, and field-access counts), matching Zig @offsetOf in debug and release profiles (fast drops the hidden tag of an untagged union).
  • Entry files require main :: fn() or exit 6 at the Entry Point stage. a7 check --lib checks library files without main; build and run still require it.
  • Default output paths derive from the source filename stem, refuse .a7 destinations, reject empty -o "" / --output "" arguments with usage exit 2, and prevent output or --doc-out paths from overwriting input modules or each other. Preprocessor exceptions fail at the codegen stage instead of escaping unhandled. Diagnostics go to stderr with --> path:line:col, including imported modules, and escape [ and Rich console markup.
  • Build profiles: --profile release builds with Zig ReleaseSafe (keeping runtime checks), while --profile fast uses ReleaseFast. Use fast for the prior unchecked release behavior. --build-profile selects the profile when emitting Zig, and --no-nonwrap forces wrapping arithmetic everywhere.
  • A7_PYTEST_WORKERS accepts integers 1 through 8 (default 8) in local gates and rejects invalid values before running checks.

Language surface, modules, and generics

  • User variadic parameters, multi-declarations/destructuring, and multi-return spellings are cut from the runnable surface. Variadics parse then fail at semantic exit 6 with slice guidance; destructuring and multi-return fail at parse exit 5. Collections, std/string, and std/mem stay deferred under P-STD-collections-scope.
  • Selected imports (import "m" { A, B }) bind public file-module and virtual stdlib names (including IoErr). Selected module aliases and stdlib hooks used as function values reject. using import rejects at semantic exit 6 with alias guidance.
  • File modules use separate semantic scopes, underscore-based top-level privacy, importer-relative paths within the entry directory, unified symlink/hardlink/realpath identity, and local import aliases (L76 rejects parsed forwarding through another file's alias at semantic exit 6; L28 rejects local bindings reusing the same file's import aliases). Duplicate imports exit 6, and imported tokenize/parse/IO failures preserve their stage (4/5/3) and source file.
  • Package-owned Option(T) and Result(T, E) are available in every file; user redeclarations fail at semantic exit 6. io.println_ok and io.read_line return Result(usize, io.IoErr). Registered print, println, and eprintln used as values fail at semantic exit 6 instead of codegen exit 7. Reserved std/ imports resolve to packaged sources or registered hooks; public stdlib modules remain io and math.
  • Tagged-union matching uses leading-dot arms (case .none:, case .ok(v):, else:, _), rejects bare case tag: and missing variants at semantic exit 6, and rejects by-value binding of payloads containing string. Unlabeled break/continue in a match inside a loop target the enclosing loop (L58). Reversed constant match ranges (case 10..1) exit 6 with invalid_pattern, and bare undefined identifiers in case patterns exit 6 as undefined names.
  • Exact-fit constant arithmetic (a7/exact_constants.py, L61) evaluates constants exactly before fitting to the destination, enforces SPEC Appendix C growth/work/retention/depth/diagnostic budgets once per initializer/category, and applies constant float truncation remainder rules. Untyped integer literals default to i32 everywhere, and typed integers require cast to convert to float (L72).
  • Generics support inline generic functions, file-scope @type_set aliases, generic union(tag) positional specialization, $N value parameters (usize, bool, small ints, literal args, unique call-site inference, matching forwarding), minimal where conjunctions, narrower-constraint forwarding, annotation/alias constraint enforcement, concrete substitution in generic initializers and [2]$T arrays, and concrete pattern fitting after instantiation. Uncalled/global/imported generic escapes, generic struct/union arity mismatches, $T + $U arithmetic mismatches, unsigned generic negations, generic tagged-union payloads holding string, and duplicate function names exit 6 (ALREADY_DEFINED, L59).
  • ASTPreprocessor normalizes positional and reordered inline struct literals, Parser rejects unseparated where-clause declarations and accepts const array literals and zero-arg fn() struct { ... } aliases, slices of immutable array parameters reject mutable io.read_line calls, and nested-function trampoline cycles fail the recursion ban at exit 6.
  • Inferred concrete function bindings and array/string slices keep their checked runtime types across reassignment, branches, and ref parameters. Capture-free nested functions hoist and compile; capturing nested functions exit 7 naming the captured variable.
  • Uninitialized declarations and new T zero-initialize (except function-pointer locals, which exit 6 on proved-uninitialized use). Integer +, -, * wrap by default (proven-range release ops lower without wrap), runtime shifts are checked, and MIN / -1, -MIN, MIN % -1, and math.abs(MIN) have defined wrapping results.
  • Parser (L62) ends statements at newlines, }, or EOF, requires commas in lists, enforces 123abc / 1.5.3 / char-escape / unclosed-block-comment tokenizer errors (exit 4), parses nested calls in linear time, and reports exact spans on postfix, unary, assignment, and parenthesized nodes.

Safety, codegen, benchmarks, and compiler internals

  • a7/proof_discharge.py owns obligation records, BackendPlan, and named milestones (constant-fold congruence, recursion ban, match exhaustiveness; see P-PROOF).
  • Safety tracks facts by declaration identity across branches, loops, defer exits, fall arms, shadowing, and calls, rejecting nil field access, double del, and direct alias use after del (L74). Bounded repairs cover literal-index fixed-array slot aliases, dynamic-index slot invalidation, joined-allocation field-nil invalidation and selected-field del tracking, implicit_ref_args deletion rejections for non-heap values, ref tagged-union match non-nil checks, caller-side argument use-after-delete rechecks, side-effecting index/slice length refreshes, generic cast($T, float) range checks, positive-constant modulo (x % N) upper-bound proofs, single-Boolean-return and local-Boolean indexed guards, ref-to-fixed-array indexing, exact numeric reference writes, one-trip loop proofs, direct global stores, bounded callee replay, literal-selector direct-call returns, and rejection-only readonly call/entry checks. Proved recursion through function values exits 6, and control flow leaving defer exits 6. General alias, slice-container (P-REF-container-identities), and lifetime guarantees remain incomplete.
  • Zig codegen emits native switch for constant scalar/enum matches, lowers ref parameters to ?*T (L60), isolates sibling nested functions and block-scoped untyped constants, keeps slice bindings const on element writes, wraps sliced array literals as typed arrays, emits comptime _: type for unused generic parameters, omits main wrappers in --lib builds with io, uses smp_allocator in release builds and page_allocator in debug builds, buffers stdout in a 4096-byte writer flushed at exit and before stderr/panics, exits 0 on closed pipes, elides unused loop labels (ed0baff), and compares strings by content.
  • Updated examples/034_string_utils.a7, examples/037_language_tour.a7, and examples/048_worklist_traversal.a7 and expanded test/test_parser_examples.py to verify AST declarations across all 51 examples/*.a7 files alongside four new test/test_audit_*_fixes.py regression suites.
  • Compiler AST/parser/typechecker/backend/safety traversals and structural equality/repr use explicit stacks/worklists and compact allocation graphs, leaving both recursion-scanner modes in test/test_no_recursion.py empty.
  • Benchmark suite (bench/, scripts/bench_perf.py) adds aos_walk, soa_walk, stride_walk, kv_append, and seven mem_* workloads. Pinning and --gate default to 7 samples (minimum 5), reject CV above 0.10, enforce CPU affinity, and fail --gate on missing or incomplete host baselines.
  • Docs site rebuilt with light/dark themes, tour, example index, 12 language topics, search, Markdown twins, export freshness checks, ordered-list steps, and path-confined preview serving. Release packaging uses project_status.py for example counts, locked requirement audits, and clean-venv wheel/sdist smoke tests.

0.3.0

  • Installed a7 CLI entrypoint.
  • Zig is the only supported public backend.
  • Added debug and release example artifact verification.
  • Added wheel install smoke verification.
  • Added checksum and archive-content verification for release artifacts.
  • Added internal safety proof planning and operation-specific backend approvals for casts, division/modulo, bounds-sensitive indexing/slicing, ref dereferences, and direct use after del.
  • Expanded the verified example suite to 43 runnable programs.