@intentius/tsad-conformance 1.4.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 +59 -0
- package/dist/adapter.d.ts +65 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +2 -0
- package/dist/adapter.js.map +1 -0
- package/dist/bundled.d.ts +5 -0
- package/dist/bundled.d.ts.map +1 -0
- package/dist/bundled.js +28 -0
- package/dist/bundled.js.map +1 -0
- package/dist/fixture.d.ts +49 -0
- package/dist/fixture.d.ts.map +1 -0
- package/dist/fixture.js +95 -0
- package/dist/fixture.js.map +1 -0
- package/dist/host.d.ts +33 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +79 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/rules.d.ts +46 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +135 -0
- package/dist/rules.js.map +1 -0
- package/dist/runner.d.ts +26 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +152 -0
- package/dist/runner.js.map +1 -0
- package/fixtures/F-CallLeak/a-call-returns-a-live-object/expect.json +8 -0
- package/fixtures/F-CallLeak/a-call-returns-a-live-object/project/caller.ts +5 -0
- package/fixtures/F-CallLeak/a-call-returns-a-live-object/project/leaky.ts +7 -0
- package/fixtures/F-CallLeak/a-call-returns-a-live-object/project/pure.ts +5 -0
- package/fixtures/F-Cycle/mutual-imports/expect.json +6 -0
- package/fixtures/F-Cycle/mutual-imports/project/a.ts +3 -0
- package/fixtures/F-Cycle/mutual-imports/project/b.ts +3 -0
- package/fixtures/F-Depth/exhaustion-is-a-fallback/expect.json +19 -0
- package/fixtures/F-Depth/exhaustion-is-a-fallback/project/deep.ts +3 -0
- package/fixtures/F-Depth/exhaustion-is-a-fallback/project/rec.ts +3 -0
- package/fixtures/F-Div-Depth/new-inside-function-body/expect.json +21 -0
- package/fixtures/F-Div-Depth/new-inside-function-body/project/app.ts +3 -0
- package/fixtures/F-Div-Depth/new-inside-function-body/project/fn.ts +3 -0
- package/fixtures/F-Div-Eager/referenced-not-called/expect.json +8 -0
- package/fixtures/F-Div-Eager/referenced-not-called/project/app.ts +3 -0
- package/fixtures/F-Div-NsNew/namespace-callee/expect.json +18 -0
- package/fixtures/F-Div-NsNew/namespace-callee/input.ts +3 -0
- package/fixtures/F-Div-Provenance/helper-name-from-project-import/expect.json +20 -0
- package/fixtures/F-Div-Provenance/helper-name-from-project-import/project/app.ts +3 -0
- package/fixtures/F-Div-Provenance/helper-name-from-project-import/project/local.ts +3 -0
- package/fixtures/F-Div-SameFileNew/no-module-graph/expect.json +8 -0
- package/fixtures/F-Div-SameFileNew/no-module-graph/input.ts +5 -0
- package/fixtures/F-Div-Tag/unregistered-tag/expect.json +15 -0
- package/fixtures/F-Div-Tag/unregistered-tag/input.ts +1 -0
- package/fixtures/F-Eval-Array/spread-string-rejected/expect.json +14 -0
- package/fixtures/F-Eval-Array/spread-string-rejected/input.ts +1 -0
- package/fixtures/F-Eval-Binary/division-and-float/expect.json +19 -0
- package/fixtures/F-Eval-Binary/division-and-float/input.ts +1 -0
- package/fixtures/F-Eval-Binary/logical-return-operand/expect.json +20 -0
- package/fixtures/F-Eval-Binary/logical-return-operand/input.ts +1 -0
- package/fixtures/F-Eval-Binary/plus-dispatch/expect.json +19 -0
- package/fixtures/F-Eval-Binary/plus-dispatch/input.ts +1 -0
- package/fixtures/F-Eval-Binary/relational-on-strings/expect.json +18 -0
- package/fixtures/F-Eval-Binary/relational-on-strings/input.ts +1 -0
- package/fixtures/F-Eval-CallEager/evaluated-at-fold-time/expect.json +8 -0
- package/fixtures/F-Eval-CallEager/evaluated-at-fold-time/project/app.ts +3 -0
- package/fixtures/F-Eval-CallEager/not-a-function/expect.json +22 -0
- package/fixtures/F-Eval-CallEager/not-a-function/project/app.ts +3 -0
- package/fixtures/F-Eval-CallEager/not-a-function/project/local.ts +1 -0
- package/fixtures/F-Eval-CallHelper/helper-folds/expect.json +8 -0
- package/fixtures/F-Eval-CallHelper/helper-folds/project/app.ts +3 -0
- package/fixtures/F-Eval-CallHelper/inside-function-body/expect.json +22 -0
- package/fixtures/F-Eval-CallHelper/inside-function-body/project/app.ts +3 -0
- package/fixtures/F-Eval-CallHelper/inside-function-body/project/fn.ts +5 -0
- package/fixtures/F-Eval-CallIntrinsic/call-form-folds/expect.json +8 -0
- package/fixtures/F-Eval-CallIntrinsic/call-form-folds/project/app.ts +3 -0
- package/fixtures/F-Eval-CallIntrinsic/inside-function-body/expect.json +22 -0
- package/fixtures/F-Eval-CallIntrinsic/inside-function-body/project/app.ts +3 -0
- package/fixtures/F-Eval-CallIntrinsic/inside-function-body/project/fn.ts +5 -0
- package/fixtures/F-Eval-CallLocal/local-function-folds/expect.json +7 -0
- package/fixtures/F-Eval-CallLocal/local-function-folds/project/app.ts +3 -0
- package/fixtures/F-Eval-CallLocal/local-function-folds/project/pure.ts +3 -0
- package/fixtures/F-Eval-CallLocal/recursion-folds/expect.json +17 -0
- package/fixtures/F-Eval-CallLocal/recursion-folds/project/rec.ts +3 -0
- package/fixtures/F-Eval-CallLocal/recursion-folds/project/shallow.ts +3 -0
- package/fixtures/F-Eval-CallLocal/spread-argument-rejected/expect.json +20 -0
- package/fixtures/F-Eval-CallLocal/spread-argument-rejected/project/app.ts +5 -0
- package/fixtures/F-Eval-CallLocal/spread-argument-rejected/project/pure.ts +3 -0
- package/fixtures/F-Eval-CallMethod/method-missing/expect.json +17 -0
- package/fixtures/F-Eval-CallMethod/method-missing/input.ts +1 -0
- package/fixtures/F-Eval-CallMethod/null-receiver-dot/expect.json +13 -0
- package/fixtures/F-Eval-CallMethod/null-receiver-dot/input.ts +2 -0
- package/fixtures/F-Eval-CallMethod/null-receiver-optional/expect.json +2 -0
- package/fixtures/F-Eval-CallMethod/null-receiver-optional/input.ts +2 -0
- package/fixtures/F-Eval-CallMethod/real-receiver/expect.json +2 -0
- package/fixtures/F-Eval-CallMethod/real-receiver/input.ts +1 -0
- package/fixtures/F-Eval-Template/number-formatting/expect.json +11 -0
- package/fixtures/F-Eval-Template/number-formatting/input.ts +1 -0
- package/fixtures/F-Eval-Template/tostring-of-non-numbers/expect.json +10 -0
- package/fixtures/F-Eval-Template/tostring-of-non-numbers/input.ts +1 -0
- package/fixtures/F-Eval-Unary/coercion/expect.json +19 -0
- package/fixtures/F-Eval-Unary/coercion/input.ts +1 -0
- package/fixtures/F-Eval-Undefined/bare-undefined/expect.json +2 -0
- package/fixtures/F-Eval-Undefined/bare-undefined/input.ts +1 -0
- package/fixtures/F-Exc-Registry/call-form-without-registry/expect.json +15 -0
- package/fixtures/F-Exc-Registry/call-form-without-registry/input.ts +1 -0
- package/fixtures/F-Host-Closed-vs-Open/package-call-is-closed/expect.json +9 -0
- package/fixtures/F-Host-Closed-vs-Open/package-call-is-closed/project/closed.ts +3 -0
- package/fixtures/F-Host-Closed-vs-Open/package-call-is-closed/project/open.ts +3 -0
- package/fixtures/F-Host-Closed-vs-Open/package-call-is-closed/project/pure.ts +3 -0
- package/fixtures/F-Host-DataExports/plain-data-export/expect.json +8 -0
- package/fixtures/F-Host-DataExports/plain-data-export/project/app.ts +3 -0
- package/fixtures/F-Host-Registry/tag-called-as-function/expect.json +8 -0
- package/fixtures/F-Host-Registry/tag-called-as-function/project/app.ts +3 -0
- package/fixtures/F-Host-Trust/unowned-package/expect.json +6 -0
- package/fixtures/F-Host-Trust/unowned-package/project/app.ts +3 -0
- package/fixtures/F-Namespace/synthetic-namespace-object/expect.json +7 -0
- package/fixtures/F-Namespace/synthetic-namespace-object/project/use.ts +3 -0
- package/fixtures/F-Namespace/synthetic-namespace-object/project/values.ts +2 -0
- package/fixtures/F-NoExports/nothing-to-produce/expect.json +7 -0
- package/fixtures/F-NoExports/nothing-to-produce/project/defaulted.ts +1 -0
- package/fixtures/F-NoExports/nothing-to-produce/project/empty.ts +3 -0
- package/fixtures/F-Prebuild/same-file-construction-shared/expect.json +19 -0
- package/fixtures/F-Prebuild/same-file-construction-shared/project/shared.ts +6 -0
- package/fixtures/F-Profile-DataHost/plain-data-across-files/expect.json +39 -0
- package/fixtures/F-Profile-DataHost/plain-data-across-files/project/defaults.ts +5 -0
- package/fixtures/F-Profile-DataHost/plain-data-across-files/project/service.ts +10 -0
- package/fixtures/F-Seed/seeded-by-its-own-body/expect.json +8 -0
- package/fixtures/F-Seed/seeded-by-its-own-body/project/app.ts +8 -0
- package/fixtures/F-Seed/seeded-by-its-own-body/project/lone.ts +1 -0
- package/fixtures/F-Succ/backward-along-captures/expect.json +26 -0
- package/fixtures/F-Succ/backward-along-captures/project/breaker.ts +10 -0
- package/fixtures/F-Succ/backward-along-captures/project/shared.ts +1 -0
- package/fixtures/F-Succ/backward-along-captures/project/sibling.ts +3 -0
- package/fixtures/F-Succ/forward-into-imports/expect.json +8 -0
- package/fixtures/F-Succ/forward-into-imports/project/app.ts +10 -0
- package/fixtures/F-Succ/forward-into-imports/project/config.ts +1 -0
- package/fixtures/F-Taint/independent-file-still-folds/expect.json +9 -0
- package/fixtures/F-Taint/independent-file-still-folds/project/alone.ts +1 -0
- package/fixtures/F-Taint/independent-file-still-folds/project/app.ts +8 -0
- package/fixtures/F-Total/one-bad-declarator-fails-the-file/expect.json +7 -0
- package/fixtures/F-Total/one-bad-declarator-fails-the-file/project/mixed.ts +3 -0
- package/fixtures/F-Val-Arity/props-attributes-and-spread/expect.json +14 -0
- package/fixtures/F-Val-Arity/props-attributes-and-spread/project/arities.ts +5 -0
- package/fixtures/F-Val-Callable/host-function-as-value/expect.json +16 -0
- package/fixtures/F-Val-Callable/host-function-as-value/project/app.ts +3 -0
- package/fixtures/F-Val-Fate/revive-every-envelope/expect.json +15 -0
- package/fixtures/F-Val-Fate/revive-every-envelope/project/entities.ts +6 -0
- package/fixtures/F-Val-Live/plain-data-is-not-live/expect.json +9 -0
- package/fixtures/F-Val-Live/plain-data-is-not-live/project/breaker.ts +10 -0
- package/fixtures/F-Val-Live/plain-data-is-not-live/project/quiet.ts +3 -0
- package/fixtures/F-Val-Live/plain-data-is-not-live/project/source.ts +5 -0
- package/fixtures/F-Val-Position/attrref-in-host-arguments/expect.json +8 -0
- package/fixtures/F-Val-Position/attrref-in-host-arguments/project/rejected.ts +4 -0
- package/fixtures/F-Val-Undefined/array-element-undefined/expect.json +15 -0
- package/fixtures/F-Val-Undefined/array-element-undefined/input.ts +1 -0
- package/fixtures/F-Val-Undefined/conditional-yields-undefined/expect.json +13 -0
- package/fixtures/F-Val-Undefined/conditional-yields-undefined/input.ts +2 -0
- package/fixtures/F-Val-Undefined/optional-chain-yields-undefined-property/expect.json +13 -0
- package/fixtures/F-Val-Undefined/optional-chain-yields-undefined-property/input.ts +2 -0
- package/fixtures/F-Val-Undefined/property-literal-undefined/expect.json +16 -0
- package/fixtures/F-Val-Undefined/property-literal-undefined/input.ts +1 -0
- package/fixtures/F-Val-Undefined/spread-carries-undefined/expect.json +14 -0
- package/fixtures/F-Val-Undefined/spread-carries-undefined/input.ts +2 -0
- package/fixtures/S-Array/spread/expect.json +1 -0
- package/fixtures/S-Array/spread/input.ts +1 -0
- package/fixtures/S-Binary/arithmetic-and-concat/expect.json +1 -0
- package/fixtures/S-Binary/arithmetic-and-concat/input.ts +1 -0
- package/fixtures/S-Binary/lazy-untaken-unfoldable/expect.json +1 -0
- package/fixtures/S-Binary/lazy-untaken-unfoldable/input.ts +1 -0
- package/fixtures/S-Binary/nullish-coalesce/expect.json +1 -0
- package/fixtures/S-Binary/nullish-coalesce/input.ts +1 -0
- package/fixtures/S-CallLocal/imported-callee-is-shape-valid/expect.json +10 -0
- package/fixtures/S-CallLocal/imported-callee-is-shape-valid/input.ts +3 -0
- package/fixtures/S-Conditional/taken-branch-only/expect.json +1 -0
- package/fixtures/S-Conditional/taken-branch-only/input.ts +1 -0
- package/fixtures/S-ExportDefault/imported-by-sibling/expect.json +30 -0
- package/fixtures/S-ExportDefault/imported-by-sibling/project/app.ts +3 -0
- package/fixtures/S-ExportDefault/imported-by-sibling/project/policy.ts +1 -0
- package/fixtures/S-ExportDefault/plain-object/expect.json +21 -0
- package/fixtures/S-ExportDefault/plain-object/input.ts +1 -0
- package/fixtures/S-Ident/const-chain/expect.json +1 -0
- package/fixtures/S-Ident/const-chain/input.ts +1 -0
- package/fixtures/S-Ident/process/expect.json +1 -0
- package/fixtures/S-Ident/process/input.ts +1 -0
- package/fixtures/S-Ident/unresolved/expect.json +1 -0
- package/fixtures/S-Ident/unresolved/input.ts +1 -0
- package/fixtures/S-Index/dynamic-key/expect.json +1 -0
- package/fixtures/S-Index/dynamic-key/input.ts +1 -0
- package/fixtures/S-Index/literal-key/expect.json +1 -0
- package/fixtures/S-Index/literal-key/input.ts +1 -0
- package/fixtures/S-Literal/null-and-booleans/expect.json +1 -0
- package/fixtures/S-Literal/null-and-booleans/input.ts +1 -0
- package/fixtures/S-Literal/numeric/expect.json +1 -0
- package/fixtures/S-Literal/numeric/input.ts +1 -0
- package/fixtures/S-LocalFunction/arrow-const-call/expect.json +21 -0
- package/fixtures/S-LocalFunction/arrow-const-call/project/label.ts +3 -0
- package/fixtures/S-LocalFunction/function-as-value-still-rejects/expect.json +11 -0
- package/fixtures/S-LocalFunction/function-as-value-still-rejects/input.ts +3 -0
- package/fixtures/S-LocalFunction/same-file-declaration-call/expect.json +19 -0
- package/fixtures/S-LocalFunction/same-file-declaration-call/project/twice.ts +5 -0
- package/fixtures/S-Member/nested/expect.json +1 -0
- package/fixtures/S-Member/nested/input.ts +1 -0
- package/fixtures/S-Member/nullish-plain-refuses/expect.json +1 -0
- package/fixtures/S-Member/nullish-plain-refuses/input.ts +1 -0
- package/fixtures/S-Member/optional-chain/expect.json +1 -0
- package/fixtures/S-Member/optional-chain/input.ts +1 -0
- package/fixtures/S-Object/spread-later-wins/expect.json +1 -0
- package/fixtures/S-Object/spread-later-wins/input.ts +1 -0
- package/fixtures/S-Object/spread-non-object/expect.json +1 -0
- package/fixtures/S-Object/spread-non-object/input.ts +1 -0
- package/fixtures/S-Reject/arrow-as-value/expect.json +1 -0
- package/fixtures/S-Reject/arrow-as-value/input.ts +1 -0
- package/fixtures/S-Reject/call-as-value/expect.json +1 -0
- package/fixtures/S-Reject/call-as-value/input.ts +1 -0
- package/fixtures/S-Template/coercion/expect.json +2 -0
- package/fixtures/S-Template/coercion/input.ts +2 -0
- package/fixtures/S-Template/composite-step-span/expect.json +2 -0
- package/fixtures/S-Template/composite-step-span/input.ts +1 -0
- package/fixtures/S-Template/const-span/expect.json +2 -0
- package/fixtures/S-Template/const-span/input.ts +2 -0
- package/fixtures/S-Template/envelope-span/expect.json +2 -0
- package/fixtures/S-Template/envelope-span/input.ts +2 -0
- package/fixtures/S-Template/nested-construction-span/expect.json +2 -0
- package/fixtures/S-Template/nested-construction-span/input.ts +1 -0
- package/fixtures/S-Template/no-substitution/expect.json +2 -0
- package/fixtures/S-Template/no-substitution/input.ts +1 -0
- package/fixtures/S-Template/unfoldable-span/expect.json +16 -0
- package/fixtures/S-Template/unfoldable-span/input.ts +1 -0
- package/fixtures/S-Unary/not-and-negate/expect.json +1 -0
- package/fixtures/S-Unary/not-and-negate/input.ts +1 -0
- package/fixtures/S-Unclaimed/composite-step/expect.json +3 -0
- package/fixtures/S-Unclaimed/composite-step/input.ts +1 -0
- package/fixtures/S-Unwrap/as-and-parens/expect.json +1 -0
- package/fixtures/S-Unwrap/as-and-parens/input.ts +1 -0
- package/fixtures/UNCOVERED.md +37 -0
- package/package.json +35 -0
- package/spec/VERSION +1 -0
- package/spec/divergence.md +129 -0
- package/spec/grammar.md +277 -0
- package/spec/hosts.md +175 -0
- package/spec/judgments.md +1049 -0
- package/spec/rules.md +102 -0
- package/spec/values.md +247 -0
- package/src/adapter.ts +52 -0
- package/src/adapters/chant.ts +125 -0
- package/src/bundled.ts +27 -0
- package/src/chant-agreement.test.ts +67 -0
- package/src/corpus.test.ts +66 -0
- package/src/corpus.ts +540 -0
- package/src/fixture.ts +117 -0
- package/src/host.ts +105 -0
- package/src/index.ts +6 -0
- package/src/rules.test.ts +50 -0
- package/src/rules.ts +140 -0
- package/src/runner.test.ts +46 -0
- package/src/runner.ts +119 -0
- package/src/version.test.ts +31 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = [0 || "x", "" && 1, null ?? 0, 0 ?? 1, "" ?? "y", false || null, "a" && "b", undefined ?? null];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-Binary"
|
|
4
|
+
],
|
|
5
|
+
"export": "x",
|
|
6
|
+
"shape": "accept",
|
|
7
|
+
"fold": "fold",
|
|
8
|
+
"value": [
|
|
9
|
+
"12",
|
|
10
|
+
"34",
|
|
11
|
+
"33",
|
|
12
|
+
"123",
|
|
13
|
+
2,
|
|
14
|
+
1,
|
|
15
|
+
0.30000000000000004,
|
|
16
|
+
0.7999999999999999
|
|
17
|
+
],
|
|
18
|
+
"note": "+ dispatches on the operands after ToPrimitive: one string makes it concatenation, left to right, so 1 + 2 + \"3\" is \"33\" and \"1\" + 2 + 3 is \"123\"; booleans and null go through ToNumber. The two float results are the doubles ECMAScript produces, not what decimal arithmetic would (R10.1)."
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = [1 + "2", "3" + 4, 1 + 2 + "3", "1" + 2 + 3, true + 1, null + 1, 0.1 + 0.2, 0.1 + 0.7];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-Binary"
|
|
4
|
+
],
|
|
5
|
+
"export": "x",
|
|
6
|
+
"shape": "accept",
|
|
7
|
+
"fold": "fold",
|
|
8
|
+
"value": [
|
|
9
|
+
true,
|
|
10
|
+
true,
|
|
11
|
+
false,
|
|
12
|
+
true,
|
|
13
|
+
false,
|
|
14
|
+
true,
|
|
15
|
+
true
|
|
16
|
+
],
|
|
17
|
+
"note": "Relational operators compare two strings by code unit (\"10\" < \"9\") and coerce a string against a number (\"10\" < 9 is 10 < 9). Strict equality never coerces. All ECMAScript, and all easy to get wrong in a port that reaches for its host language's comparison."
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = ["b" > "a", "10" < "9", "10" < 9, "a" === "a", 1 === "1", "1" !== 1, 2 >= "2"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Eval-CallEager", "F-Host-Admission", "S-CallEager"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "app.ts": "fold" },
|
|
6
|
+
"exports": { "app.ts": { "n": 3 } },
|
|
7
|
+
"note": "An eager intrinsic is invoked now, with the folded arguments, and the result is the value. F-Host-Admission is what makes that sound: count is a pure function of its arguments, so invoking it at fold time is indistinguishable from invoking it during a run."
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallEager",
|
|
4
|
+
"F-Host-NoSubstitution"
|
|
5
|
+
],
|
|
6
|
+
"project": true,
|
|
7
|
+
"host": "shapes",
|
|
8
|
+
"verdicts": {
|
|
9
|
+
"local.ts": "run",
|
|
10
|
+
"app.ts": "run"
|
|
11
|
+
},
|
|
12
|
+
"rejectRule": {
|
|
13
|
+
"app.ts": "F-Eval-CallEager"
|
|
14
|
+
},
|
|
15
|
+
"note": "The registry names count as eager, but the binding the file imported is a project file's number, not the host's function. Revival invokes what the import names and never substitutes the host's own (F-Host-NoSubstitution), so the call rejects: the name alone admits nothing. local.ts would fold on its own; app.ts imports it and runs, so the forward edge (F-Succ) takes it along.",
|
|
16
|
+
"tentative": {
|
|
17
|
+
"local.ts": "fold"
|
|
18
|
+
},
|
|
19
|
+
"taintedBy": {
|
|
20
|
+
"local.ts": "app.ts"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const count = 3;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Eval-CallHelper", "S-CallHelper"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "app.ts": "fold" },
|
|
6
|
+
"exports": { "app.ts": { "v": "DONE" } },
|
|
7
|
+
"note": "A registered authoring helper: J1 yields a {__helper} envelope, revival invokes the function the file imported."
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallHelper",
|
|
4
|
+
"F-Div-Depth"
|
|
5
|
+
],
|
|
6
|
+
"project": true,
|
|
7
|
+
"host": "shapes",
|
|
8
|
+
"verdicts": {
|
|
9
|
+
"fn.ts": "run",
|
|
10
|
+
"app.ts": "run"
|
|
11
|
+
},
|
|
12
|
+
"rejectRule": {
|
|
13
|
+
"app.ts": "F-Eval-CallHelper"
|
|
14
|
+
},
|
|
15
|
+
"note": "A helper call inside a folded function body is refused, the same way a `new` and an intrinsic call are. fn.ts would fold on its own; app.ts imports it and runs, so the forward edge (F-Succ) takes it along.",
|
|
16
|
+
"tentative": {
|
|
17
|
+
"fn.ts": "fold"
|
|
18
|
+
},
|
|
19
|
+
"taintedBy": {
|
|
20
|
+
"fn.ts": "app.ts"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Eval-CallIntrinsic", "F-Host-Registry", "F-Host-Interface", "S-CallIntrinsic"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "app.ts": "fold" },
|
|
6
|
+
"exports": { "app.ts": { "r": { "Ref": "Bucket" } } },
|
|
7
|
+
"note": "An intrinsic registered with foldsAsCall: J1 yields an {__intrinsic} envelope and revival invokes the function the file imported. The registry entry is what admits the call form; the same name without the flag is F-Host-Registry's tag-called-as-function fixture."
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallIntrinsic",
|
|
4
|
+
"F-Div-Depth"
|
|
5
|
+
],
|
|
6
|
+
"project": true,
|
|
7
|
+
"host": "shapes",
|
|
8
|
+
"verdicts": {
|
|
9
|
+
"fn.ts": "run",
|
|
10
|
+
"app.ts": "run"
|
|
11
|
+
},
|
|
12
|
+
"rejectRule": {
|
|
13
|
+
"app.ts": "F-Eval-CallIntrinsic"
|
|
14
|
+
},
|
|
15
|
+
"note": "The call form is refused at depth > 0: an intrinsic reached through a project-local call would be an envelope the file's own declarators never produced. fn.ts would fold on its own; app.ts imports it and runs, so the forward edge (F-Succ) takes it along.",
|
|
16
|
+
"tentative": {
|
|
17
|
+
"fn.ts": "fold"
|
|
18
|
+
},
|
|
19
|
+
"taintedBy": {
|
|
20
|
+
"fn.ts": "app.ts"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Eval-CallLocal", "S-FnBody", "S-FnParams", "S-ExportFunction", "S-Call"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"verdicts": { "pure.ts": "fold", "app.ts": "fold" },
|
|
5
|
+
"exports": { "app.ts": { "x": { "doubled": 42 } } },
|
|
6
|
+
"note": "A call into a project file folds whenever the callee's body is in the subset (S-FnBody), with no allowlist: the argument folds in the caller's scope, the body in the defining module's, and the result is plain data."
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallLocal",
|
|
4
|
+
"S-FnBody"
|
|
5
|
+
],
|
|
6
|
+
"project": true,
|
|
7
|
+
"verdicts": {
|
|
8
|
+
"rec.ts": "fold",
|
|
9
|
+
"shallow.ts": "fold"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
"shallow.ts": {
|
|
13
|
+
"floor": 0
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"note": "A recursive project-local function, called three deep: the body folds in the defining module's scope, where its own name is bound, and the conditional takes only the taken branch. The bound on depth is F-Depth's, and a fixture for it waits on the spec deciding whether the number is normative."
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallLocal"
|
|
4
|
+
],
|
|
5
|
+
"project": true,
|
|
6
|
+
"verdicts": {
|
|
7
|
+
"pure.ts": "run",
|
|
8
|
+
"app.ts": "run"
|
|
9
|
+
},
|
|
10
|
+
"rejectRule": {
|
|
11
|
+
"app.ts": "F-Eval-CallLocal"
|
|
12
|
+
},
|
|
13
|
+
"note": "Step 3: a spread argument rejects. The callee is fine; the call is not. pure.ts would fold on its own; app.ts imports it and runs, so the forward edge (F-Succ) takes it along.",
|
|
14
|
+
"tentative": {
|
|
15
|
+
"pure.ts": "fold"
|
|
16
|
+
},
|
|
17
|
+
"taintedBy": {
|
|
18
|
+
"pure.ts": "app.ts"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallMethod",
|
|
4
|
+
"F-Div-Method",
|
|
5
|
+
"F-Div",
|
|
6
|
+
"F-Direction",
|
|
7
|
+
"S-CallMethod"
|
|
8
|
+
],
|
|
9
|
+
"export": "x",
|
|
10
|
+
"shape": "accept",
|
|
11
|
+
"fold": "run",
|
|
12
|
+
"note": "The receiver folds, but its `m` is not a function. Shape accepts (receiver and arguments are valid expressions; the method name is unconstrained); the folder rejects at the call. F-Direction: the divergence runs the permitted way.",
|
|
13
|
+
"rejectAt": {
|
|
14
|
+
"line": 1,
|
|
15
|
+
"column": 18
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = ({ m: 1 }).m();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-CallMethod"
|
|
4
|
+
],
|
|
5
|
+
"export": "x",
|
|
6
|
+
"shape": "accept",
|
|
7
|
+
"fold": "run",
|
|
8
|
+
"note": "A `.` method call on a receiver that folds to null: running it would throw, so the folder refuses rather than guess.",
|
|
9
|
+
"rejectAt": {
|
|
10
|
+
"line": 2,
|
|
11
|
+
"column": 18
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = "abc".toUpperCase();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-Template",
|
|
4
|
+
"F-Eval-Binary"
|
|
5
|
+
],
|
|
6
|
+
"export": "x",
|
|
7
|
+
"shape": "accept",
|
|
8
|
+
"fold": "fold",
|
|
9
|
+
"value": "0.30000000000000004|1e+21|0|0.3333333333333333|100|1.5e-7|9007199254740992|Infinity|123456789012345680000",
|
|
10
|
+
"note": "ToString of a Number is ECMAScript Number::toString: shortest round-trip digits, exponent form at and above 1e21, -0 prints as 0, an integer literal beyond 2^53 rounds to the nearest double before it is ever formatted. An evaluator in another language has to reproduce every one of these or the same file prints differently per platform (#81)."
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = `${0.1 + 0.2}|${1e21}|${-0}|${1 / 3}|${100}|${1.5e-7}|${9007199254740993}|${1 / 0}|${123456789012345680000}`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-Template"
|
|
4
|
+
],
|
|
5
|
+
"export": "x",
|
|
6
|
+
"shape": "accept",
|
|
7
|
+
"fold": "fold",
|
|
8
|
+
"value": "true|null|undefined|1,2||s",
|
|
9
|
+
"note": "ToString for the rest of the scalars and for an array, which joins on a comma with no brackets. An envelope in a span is refused instead (F-Div-TemplateEnvelope); a plain object would print as [object Object] and is deliberately not exercised here."
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = `${true}|${null}|${undefined}|${[1, 2]}|${[]}|${"s"}`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Eval-Unary"
|
|
4
|
+
],
|
|
5
|
+
"export": "x",
|
|
6
|
+
"shape": "accept",
|
|
7
|
+
"fold": "fold",
|
|
8
|
+
"value": [
|
|
9
|
+
true,
|
|
10
|
+
false,
|
|
11
|
+
false,
|
|
12
|
+
false,
|
|
13
|
+
-3,
|
|
14
|
+
-12,
|
|
15
|
+
-1,
|
|
16
|
+
0
|
|
17
|
+
],
|
|
18
|
+
"note": "! is ¬truthy: the empty string is falsy and \"0\" is truthy, every object and array is truthy. Unary minus is −ToNumber: a numeric string with surrounding whitespace parses, true is 1, null is 0, and -null is -0, which the comparison form writes as 0 (R10.1)."
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const x = [!"", !"0", ![], !{}, -"3", -" 12 ", -true, -null];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const u = undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Exc-Registry",
|
|
4
|
+
"F-Exc",
|
|
5
|
+
"S-CallIntrinsic"
|
|
6
|
+
],
|
|
7
|
+
"export": "r",
|
|
8
|
+
"shape": "reject",
|
|
9
|
+
"fold": "run",
|
|
10
|
+
"note": "The call form of an intrinsic is admitted by registration. With no registry the classifier rejects conservatively rather than guess, which is the exception F-Exc-Registry states to the shape-accepts direction; the folder, also without one, has no rule for the call and rejects too.",
|
|
11
|
+
"rejectAt": {
|
|
12
|
+
"line": 1,
|
|
13
|
+
"column": 18
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const r = ref("Bucket");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Host-Closed-vs-Open", "F-Eval-Reject"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "pure.ts": "fold", "open.ts": "fold", "closed.ts": "run" },
|
|
6
|
+
"exports": { "open.ts": { "v": "n1" } },
|
|
7
|
+
"rejectRule": { "closed.ts": "F-Eval-Reject" },
|
|
8
|
+
"note": "The asymmetry: a call into a project file folds whenever the body is in the subset, with no allowlist; a call into a package folds only through a registered name, and Bucket is registered as nothing but a constructor."
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Host-DataExports", "F-Import"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "app.ts": "fold" },
|
|
6
|
+
"exports": { "app.ts": { "s": 3 } },
|
|
7
|
+
"note": "A named import from an active package resolves to the package's real export, and a plain-data export folds as a value."
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Host-Registry", "F-Eval-Reject"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "app.ts": "run" },
|
|
6
|
+
"rejectRule": { "app.ts": "F-Eval-Reject" },
|
|
7
|
+
"note": "join is registered with isTag, and the three flags are mutually exclusive: the call form folds iff not a tag and foldsAsCall. Calling a tag as a function is admitted by no rule, and the flag is never inferred from the call's shape."
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Host-Trust", "F-Import", "F-Reference"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"verdicts": { "app.ts": "run" },
|
|
5
|
+
"note": "A bare specifier outside both trust arms is never resolved: the binding is absent and a reference to it is an unresolved identifier. Not an error in the import, an unresolved name at the use."
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Namespace", "F-Import", "F-Bind"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"verdicts": { "values.ts": "fold", "use.ts": "fold" },
|
|
5
|
+
"exports": { "use.ts": { "url": "localhost:8080" } },
|
|
6
|
+
"note": "A namespace import of a project file is a synthetic plain object of the target's namespace, so a member access on it indexes like any other object. Every entry here is a primitive, so nothing is captured and no edge exists."
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-NoExports", "F-Scan"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"verdicts": { "empty.ts": "run", "defaulted.ts": "run" },
|
|
5
|
+
"tentative": { "empty.ts": "run", "defaulted.ts": "run" },
|
|
6
|
+
"note": "Two ways to fail before any expression is reduced. empty.ts passes the statement gate and yields no declarator, so there is nothing to fold to; defaulted.ts is disqualified by the gate itself. Neither is folded to an empty namespace."
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default { port: 8080 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Prebuild", "F-Count"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"host": "shapes",
|
|
5
|
+
"verdicts": { "shared.ts": "fold" },
|
|
6
|
+
"exports": {
|
|
7
|
+
"shared.ts": {
|
|
8
|
+
"wrapper": {
|
|
9
|
+
"inner": { "entityType": "Bucket", "lexicon": "shapes", "props": { "name": "base" }, "attributes": {} },
|
|
10
|
+
"twice": [
|
|
11
|
+
{ "entityType": "Bucket", "lexicon": "shapes", "props": { "name": "base" }, "attributes": {} },
|
|
12
|
+
{ "entityType": "Bucket", "lexicon": "shapes", "props": { "name": "base" }, "attributes": {} }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"base": { "entityType": "Bucket", "lexicon": "shapes", "props": { "name": "base" }, "attributes": {} }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"note": "A non-exported same-file construction read as a value from an exported sibling, and re-exported by name. Under F-Eval-Ident step 1 without F-Prebuild every reference rejects; with it the file folds and every reference is the one instance F-Prebuild built. Found by the corpus cross-check (#25, #68): twelve chant examples fold this shape and the reference refused all of them."
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": [
|
|
3
|
+
"F-Profile",
|
|
4
|
+
"F-Profile-DataHost"
|
|
5
|
+
],
|
|
6
|
+
"project": true,
|
|
7
|
+
"profiles": [
|
|
8
|
+
"full",
|
|
9
|
+
"data-host"
|
|
10
|
+
],
|
|
11
|
+
"verdicts": {
|
|
12
|
+
"defaults.ts": "fold",
|
|
13
|
+
"service.ts": "fold"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
"service.ts": {
|
|
17
|
+
"service": {
|
|
18
|
+
"name": "svc-platform",
|
|
19
|
+
"labels": {
|
|
20
|
+
"team": "platform",
|
|
21
|
+
"tier": "gold",
|
|
22
|
+
"exposed": true
|
|
23
|
+
},
|
|
24
|
+
"ports": [
|
|
25
|
+
{
|
|
26
|
+
"containerPort": 8080,
|
|
27
|
+
"protocol": "TCP"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"containerPort": 8443,
|
|
31
|
+
"protocol": "TCP"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"replicas": 3
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"note": "The whole of what a data-host evaluator needs: literals, a shared const, a spread, a template, a conditional, a cross-file import, and a project-local function folded by interpretation. No host, no new, no run path, and the same answer whether folded or run in JavaScript."
|
|
39
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": ["F-Seed", "F-Verdict", "F-Call"],
|
|
3
|
+
"project": true,
|
|
4
|
+
"verdicts": { "app.ts": "run", "lone.ts": "fold" },
|
|
5
|
+
"tentative": { "app.ts": "run", "lone.ts": "fold" },
|
|
6
|
+
"exports": { "lone.ts": { "value": 1 } },
|
|
7
|
+
"note": "Seed(B) is exactly the files J2 refused. app.ts calls a local function whose body leaves S-FnBody, so it is in the seed on its own account, with no edge involved. lone.ts shares no edge and folds."
|
|
8
|
+
}
|