gdp-wired 0.31.1 → 0.33.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 +95 -6
- package/dist/core/c/reader.d.ts +86 -0
- package/dist/core/c/reader.js +860 -0
- package/dist/core/check.js +20 -6
- package/dist/core/cli.d.ts +76 -0
- package/dist/core/cli.js +636 -0
- package/dist/core/dsl.d.ts +6 -4
- package/dist/core/dsl.js +30 -16
- package/dist/core/effect.d.ts +6 -4
- package/dist/core/effect.js +48 -10
- package/dist/core/ex/harness.exs +177 -0
- package/dist/core/ex/json.exs +46 -0
- package/dist/core/ex/reader.exs +462 -0
- package/dist/core/exists.d.ts +3 -0
- package/dist/core/exists.js +19 -5
- package/dist/core/extract-c.d.ts +35 -0
- package/dist/core/extract-c.js +424 -0
- package/dist/core/extract-check.js +27 -6
- package/dist/core/extract-ex.d.ts +16 -0
- package/dist/core/extract-ex.js +33 -0
- package/dist/core/extract-go-check.d.ts +28 -0
- package/dist/core/extract-go-check.js +639 -0
- package/dist/core/extract-go.d.ts +231 -0
- package/dist/core/extract-go.js +1166 -0
- package/dist/core/extract-jvm.d.ts +23 -0
- package/dist/core/extract-jvm.js +220 -0
- package/dist/core/extract-print.js +17 -7
- package/dist/core/extract-py.d.ts +15 -0
- package/dist/core/extract-py.js +31 -0
- package/dist/core/extract-rb.d.ts +17 -0
- package/dist/core/extract-rb.js +31 -0
- package/dist/core/extract-read.d.ts +20 -0
- package/dist/core/extract-read.js +46 -6
- package/dist/core/extract-rs.d.ts +12 -0
- package/dist/core/extract-rs.js +306 -0
- package/dist/core/extract-shapes.d.ts +2 -0
- package/dist/core/extract-shapes.js +6 -5
- package/dist/core/extract-step.d.ts +806 -0
- package/dist/core/extract-step.js +4141 -0
- package/dist/core/extract-swift.d.ts +27 -0
- package/dist/core/extract-swift.js +484 -0
- package/dist/core/extract-xstate.d.ts +10 -3
- package/dist/core/extract-xstate.js +50 -4
- package/dist/core/extract.d.ts +22 -3
- package/dist/core/extract.js +107 -18
- package/dist/core/go/go.mod +3 -0
- package/dist/core/go/reader.go +901 -0
- package/dist/core/infer.d.ts +4 -0
- package/dist/core/infer.js +1838 -69
- package/dist/core/jvm/Harness.java +361 -0
- package/dist/core/jvm/JavaReader.java +825 -0
- package/dist/core/jvm/Jvm.java +332 -0
- package/dist/core/jvm/KtReader.java +960 -0
- package/dist/core/jvm/Rt.java +10 -0
- package/dist/core/laws.d.ts +83 -0
- package/dist/core/laws.js +623 -0
- package/dist/core/machine.d.ts +2 -0
- package/dist/core/machine.js +87 -0
- package/dist/core/py/harness.py +328 -0
- package/dist/core/py/reader.py +447 -0
- package/dist/core/rb/harness.rb +233 -0
- package/dist/core/rb/reader.rb +375 -0
- package/dist/core/relational.d.ts +49 -0
- package/dist/core/relational.js +345 -0
- package/dist/core/rs/Cargo.lock +108 -0
- package/dist/core/rs/Cargo.toml +14 -0
- package/dist/core/rs/src/main.rs +681 -0
- package/dist/core/swift/Harness.swift +124 -0
- package/dist/core/swift/Main.swift +34 -0
- package/dist/core/swift/Package.swift +13 -0
- package/dist/core/swift/Sources/gdp-swiftreader/main.swift +1341 -0
- package/dist/interchange/check.d.ts +16 -0
- package/dist/interchange/check.js +111 -0
- package/dist/interchange/format.d.ts +150 -0
- package/dist/interchange/format.js +678 -0
- package/dist/kernel/epr.d.ts +40 -0
- package/dist/kernel/epr.js +1882 -0
- package/dist/kernel/kernel.d.ts +45 -1
- package/dist/kernel/kernel.js +138 -13
- package/dist/kernel/prove.d.ts +45 -0
- package/dist/kernel/prove.js +658 -51
- package/dist/lean-kernel/emit.d.ts +17 -2
- package/dist/lean-kernel/emit.js +87 -7
- package/package.json +57 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// What the check's copy of the code calls where the original reads the clock or makes a call the caller answered
|
|
2
|
+
// (core/extract-jvm.ts rewrites those sites): the request's time and the request's answer, set by core/jvm/Harness.java.
|
|
3
|
+
package gdp;
|
|
4
|
+
|
|
5
|
+
public final class Rt {
|
|
6
|
+
public static volatile long NOW;
|
|
7
|
+
public static java.util.function.BiFunction<String, Class<?>, Object> ANSWER = (k, c) -> null;
|
|
8
|
+
public static long now() { return NOW; }
|
|
9
|
+
public static Object answer(String key, Class<?> c) { return ANSWER.apply(key, c); }
|
|
10
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Extraction, Name } from './extract.js';
|
|
2
|
+
import { type TwoRunLaw } from './relational.js';
|
|
3
|
+
export type LawText = {
|
|
4
|
+
name: string;
|
|
5
|
+
expr: string;
|
|
6
|
+
where?: string;
|
|
7
|
+
line?: number;
|
|
8
|
+
method?: string;
|
|
9
|
+
};
|
|
10
|
+
export type Built = {
|
|
11
|
+
kind: 'law' | 'step';
|
|
12
|
+
law: any;
|
|
13
|
+
method?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare class LawError extends Error {
|
|
16
|
+
}
|
|
17
|
+
export declare function lawsIn(text: string, where?: string): LawText[];
|
|
18
|
+
type Seg = {
|
|
19
|
+
f: string;
|
|
20
|
+
} | {
|
|
21
|
+
i: X;
|
|
22
|
+
} | {
|
|
23
|
+
call: true;
|
|
24
|
+
args?: string;
|
|
25
|
+
};
|
|
26
|
+
type X = {
|
|
27
|
+
k: 'num';
|
|
28
|
+
v: number;
|
|
29
|
+
} | {
|
|
30
|
+
k: 'str';
|
|
31
|
+
v: string;
|
|
32
|
+
holes?: X[];
|
|
33
|
+
parts?: string[];
|
|
34
|
+
} | {
|
|
35
|
+
k: 'bool';
|
|
36
|
+
v: boolean;
|
|
37
|
+
} | {
|
|
38
|
+
k: 'null';
|
|
39
|
+
} | {
|
|
40
|
+
k: 'path';
|
|
41
|
+
head: string;
|
|
42
|
+
segs: Seg[];
|
|
43
|
+
} | {
|
|
44
|
+
k: 'un';
|
|
45
|
+
op: '-' | 'not';
|
|
46
|
+
x: X;
|
|
47
|
+
} | {
|
|
48
|
+
k: 'bin';
|
|
49
|
+
op: string;
|
|
50
|
+
a: X;
|
|
51
|
+
b: X;
|
|
52
|
+
} | {
|
|
53
|
+
k: 'old';
|
|
54
|
+
x: X;
|
|
55
|
+
} | {
|
|
56
|
+
k: 'fn';
|
|
57
|
+
f: string;
|
|
58
|
+
xs: X[];
|
|
59
|
+
} | {
|
|
60
|
+
k: 'forall';
|
|
61
|
+
v: string;
|
|
62
|
+
over: X;
|
|
63
|
+
body: X;
|
|
64
|
+
} | {
|
|
65
|
+
k: 'dur';
|
|
66
|
+
v: number;
|
|
67
|
+
text: string;
|
|
68
|
+
};
|
|
69
|
+
export declare function duration(text: string, clock?: 's' | 'ms'): number;
|
|
70
|
+
export declare function parse(s: string): X;
|
|
71
|
+
export declare function namesWithClock(x: Extraction): Name[];
|
|
72
|
+
export declare function buildLaw(x: Extraction, l: LawText, opts?: {
|
|
73
|
+
clock?: number;
|
|
74
|
+
}): Built;
|
|
75
|
+
export type Cite = {
|
|
76
|
+
law: string;
|
|
77
|
+
text: string;
|
|
78
|
+
where: string;
|
|
79
|
+
};
|
|
80
|
+
export declare function citesIn(text: string, where?: string): Cite[];
|
|
81
|
+
export declare const isTwoRuns: (expr: string) => boolean;
|
|
82
|
+
export declare function buildTwoRuns(x: Extraction, l: LawText, others?: Record<string, Extraction>): TwoRunLaw;
|
|
83
|
+
export {};
|