A program linked with --entry and built with --exe, or with its own
exported main, no longer gets a separate ziran_exe_main.c that calls
<module>_main. zi2c writes the entry's body as int main(void), or as
int main(int argc, char **argv) when the body uses its parameters: an s32
count is main's own parameter, other types the body reads are copied from
main's, and an entry with no result returns 0. hello's C is now one
int main in hello.c with no header.
The entry keeps its own name and the wrapper when other code calls it or
takes it as a value (ProgramUsesFunction in zir_link.c), when it is
exported under another symbol, when it carries assembly or #target
clones, in library builds and with --no-main, which now does what it
says. tests/native_entry_cases.zi checks hello's C against a fixture and
builds every native entry fixture as a closed program.
Also regenerates site/guide/zx.html, which docs/ZX.md had left stale.
The legacy-removal plan keeps only the deletions still blocked on other
lanes' open files (the unreachable GPU emitter, three AArch64 helpers,
five x86 constants, a Makefile comment, generated site copies), the
planned self-hosting C replacement and the do-not-delete list. The
tool-names, native players and self-hosting plans drop their finished
deletion items. The usage and owned-values guides call the portable tier
the engine, not the VM.
ziran learn is now on by default: a native ziran build records each new
program once, silently (a failed record leaves a note that
`ziran learn status` shows), and `ziran learn off` or ZIRAN_LEARN=off
stop it.
bench/bench.zi is the one entry point for Ziran's benchmarks: `list`,
`NAME [ARGS]`, `--local NAME` for measurement-free modes, and `check`.
Every driver runs without display or desktop-session variables or
ZIRAN_PROFILE and with ZIRAN_LEARN=off, so benchmarks never record. Host
benchmarks refuse to measure anywhere but the physical ZIRAN_BENCH_HOST
(alpha by default). tests/bench_entry.sh fails while a driver in bench/ is
not registered. bench/README.md uses the entry point for every command.
`ziran learn on|off|status` records the programs this machine builds to
native code, as training data for improving Ziran's machine code. It is
off by default; while off a build reads one small settings file. With it
on, each new native `ziran build` keeps its verified .zx, ELF,
`zx2native --emit map` JSON and LIR once, named by SHA-256, under
$XDG_DATA_HOME/ziran/learn. A rebuild writes nothing, a compiler that
emits different code adds a second ELF beside the first, and the corpus
stops growing at its cap (--limit-mb, 1024 MB by default).
ZIRAN_LEARN=on|off overrides the switch and ZIRAN_LEARN_DIR moves it.
plans/2026-11-15-learning-compiler.md records the next steps: wider
recording, instruction-window search, a cost model and Alpha's GPU.
The small runtime headers (zir_bounds.h, zir_slice.h, zir_string.h,
zir_vec.h) are split into helper segments by /*@Name*/ marks, the
convention ziran_simd_ops.h already uses; a helper's mark also lists the
helpers that call it. EmitRuntimeHeaders takes the names a closed
program's generated files spell and writes only the segments they name.
Other programs keep every helper, and the marks never reach generated
output.
Kryon's window headers go from 8524 to 6628 bytes: zir_bounds.h drops
EmptyArrayIndex and zir_slice.h drops the range helpers.
A program linked with --entry that builds with --exe or has its own C
main is closed: only its generated files include its module headers.
zi2c now marks each header declaration as a chunk and keeps it only when
another generated file, or another kept header chunk, names it. The
module's own .c takes the declarations only it reads, inline copies stay
only for procedures another module calls, includes follow what the kept
text names, and a header that would declare nothing is not written.
Library builds keep each header's whole interface for their C hosts, and
separately lowered modules are unchanged byte for byte.
Kryon examples, headers before -> after: window 13/18171 -> 11/8524,
hello 71/288004 -> 67/90997, box 74/319181 -> 70/102271, image
107/691846 -> 103/419574 bytes; executables are unchanged.
`#insert NAME;` at file scope splices the text of a compile-time string
constant into the module where it stands: a literal, a #string body or
the result of `#run` on a pure procedure. The text is checked like the
rest of the file and shares its scope and #scope_file privacy, so a
compile-time procedure can write declarations generics cannot express.
Inserts are evaluated after discovery, under the #run rules and budget,
and their declarations are discovered before the file is parsed. Code
anywhere in the module can use them, including #if conditions and #run
calls above the #insert. The parser reads each insert as an in-memory
load frame. Every line of it keeps the #insert's line, so diagnostics
name the insertion site, and line numbers after the splice stay true.
A value that is not a compile-time string, #insert inside a procedure
body or an #if block, an insert in inserted text, and a misspelled
directive are rejected. The grammar lives in compiler_declaration.zi.
Saved IR holds only checked declarations, so no backend changes.
tests/insert_source_cases.zi builds a program whose Square, Cube and
helpers come from #insert. It runs from source and saved IR on C, Go,
the engine, native code and Wasm, with nine rejections.
A module declares parameters as its first declaration,
`#module_parameters(STB := false, CACHE: s32 = 8)`, and an import picks
their values, `#import "fonts"(STB = true)`. Each parameter is an
ordinary constant of the module, so `#if` keeps unchosen code out of C,
Go, ZX, Wasm and native code alike.
One program binds a module's parameters once. Every import has to give
every parameter the same value, so disagreeing imports fail with
module.parameter_conflict instead of compiling a second copy. Unknown
names and values that do not fit their type (integers by range) fail
with module.parameter_unknown and module.parameter_type at the import.
The grammar and literal rules live in compiler_declaration.zi. The
bindings are checked IR, ZirModule.parameters and ZirImport.parameters,
so they port with the checker to Ziran.
Saved .zir becomes version 65. It keeps each import's canonical list and
each module's types, defaults and bound values. A saved import that
disagrees with its module is rejected like source, and so is a bound
value that differs from the module's constant. The unused reserved
import slot is gone.
Also: a constant whose string holds `#import`, such as module source in
#string, is no longer parsed as an import. The C include path now lists
the IR headers first, so a stale copy that another generated module
keeps can't shadow them in an incremental build.
tests/module_parameters_cases.zi runs two programs that share one module
with different choices. They run from source and saved IR on C, Go, the
engine, native code and Wasm, along with the named rejections and edited
saved IR. Grammar cases are in tests/spec/compiler_declaration_test.zi.
The native loader compiled every bundle once per process. It now keeps the
compiled image in $XDG_CACHE_HOME/ziran/native (or ~/.cache/ziran/native),
so a later run in another process maps it instead of compiling again.
cmd/compiler_native_cache.zi frames an image with its key (format, image
version, runtime ABI, target, CPU features, the GNU build ID of the object
holding the compiler, and the bundle's content digest), the payload
length and a SHA-256 of the payload. Decoding refuses any entry whose key,
length or digest differs, then runs MachineImageValidate. The loader writes
a private temporary file, syncs it and renames it over the entry. It removes
a damaged entry and compiles again, keeps at most 64 entries and 512 MiB,
and clears temporary files writers abandoned. Code read from disk has no
machine program, so a trap compiles once to name its site.
ZIRAN_NATIVE_CACHE=DIR moves the cache and ZIRAN_NATIVE_CACHE=off turns it
off.
native_disk_cache_cases.zi, run from the check plan, covers the cold store,
the warm hit, an abandoned writer, flipped and truncated entries refused and
replaced, the off switch, trap sites from cached code and four racing cold
runs, all matching the engine's output.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
One commit, because the parts below only build together.
Allocator: an interval needed at the current instruction is never
evicted, and the allocated-program verifier checks that every operand sits
where the allocation says.
AArch64 encoder: compiler_aarch64.zi encodes allocated machine IR with the
shared ARM byte helpers, maps the function-address relocation,
sign-extends signed 8- and 16-bit loads and rejects what it cannot encode
with a named diagnostic. It has no AOT ELF writer yet.
Native default with checked pointers and no fallback: on linux-x86_64,
`ziran run app.zx`, `zi2zx run`, the embedding API's Auto and the Kryon
players run a bundle's verified program as native code in W^X memory.
Stray and freed pointers, double free, bounds and read-only stores trap. A
native gap is a named preflight error, nothing falls back to the engine,
and `--backend engine` picks it explicitly. zx2native uses the same
preflight. Native code exchanges module state for hot reload, checks the
stack, zeroes fresh locals, spends fuel at the engine's checkpoints and
returns records, arrays and strings from host calls. `zi2zx --debug` source
origins name lines in native traps and `zx2native --emit map`. The host
value API drops its VM prefix (HostValue, HOST_*). A call with a record
result loads the hidden result address into rax only after its stack
arguments are stored, and an indirect target stays in r10: rax could hold
a stack argument (Kryon's text-field clip guard arrived as an address) or
the target (indirect calls returning records crashed).
Self-hosting ports: compiler_backend_process, compiler_backend_cache,
compiler_native_names and compiler_runtime_emit replace the zir_c_build,
zir_c_cache and zir_c_process C, with checked bootstrap C and Makefile
rules. zir_c.toolchain again reports "compiling OUT failed:" with the head
of the compiler output and a truncation marker. The parallel scheduler no
longer stalls on a held compiler after reaping a finished job, and poll or
read errors now fail the build. A fresh BUILD_DIR (Kryon's runtime build)
builds: generated files have pattern rules, objects wait for the headers
they include, and engine flags are per object instead of leaking into zi2c.
Legacy removals F1-F10 and N1-N4: the duplicate LirX64 encoder and its
spec test, zir_c_*, zir_runtime and zir_native, nine zero-reference spec
tests, vec_capacity, the zx_metadata and native_cache_names benchmarks,
build-android-host.sh and two shell wrappers are deleted; zx2native is
machine-only; `zi2zx` rejects `--opt` on ZX input; the bootstrap is
regenerated. ASSEMBLY docs, the legacy-removal plan, the milestones and the
remaining-work plan record the current position.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tools are renamed after their input and output: zi2zx lowers source
or ZIR to executable ZX, zx2native turns ZX into a native ELF, zx2wasm
into a wasm32 module, and zi2c, zi2go and zi2zir keep their roles under
cmd/ folders of the same names. zi2asm and the cmd/zir-* folders are
gone, and tests/tool_names.sh keeps the old names out. zx2native keeps
the direct encoder as its default; the machine pipeline replaces it once
it reaches parity.
The embedding API can run a verified bundle as x86-64 machine code in
memory. Code is written to RW pages, relocated, then switched to RX,
never RWX, and each instance gets its own data
(cmd/zir/zir_native_memory.c, zir_host_native.c). Backend selection is
BundleBackendPolicy: Engine and Native are strict, and Auto chooses by
platform only, never by whether one program fits. A native gap is a
named error, never a switch to the engine. Desktop x86-64 Auto stays on
the engine until the native backend is complete.
cmd/compiler_machine_image.zi adds the target-neutral machine image
contract. The machine verifiers reject unknown relocation kinds,
out-of-range symbols and addends, non-host external calls, native-width
mismatches and missing stack or fuel facts. The machine pipeline lowers
and encodes more of LIR. Docs, site pages, Kryon's build references and
the benchmarks use the new names.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The bundle WebAssembly tier runs inside Emscripten runtimes built with
Asyncify, such as Kryon's web player: a host that suspends inside a
call (image decode, storage flush) suspends the tier's frames and
resumes at that call; JSPI runtimes keep the engine. The suspending-host
test agrees with the engine, including suspension inside a module
initializer and in a loop.
- Revision-28 lowering compares an untyped float literal with a float32
operand as float32, as C does (`x: float32 = 0.55; x != 0.55` was true).
- A prebuilt build tree compiles only zir_load.c again (Toolchains CI).
- Site target matrix collected on desktop, web and the moto e6 (mobile);
Kryon widget library data regenerated.
- Docs describe the instruction engine and one ZX format instead of the
removed portable VM, TinyCC and zi2wasm routes.
- Plans: native ZX players and phones, self-hosting, tool names by
format; engine before/after samples from Omega.
Engine (cmd/compiler_exec.zi, compiler_opt.zi, compiler_lowered_verify.zi):
- Storage that host calls return is given back once nothing the program
can reach names it; 100,100 calls returning 64-byte strings peak at
65,752 live bytes instead of growing by 6.4 MB.
- An address only loaded from or stored to later in its own block takes a
scratch table entry instead of a permanent one, so programs that read
millions of bytes of a global or of host text no longer hit the address
limit. The optimizer drops block parameters every edge passes one value
(float-text: 32,168 -> 1,031), and frame and plan records are read in
place. float-text runs 63.9 -> 45.0 s locally.
Host interface and embedding:
- Types that hold themselves through a slice and procedure values are
written in the interface section; when it cannot be written the build
fails with a diagnostic naming the type instead of writing a bundle
without it. Every entry-module global is lowered and named, so state
export includes globals the entry never reads.
Wasm tier (cmd/zir-wasm/zx_wasm_lower.c, zir_zx_wasm_web.c):
- Recursive host types work; the tier stays out of Emscripten runtimes
built with Asyncify or JSPI, where hosts suspend (Kryon's image and
storage hosts trapped with "unreachable"), and the engine runs those.
Kernels use real loops without dispatch tables. Benchmarks on Alpha in
bench/wasm_tier.*, raw samples under bench/results/.
Also: generated C indexes []*T slices with pointer elements; the site
target matrix is regenerated for desktop and web (mobile waits for the
phone's USB authorization); ASSEMBLY docs describe one ZX format; the
package artifact test restores CC instead of unsetting it, since the
artifact key names the compiler.
zi2zx bundle and ziran run always write and run revision-28 executable
ZX. The semantic bundle reader and writer, the portable VM, the
TinyCC-compiled and linked native bundles with the vendored TinyCC,
bundle libraries, the VM profile, --vm, BundleInstantiatePortable,
libziran-vm.a and the ZIR-based Wasm lowering with zi2wasm are removed;
the Wasm tier, the embedding API and every tool run revision 28. Tests
of the removed VM internals and libraries are removed, and the rest run
on revision 28. Engine problems read as the diagnostics users rely on.
libziran links the portable instruction engine, one archive member per
generated module, and BundleOpen reads, verifies and plans a revision-28
file. Bundles run and instantiate as before, with each host call
translated between the engine's host image and VmHostValue trees by the
host interface section and the semantic VM's rules. The unchanged
record host test passes against a revision-28 file. ZIRAN_BUNDLE_EXEC=1
makes zi2zx bundle and ziran run write revision 28, to measure the
switch-over.
An optional section records the type spellings and record field names
of every host capability's parameters and result, which an embedder's
host values carry and the structural payload does not. Any pointer
crosses a host boundary as an opaque handle, and platform services are
recognised only in the ziran.platform module.
A module-level variable whose initializer calls a procedure is the module's
initializer. The usage guide now says so, with the registration pattern it
enables: a library calls an optional part through a procedure variable, and
the module a caller imports to use that part registers it, so programs that
do not import it carry neither the module nor what only it reaches.
tests/module_registration.sh locks this on C from source and saved IR, on
the native and portable engines, and on Go: the import alone runs the
initializer, and without it the feature's files are not generated.
Wasm becomes the third lowering of one portable image, beside the
interpreter and native ELF. zi2asm --emit wasm reads the verified
revision-28 payload and writes one wasm32 module, so source input and
saved-ZX input give identical bytes; examples/hello.zi is 287 bytes.
The module keeps the existing budget and output ABI (zx.overrun,
zx.budget, zx.host_i64, zx_entry), so the node and web runners load it
unchanged. A form without wasm code stops at a named wasm.gap
diagnostic; the 37 codes are registered for ziran explain.
tests/zx_lowered_parity.sh emits each program twice, compares the
bytes, runs the module in node and compares its output with the
interpreter: 36 of 37 programs run as wasm.
zi2wasm and the bundle Wasm tier keep the ZIR-based lowerer until LIR
lowering covers the programs they run; the plan records why a one-step
replacement failed.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
ziran inspect printed every expression's text, so a statement's source
appeared once per node. Statements now carry their source once as a
trailing comment; literals show their value and calls their callee and
arguments, and expression text is printed only when no statement holds it.
ZIR is always written after type checking, so docs, the website and the
zi2asm pipeline help call it ZIR instead of checked ZIR or checked IR.
The site's inspection listings are regenerated in the new form.
Every ZIR expression saved its own copy of its source text, so a call and
its literal arguments repeated the statement's text. An expression whose
text appears in a statement of its function now saves that statement's
distance from the last one referenced, the text's length and a change in
the span-to-offset bias; the writer keeps whichever form is shorter and
the reader rebuilds identical text. Statement text stays: the checker
parses loop headers, targets and case markers from it when it loads ZIR.
examples/hello.zi saves its literal once (223 to 184 bytes) and
compiler_lowered_x64.zir shrinks from 583,008 to 526,092 bytes. The
published site artifacts are re-encoded with identical inspect listings.
Source builds now check and lower to LIR, verify and optimize it, encode
portable ZX, and read that same verified image for the interpreter or for
native ELF generation. Standalone .lirb, --emit exec and --input exec are
removed. Linux x86-64 hello lowers to a static ELF with target-owned
write_all/exit_group veneers and no libc, CRT or dynamic linker.
Add machine IR register allocation, allocated-code verification, the
x86-64 encoder and ELF writer, LIR optimizer folds and type/origin
pruning, and the matching ASSEMBLY, docs and site updates.
Native tests now remove their temporary build/tests folders after failing
runs too, and the private Chromium profile under build/t is removed on close.
`#foreign host_api` declarations with bool, integer and float
signatures now lower from source and saved IR to bodiless Host
functions called by host.call. The verifier keeps host signatures
bodiless and scalar, forbids direct calls, procedure values and entry
use of them, and lets host.call reach nothing else.
Revision-28 containers store the reachable capability count recomputed
from verified instructions. The reader rejects a manifest whose count
differs. The portable engine gains LirExecBindHost: a run with an
unbound capability stops before the entry executes, and host results
must use canonical bits for their declared type. Native output and
machine IR reject host calls explicitly until the native host ABI
exists.
This removes one of the two constructs that block bench/zx_compare.zi
on the new path. String values remain.
Portable standard facades for byte text, environment, timers, randomness,
mapped files, streams, worker pools, directory trees and threads; full ASCII
lowercase in std/unicode; examples move to examples/ with generated site
pages; Go output handles mixed-width slice bounds.
The experimental direct backend now writes and reads an opt-in
revision-28 ZX container that holds verified lowered instructions.
Stripped files run through the portable engine without source or
semantic IR. Bounded validation covers framing, identities, symbols
and reachability, and versions 26/27 are rejected with a rebuild
diagnostic. Default ziran/zi2zx output is unchanged.
Address-taken local scalars lower to fresh checked frame storage in
the portable engine and native x86-64, including aliases across calls
and recursion and stale-token traps. A verified target-neutral machine
IR keeps Allocate as an explicit effectful operation ahead of register
allocation.
ASSEMBLY/milestones.md reviews the ten-step plan and reorders delivery
around a Linux x86-64 vertical slice. It starts with an Alpha
physical-host baseline and adds staged interim comparisons. Plan
statuses now match the implementation.
Prepare short portable helpers and scalar record reads, improve JSON SIMD scanning, expose one-line execution, and publish qualified Alpha benchmark artifacts. Add the experimental verified lowered execution, serialization and Linux x86-64 backend with source maps.
Physically remove 263 redundant test entry points and unused helpers, migrate retained helpers to Ziran, and execute the full retained suite without sharding. Allow ignored backup state for the managed physical Alpha workflow.
Local validation: all 268 retained tests passed across the full run and corrected targeted reruns; bootstrap matches. Current assembly verifier, x86-64, executor and serializer tests passed. Website examples and all 4661 local links passed. Six Alpha JSON/text workloads retain verified artifacts, raw samples and explicit unsupported Wasm diagnostics. The mobile sub-500 ns target remains pending.
Compare five real examples across four targets on three measured platforms, preserving raw samples, independent output verification and artifact provenance.
Complete the WebAssembly support needed by the examples, inspect ZX bundles, prune generated C dependencies while preserving C++ linkage, and validate native script execution. Optimize only the temporary bootstrap seed and retain fresh-build measurements and historical benchmark records under bench/results.
Local tests: all 522 cases passed across the full run and corrected header-test rerun; all 16 bootstrap modules match. Playground runtime, bundle runtime, private browser layouts and matrix controls, published artifacts and local site links passed.
compiler_proof.zi replaces zir_proof.c: it parses #proof declarations,
gives each theorem its claim graph, retypes unchecked graphs and unfolds
pure scalar procedures into terms for the proof kernel. Results and
diagnostics are unchanged; C services come through compiler_services.
781 lines of C become 714 of Ziran.
compiler_bundle.zi now compares a bundle's capability, law and waiver
tables with the program it links (Differs) and names each mismatch. The
C reader decodes those tables in place, keeps their strings
NUL-terminated in one block and frees on one path; the writer builds the
same table views the check compares, so the old law records, their copy
loops and the C comparisons are gone.
Capabilities have one source, BundleLinkedCapabilities, shared by the
writer, the reader and the host. The native and wasm engines take that
table instead of two parallel name arrays. ZxAssetsAdd keeps collected
and library assets in name order for both zi2zx paths.
Bundles stay byte-identical to the C writer: 163 bundles from the bundle,
law, proof, portable and zx tests and a Kryon app bundle match.
A local declared without a value starts at zero. The range facts now
prove when every element is stored before anything reads it: constant
positions, loops with constant bounds, field by field or whole, and
Simd.Store runs. Generated C then declares the local without the fill.
A store that may be missing or late, an earlier read, view or using
field, an unknown or wrapping index, and records whose fields differ
in size keep the fill. tests/definite_initialization.sh covers each
case on C, Go, native and the VM.
Headers no longer define record and array constants as macros in
Ziran spelling. Checked uses carry the value, so C, like Go, skips
them; tests/constant_tables.sh checks no header spells one.
AV1 decoder against the previous build, CPU 12, best of 7, bit-exact:
q20 1.001, q40 0.966, 10-bit 1.001, 444 0.996, screen 0.982, 352 0.995.
make check passes except two bundle tests that fail to link on the
bundle work in progress (BundleCapabilities defined twice);
check-bootstrap matches.
cmd/compiler_ir.zi holds the records zir.h declared by hand: modules,
functions, statements, expressions, types, laws and proofs, their kinds
and the buffer sizes, spelled for C with #c. zir.h includes the generated
compiler_ir.h, built like the other compiler modules from a checked seed
in bootstrap/compiler_ir. Every field keeps its size and offset, and saved
IR, C and Go output are unchanged. C compiled outside the Makefile adds
-Ibootstrap/compiler_ir.
The implementation status lists compiler_bundle.zi and the new
zir_bundle.c and zir_bundle_assets.c sizes. CHANGELOG.md also carries the
pending entry for generated C skipping provably stored zero fills.
Bundles used to drop procedures' #asm variants. They now keep them,
but only a bundle built in memory from local source runs them:
`zi2zx run FILE.zi` and `ziran run FILE.zi` mark that bundle trusted
and TinyCC compiles its variants. A bundle file, however it was built
or obtained, the portable VM, linked native C and any run that links
libraries from other bundles define ZIRAN_NO_ASM ahead of the program,
so each procedure takes its portable body. A crafted .zx therefore
cannot have TinyCC assemble instructions of its own. Trusted code is
cached under an identity of its own.
`zi2zx run FILE.zi` builds the bundle with the bundle options, the
source's folder as the default root and its main as the default
entry. tests/zx_native_asm.sh checks a variant that wraps where its
body saturates: the .zx file, a copied "downloaded" .zx and --vm all
run the portable body, and local source runs the variant on x86_64.
Under ziran run (TinyCC, Ryzen 9 9950X) the AV1 8x8 inverse DCT takes
28 ns a block with its #asm variant, 1831 ns with its portable body
and 1857 ns with std/simd. AArch64 variants are built only, with the
NDK; no AArch64 machine ran them here.
A record field takes #c "TYPE" to set its C header type (or an array's
element type), an enum takes a trailing #c "PREFIX" for its C constants,
and a using field of a union or struct spelled #c "union"/"struct" lays
its fields out as an anonymous C member. Saved IR keeps the spellings
(version 63); Go and the .zx VM ignore them.
cmd/compiler_proof_kernel.zi replaces cmd/zir/zir_proof_kernel.c and .h.
Proof results, law diagnostics and the step budget are unchanged: the
kernel test pins a trace hash recorded from the old C kernel.
A local such as at := row * stride + column took its range from where it
was declared, before the guard that bounds row, stride and column, so
at + 1 seemed able to wrap and a guard such as
cast(s64)at + 4 * cast(s64)stride >= levels.count proved none of
levels[at + 1], levels[at + stride] or levels[at + 2 * stride].
A local never written after its declaration holds the value its
initializer had, and while nothing writes what the initializer reads,
those still hold the same values at a later read. The prover now also
evaluates the initializer, and decides whether its operations wrapped,
with what those reads hold at the later statement. Such answers hold only
on paths reaching that statement, so none is memoized.
tests/guarded_index_ranges.sh proves the coefficient-context shape and
keeps checks, which still abort on C, Go, native and the VM, when the
guard leaves row unbounded so at wraps negative, when row is written
between the declaration and the guard, and one past the guarded offset.
The previous compiler keeps every check in the proven case.
AV1 decoder: its generated C is unchanged, as its coefficient contexts
now read masked fixed tables; compile time 20.7 s before, 19.8 s after.
tests/spec/asm_dct8.zi runs the 8-bit DCT_DCT 8x8 inverse transform at
16-bit lanes as one typed routine: SSSE3, AArch64 and ARMv7 NEON
variants and a portable body that all return 0, writing nothing, when an
input or rotation result reaches the 16-bit bounds. tests/asm_dct8.sh
compares them with AV1's s64 reference on random and edge-case blocks,
in normal, ZIRAN_ASM_CHECK, ZIRAN_SIMD_TIER=1 and portable builds, and
assembles the NEON variants with NDK clang. The templates come from
tests/asm_dct8_templates.py, which the test also checks.
On a Ryzen 9 9950X at -O3 a block takes 23.5 ns, against 124 ns for the
AV1 decoder's std/simd transform and 257 ns for the portable body.