A proof's time limit is the reader's to set
Build, test, deploy / site (push) Successful in 7m44s

The Prove view gives each routine 3 seconds on the clock. On a slow or
busy device that runs out before the proof does, and claims stay open
with nothing to say why.

- The view says when the time, not the proof, stopped the checker, that
  what was not finished is open and not disproved, and offers to prove
  again with the next longer time. The setting is at the foot of the
  view: 3, 10 or 30 seconds or 2 minutes for each routine, kept in the
  browser (pplus.proveclock).
- A proof rendered with Quarto takes prove-seconds on the shortcode or
  pplus-prove-seconds for the site, and the render warns when the time
  ran out.
- The home page's own example is proved with no time on the clock, and
  the tests that hold a proof's outcome give it time to spare, so
  neither depends on the machine.
- core moves to 38e6e2c, whose report says which routines the clock
  stopped.
This commit is contained in:
alexm committed 2026-11-13 07:01:35 -05:00
1 parent d1955ad358
commit 7000662539
19 files changed
+240 -6

No files matched your search

+1
View File
@@ -131,6 +131,7 @@ The **Share** button in the app produces the app link, a ready-to-paste `<iframe
- **Mojo for every exercise with pseudo**: each has its Mojo in `core/library/mojo/local/`, so the Developer and Hardware areas always have something to show for it; `core/tests/mojo.test.mjs` runs each Mojo program in the interpreter and checks it prints what the exercise expects.
- **Panes**: the area's own (see the table above), dimmed when empty (a dimmed tab opens an empty pane to write in), as tabs over one editor (CodeMirror: search and replace with Ctrl+F, go to line with Ctrl+G, bracket matching, undo and redo; Tab indents, Ctrl+/ comments). The editor is never split: in the Bridge a short note in the pane head says the other tabs update as you type (lingo and matho update the pseudo, and the pseudo the Mojo made from it), and clicking a line marks the lines it became in the next tab down; Hardware does the same between Mojo and x86-64. Drag the dividers to resize (double-click resets); the widths, the dock tab, and what is folded are remembered in the share link.
- **The side column** is the inspect panel. Its tabs are offered only when they mean something for the pane (Prove for the pseudo family) and dimmed, with the reason, when the run has nothing for them yet.
- **Prove has a time limit the reader sets.** The prover's work is counted, the same on every machine; behind that it stops at a time on the clock, 3 seconds for each routine, so a page never waits long. On a slow or busy device 3 seconds can run out before the proof does. Core's report says when (`ProofReport.clock`), and the view then says "Time ran out" on those routines, that what was not finished is open and not disproved, and offers to prove again with the next longer time. The setting itself is at the foot of the view: 3, 10 or 30 seconds or 2 minutes for each routine (`src/core/proveclock.ts`, kept in this browser as `pplus.proveclock`; `Session.setProofClock` proves again). More time never proves anything that is not true. The home page's own example is proved with no time on the clock, so it reads the same on every device; a page rendered with Quarto takes `prove-seconds` (`quarto/README.md`).
- **The Run view** (the first tab, in the Bridge and the Developer area; `src/core/runview.ts`, drawn by `src/ui/views/run.ts`) is the whole run read top to bottom, one row per step: its number, its line, what ran (indented by call depth, with what it printed), and a column for each variable you **follow**, holding its value after that step: in color where the step wrote it (with the position, `[5, 6]`, when it wrote one element), faded where it carries over, underlined where the step reads it, hatched where it is not in scope. The lifecycle of the value a variable names (Mojo: made ●, copied ⧉, moved in ⇢, moved out ⇥, destroyed ✕) is marked in the same cell; events of values no column names are noted beside the step. Above the rows, the followed variables as they stand at the stepper's position, with a ruler for a string or list and a grid for a table, the element just written and the one about to be read marked. **+ variables** opens a picker of every variable in the run, by routine; until you choose, it follows the variables of the routine that does the most work. The choice is kept per area (`layout.follow`). "Only steps that change something" hides the rest. Click a row to step there; the stepper keeps its row in view. It replaces the Variables panel, the trace table, the table of values and the Lifetimes tab, which each showed part of this.
- **The Tests tab** is a fuzzer that shows its work (`core/src/common/fuzz.ts`, drawn by `src/ui/views/tests.ts`). For each routine (the pseudo's, with the speco woven in; or each Mojo function other than `main`) it lists **what each input must do** (finish within the step limit; raise no runtime error, or for Mojo no abort and no uncaught raise; keep every REQUIRE, ENSURE, INVARIANT, DECREASES and ASSERT, with inputs that break a REQUIRE skipped rather than failed; give the same answer when run again), **how the inputs were made** (each parameter's generator, with the values it tries first, and each strategy with how many inputs it made: edge cases in combination, every DNA string up to three letters for a routine that reads one, seeded random values, and mutations of the inputs that reached a line nothing earlier had reached, as a coverage-guided fuzzer does), each **failure** with the case that found it and every step of shrinking it to a smaller input that still fails the same way (the shrinking is greedy, so the input it ends on is the smallest it found, not always the smallest there is) (**Step through this input** puts that call in the call box and shows the run), the **lines reached** by how many inputs (a line no input reached is flagged), the **answers** given and how often, and **every case** run with its strategy, input, outcome, answer or error, and steps, filterable by outcome and strategy. The seed and the number of inputs (100 to 3,000) are chosen at the top; the same seed always makes the same inputs. `core/tests/fuzz.test.mjs` runs it on every exercise.
- **Views that follow the run**: the **Flowchart** shades by the run so far and marks the box that runs next; the **Data flow** lights up the names the next line reads and the name the last line wrote.