aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 09:43:55 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 09:43:55 +0000
commit52972fe525abde6e107d7240be91a8985abf0683 (patch)
tree571fcb7b8f424eb131421b63bc91cae9ceccf051 /README.md
parenttodo: record the reverted unchecked trial and what it showed (diff)
parity: compare what zc0 and the self-hosted compiler print
src/tools/parity.sh compiles each program of tests/programs, examples and examples/learn with zc0 (runtime, program, mkgenome, a microcore with the image embedded, kept under build/parity/) and runs it beside build/bin/zy < prog.zc, then compares stdout. what zc0 rejects is skipped and counted. tests/parity.known lists the differences that are by design (zc0 has no ownership analysis or memdebug checks). make parity runs it. tests/programs/parity_ops.zc pins operator precedence and associativity across every binary operator, unary operators, assignment and short-circuit order; its output matches a c compiler's.
Diffstat (limited to 'README.md')
-rw-r--r--README.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index 235fedb..379ed5b 100644
--- a/README.md
+++ b/README.md
@@ -31,13 +31,14 @@ run these commands from the repository root. everything built or generated goes
make
build/bin/zy < examples/hello.zc
make test JOBS=4
+make parity
make genome
make web
make js
make run PROG=examples/hello.zc
```
-the cores embed their genome with c23 `#embed`, so the c compiler has to be clang 19 or gcc 15 or later. `src/tools/findcc.sh` finds one (`CC` set on the command line or in the environment is used as given, and must support it too). `make genome` bootstraps the compiler, compares two self-compiled images, and writes `build/core/genome.bin` only after they agree; `make` reruns it whenever a source of the genome changes, and the cores that embed it are rebuilt after it. `make check` runs the smaller suite while iterating. `ONBOARD.md` is a reading and verification order for getting to know the code.
+the cores embed their genome with c23 `#embed`, so the c compiler has to be clang 19 or gcc 15 or later. `src/tools/findcc.sh` finds one (`CC` set on the command line or in the environment is used as given, and must support it too). `make genome` bootstraps the compiler, compares two self-compiled images, and writes `build/core/genome.bin` only after they agree; `make` reruns it whenever a source of the genome changes, and the cores that embed it are rebuilt after it. `make check` runs the smaller suite while iterating. `make parity` (`src/tools/parity.sh`, `--help` for options) compiles the test and example programs with zc0 and with the self-hosted compiler and compares what they print, which the fixpoint check cannot see; programs zc0 rejects are skipped and counted, intended differences are listed in `tests/parity.known`, and work files go to `build/parity/`. `ONBOARD.md` is a reading and verification order for getting to know the code.
### command-line help