Inputs cut short by the clock count only where a claim is open
Test / gate (push) Canceled after 0s

A proof report named a routine as stopped by the clock whenever the
generated inputs that cross-check it were cut short, even when every
claim of it was proved and nothing was left undecided. On a loaded
machine that is the common case: a container running the site's tests
on two processors reported it for the simplest proved example. The
prover running out of time still counts always; the inputs' clock
counts when a claim of the routine is still open.
This commit is contained in:
alexm committed 2026-11-13 07:32:45 -05:00
1 parent 38e6e2cdd2
commit 941af6bc78
5 files changed
+30 -9

No files matched your search

+12
View File
@@ -109,6 +109,18 @@ test('the time on the clock is the caller\'s: run out, it leaves a subroutine pa
const stopped = cut.units.find((u) => u.name === 'MAX_SUBARRAY');
assert.equal(stopped.timedOut, true);
assert.equal(stopped.notes.filter((n) => /ran out of time.*open, not disproved/.test(n)).length, 1);
// the inputs' clock alone: cut short on a routine whose every claim is proved, nothing was left undecided, and
// the report does not call that running out of time (on a loaded machine it happens to correct, proved programs)
const inputsCut = provePseudo(studyOf(src), { budgetMs: Infinity, inputsBudgetMs: -1 });
assert.deepEqual(inputsCut.counts, { proved: 6, broken: 0, open: 0, total: 6 });
assert.deepEqual(inputsCut.clock.stopped, []);
// where a claim is open and the inputs that might break it were not tried, it does
// (a fourth power is never negative, which is true and past what this prover shows)
const open = 'FUNCTION F(X : INTEGER) RETURNS INTEGER\n ENSURE RESULT >= 0\n RETURN X * X * X * X\nENDFUNCTION\n';
const undecided = provePseudo(studyOf(open), { budgetMs: Infinity, inputsBudgetMs: -1 });
assert.deepEqual(undecided.counts, { proved: 0, broken: 0, open: 1, total: 1 });
assert.deepEqual(undecided.clock.stopped, ['F']);
assert.deepEqual(provePseudo(studyOf(open), NO_CLOCK).clock.stopped, []);
// left out, the clock is the Prove tab's (whether it is reached is the machine's, and not asserted)
assert.equal(provePseudo(studyOf(src)).clock.budgetMs, 3000);
// a Workspace hands its own on, and proves again when it changes