gdp-wired 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/dist/core/bmc.d.ts +49 -0
- package/dist/core/bmc.js +509 -0
- package/dist/core/check.d.ts +1 -1
- package/dist/core/check.js +19 -6
- package/dist/core/cycles.d.ts +38 -0
- package/dist/core/cycles.js +531 -43
- package/dist/core/data.d.ts +25 -1
- package/dist/core/data.js +984 -215
- package/dist/core/discover.js +8 -3
- package/dist/core/dsl.d.ts +17 -3
- package/dist/core/dsl.js +81 -15
- package/dist/core/extract-check.d.ts +77 -0
- package/dist/core/extract-check.js +785 -0
- package/dist/core/extract-ir.d.ts +139 -0
- package/dist/core/extract-ir.js +198 -0
- package/dist/core/extract-print.d.ts +30 -0
- package/dist/core/extract-print.js +426 -0
- package/dist/core/extract-read.d.ts +298 -0
- package/dist/core/extract-read.js +1298 -0
- package/dist/core/extract-shapes.d.ts +13 -0
- package/dist/core/extract-shapes.js +993 -0
- package/dist/core/extract-xstate.d.ts +34 -0
- package/dist/core/extract-xstate.js +320 -0
- package/dist/core/extract.d.ts +31 -0
- package/dist/core/extract.js +249 -0
- package/dist/core/infer.js +518 -5
- package/dist/core/kind.d.ts +30 -0
- package/dist/core/kind.js +81 -0
- package/dist/core/nonterm.d.ts +34 -0
- package/dist/core/nonterm.js +610 -0
- package/dist/core/q.d.ts +17 -0
- package/dist/core/q.js +52 -0
- package/dist/core/rationals.d.ts +112 -0
- package/dist/core/rationals.js +281 -0
- package/dist/core/relation.d.ts +28 -0
- package/dist/core/relation.js +483 -0
- package/dist/core/solver.d.ts +5 -2
- package/dist/core/solver.js +65 -20
- package/dist/core/transfer.d.ts +3 -3
- package/dist/core/transfer.js +69 -42
- package/dist/core/xstate.d.ts +6 -0
- package/dist/core/xstate.js +70 -12
- package/dist/kernel/cdcl.d.ts +13 -0
- package/dist/kernel/cdcl.js +307 -236
- package/dist/kernel/kernel.d.ts +106 -0
- package/dist/kernel/kernel.js +342 -0
- package/dist/kernel/prove.js +14 -3
- package/dist/kernel/qprove.d.ts +18 -0
- package/dist/kernel/qprove.js +157 -0
- package/dist/kernel/reader.d.ts +14 -0
- package/dist/kernel/reader.js +102 -14
- package/dist/kernel/simplex.d.ts +4 -0
- package/dist/kernel/simplex.js +38 -11
- package/dist/lean-kernel/emit.d.ts +46 -1
- package/dist/lean-kernel/emit.js +125 -16
- package/dist/lean-kernel/library.js +4 -1
- package/dist/lean-kernel/qlean.d.ts +26 -0
- package/dist/lean-kernel/qlean.js +105 -0
- package/package.json +16 -3
package/dist/core/data.d.ts
CHANGED
|
@@ -204,6 +204,7 @@ export declare class Data {
|
|
|
204
204
|
readonly group: string[];
|
|
205
205
|
readonly ctors: Ctor[];
|
|
206
206
|
readonly seq: number;
|
|
207
|
+
abstract: boolean;
|
|
207
208
|
constructor(name: string, decl: Record<string, Record<string, FieldSort>>, group?: string[]);
|
|
208
209
|
index(ctor: string): number;
|
|
209
210
|
get nullary(): number;
|
|
@@ -257,6 +258,7 @@ export type Termination = {
|
|
|
257
258
|
proof?: CyclicVerdict;
|
|
258
259
|
scheme?: string;
|
|
259
260
|
lemmas: string[];
|
|
261
|
+
lemmaLaws?: DataLaw[];
|
|
260
262
|
}[];
|
|
261
263
|
ms: number;
|
|
262
264
|
};
|
|
@@ -265,6 +267,13 @@ export declare const terminationMs: {
|
|
|
265
267
|
};
|
|
266
268
|
export declare const showMeasure: (f: Pick<Fn, "params">, m: Measure) => string;
|
|
267
269
|
export declare function measureX(f: Pick<Fn, 'params'>, c: Measure['comps'][number], args: X[]): X;
|
|
270
|
+
export declare function checkMeasures(fns: Fn[], ms: Measure[], budget?: number): {
|
|
271
|
+
proven: true;
|
|
272
|
+
obligations: Termination['obligations'][];
|
|
273
|
+
} | {
|
|
274
|
+
proven: false;
|
|
275
|
+
why: string;
|
|
276
|
+
};
|
|
268
277
|
export type DataLaw = {
|
|
269
278
|
name: string;
|
|
270
279
|
vars: {
|
|
@@ -293,7 +302,7 @@ export declare function evalY(y: Y, env: Env, params: Record<string, (n: number)
|
|
|
293
302
|
export declare const showValue: (d: Sort, v: Value) => string;
|
|
294
303
|
type Rand = () => number;
|
|
295
304
|
export declare const rng: (seed: number) => Rand;
|
|
296
|
-
export declare function randomValue(s: Sort, rand: Rand, size: number, natMax?: number): Value;
|
|
305
|
+
export declare function randomValue(s: Sort, rand: Rand, size: number, natMax?: number, full?: boolean): Value;
|
|
297
306
|
export declare const randomFn: (rand: Rand, natMax?: number) => ((n: number) => number);
|
|
298
307
|
export type Sample = {
|
|
299
308
|
env: Env;
|
|
@@ -382,6 +391,7 @@ export type Options = {
|
|
|
382
391
|
seed?: number;
|
|
383
392
|
patience?: number;
|
|
384
393
|
transfer?: boolean;
|
|
394
|
+
lemmasFirst?: boolean;
|
|
385
395
|
};
|
|
386
396
|
export declare function refute(l: DataLaw, n?: number, seed?: number): Record<string, string> | undefined;
|
|
387
397
|
type SchemeUse = {
|
|
@@ -408,6 +418,7 @@ type Companion = {
|
|
|
408
418
|
};
|
|
409
419
|
uses: SchemeUse[];
|
|
410
420
|
};
|
|
421
|
+
export declare const rankWidth: (p: Program) => number;
|
|
411
422
|
export declare const schemesOf: (p: Program, l: DataLaw) => Scheme[];
|
|
412
423
|
export type Proven = {
|
|
413
424
|
law: DataLaw;
|
|
@@ -437,4 +448,17 @@ export declare function searchIn(l: DataLaw, opts: Options, until: number, ctx?:
|
|
|
437
448
|
out?: Proven;
|
|
438
449
|
};
|
|
439
450
|
export declare const proveDataToday: (l: DataLaw) => DataVerdict;
|
|
451
|
+
export declare function opaque(name: string): Data;
|
|
452
|
+
export declare function unknownFn(name: string, from: Sort[], to: Sort): ((...args: unknown[]) => Nat | Bool | Val | Integer) & {
|
|
453
|
+
param: string;
|
|
454
|
+
};
|
|
455
|
+
export declare function closures(name: string, args: Record<string, Sort>, ret: Sort, cases: Record<string, {
|
|
456
|
+
fields?: Record<string, unknown>;
|
|
457
|
+
apply: (fields: Record<string, any>, args: Record<string, any>) => Nat | Bool | Val | Integer | number;
|
|
458
|
+
}>, opts?: {
|
|
459
|
+
unknown?: string;
|
|
460
|
+
}): {
|
|
461
|
+
data: Data & Record<string, any>;
|
|
462
|
+
apply: Callable;
|
|
463
|
+
};
|
|
440
464
|
export {};
|