gdp-wired 0.37.0 → 0.39.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 +2 -2
- package/dist/core/cli.d.ts +2 -1
- package/dist/core/cli.js +25 -6
- package/dist/core/cyclic.js +1 -1
- package/dist/core/dsl.js +64 -3
- package/dist/core/exists.d.ts +1 -0
- package/dist/core/exists.js +28 -0
- package/dist/core/extract-check.d.ts +2 -2
- package/dist/core/extract-check.js +7 -4
- package/dist/core/extract-print.js +5 -3
- package/dist/core/extract-read.d.ts +2 -0
- package/dist/core/extract-sol.d.ts +91 -0
- package/dist/core/extract-sol.js +1106 -0
- package/dist/core/extract-step.d.ts +56 -6
- package/dist/core/extract-step.js +588 -67
- package/dist/core/extract.d.ts +8 -0
- package/dist/core/extract.js +25 -4
- package/dist/core/infer.js +48 -13
- package/dist/core/laws.js +16 -2
- package/dist/core/live.js +158 -63
- package/dist/core/machine.js +7 -4
- package/dist/core/py/harness.py +75 -12
- package/dist/core/py/reader.py +67 -11
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export type SType = {
|
|
|
13
13
|
atomic?: string;
|
|
14
14
|
lock?: string;
|
|
15
15
|
rs?: string;
|
|
16
|
+
mod?: string;
|
|
16
17
|
} | {
|
|
17
18
|
k: 'float' | 'bool' | 'str' | 'none' | 'any' | 'lock';
|
|
18
19
|
atomic?: string;
|
|
@@ -158,6 +159,10 @@ type Try = {
|
|
|
158
159
|
hs: Handler[];
|
|
159
160
|
to: [Path, number, Kind][];
|
|
160
161
|
ws: B[];
|
|
162
|
+
depth: number;
|
|
163
|
+
};
|
|
164
|
+
export type StoreVal = 'int' | 'float' | string[] | {
|
|
165
|
+
json: Record<string, string | string[]>;
|
|
161
166
|
};
|
|
162
167
|
export type StoreDecl = {
|
|
163
168
|
get?: string[];
|
|
@@ -167,6 +172,16 @@ export type StoreDecl = {
|
|
|
167
172
|
value?: 'int' | 'float' | 'str';
|
|
168
173
|
attrs?: Record<string, null | boolean | number | string>;
|
|
169
174
|
async?: Record<string, boolean>;
|
|
175
|
+
values?: Record<string, StoreVal>;
|
|
176
|
+
apart?: boolean;
|
|
177
|
+
nothrow?: boolean;
|
|
178
|
+
};
|
|
179
|
+
type JField = {
|
|
180
|
+
name: string;
|
|
181
|
+
opt?: boolean;
|
|
182
|
+
choice?: boolean;
|
|
183
|
+
vals?: string[];
|
|
184
|
+
out?: boolean;
|
|
170
185
|
};
|
|
171
186
|
export type StepOptions = {
|
|
172
187
|
entry?: string | string[];
|
|
@@ -178,13 +193,15 @@ export type StepOptions = {
|
|
|
178
193
|
failures?: 'refuse' | 'kept';
|
|
179
194
|
onError?: 'refuse' | 'discard';
|
|
180
195
|
domains?: Record<string, 'nat' | 'int'>;
|
|
196
|
+
defaults?: string[];
|
|
197
|
+
fields?: Record<string, null | boolean | number | string>;
|
|
181
198
|
check?: {
|
|
182
199
|
runs?: number;
|
|
183
200
|
depth?: number;
|
|
184
201
|
states?: number;
|
|
185
202
|
seed?: number;
|
|
186
203
|
bound?: number;
|
|
187
|
-
probes?: boolean;
|
|
204
|
+
probes?: boolean | 'writes';
|
|
188
205
|
};
|
|
189
206
|
};
|
|
190
207
|
export type IntTy = {
|
|
@@ -193,6 +210,7 @@ export type IntTy = {
|
|
|
193
210
|
name?: string;
|
|
194
211
|
t?: number;
|
|
195
212
|
ub?: boolean;
|
|
213
|
+
mod?: string;
|
|
196
214
|
};
|
|
197
215
|
type V = {
|
|
198
216
|
t: 'num';
|
|
@@ -242,6 +260,7 @@ type V = {
|
|
|
242
260
|
patch?: Patch;
|
|
243
261
|
ret?: SType;
|
|
244
262
|
recv?: V;
|
|
263
|
+
nothrow?: boolean;
|
|
245
264
|
} | {
|
|
246
265
|
t: 'fn';
|
|
247
266
|
id: string;
|
|
@@ -261,6 +280,10 @@ type V = {
|
|
|
261
280
|
t: 'sattr';
|
|
262
281
|
store: string;
|
|
263
282
|
path: string;
|
|
283
|
+
} | {
|
|
284
|
+
t: 'val';
|
|
285
|
+
ty: string;
|
|
286
|
+
f: Map<string, V>;
|
|
264
287
|
} | {
|
|
265
288
|
t: 'tuple';
|
|
266
289
|
xs: V[];
|
|
@@ -297,6 +320,11 @@ type V = {
|
|
|
297
320
|
t: 'pop';
|
|
298
321
|
id: string;
|
|
299
322
|
};
|
|
323
|
+
type CellWrite = {
|
|
324
|
+
key: K;
|
|
325
|
+
has: B;
|
|
326
|
+
vals: Map<string, V>;
|
|
327
|
+
};
|
|
300
328
|
type Ptr = {
|
|
301
329
|
k: 'nil';
|
|
302
330
|
} | {
|
|
@@ -355,11 +383,8 @@ type Obj = {
|
|
|
355
383
|
decl: MapDecl;
|
|
356
384
|
val?: SType;
|
|
357
385
|
nil?: B;
|
|
358
|
-
w?:
|
|
359
|
-
|
|
360
|
-
has: B;
|
|
361
|
-
vals: Map<string, V>;
|
|
362
|
-
};
|
|
386
|
+
w?: CellWrite;
|
|
387
|
+
pre?: CellWrite[];
|
|
363
388
|
origin: Origin;
|
|
364
389
|
} | {
|
|
365
390
|
k: 'store';
|
|
@@ -406,6 +431,8 @@ export type Leaf = {
|
|
|
406
431
|
store?: string;
|
|
407
432
|
tpl?: string;
|
|
408
433
|
ordered?: boolean;
|
|
434
|
+
json?: JField[];
|
|
435
|
+
choice?: boolean;
|
|
409
436
|
};
|
|
410
437
|
export type PArg = {
|
|
411
438
|
k: 'in';
|
|
@@ -423,6 +450,7 @@ export type PArg = {
|
|
|
423
450
|
f: [string, PArg][];
|
|
424
451
|
} | {
|
|
425
452
|
k: 'inert';
|
|
453
|
+
dict?: boolean;
|
|
426
454
|
} | {
|
|
427
455
|
k: 'store';
|
|
428
456
|
name: string;
|
|
@@ -529,11 +557,14 @@ export declare class Stepper {
|
|
|
529
557
|
tpl: string;
|
|
530
558
|
id: string;
|
|
531
559
|
decl: MapDecl;
|
|
560
|
+
json?: JField[];
|
|
561
|
+
choice?: boolean;
|
|
532
562
|
}>;
|
|
533
563
|
readonly leasts: LeastRead[];
|
|
534
564
|
frames: string[];
|
|
535
565
|
fieldNames: Set<string>;
|
|
536
566
|
readonly frozen: Set<string>;
|
|
567
|
+
readonly atDefault: Set<V>;
|
|
537
568
|
readonly ints: Map<string, IntTy>;
|
|
538
569
|
readonly paramsOut: B[];
|
|
539
570
|
now?: Var;
|
|
@@ -575,6 +606,7 @@ export declare class Stepper {
|
|
|
575
606
|
raise(p: Path, c: B, w: B, [t, i]: [Try, number], k: Kind, at: {
|
|
576
607
|
p: string;
|
|
577
608
|
}): void;
|
|
609
|
+
readonly frameLocals: Map<string, V>[];
|
|
578
610
|
tryStmt(s: SS, p: Path): Flow;
|
|
579
611
|
listOf(v: V, p: Path, at: SX, carried?: boolean): {
|
|
580
612
|
id: string;
|
|
@@ -718,6 +750,19 @@ export declare class Stepper {
|
|
|
718
750
|
callsOn(r: SRec, fields: string[]): string[];
|
|
719
751
|
storeDecl(store: string): StoreDecl;
|
|
720
752
|
storeCall(store: string, m: string, args: V[], kw: [string, V][], at: SX, p: Path, awaited: boolean): [V, Path];
|
|
753
|
+
readonly withBodies: {
|
|
754
|
+
body: SS[];
|
|
755
|
+
locals: Map<string, V>;
|
|
756
|
+
}[];
|
|
757
|
+
generatorCM(s: SS, p: Path): Flow | undefined;
|
|
758
|
+
valItem(m: Extract<V, {
|
|
759
|
+
t: 'val';
|
|
760
|
+
}>, k: V, x: SX, p: Path): [V, Path];
|
|
761
|
+
valCall(o: Extract<V, {
|
|
762
|
+
t: 'val';
|
|
763
|
+
}>, m: string, args: V[], kw: [string, V][], x: SX, p: Path): [V, Path];
|
|
764
|
+
json(q0: string, args: V[], kw: [string, V][], x: SX, p: Path): [V, Path];
|
|
765
|
+
valBin(op: string, a: V, b: V, x: SX, p: Path): V;
|
|
721
766
|
calleeNames(x: SX): string[];
|
|
722
767
|
match(list: string[] | undefined, names: string[]): string | undefined;
|
|
723
768
|
skipped(names: string[]): boolean;
|
|
@@ -758,6 +803,7 @@ export declare class Stepper {
|
|
|
758
803
|
floorDiv(a: N, k: number): N;
|
|
759
804
|
compare(x: SX, p: Path): [V, Path];
|
|
760
805
|
equal(a: V, b: V, at: SX, p: Path): B;
|
|
806
|
+
truth(x: SX, p: Path): [B, Path];
|
|
761
807
|
boolOp(x: SX, p: Path): [V, Path];
|
|
762
808
|
fstr(x: SX, p: Path): [V, Path];
|
|
763
809
|
call(x: SX, p: Path, awaited: boolean): [V, Path];
|
|
@@ -848,6 +894,7 @@ export declare class Stepper {
|
|
|
848
894
|
wrap(e: N, ty: IntTy, x: {
|
|
849
895
|
p: string;
|
|
850
896
|
}, p: Path): N;
|
|
897
|
+
pastMod(e: N, mod: string): B;
|
|
851
898
|
past(e: N, lo: number, hi: number, p: Path): [B, B];
|
|
852
899
|
within(e: N, b: number, side: 'lo' | 'hi', p: Path): boolean;
|
|
853
900
|
mapAt(m: V, at: SX, p: Path): Extract<Obj, {
|
|
@@ -901,6 +948,9 @@ type CellW = {
|
|
|
901
948
|
has: B;
|
|
902
949
|
vals: Record<string, Term>;
|
|
903
950
|
};
|
|
951
|
+
export declare function padWrites<W extends {
|
|
952
|
+
key: K;
|
|
953
|
+
}>(lists: W[][], base: (k: K) => Omit<W, 'key'>): W[][];
|
|
904
954
|
export declare function mapWritesOf(g: Stepper, d: MapDecl, sels: B[], ws: (CellW | undefined)[], fix?: (i: number, w: CellW, base: (k: K) => CellW) => CellW): CellW | undefined;
|
|
905
955
|
export declare const rangeLaws: (state: Var[], ints: Map<string, IntTy>) => string[];
|
|
906
956
|
export declare const varTerm: (v: Var) => Term;
|