1350 files changed
+197
-941995
No files matched your search
@@ -1,6 +1,6 @@
|
||||
// The prover's "proved" must be a proof. Two gates hold it to that:
|
||||
//
|
||||
// 1. The regression programs in tests/prover/ each name, in a `// MUST-NOT-PROVE: <kind>@<line>`
|
||||
// 1. The regression programs in library/pseudo/prover/ each name, in a `// MUST-NOT-PROVE: <kind>@<line>`
|
||||
// header, an obligation that a run of the program breaks. Each one was proved by an unsound
|
||||
// rule once; the rule is fixed, and the obligation may never be proved again. A program whose
|
||||
// fix was to the language instead (a run that now stops where it used to go on outside what a
|
||||
@@ -10,7 +10,7 @@
|
||||
// line and column) or by running the program as written (matched by kind and line).
|
||||
//
|
||||
// A failure here is a soundness bug in src/engines/pseudo/vcgen.js or solver.js: fix the rule,
|
||||
// never the test. Add the program that found it to tests/prover/.
|
||||
// never the test. Add the program that found it to library/pseudo/prover/.
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
@@ -21,8 +21,8 @@ import { checkProperties } from '../dist/engines/pseudo/testing.js';
|
||||
import { PROBLEMS } from '../dist/common/problems.js';
|
||||
import { LESSONS, solutionOf } from '../dist/curriculum/index.js';
|
||||
|
||||
const PROVER_DIR = 'tests/prover';
|
||||
const CORPUS_DIR = 'tests/corpus';
|
||||
const PROVER_DIR = 'library/pseudo/prover';
|
||||
const CORPUS_DIR = 'library/pseudo/programs';
|
||||
|
||||
/** The verifier's obligation kinds against the runtime error kinds a run or the fuzzer reports. */
|
||||
const RUNTIME_KIND = {
|
||||
@@ -127,7 +127,7 @@ test('nothing the prover proves is broken by a run or by generated inputs', () =
|
||||
test('canary: after a program that runs to its end, ASSERT 1 == 2 is never proved', () => {
|
||||
// A false claim proved at a point every run reaches means the checker holds a contradiction
|
||||
// there: some rule assumed a fact a run can break. This finds such a rule even when no
|
||||
// program happens to assert something false after it (tests/prover/foreach-empty.pseudo).
|
||||
// program happens to assert something false after it (library/pseudo/prover/foreach-empty.pseudo).
|
||||
const problems = [];
|
||||
let canaries = 0;
|
||||
for (const p of programs()) {
|
||||
|
||||
Reference in new issue
Block a user