1350 files changed
+197
-941995
No files matched your search
@@ -1,13 +1,15 @@
|
||||
# pplus-core
|
||||
|
||||
pplus-core is the part of Programming+ that has to be right: the languages, the translators between them, the Mojo checker and interpreter, the prover, the fuzzer, the x86-64 machine model, and the stored answers of the real tools that everything it says rests on. It has no DOM. pplus-web (the site, the editor, the views and the Quarto extension) and the course site use it as a pinned dependency.
|
||||
pplus-core is the part of Programming+ that has to be right: the languages, the translators between them, the Mojo checker and interpreter, the prover, the fuzzer, the x86-64 machine model, and the tools that check everything it says against the ground truth in pplus-library. It has no DOM. pplus-web (the site, the editor, the views and the Quarto extension) and the course site use it as a pinned dependency.
|
||||
|
||||
- **Languages:** pseudo (parser, checker, interpreter, the English reader for lingo), matho (equations in LaTeX), speco (specifications), Mojo (a checker and an interpreter held to the real compiler), x86-64 on a model machine with caches, a pipeline and an out-of-order core.
|
||||
- **Translators:** pseudo to Mojo, lingo, matho and speco, with line maps and located refusals, and the hub that keeps the linked languages in step (`src/sync/`).
|
||||
- **Verification:** the prover (`src/engines/pseudo/logic.ts`, `solver.ts`, `vcgen.ts`), sound and held to it by tests; the fuzzer (`src/common/fuzz.ts`); and a pinned Dafny (`scripts/dafny.py`).
|
||||
- **Stored answers:** the Mojo corpus (`mojo/`): material harvested from Modular's repositories at pinned commits, our own probes and programs, and godbolt's answers for every one of them (`mojo/golden/`).
|
||||
- **A workspace:** `src/common/workspace.ts` is one piece of work and everything its sources mean. pplus-web's session extends it.
|
||||
- **A library:** pplus-library, the submodule `library/`: verified routines (statistics, numerics, alignment, molecular simulation, sequences) that a program brings in with `USE`, each checked at every level ([docs/library.md](docs/library.md)).
|
||||
- **The ground truth:** pplus-library, the submodule `library/`, holds everything the engines are held to and nothing they run:
|
||||
- verified routines (statistics, numerics, alignment, molecular simulation, sequences) that a program brings in with `USE`, each checked at every level ([docs/library.md](docs/library.md));
|
||||
- the Mojo corpus (`library/mojo/`): the pin, material harvested from Modular's repositories at pinned commits, our own probes and programs, and godbolt's answers for every one of them ([docs/mojo-corpus.md](docs/mojo-corpus.md));
|
||||
- pseudo regression programs and the prover's soundness regressions (`library/pseudo/`).
|
||||
- **A command line:** `pixi run cli check|run|prove|fuzz|translate <file>`.
|
||||
|
||||
Everything it says about Mojo is pinned to **Mojo 1.1.0** and checked against the real compiler on [Compiler Explorer](https://godbolt.org).
|
||||
@@ -17,9 +19,9 @@ Everything it says about Mojo is pinned to **Mojo 1.1.0** and checked against th
|
||||
Clone with the library submodule (`git clone --recurse-submodules`, or `git submodule update --init` in an existing clone). With [pixi](https://pixi.sh) (it brings the pinned Mojo, Node and Python):
|
||||
|
||||
```bash
|
||||
pixi run test # build, then every test
|
||||
pixi run ci # the gate: every test, and no Mojo program of ours failing
|
||||
pixi run cli prove tests/corpus/27-quantifiers.pseudo
|
||||
pixi run test # build, then every test
|
||||
pixi run ci # the gate: every test, and no Mojo program of ours failing
|
||||
pixi run cli prove library/pseudo/programs/27-quantifiers.pseudo
|
||||
pixi run dafny-fetch # once: the pinned Dafny, into .tools/
|
||||
```
|
||||
|
||||
@@ -53,23 +55,23 @@ Every command is a pixi task (`pixi task list` shows them with their description
|
||||
| `library-verify-mojo` | Ask the pinned Mojo compiler about every Mojo reference of the library (network) |
|
||||
| `library-harness <id> <lang> <level>` | Print the program a reference implementation is run as |
|
||||
| **Write content** | |
|
||||
| `new-exercise <id>` | Start an exercise whose Mojo lives in `mojo/local/<id>.mojo` ([docs/exercises.md](docs/exercises.md)) |
|
||||
| `new-probe <name> <question>` | Start `mojo/probes/<name>.mojo`: one question about the compiler ([docs/mojo-corpus.md](docs/mojo-corpus.md)) |
|
||||
| `new-stress <name> <about>` | Start `mojo/stress/<name>.mojo`: realistic Mojo that tests the interpreter |
|
||||
| `play <name>` | For `mojo/local/<name>.mojo`: run, verify on godbolt, build, list the assembly, test |
|
||||
| `new-exercise <id>` | Start an exercise whose Mojo lives in `library/mojo/local/<id>.mojo` ([docs/exercises.md](docs/exercises.md)) |
|
||||
| `new-probe <name> <question>` | Start `library/mojo/probes/<name>.mojo`: one question about the compiler ([docs/mojo-corpus.md](docs/mojo-corpus.md)) |
|
||||
| `new-stress <name> <about>` | Start `library/mojo/stress/<name>.mojo`: realistic Mojo that tests the interpreter |
|
||||
| `play <name>` | For `library/mojo/local/<name>.mojo`: run, verify on godbolt, build, list the assembly, test |
|
||||
| `play-watch <name>` | The same, again on every save (tests off) |
|
||||
| **The Mojo corpus** ([docs/mojo-corpus.md](docs/mojo-corpus.md)) | |
|
||||
| `mojo-verify` | Ask godbolt about every program with no answer yet (network) |
|
||||
| `mojo-verify-item <id>` | Ask again about one item, e.g. `'probes/life-*'` (network) |
|
||||
| `mojo-verify-dry` | Show what `mojo-verify` would send; send nothing |
|
||||
| `mojo-verify-diagnostics` | Also check the compiler's own diagnostic tests (opt-in; network) |
|
||||
| `mojo-status` | Judge every item from the stored answers, offline; writes `mojo/golden/STATUS.md` |
|
||||
| `mojo-status` | Judge every item from the stored answers, offline; writes `library/mojo/golden/STATUS.md` |
|
||||
| `mojo-status-strict` | The same, and fail if a program we wrote fails |
|
||||
| `mojo-harvest` | After editing `mojo/pin.json`: fetch Modular's sources, process, regenerate (network) |
|
||||
| `mojo-harvest` | After editing `library/mojo/pin.json`: fetch Modular's sources, process, regenerate (network) |
|
||||
| `mojo-harvest-local [dir]` | Harvest, with zips standing in for sources the pin leaves unresolved |
|
||||
| `mojo-harvest-offline [dir]` | Harvest from zips only, no network |
|
||||
| `mojo-fetch` | Re-resolve every ref in the pin and rewrite the lock (network) |
|
||||
| `mojo-emit` | Regenerate `src/mojo/generated/` and `syntax/mojo.xml` from the pin and corpus, offline |
|
||||
| `mojo-emit` | Regenerate `src/mojo/generated/` and `library/syntax/mojo.xml` from the pin and corpus, offline |
|
||||
| `mojo-test` | The corpus pipeline's own tests |
|
||||
| `mojo-run <file>` | Run one Mojo file on the pinned local compiler |
|
||||
| `mojo-probes-local` | Run every probe on the local compiler (a quick look) |
|
||||
@@ -95,10 +97,12 @@ src/
|
||||
mojo/ the Mojo checker, interpreter, lifetimes, practices, AT&T-to-Intel; generated/ from the corpus
|
||||
exercises/ one file per catalog problem
|
||||
curriculum/ a lesson corpus kept as an interpreter fixture
|
||||
syntax/mojo.xml the Mojo words as a KDE syntax for Pandoc (generated; pplus-web copies it)
|
||||
library/ pplus-library, a git submodule: verified routines that programs bring in with USE
|
||||
tests/ node --test against dist/; corpus/ (pseudo programs), prover/ (soundness regressions)
|
||||
mojo/ the Mojo corpus: the pin and lock, harvested material, our programs, godbolt's answers
|
||||
library/ pplus-library, a git submodule: the ground truth
|
||||
modules/ verified routines that programs bring in with USE
|
||||
mojo/ the Mojo corpus: the pin and lock, harvested material, our programs, godbolt's answers
|
||||
pseudo/ programs/ (pseudo regression programs), prover/ (soundness regressions)
|
||||
syntax/mojo.xml the Mojo words as a KDE syntax for Pandoc (generated; pplus-web copies it)
|
||||
tests/ node --test against dist/, over the programs in library/ and the cases in each test
|
||||
scripts/ the tasks above; scripts/mojo/ is the corpus pipeline; dafny.py the Dafny pin; cli.mjs
|
||||
docs/ the documents below
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user