gdp-wired 0.45.0 → 0.47.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 +61 -8
- package/dist/core/bitsets.d.ts +2 -0
- package/dist/core/bitsets.js +23 -0
- package/dist/core/bmc.js +6 -2
- package/dist/core/c/reader.d.ts +9 -1
- package/dist/core/c/reader.js +423 -31
- package/dist/core/calendar.d.ts +29 -0
- package/dist/core/calendar.js +82 -0
- package/dist/core/cli.d.ts +4 -0
- package/dist/core/cli.js +206 -40
- package/dist/core/compose.js +3 -1
- package/dist/core/counts.d.ts +4 -1
- package/dist/core/counts.js +314 -85
- package/dist/core/cycles.js +8 -1
- package/dist/core/cyclic.d.ts +1 -0
- package/dist/core/cyclic.js +13 -7
- package/dist/core/data-synth.d.ts +3 -0
- package/dist/core/data-synth.js +252 -0
- package/dist/core/data.d.ts +2 -1
- package/dist/core/data.js +223 -24
- package/dist/core/discover.js +3 -1
- package/dist/core/draft.d.ts +19 -0
- package/dist/core/draft.js +53 -0
- package/dist/core/dsl.d.ts +37 -3
- package/dist/core/dsl.js +167 -26
- package/dist/core/effect-schema.d.ts +90 -0
- package/dist/core/effect-schema.js +500 -0
- package/dist/core/effect.d.ts +4 -11
- package/dist/core/effect.js +3 -79
- package/dist/core/exists.d.ts +1 -0
- package/dist/core/exists.js +191 -16
- package/dist/core/extract-c.d.ts +2 -0
- package/dist/core/extract-c.js +169 -22
- package/dist/core/extract-check.d.ts +1 -0
- package/dist/core/extract-check.js +97 -6
- package/dist/core/extract-go-check.d.ts +1 -1
- package/dist/core/extract-go-check.js +26 -5
- package/dist/core/extract-go.d.ts +8 -0
- package/dist/core/extract-go.js +67 -6
- package/dist/core/extract-ir.d.ts +1 -0
- package/dist/core/extract-ir.js +15 -0
- package/dist/core/extract-jvm.d.ts +1 -1
- package/dist/core/extract-jvm.js +2 -0
- package/dist/core/extract-orm.d.ts +12 -0
- package/dist/core/extract-orm.js +244 -0
- package/dist/core/extract-print.js +20 -1
- package/dist/core/extract-py.d.ts +1 -0
- package/dist/core/extract-py.js +1 -1
- package/dist/core/extract-read.d.ts +26 -1
- package/dist/core/extract-read.js +14 -7
- package/dist/core/extract-rs.js +63 -15
- package/dist/core/extract-shapes.d.ts +1 -0
- package/dist/core/extract-shapes.js +84 -0
- package/dist/core/extract-sol.d.ts +10 -1
- package/dist/core/extract-sol.js +70 -22
- package/dist/core/extract-standalone.d.ts +3 -0
- package/dist/core/extract-standalone.js +221 -0
- package/dist/core/extract-step.d.ts +151 -1
- package/dist/core/extract-step.js +1232 -60
- package/dist/core/extract-swift.js +6 -2
- package/dist/core/extract.d.ts +9 -0
- package/dist/core/extract.js +77 -7
- package/dist/core/fiber-run.d.ts +5 -0
- package/dist/core/fiber-run.js +18 -0
- package/dist/core/infer.d.ts +4 -1
- package/dist/core/infer.js +918 -217
- package/dist/core/jvm/JavaReader.java +23 -6
- package/dist/core/jvm/Jvm.java +3 -0
- package/dist/core/jvm/KtReader.java +6 -5
- package/dist/core/laws.d.ts +10 -3
- package/dist/core/laws.js +226 -23
- package/dist/core/machine.d.ts +15 -1
- package/dist/core/machine.js +187 -15
- package/dist/core/nonterm.js +14 -1
- package/dist/core/orm/harness.js +61 -0
- package/dist/core/orm-fixtures/schema.prisma +5 -0
- package/dist/core/py/harness.py +183 -10
- package/dist/core/py/reader.py +234 -40
- package/dist/core/reader-fixtures/README.md +28 -0
- package/dist/core/reader-fixtures/c-693042.cpp +8 -0
- package/dist/core/reader-fixtures/go-685506.go +14 -0
- package/dist/core/reader-fixtures/jvm-724362.kt +8 -0
- package/dist/core/reader-fixtures/jvm-737430.kt +7 -0
- package/dist/core/reader-fixtures/jvm-765282.kt +3 -0
- package/dist/core/reader-fixtures/swift-735726.swift +15 -0
- package/dist/core/reader-fixtures/swift-735990.swift +15 -0
- package/dist/core/reader-fixtures/swift-739158.swift +4 -0
- package/dist/core/reader-fixtures/swift-744834.swift +15 -0
- package/dist/core/reader-fixtures/swift-746946.swift +31 -0
- package/dist/core/reader-fixtures/typescript-673062.ts.txt +2 -0
- package/dist/core/relation.d.ts +1 -1
- package/dist/core/relation.js +29 -2
- package/dist/core/relational.js +4 -2
- package/dist/core/rs/Cargo.toml +1 -1
- package/dist/core/rs/src/main.rs +466 -11
- package/dist/core/sample-cache.d.ts +8 -0
- package/dist/core/sample-cache.js +46 -0
- package/dist/core/security.d.ts +38 -0
- package/dist/core/security.js +88 -0
- package/dist/core/sol/harness.py +57 -4
- package/dist/core/sol-concrete.d.ts +23 -0
- package/dist/core/sol-concrete.js +195 -0
- package/dist/core/solver.js +3 -1
- package/dist/core/swift/Sources/gdp-swiftreader/main.swift +50 -7
- package/dist/core/system.js +1 -1
- package/dist/core/transfer.js +22 -9
- package/dist/core/translate.js +39 -10
- package/dist/core/watch.js +50 -5
- package/dist/interchange/format.js +11 -1
- package/dist/kernel/cdcl.d.ts +5 -0
- package/dist/kernel/cdcl.js +56 -9
- package/dist/kernel/epr.js +108 -26
- package/dist/kernel/kernel.d.ts +29 -1
- package/dist/kernel/kernel.js +325 -62
- package/dist/kernel/model-sequence.d.ts +3 -0
- package/dist/kernel/model-sequence.js +34 -0
- package/dist/kernel/prove.d.ts +10 -3
- package/dist/kernel/prove.js +332 -71
- package/dist/kernel/reader.d.ts +3 -0
- package/dist/kernel/reader.js +101 -14
- package/dist/kernel/share.d.ts +1 -0
- package/dist/kernel/share.js +27 -0
- package/dist/lean-kernel/emit.js +30 -37
- package/dist/lean-kernel/lean-terms.js +5 -0
- package/dist/lean-kernel/library.js +10 -10
- package/package.json +6 -1
|
@@ -94,6 +94,12 @@ export type SFunc = {
|
|
|
94
94
|
late?: string;
|
|
95
95
|
};
|
|
96
96
|
export type SRec = {
|
|
97
|
+
initializers?: string[];
|
|
98
|
+
orm?: {
|
|
99
|
+
framework: 'django' | 'sqlalchemy' | 'prisma' | 'typeorm';
|
|
100
|
+
key: string;
|
|
101
|
+
why?: string;
|
|
102
|
+
};
|
|
97
103
|
name: string;
|
|
98
104
|
short: string;
|
|
99
105
|
fields: {
|
|
@@ -109,6 +115,9 @@ export type SRec = {
|
|
|
109
115
|
p: string;
|
|
110
116
|
rets?: Record<string, SType>;
|
|
111
117
|
cattrs?: Record<string, number | string | boolean | null>;
|
|
118
|
+
mro?: string[] | null;
|
|
119
|
+
declared?: string[];
|
|
120
|
+
classCollections?: Record<string, string>;
|
|
112
121
|
};
|
|
113
122
|
export type SModule = {
|
|
114
123
|
lang: string;
|
|
@@ -169,6 +178,7 @@ export type StoreVal = 'int' | 'float' | 'str' | string[] | {
|
|
|
169
178
|
json: Record<string, string | string[]>;
|
|
170
179
|
};
|
|
171
180
|
export type StoreDecl = {
|
|
181
|
+
ormSession?: boolean;
|
|
172
182
|
get?: string[];
|
|
173
183
|
set?: string[];
|
|
174
184
|
delete?: string[];
|
|
@@ -223,12 +233,19 @@ export type IntTy = {
|
|
|
223
233
|
ub?: boolean;
|
|
224
234
|
mod?: string;
|
|
225
235
|
};
|
|
236
|
+
type Bits = {
|
|
237
|
+
x: N;
|
|
238
|
+
A: number;
|
|
239
|
+
B: number;
|
|
240
|
+
w: number;
|
|
241
|
+
};
|
|
226
242
|
type V = {
|
|
227
243
|
t: 'num';
|
|
228
244
|
e: N;
|
|
229
245
|
ty?: IntTy;
|
|
230
246
|
cmp?: [N, N];
|
|
231
247
|
slen?: K;
|
|
248
|
+
bits?: Bits;
|
|
232
249
|
} | {
|
|
233
250
|
t: 'bool';
|
|
234
251
|
e: B;
|
|
@@ -264,6 +281,7 @@ type V = {
|
|
|
264
281
|
store: string;
|
|
265
282
|
path: string;
|
|
266
283
|
};
|
|
284
|
+
sink?: boolean;
|
|
267
285
|
} | {
|
|
268
286
|
t: 'ext';
|
|
269
287
|
q: string;
|
|
@@ -337,6 +355,29 @@ type CellWrite = {
|
|
|
337
355
|
vals: Map<string, V>;
|
|
338
356
|
on?: B;
|
|
339
357
|
};
|
|
358
|
+
type Ranking = {
|
|
359
|
+
name: string;
|
|
360
|
+
id: string;
|
|
361
|
+
decl: MapDecl;
|
|
362
|
+
K: {
|
|
363
|
+
op: 'num';
|
|
364
|
+
e: N;
|
|
365
|
+
};
|
|
366
|
+
exists: B;
|
|
367
|
+
view: Map<string, V>;
|
|
368
|
+
cur: Map<string, V>;
|
|
369
|
+
a: N;
|
|
370
|
+
ld: B;
|
|
371
|
+
ord: string;
|
|
372
|
+
rk: string;
|
|
373
|
+
order?: {
|
|
374
|
+
by: (k: K) => {
|
|
375
|
+
e: N;
|
|
376
|
+
desc?: boolean;
|
|
377
|
+
}[];
|
|
378
|
+
sig: string;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
340
381
|
type Ptr = {
|
|
341
382
|
k: 'nil';
|
|
342
383
|
} | {
|
|
@@ -390,6 +431,13 @@ type Obj = {
|
|
|
390
431
|
origin: Origin;
|
|
391
432
|
lazy?: string;
|
|
392
433
|
moved?: boolean;
|
|
434
|
+
orm?: {
|
|
435
|
+
table: string;
|
|
436
|
+
key: K;
|
|
437
|
+
session?: string;
|
|
438
|
+
loaded?: boolean;
|
|
439
|
+
deleted?: boolean;
|
|
440
|
+
};
|
|
393
441
|
} | {
|
|
394
442
|
k: 'map';
|
|
395
443
|
decl: MapDecl;
|
|
@@ -397,6 +445,7 @@ type Obj = {
|
|
|
397
445
|
nil?: B;
|
|
398
446
|
w?: CellWrite;
|
|
399
447
|
pre?: CellWrite[];
|
|
448
|
+
ew?: CellWrite;
|
|
400
449
|
origin: Origin;
|
|
401
450
|
} | {
|
|
402
451
|
k: 'store';
|
|
@@ -429,6 +478,15 @@ type Flow = {
|
|
|
429
478
|
};
|
|
430
479
|
export type { V as StepValue, Path as StepPath, Obj as StepObj, Ptr as StepPtr };
|
|
431
480
|
export type Leaf = {
|
|
481
|
+
orm?: {
|
|
482
|
+
rec: string;
|
|
483
|
+
key: string;
|
|
484
|
+
framework: string;
|
|
485
|
+
fields: {
|
|
486
|
+
name: string;
|
|
487
|
+
t: SType;
|
|
488
|
+
}[];
|
|
489
|
+
};
|
|
432
490
|
t?: SType;
|
|
433
491
|
name: string;
|
|
434
492
|
path: string[];
|
|
@@ -451,6 +509,7 @@ export type Leaf = {
|
|
|
451
509
|
};
|
|
452
510
|
export type PArg = {
|
|
453
511
|
k: 'in';
|
|
512
|
+
time?: string;
|
|
454
513
|
name: string;
|
|
455
514
|
float?: boolean;
|
|
456
515
|
sym?: boolean;
|
|
@@ -485,6 +544,7 @@ export type Answer = {
|
|
|
485
544
|
name: string;
|
|
486
545
|
none?: string;
|
|
487
546
|
float?: boolean;
|
|
547
|
+
time?: string;
|
|
488
548
|
};
|
|
489
549
|
sort: string;
|
|
490
550
|
how?: string;
|
|
@@ -507,6 +567,7 @@ export type Answer = {
|
|
|
507
567
|
export type StepRead = {
|
|
508
568
|
ints: Record<string, IntTy>;
|
|
509
569
|
madeAt?: string;
|
|
570
|
+
naiveUtc?: boolean;
|
|
510
571
|
model: Model;
|
|
511
572
|
leaves: Leaf[];
|
|
512
573
|
args: Record<string, [string, PArg][]>;
|
|
@@ -527,6 +588,7 @@ export type StepRead = {
|
|
|
527
588
|
store: string;
|
|
528
589
|
path: string;
|
|
529
590
|
}[];
|
|
591
|
+
edges?: B[];
|
|
530
592
|
};
|
|
531
593
|
export type Inferred = {
|
|
532
594
|
answers: Map<string, SType>;
|
|
@@ -578,6 +640,21 @@ export declare class Stepper {
|
|
|
578
640
|
readonly folds: Fold[];
|
|
579
641
|
hidden: number;
|
|
580
642
|
inFold: number;
|
|
643
|
+
drain?: {
|
|
644
|
+
i: N;
|
|
645
|
+
back: boolean;
|
|
646
|
+
entry: Path;
|
|
647
|
+
map?: {
|
|
648
|
+
name: string;
|
|
649
|
+
id: string;
|
|
650
|
+
};
|
|
651
|
+
dir?: boolean;
|
|
652
|
+
empty?: string;
|
|
653
|
+
rank?: Map<string, Ranking>;
|
|
654
|
+
run?: string;
|
|
655
|
+
};
|
|
656
|
+
drainSetup: number;
|
|
657
|
+
drainAgain: boolean;
|
|
581
658
|
readonly initHeap: Map<string, Obj>;
|
|
582
659
|
readonly storeMaps: Map<string, {
|
|
583
660
|
store: string;
|
|
@@ -647,6 +724,37 @@ export declare class Stepper {
|
|
|
647
724
|
held: (k: K) => B;
|
|
648
725
|
} | undefined;
|
|
649
726
|
forStmt(s: SS, p: Path): Flow;
|
|
727
|
+
whileStmt(s: SS, p: Path, back?: boolean): Flow;
|
|
728
|
+
whileRank(s: SS, p: Path): Flow;
|
|
729
|
+
rankOrder(d: Ranking): (k: K) => {
|
|
730
|
+
e: N;
|
|
731
|
+
desc?: boolean;
|
|
732
|
+
}[];
|
|
733
|
+
rankOf(o: Extract<Obj, {
|
|
734
|
+
k: 'map';
|
|
735
|
+
}>, at: SX): Ranking;
|
|
736
|
+
rankLeast(o: Extract<Obj, {
|
|
737
|
+
k: 'map';
|
|
738
|
+
}>, at: SX, where: (k: K) => B, by: (k: K) => {
|
|
739
|
+
e: N;
|
|
740
|
+
desc?: boolean;
|
|
741
|
+
}[]): {
|
|
742
|
+
key: N;
|
|
743
|
+
some: B;
|
|
744
|
+
held: B;
|
|
745
|
+
where: (k: K) => B;
|
|
746
|
+
};
|
|
747
|
+
drainLeast(o: Extract<Obj, {
|
|
748
|
+
k: 'map';
|
|
749
|
+
}>, at: SX, where: (k: K) => B, by: (k: K) => {
|
|
750
|
+
e: N;
|
|
751
|
+
desc?: boolean;
|
|
752
|
+
}[]): {
|
|
753
|
+
key: N;
|
|
754
|
+
some: B;
|
|
755
|
+
held: B;
|
|
756
|
+
where: (k: K) => B;
|
|
757
|
+
};
|
|
650
758
|
foldExpr(x: SX, p: Path): [V, Path];
|
|
651
759
|
changedFrom(e: Path, p: Path): boolean;
|
|
652
760
|
joinSome(ps: Path[], at: {
|
|
@@ -754,6 +862,23 @@ export declare class Stepper {
|
|
|
754
862
|
some: B;
|
|
755
863
|
held: B;
|
|
756
864
|
}, d: V | undefined, x: SX, p: Path): [V, Path];
|
|
865
|
+
timeField(v: V, t: SType | undefined, read: boolean, at: {
|
|
866
|
+
p: string;
|
|
867
|
+
text?: string;
|
|
868
|
+
}): V;
|
|
869
|
+
naiveUtc: boolean;
|
|
870
|
+
readonly ormTables: Map<string, {
|
|
871
|
+
id: string;
|
|
872
|
+
decl: MapDecl;
|
|
873
|
+
}>;
|
|
874
|
+
ormTable(rec: string, at: SX, p: Path): {
|
|
875
|
+
id: string;
|
|
876
|
+
decl: MapDecl;
|
|
877
|
+
};
|
|
878
|
+
ormRow(rec: string, key: K, vals: Map<string, V>, at: SX, p: Path): [V, Path];
|
|
879
|
+
ormCall(rec: string, op: string, args: V[], kw: [string, V][], at: SX, p: Path): [V, Path];
|
|
880
|
+
ormSession(name: string, op: string, args: V[], kw: [string, V][], at: SX, p: Path): [V, Path];
|
|
881
|
+
ormPersist(v: V, op: string, args: V[], kw: [string, V][], at: SX, p: Path): [V, Path];
|
|
757
882
|
storeMap(store: string, tpl: string, kn: boolean, at: SX, p: Path): [string, Extract<Obj, {
|
|
758
883
|
k: 'map';
|
|
759
884
|
}>];
|
|
@@ -830,6 +955,8 @@ export declare class Stepper {
|
|
|
830
955
|
isOf(v: V, k: string, at: SX): B;
|
|
831
956
|
inner(v: V, k: string, at: SX): V;
|
|
832
957
|
rmw(x: SX, p: Path): [V, Path];
|
|
958
|
+
classConstant(value: number | string | boolean | null, at: SX): V;
|
|
959
|
+
classCollection(owner: string, name: string): V;
|
|
833
960
|
get(x: SX, p: Path): [V, Path];
|
|
834
961
|
lazyField(id: string, obj: Extract<Obj, {
|
|
835
962
|
k: 'rec';
|
|
@@ -844,15 +971,20 @@ export declare class Stepper {
|
|
|
844
971
|
equal(a: V, b: V, at: SX, p: Path): B;
|
|
845
972
|
truth(x: SX, p: Path): [B, Path];
|
|
846
973
|
boolOp(x: SX, p: Path): [V, Path];
|
|
974
|
+
checkOrmDisplay(v: V, at: SX): void;
|
|
847
975
|
fstr(x: SX, p: Path, given?: (string | V)[]): [V, Path];
|
|
848
976
|
call(x: SX, p: Path, awaited: boolean): [V, Path];
|
|
849
977
|
argsRead(x: SX, p: Path): Path;
|
|
850
978
|
evArgs<T>(x: SX, p: Path, k: (args: V[], kw: [string, V][], p: Path) => T): T;
|
|
851
979
|
dictCall(m: V, name: string, x: SX, p: Path): [V, Path];
|
|
852
980
|
setCall(m: V, name: string, x: SX, p: Path): [V, Path];
|
|
981
|
+
hasAttribute(v: V, name: string, at: SX, p: Path): boolean;
|
|
982
|
+
initMethod(r: SRec, at: {
|
|
983
|
+
p: string;
|
|
984
|
+
}): string | null | undefined;
|
|
853
985
|
construct(rec: string, args: V[], kw: [string, V][], x: SX, p: Path): [V, Path];
|
|
854
986
|
builtin(n: string, x: SX, p: Path): [V, Path];
|
|
855
|
-
quotient(d: SX, p: Path, round: 'floor' | 'ceil' | 'trunc' | 'even'): [V, Path];
|
|
987
|
+
quotient(d: SX, p: Path, round: 'floor' | 'ceil' | 'trunc' | 'even' | 'up' | 'away'): [V, Path];
|
|
856
988
|
lib(q0: string, x: SX, p: Path): [V, Path];
|
|
857
989
|
readonly edges: B[];
|
|
858
990
|
readonly lists: MapDecl[];
|
|
@@ -922,6 +1054,23 @@ export declare class Stepper {
|
|
|
922
1054
|
binop(op: string, a: V, b: V, x: {
|
|
923
1055
|
p: string;
|
|
924
1056
|
}, p: Path): V;
|
|
1057
|
+
bitop(op: string, a: Extract<V, {
|
|
1058
|
+
t: 'num';
|
|
1059
|
+
}>, b: Extract<V, {
|
|
1060
|
+
t: 'num';
|
|
1061
|
+
}>, x: {
|
|
1062
|
+
p: string;
|
|
1063
|
+
}): V;
|
|
1064
|
+
ofBits(f: Bits, at: {
|
|
1065
|
+
p: string;
|
|
1066
|
+
}): N;
|
|
1067
|
+
andRuns(v: N, k: number, at: {
|
|
1068
|
+
p: string;
|
|
1069
|
+
}): N;
|
|
1070
|
+
bitsOf(v: N): Bits | undefined;
|
|
1071
|
+
bitGeneric(op: string, v: N, w: N, first: boolean, ty: IntTy, x: {
|
|
1072
|
+
p: string;
|
|
1073
|
+
}): V;
|
|
925
1074
|
eq(a: V, b: V, x: {
|
|
926
1075
|
p: string;
|
|
927
1076
|
}, p?: Path): B;
|
|
@@ -987,6 +1136,7 @@ type CellW = {
|
|
|
987
1136
|
key: K;
|
|
988
1137
|
has: B;
|
|
989
1138
|
vals: Record<string, Term>;
|
|
1139
|
+
each?: true;
|
|
990
1140
|
};
|
|
991
1141
|
export declare function padWrites<W extends {
|
|
992
1142
|
key: K;
|