jspurefix 5.11.3 → 5.11.4

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.
Files changed (100) hide show
  1. package/.gitattributes +4 -0
  2. package/dist/buffer/index.d.ts +6 -0
  3. package/dist/buffer/index.js +6 -0
  4. package/dist/buffer/index.js.map +1 -1
  5. package/dist/collections/index.d.ts +1 -0
  6. package/dist/collections/index.js +16 -0
  7. package/dist/collections/index.js.map +1 -1
  8. package/dist/dictionary/contained/index.d.ts +3 -0
  9. package/dist/dictionary/contained/index.js +3 -0
  10. package/dist/dictionary/contained/index.js.map +1 -1
  11. package/dist/dictionary/index.d.ts +5 -0
  12. package/dist/dictionary/index.js +5 -0
  13. package/dist/dictionary/index.js.map +1 -1
  14. package/dist/generator/applicability.d.ts +3 -0
  15. package/dist/generator/applicability.js +48 -0
  16. package/dist/generator/applicability.js.map +1 -0
  17. package/dist/generator/case-builder.d.ts +34 -0
  18. package/dist/generator/case-builder.js +111 -0
  19. package/dist/generator/case-builder.js.map +1 -0
  20. package/dist/generator/corpus-store.d.ts +43 -0
  21. package/dist/generator/corpus-store.js +115 -0
  22. package/dist/generator/corpus-store.js.map +1 -0
  23. package/dist/generator/index.d.ts +12 -0
  24. package/dist/generator/index.js +29 -0
  25. package/dist/generator/index.js.map +1 -0
  26. package/dist/generator/instrument-universe.d.ts +54 -0
  27. package/dist/generator/instrument-universe.js +286 -0
  28. package/dist/generator/instrument-universe.js.map +1 -0
  29. package/dist/generator/layout.d.ts +46 -0
  30. package/dist/generator/layout.js +208 -0
  31. package/dist/generator/layout.js.map +1 -0
  32. package/dist/generator/market-context.d.ts +64 -0
  33. package/dist/generator/market-context.js +119 -0
  34. package/dist/generator/market-context.js.map +1 -0
  35. package/dist/generator/outcome.d.ts +16 -0
  36. package/dist/generator/outcome.js +71 -0
  37. package/dist/generator/outcome.js.map +1 -0
  38. package/dist/generator/realistic-generator.d.ts +53 -0
  39. package/dist/generator/realistic-generator.js +275 -0
  40. package/dist/generator/realistic-generator.js.map +1 -0
  41. package/dist/generator/rng.d.ts +12 -0
  42. package/dist/generator/rng.js +60 -0
  43. package/dist/generator/rng.js.map +1 -0
  44. package/dist/generator/scatter.d.ts +50 -0
  45. package/dist/generator/scatter.js +285 -0
  46. package/dist/generator/scatter.js.map +1 -0
  47. package/dist/generator/scenarios.d.ts +13 -0
  48. package/dist/generator/scenarios.js +139 -0
  49. package/dist/generator/scenarios.js.map +1 -0
  50. package/dist/generator/value-conventions.d.ts +15 -0
  51. package/dist/generator/value-conventions.js +217 -0
  52. package/dist/generator/value-conventions.js.map +1 -0
  53. package/dist/index.d.ts +6 -0
  54. package/dist/index.js +4 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/jsfix-cmd.d.ts +5 -0
  57. package/dist/jsfix-cmd.js +161 -0
  58. package/dist/jsfix-cmd.js.map +1 -1
  59. package/dist/store/fix-msg-ascii-store-resend.js +2 -2
  60. package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
  61. package/dist/store/fix-msg-store-record.d.ts +1 -1
  62. package/dist/store/fix-msg-store-record.js.map +1 -1
  63. package/dist/store/index.d.ts +1 -0
  64. package/dist/store/index.js +1 -0
  65. package/dist/store/index.js.map +1 -1
  66. package/dist/transport/index.d.ts +7 -0
  67. package/dist/transport/index.js +7 -0
  68. package/dist/transport/index.js.map +1 -1
  69. package/dist/transport/session/index.d.ts +1 -0
  70. package/dist/transport/session/index.js +1 -0
  71. package/dist/transport/session/index.js.map +1 -1
  72. package/docs/generated-cases.md +237 -0
  73. package/docs/scattered-components.md +60 -5
  74. package/jsfix.test_client.txt +62 -62
  75. package/jsfix.test_server.txt +72 -72
  76. package/package.json +5 -2
  77. package/src/buffer/index.ts +6 -0
  78. package/src/collections/index.ts +1 -1
  79. package/src/dictionary/contained/index.ts +3 -0
  80. package/src/dictionary/index.ts +5 -0
  81. package/src/generator/applicability.ts +87 -0
  82. package/src/generator/case-builder.ts +167 -0
  83. package/src/generator/corpus-store.ts +166 -0
  84. package/src/generator/index.ts +12 -0
  85. package/src/generator/instrument-universe.ts +347 -0
  86. package/src/generator/layout.ts +279 -0
  87. package/src/generator/market-context.ts +207 -0
  88. package/src/generator/outcome.ts +102 -0
  89. package/src/generator/realistic-generator.ts +404 -0
  90. package/src/generator/rng.ts +92 -0
  91. package/src/generator/scatter.ts +432 -0
  92. package/src/generator/scenarios.ts +167 -0
  93. package/src/generator/value-conventions.ts +295 -0
  94. package/src/index.ts +12 -0
  95. package/src/jsfix-cmd.ts +204 -0
  96. package/src/store/fix-msg-ascii-store-resend.ts +2 -1
  97. package/src/store/fix-msg-store-record.ts +4 -1
  98. package/src/store/index.ts +1 -0
  99. package/src/transport/index.ts +10 -0
  100. package/src/transport/session/index.ts +1 -0
package/.gitattributes CHANGED
@@ -2,3 +2,7 @@
2
2
  # letting eol normalisation rewrite them on checkout.
3
3
  *.crt -text
4
4
  *.key -text
5
+
6
+ # scattered component corpus - the whole point of an entry is that its bytes do not
7
+ # change, so keep them identical on every platform.
8
+ data/corpus/**/*.txt -text
@@ -9,3 +9,9 @@ export * from './segment/segment-summary';
9
9
  export * from './structure';
10
10
  export * from './tag/tag-pos';
11
11
  export * from './tag/tags';
12
+ export * from './segment/segment-view';
13
+ export * from './segment/segment-type';
14
+ export * from './tag/tag-type';
15
+ export * from './ascii/ascii-parser';
16
+ export * from './ascii/ascii-parser-state';
17
+ export * from './ascii/parse-state';
@@ -25,4 +25,10 @@ __exportStar(require("./segment/segment-summary"), exports);
25
25
  __exportStar(require("./structure"), exports);
26
26
  __exportStar(require("./tag/tag-pos"), exports);
27
27
  __exportStar(require("./tag/tags"), exports);
28
+ __exportStar(require("./segment/segment-view"), exports);
29
+ __exportStar(require("./segment/segment-type"), exports);
30
+ __exportStar(require("./tag/tag-type"), exports);
31
+ __exportStar(require("./ascii/ascii-parser"), exports);
32
+ __exportStar(require("./ascii/ascii-parser-state"), exports);
33
+ __exportStar(require("./ascii/parse-state"), exports);
28
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/buffer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,iDAA8B;AAC9B,kDAA+B;AAC/B,gDAA6B;AAC7B,+CAA4B;AAC5B,6CAA0B;AAC1B,gEAA6C;AAC7C,4DAAyC;AACzC,8CAA2B;AAC3B,gDAA6B;AAC7B,6CAA0B","sourcesContent":["export * from './elastic-buffer'\nexport * from './encode-proxy'\nexport * from './encoder-state'\nexport * from './msg-encoder'\nexport * from './msg-parser'\nexport * from './msg-view'\nexport * from './segment/segment-description'\nexport * from './segment/segment-summary'\nexport * from './structure'\nexport * from './tag/tag-pos'\nexport * from './tag/tags'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/buffer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,iDAA8B;AAC9B,kDAA+B;AAC/B,gDAA6B;AAC7B,+CAA4B;AAC5B,6CAA0B;AAC1B,gEAA6C;AAC7C,4DAAyC;AACzC,8CAA2B;AAC3B,gDAA6B;AAC7B,6CAA0B;AAC1B,yDAAsC;AACtC,yDAAsC;AACtC,iDAA8B;AAC9B,uDAAoC;AACpC,6DAA0C;AAC1C,sDAAmC","sourcesContent":["export * from './elastic-buffer'\nexport * from './encode-proxy'\nexport * from './encoder-state'\nexport * from './msg-encoder'\nexport * from './msg-parser'\nexport * from './msg-view'\nexport * from './segment/segment-description'\nexport * from './segment/segment-summary'\nexport * from './structure'\nexport * from './tag/tag-pos'\nexport * from './tag/tags'\nexport * from './segment/segment-view'\nexport * from './segment/segment-type'\nexport * from './tag/tag-type'\nexport * from './ascii/ascii-parser'\nexport * from './ascii/ascii-parser-state'\nexport * from './ascii/parse-state'\n"]}
@@ -0,0 +1 @@
1
+ export * from './collection';
@@ -1,2 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./collection"), exports);
2
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collections/index.ts"],"names":[],"mappings":"","sourcesContent":["\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B","sourcesContent":["export * from './collection'\n"]}
@@ -9,3 +9,6 @@ export * from './contained-group-field';
9
9
  export * from './contained-simple-field';
10
10
  export * from './fields-dispatch';
11
11
  export * from './contained-set-builder';
12
+ export * from './contained-field-set';
13
+ export * from './contained-field-dispatcher';
14
+ export * from './field-dispatcher';
@@ -25,4 +25,7 @@ __exportStar(require("./contained-group-field"), exports);
25
25
  __exportStar(require("./contained-simple-field"), exports);
26
26
  __exportStar(require("./fields-dispatch"), exports);
27
27
  __exportStar(require("./contained-set-builder"), exports);
28
+ __exportStar(require("./contained-field-set"), exports);
29
+ __exportStar(require("./contained-field-dispatcher"), exports);
30
+ __exportStar(require("./field-dispatcher"), exports);
28
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dictionary/contained/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C;AAC3C,yDAAsC;AACtC,oDAAiC;AACjC,6DAA0C;AAC1C,oDAAiC;AACjC,kDAA+B;AAC/B,0DAAuC;AACvC,0DAAuC;AACvC,2DAAwC;AACxC,oDAAiC;AACjC,0DAAuC","sourcesContent":["export * from './contained-component-field'\nexport * from './contained-field-type'\nexport * from './contained-field'\nexport * from './contained-field-dispatch'\nexport * from './fields-dispatch'\nexport * from './contained-set'\nexport * from './contained-set-builder'\nexport * from './contained-group-field'\nexport * from './contained-simple-field'\nexport * from './fields-dispatch'\nexport * from './contained-set-builder'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dictionary/contained/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C;AAC3C,yDAAsC;AACtC,oDAAiC;AACjC,6DAA0C;AAC1C,oDAAiC;AACjC,kDAA+B;AAC/B,0DAAuC;AACvC,0DAAuC;AACvC,2DAAwC;AACxC,oDAAiC;AACjC,0DAAuC;AACvC,wDAAqC;AACrC,+DAA4C;AAC5C,qDAAkC","sourcesContent":["export * from './contained-component-field'\nexport * from './contained-field-type'\nexport * from './contained-field'\nexport * from './contained-field-dispatch'\nexport * from './fields-dispatch'\nexport * from './contained-set'\nexport * from './contained-set-builder'\nexport * from './contained-group-field'\nexport * from './contained-simple-field'\nexport * from './fields-dispatch'\nexport * from './contained-set-builder'\nexport * from './contained-field-set'\nexport * from './contained-field-dispatcher'\nexport * from './field-dispatcher'\n"]}
@@ -5,3 +5,8 @@ export * from './fix-parser';
5
5
  export * from './fix-versions';
6
6
  export * from './fragment-safety';
7
7
  export * from './set-reduce';
8
+ export * from './definition';
9
+ export * from './contained';
10
+ export * from './type-dispatcher';
11
+ export * from './contained-set-type';
12
+ export * from './fix-definition-source';
@@ -21,4 +21,9 @@ __exportStar(require("./fix-parser"), exports);
21
21
  __exportStar(require("./fix-versions"), exports);
22
22
  __exportStar(require("./fragment-safety"), exports);
23
23
  __exportStar(require("./set-reduce"), exports);
24
+ __exportStar(require("./definition"), exports);
25
+ __exportStar(require("./contained"), exports);
26
+ __exportStar(require("./type-dispatcher"), exports);
27
+ __exportStar(require("./contained-set-type"), exports);
28
+ __exportStar(require("./fix-definition-source"), exports);
24
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dictionary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,+CAA4B;AAC5B,8DAA2C;AAC3C,+CAA4B;AAC5B,iDAA8B;AAC9B,oDAAiC;AACjC,+CAA4B","sourcesContent":["export * from './dict-primitive'\nexport * from './field-enum'\nexport * from './contained/fields-dispatch'\nexport * from './fix-parser'\nexport * from './fix-versions'\nexport * from './fragment-safety'\nexport * from './set-reduce'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dictionary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,+CAA4B;AAC5B,8DAA2C;AAC3C,+CAA4B;AAC5B,iDAA8B;AAC9B,oDAAiC;AACjC,+CAA4B;AAC5B,+CAA4B;AAC5B,8CAA2B;AAC3B,oDAAiC;AACjC,uDAAoC;AACpC,0DAAuC","sourcesContent":["export * from './dict-primitive'\nexport * from './field-enum'\nexport * from './contained/fields-dispatch'\nexport * from './fix-parser'\nexport * from './fix-versions'\nexport * from './fragment-safety'\nexport * from './set-reduce'\nexport * from './definition'\nexport * from './contained'\nexport * from './type-dispatcher'\nexport * from './contained-set-type'\nexport * from './fix-definition-source'\n"]}
@@ -0,0 +1,3 @@
1
+ import { AssetClass } from './instrument-universe';
2
+ export declare function fieldApplies(name: string, assetClass: AssetClass): boolean;
3
+ export declare function setApplies(name: string, assetClass: AssetClass): boolean;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fieldApplies = fieldApplies;
4
+ exports.setApplies = setApplies;
5
+ const instrument_universe_1 = require("./instrument-universe");
6
+ const bond = [instrument_universe_1.AssetClass.Bond];
7
+ const option = [instrument_universe_1.AssetClass.Option];
8
+ const listed = [instrument_universe_1.AssetClass.Future, instrument_universe_1.AssetClass.Option, instrument_universe_1.AssetClass.Spread];
9
+ const multileg = [instrument_universe_1.AssetClass.Spread];
10
+ const fieldRestrictions = [
11
+ {
12
+ test: /Coupon|Repurchase|RepoCollateral|Redemption|CreditRating|Issuer|IssueDate|DatedDate|InterestAccrual|AccruedInterest|NumDaysInterest|Factor$|Pool$|InstrRegistry|CountryOfIssue|StateOrProvinceOfIssue|LocaleOfIssue|CPProgram|CPRegType|MarginRatio|TerminationType|DeliveryForm|(Start|End)Cash$/,
13
+ classes: bond
14
+ },
15
+ {
16
+ test: /Yield|BenchmarkCurve|BenchmarkPrice|BenchmarkSecurity|Stipulation|Concession|TotalTakedown/,
17
+ classes: bond
18
+ },
19
+ {
20
+ test: /StrikePrice$|StrikeCurrency$|StrikeMultiplier$|StrikeValue$|PutOrCall$|OptAttribute$|ExerciseStyle$/,
21
+ classes: option
22
+ },
23
+ {
24
+ test: /MaturityMonthYear$|MaturityDate$|MaturityDay$|ContractMultiplier$|ContractSettlMonth$/,
25
+ classes: listed
26
+ }
27
+ ];
28
+ const setRestrictions = [
29
+ { test: /^(YieldData|SpreadOrBenchmarkCurveData|FinancingDetails)$/, classes: bond },
30
+ { test: /Stipulations|Stips/, classes: bond },
31
+ { test: /Leg(s|Grp|$|[A-Z])|InstrmtLeg/, classes: multileg },
32
+ { test: /Und(erlying|Instrmt)/, classes: [instrument_universe_1.AssetClass.Spread, instrument_universe_1.AssetClass.Option] }
33
+ ];
34
+ function applies(restrictions, name, assetClass) {
35
+ for (const r of restrictions) {
36
+ if (r.test.test(name)) {
37
+ return r.classes.includes(assetClass);
38
+ }
39
+ }
40
+ return true;
41
+ }
42
+ function fieldApplies(name, assetClass) {
43
+ return applies(fieldRestrictions, name, assetClass);
44
+ }
45
+ function setApplies(name, assetClass) {
46
+ return applies(setRestrictions, name, assetClass);
47
+ }
48
+ //# sourceMappingURL=applicability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../src/generator/applicability.ts"],"names":[],"mappings":";;AA6EA,oCAEC;AAKD,gCAEC;AAtFD,+DAAkD;AAwBlD,MAAM,IAAI,GAAG,CAAC,gCAAU,CAAC,IAAI,CAAC,CAAA;AAC9B,MAAM,MAAM,GAAG,CAAC,gCAAU,CAAC,MAAM,CAAC,CAAA;AAClC,MAAM,MAAM,GAAG,CAAC,gCAAU,CAAC,MAAM,EAAE,gCAAU,CAAC,MAAM,EAAE,gCAAU,CAAC,MAAM,CAAC,CAAA;AACxE,MAAM,QAAQ,GAAG,CAAC,gCAAU,CAAC,MAAM,CAAC,CAAA;AAOpC,MAAM,iBAAiB,GAA4B;IACjD;QAGE,IAAI,EAAE,mSAAmS;QACzS,OAAO,EAAE,IAAI;KACd;IACD;QAEE,IAAI,EAAE,4FAA4F;QAClG,OAAO,EAAE,IAAI;KACd;IACD;QACE,IAAI,EAAE,qGAAqG;QAC3G,OAAO,EAAE,MAAM;KAChB;IACD;QAEE,IAAI,EAAE,uFAAuF;QAC7F,OAAO,EAAE,MAAM;KAChB;CACF,CAAA;AAED,MAAM,eAAe,GAA4B;IAC/C,EAAE,IAAI,EAAE,2DAA2D,EAAE,OAAO,EAAE,IAAI,EAAE;IACpF,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE;IAE7C,EAAE,IAAI,EAAE,+BAA+B,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC5D,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,CAAC,gCAAU,CAAC,MAAM,EAAE,gCAAU,CAAC,MAAM,CAAC,EAAE;CAClF,CAAA;AAED,SAAS,OAAO,CAAE,YAAqC,EAAE,IAAY,EAAE,UAAsB;IAC3F,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;QAC7B,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;QACvC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAKD,SAAgB,YAAY,CAAE,IAAY,EAAE,UAAsB;IAChE,OAAO,OAAO,CAAC,iBAAiB,EAAE,IAAI,EAAE,UAAU,CAAC,CAAA;AACrD,CAAC;AAKD,SAAgB,UAAU,CAAE,IAAY,EAAE,UAAsB;IAC9D,OAAO,OAAO,CAAC,eAAe,EAAE,IAAI,EAAE,UAAU,CAAC,CAAA;AACnD,CAAC","sourcesContent":["import { AssetClass } from './instrument-universe'\n\n/**\n * Which optional fields belong on which kind of instrument.\n *\n * FIX puts every asset class through one `Instrument` component, so the dictionary is\n * perfectly happy for a Brent future to carry a repurchase rate, a credit rating and a\n * coupon payment date. Nothing rejects it and nothing in the engine cares - but it is\n * the single loudest tell that a message was generated rather than captured, and it\n * makes a fixture harder to read than a dense one, because the eye keeps stopping on\n * fields that should not be there.\n *\n * The gate is written over field *names* rather than tags, and that is the whole trick.\n * FIX mirrors the instrument block for legs and underlyings by prefixing it -\n * `CouponRate`, `LegCouponRate`, `UnderlyingCouponRate` - so one pattern covers all\n * three, and covers the same field in a dictionary that renumbered it. A tag list would\n * have to be recited three times and would still miss whatever the next version adds.\n *\n * The gate is advisory. A field the dictionary marks required is emitted whatever this\n * says, and so is anything the caller has explicitly asked for - a house dialect is\n * entitled to put a coupon on a future, and refusing to generate that would be worse\n * than generating it by accident.\n */\n\nconst bond = [AssetClass.Bond]\nconst option = [AssetClass.Option]\nconst listed = [AssetClass.Future, AssetClass.Option, AssetClass.Spread]\nconst multileg = [AssetClass.Spread]\n\ninterface IRestriction {\n readonly test: RegExp\n readonly classes: readonly AssetClass[]\n}\n\nconst fieldRestrictions: readonly IRestriction[] = [\n {\n // coupon, issuance, redemption, rating and registry - the fixed income half of the\n // instrument block, plus its repo and financing neighbours\n test: /Coupon|Repurchase|RepoCollateral|Redemption|CreditRating|Issuer|IssueDate|DatedDate|InterestAccrual|AccruedInterest|NumDaysInterest|Factor$|Pool$|InstrRegistry|CountryOfIssue|StateOrProvinceOfIssue|LocaleOfIssue|CPProgram|CPRegType|MarginRatio|TerminationType|DeliveryForm|(Start|End)Cash$/,\n classes: bond\n },\n {\n // yield, benchmark spread, stipulations and the new issue economics\n test: /Yield|BenchmarkCurve|BenchmarkPrice|BenchmarkSecurity|Stipulation|Concession|TotalTakedown/,\n classes: bond\n },\n {\n test: /StrikePrice$|StrikeCurrency$|StrikeMultiplier$|StrikeValue$|PutOrCall$|OptAttribute$|ExerciseStyle$/,\n classes: option\n },\n {\n // a listed contract has an expiry and a multiplier; cash equity and spot FX do not\n test: /MaturityMonthYear$|MaturityDate$|MaturityDay$|ContractMultiplier$|ContractSettlMonth$/,\n classes: listed\n }\n]\n\nconst setRestrictions: readonly IRestriction[] = [\n { test: /^(YieldData|SpreadOrBenchmarkCurveData|FinancingDetails)$/, classes: bond },\n { test: /Stipulations|Stips/, classes: bond },\n // legs describe a strategy, so they belong to an instrument that has one\n { test: /Leg(s|Grp|$|[A-Z])|InstrmtLeg/, classes: multileg },\n { test: /Und(erlying|Instrmt)/, classes: [AssetClass.Spread, AssetClass.Option] }\n]\n\nfunction applies (restrictions: readonly IRestriction[], name: string, assetClass: AssetClass): boolean {\n for (const r of restrictions) {\n if (r.test.test(name)) {\n return r.classes.includes(assetClass)\n }\n }\n return true\n}\n\n/**\n * whether an optional field of this name is plausible on this kind of instrument\n */\nexport function fieldApplies (name: string, assetClass: AssetClass): boolean {\n return applies(fieldRestrictions, name, assetClass)\n}\n\n/**\n * whether an optional component or group of this name is plausible here\n */\nexport function setApplies (name: string, assetClass: AssetClass): boolean {\n return applies(setRestrictions, name, assetClass)\n}\n"]}
@@ -0,0 +1,34 @@
1
+ import { ILooseObject } from '../collections/collection';
2
+ import { FixDefinitions } from '../dictionary/definition';
3
+ import { IFragmentSafetyFinding } from '../dictionary/fragment-safety';
4
+ import { IScatterPlan } from './scatter';
5
+ import { IGeneratorOptions } from './realistic-generator';
6
+ export interface ICaseOptions {
7
+ readonly scenario?: string;
8
+ readonly msgType?: string;
9
+ readonly seed?: number;
10
+ readonly depth?: number;
11
+ readonly fragments?: number;
12
+ readonly delimiter: string;
13
+ readonly generator?: IGeneratorOptions;
14
+ }
15
+ export interface IGeneratedCase {
16
+ readonly name: string;
17
+ readonly msgType: string;
18
+ readonly seed: number;
19
+ readonly object: ILooseObject;
20
+ readonly canonical: string;
21
+ readonly scattered: string;
22
+ readonly plan: IScatterPlan;
23
+ readonly requestedDepth: number;
24
+ readonly safety: readonly IFragmentSafetyFinding[];
25
+ }
26
+ export type Encode = (msgType: string, object: ILooseObject) => string;
27
+ export declare class CaseBuilder {
28
+ readonly definitions: FixDefinitions;
29
+ readonly encode: Encode;
30
+ constructor(definitions: FixDefinitions, encode: Encode);
31
+ build(options: ICaseOptions): IGeneratedCase;
32
+ private safetyOf;
33
+ }
34
+ export declare function describeCase(c: IGeneratedCase, delimiter: string): string;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CaseBuilder = void 0;
4
+ exports.describeCase = describeCase;
5
+ const fragment_safety_1 = require("../dictionary/fragment-safety");
6
+ const layout_1 = require("./layout");
7
+ const scatter_1 = require("./scatter");
8
+ const realistic_generator_1 = require("./realistic-generator");
9
+ const rng_1 = require("./rng");
10
+ const scenarios_1 = require("./scenarios");
11
+ class CaseBuilder {
12
+ constructor(definitions, encode) {
13
+ this.definitions = definitions;
14
+ this.encode = encode;
15
+ }
16
+ build(options) {
17
+ var _a, _b, _c, _d, _e, _f, _g, _h;
18
+ const seed = (_a = options.seed) !== null && _a !== void 0 ? _a : 0x5eed;
19
+ const scenario = options.scenario ? scenarios_1.Scenarios.get(options.scenario) : undefined;
20
+ if (options.scenario && !scenario) {
21
+ throw new Error(`no scenario named ${options.scenario} - try one of ${scenarios_1.Scenarios.names().join(', ')}`);
22
+ }
23
+ const msgType = (_b = options.msgType) !== null && _b !== void 0 ? _b : scenario === null || scenario === void 0 ? void 0 : scenario.msgType;
24
+ if (!msgType) {
25
+ throw new Error('a case needs either a scenario or a message type');
26
+ }
27
+ const generatorOptions = Object.assign(Object.assign(Object.assign({}, ((_c = scenario === null || scenario === void 0 ? void 0 : scenario.options) !== null && _c !== void 0 ? _c : {})), ((_d = options.generator) !== null && _d !== void 0 ? _d : {})), { seed });
28
+ const generator = new realistic_generator_1.RealisticGenerator(this.definitions, generatorOptions);
29
+ const message = generator.generate(msgType);
30
+ const canonical = this.encode(message.msgType, message.object);
31
+ const depth = (_e = options.depth) !== null && _e !== void 0 ? _e : 0;
32
+ if (depth <= 0) {
33
+ return {
34
+ name: (_f = scenario === null || scenario === void 0 ? void 0 : scenario.name) !== null && _f !== void 0 ? _f : message.name,
35
+ msgType: message.msgType,
36
+ seed,
37
+ object: message.object,
38
+ canonical,
39
+ scattered: canonical,
40
+ plan: { depth: 0, sites: [] },
41
+ requestedDepth: 0,
42
+ safety: []
43
+ };
44
+ }
45
+ const layout = layout_1.Layout.build(canonical, options.delimiter, message.object, message.definition);
46
+ const scatterer = new scatter_1.Scatterer(layout, new rng_1.Rng(seed ^ 0x9e37), (_g = options.fragments) !== null && _g !== void 0 ? _g : 2);
47
+ const result = scatterer.scatter(depth, options.delimiter);
48
+ return {
49
+ name: (_h = scenario === null || scenario === void 0 ? void 0 : scenario.name) !== null && _h !== void 0 ? _h : message.name,
50
+ msgType: message.msgType,
51
+ seed,
52
+ object: message.object,
53
+ canonical,
54
+ scattered: result.wire,
55
+ plan: result.plan,
56
+ requestedDepth: depth,
57
+ safety: this.safetyOf(result.plan)
58
+ };
59
+ }
60
+ safetyOf(plan) {
61
+ var _a;
62
+ const out = [];
63
+ for (const site of plan.sites) {
64
+ const leaf = (_a = site.component.split('.').pop()) !== null && _a !== void 0 ? _a : '';
65
+ const name = leaf.replace(/\[[0-9]+\]$/, '');
66
+ const set = this.definitions.component.get(name);
67
+ if (!set)
68
+ continue;
69
+ for (const f of fragment_safety_1.FragmentSafety.analyseSet(set, site.component)) {
70
+ out.push(f);
71
+ }
72
+ }
73
+ return out;
74
+ }
75
+ }
76
+ exports.CaseBuilder = CaseBuilder;
77
+ function describeCase(c, delimiter) {
78
+ const lines = [];
79
+ lines.push(`scenario ${c.name}`);
80
+ lines.push(`msgType ${c.msgType}`);
81
+ lines.push(`seed ${c.seed}`);
82
+ if (c.requestedDepth > 0) {
83
+ const short = c.plan.depth < c.requestedDepth
84
+ ? ` (asked for ${c.requestedDepth}; the message could not express more)`
85
+ : '';
86
+ lines.push(`doll depth ${c.plan.depth}${short}`);
87
+ for (const site of c.plan.sites) {
88
+ lines.push(` ${site.component} (${site.containment})`);
89
+ lines.push(` level ${site.level} (structure depth ${site.structureDepth})`);
90
+ lines.push(` runs ${site.fragments}`);
91
+ lines.push(` tags ${site.tags.join(' ')}`);
92
+ if (site.contendedTags.length > 0) {
93
+ lines.push(` contended ${site.contendedTags.join(' ')} - also claimed by a sibling of this component`);
94
+ }
95
+ }
96
+ if (c.safety.length > 0) {
97
+ lines.push(' fragment safety');
98
+ for (const f of c.safety) {
99
+ lines.push(` ${(0, fragment_safety_1.describeFinding)(f)}`);
100
+ }
101
+ }
102
+ }
103
+ else {
104
+ lines.push('doll depth 0 (canonical, nothing moved)');
105
+ }
106
+ const before = (0, layout_1.tokenise)(c.canonical, delimiter).length;
107
+ const after = (0, layout_1.tokenise)(c.scattered, delimiter).length;
108
+ lines.push(`tokens ${before} canonical, ${after} scattered`);
109
+ return lines.join('\n');
110
+ }
111
+ //# sourceMappingURL=case-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"case-builder.js","sourceRoot":"","sources":["../../src/generator/case-builder.ts"],"names":[],"mappings":";;;AAsIA,oCAgCC;AApKD,mEAAuG;AACvG,qCAA2C;A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AS,CAAC,CAAC,MAAM,CAAA;IACtD,MAAM,KAAK,GAAG,IAAA,iBAAQ,EAAC,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,CAAA;IACrD,KAAK,CAAC,IAAI,CAAC,cAAc,MAAM,eAAe,KAAK,YAAY,CAAC,CAAA;IAChE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC","sourcesContent":["import { ILooseObject } from '../collections/collection'\nimport { FixDefinitions } from '../dictionary/definition'\nimport { FragmentSafety, IFragmentSafetyFinding, describeFinding } from '../dictionary/fragment-safety'\nimport { Layout, tokenise } from './layout'\nimport { IScatterPlan, Scatterer } from './scatter'\nimport { IGeneratorOptions, RealisticGenerator } from './realistic-generator'\nimport { Rng } from './rng'\nimport { Scenarios } from './scenarios'\n\n/**\n * One test case: a message, the canonical encoding of it, and a legal re-ordering of the\n * same bytes with one or more components taken apart.\n *\n * The canonical encoding is the oracle. It is contiguous by construction, because the\n * encoder emits in dictionary order, so today's parser handles it and the object it\n * produces is by definition the right answer. The scattered variant is a permutation of\n * the same body tokens, so it says exactly the same thing - and any difference in what\n * the parser makes of it is a defect, with no hand written expectation to be wrong about.\n *\n * A case also carries the fragment safety findings for the component it took apart. If\n * two children of a set both claim a tag then no repair can attribute it by tag alone,\n * and a case built over that shape is unfair rather than failing - see phase 0 of\n * `docs/scattered-components.md`, and the 57 collisions in the QuickFIX FIX50SP2\n * dictionary that motivated recording it.\n */\n\nexport interface ICaseOptions {\n /** a named scenario, or a message type with generator options of your own */\n readonly scenario?: string\n readonly msgType?: string\n readonly seed?: number\n /** how many nested scatter sites to ask for; 0 leaves the message canonical */\n readonly depth?: number\n /** how many runs to break each scattered component into */\n readonly fragments?: number\n readonly delimiter: string\n readonly generator?: IGeneratorOptions\n}\n\nexport interface IGeneratedCase {\n readonly name: string\n readonly msgType: string\n readonly seed: number\n readonly object: ILooseObject\n readonly canonical: string\n readonly scattered: string\n readonly plan: IScatterPlan\n /** what was asked for, which may exceed what the message could express */\n readonly requestedDepth: number\n readonly safety: readonly IFragmentSafetyFinding[]\n}\n\nexport type Encode = (msgType: string, object: ILooseObject) => string\n\nexport class CaseBuilder {\n constructor (\n public readonly definitions: FixDefinitions,\n public readonly encode: Encode) {\n }\n\n public build (options: ICaseOptions): IGeneratedCase {\n const seed = options.seed ?? 0x5eed\n const scenario = options.scenario ? Scenarios.get(options.scenario) : undefined\n if (options.scenario && !scenario) {\n throw new Error(`no scenario named ${options.scenario} - try one of ${Scenarios.names().join(', ')}`)\n }\n const msgType = options.msgType ?? scenario?.msgType\n if (!msgType) {\n throw new Error('a case needs either a scenario or a message type')\n }\n const generatorOptions: IGeneratorOptions = {\n ...(scenario?.options ?? {}),\n ...(options.generator ?? {}),\n seed\n }\n const generator = new RealisticGenerator(this.definitions, generatorOptions)\n const message = generator.generate(msgType)\n const canonical = this.encode(message.msgType, message.object)\n\n const depth = options.depth ?? 0\n if (depth <= 0) {\n return {\n name: scenario?.name ?? message.name,\n msgType: message.msgType,\n seed,\n object: message.object,\n canonical,\n scattered: canonical,\n plan: { depth: 0, sites: [] },\n requestedDepth: 0,\n safety: []\n }\n }\n\n const layout = Layout.build(canonical, options.delimiter, message.object, message.definition)\n const scatterer = new Scatterer(layout, new Rng(seed ^ 0x9e37), options.fragments ?? 2)\n const result = scatterer.scatter(depth, options.delimiter)\n return {\n name: scenario?.name ?? message.name,\n msgType: message.msgType,\n seed,\n object: message.object,\n canonical,\n scattered: result.wire,\n plan: result.plan,\n requestedDepth: depth,\n safety: this.safetyOf(result.plan)\n }\n }\n\n /**\n * findings for the sets the plan actually touched, rather than for the whole\n * dictionary - a collision three components away is not this case's problem\n */\n private safetyOf (plan: IScatterPlan): IFragmentSafetyFinding[] {\n const out: IFragmentSafetyFinding[] = []\n for (const site of plan.sites) {\n const leaf = site.component.split('.').pop() ?? ''\n const name = leaf.replace(/\\[[0-9]+\\]$/, '')\n const set = this.definitions.component.get(name)\n if (!set) continue\n for (const f of FragmentSafety.analyseSet(set, site.component)) {\n out.push(f)\n }\n }\n return out\n }\n}\n\n/**\n * A human readable account of what was done to a message, for the header of a fixture\n * file. A scattered message is hard to read precisely because it is scattered, so\n * something has to say which tags moved and where they went.\n */\nexport function describeCase (c: IGeneratedCase, delimiter: string): string {\n const lines: string[] = []\n lines.push(`scenario ${c.name}`)\n lines.push(`msgType ${c.msgType}`)\n lines.push(`seed ${c.seed}`)\n if (c.requestedDepth > 0) {\n const short = c.plan.depth < c.requestedDepth\n ? ` (asked for ${c.requestedDepth}; the message could not express more)`\n : ''\n lines.push(`doll depth ${c.plan.depth}${short}`)\n for (const site of c.plan.sites) {\n lines.push(` ${site.component} (${site.containment})`)\n lines.push(` level ${site.level} (structure depth ${site.structureDepth})`)\n lines.push(` runs ${site.fragments}`)\n lines.push(` tags ${site.tags.join(' ')}`)\n if (site.contendedTags.length > 0) {\n lines.push(` contended ${site.contendedTags.join(' ')} - also claimed by a sibling of this component`)\n }\n }\n if (c.safety.length > 0) {\n lines.push(' fragment safety')\n for (const f of c.safety) {\n lines.push(` ${describeFinding(f)}`)\n }\n }\n } else {\n lines.push('doll depth 0 (canonical, nothing moved)')\n }\n const before = tokenise(c.canonical, delimiter).length\n const after = tokenise(c.scattered, delimiter).length\n lines.push(`tokens ${before} canonical, ${after} scattered`)\n return lines.join('\\n')\n}\n"]}
@@ -0,0 +1,43 @@
1
+ import { IScatterPlan } from './scatter';
2
+ import { CaseOutcome } from './outcome';
3
+ import { IGeneratedCase } from './case-builder';
4
+ export interface ICorpusEntry {
5
+ readonly name: string;
6
+ readonly note: string;
7
+ readonly dictionary: string;
8
+ readonly session: string;
9
+ readonly delimiter: string;
10
+ readonly expected: CaseOutcome;
11
+ readonly missing?: string[];
12
+ readonly added?: string[];
13
+ readonly changed?: string[];
14
+ readonly origin?: {
15
+ readonly scenario?: string;
16
+ readonly seed?: number;
17
+ readonly depth?: number;
18
+ readonly fragments?: number;
19
+ readonly asOf?: string;
20
+ };
21
+ readonly plan: IScatterPlan;
22
+ }
23
+ export interface ILoadedCase {
24
+ readonly entry: ICorpusEntry;
25
+ readonly canonical: string;
26
+ readonly scattered: string;
27
+ readonly directory: string;
28
+ }
29
+ export declare class CorpusStore {
30
+ readonly root: string;
31
+ constructor(root: string);
32
+ names(): string[];
33
+ load(name: string): ILoadedCase;
34
+ loadAll(): ILoadedCase[];
35
+ save(entry: ICorpusEntry, canonical: string, scattered: string): string;
36
+ static fromCase(name: string, note: string, dictionary: string, session: string, delimiter: string, generated: IGeneratedCase, expected: CaseOutcome, detail: {
37
+ missing: string[];
38
+ added: string[];
39
+ changed: string[];
40
+ }, asOf?: Date): ICorpusEntry;
41
+ private static wireFile;
42
+ private static readWire;
43
+ }
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CorpusStore = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const CASE_FILE = 'case.json';
40
+ const CANONICAL_FILE = 'canonical.txt';
41
+ const SCATTERED_FILE = 'scattered.txt';
42
+ class CorpusStore {
43
+ constructor(root) {
44
+ this.root = root;
45
+ }
46
+ names() {
47
+ if (!fs.existsSync(this.root))
48
+ return [];
49
+ return fs.readdirSync(this.root)
50
+ .filter(name => fs.existsSync(path.join(this.root, name, CASE_FILE)))
51
+ .sort();
52
+ }
53
+ load(name) {
54
+ const directory = path.join(this.root, name);
55
+ const entry = JSON.parse(fs.readFileSync(path.join(directory, CASE_FILE), 'utf8'));
56
+ return {
57
+ entry,
58
+ canonical: CorpusStore.readWire(path.join(directory, CANONICAL_FILE)),
59
+ scattered: CorpusStore.readWire(path.join(directory, SCATTERED_FILE)),
60
+ directory
61
+ };
62
+ }
63
+ loadAll() {
64
+ return this.names().map(name => this.load(name));
65
+ }
66
+ save(entry, canonical, scattered) {
67
+ const directory = path.join(this.root, entry.name);
68
+ fs.mkdirSync(directory, { recursive: true });
69
+ fs.writeFileSync(path.join(directory, CASE_FILE), `${JSON.stringify(entry, null, 2)}\n`, 'utf8');
70
+ fs.writeFileSync(path.join(directory, CANONICAL_FILE), CorpusStore.wireFile(entry, 'canonical - dictionary order, contiguous, the oracle', canonical), 'utf8');
71
+ fs.writeFileSync(path.join(directory, SCATTERED_FILE), CorpusStore.wireFile(entry, 'scattered - the same bytes, legally re-ordered', scattered), 'utf8');
72
+ return directory;
73
+ }
74
+ static fromCase(name, note, dictionary, session, delimiter, generated, expected, detail, asOf) {
75
+ return {
76
+ name,
77
+ note,
78
+ dictionary,
79
+ session,
80
+ delimiter,
81
+ expected,
82
+ missing: detail.missing.length > 0 ? detail.missing : undefined,
83
+ added: detail.added.length > 0 ? detail.added : undefined,
84
+ changed: detail.changed.length > 0 ? detail.changed : undefined,
85
+ origin: {
86
+ scenario: generated.name,
87
+ seed: generated.seed,
88
+ depth: generated.requestedDepth,
89
+ asOf: asOf ? asOf.toISOString() : undefined
90
+ },
91
+ plan: generated.plan
92
+ };
93
+ }
94
+ static wireFile(entry, what, wire) {
95
+ const lines = [];
96
+ lines.push(`# ${entry.name} - ${what}`);
97
+ lines.push(`# ${entry.note}`);
98
+ lines.push(`# dictionary ${entry.dictionary}, expected ${entry.expected}`);
99
+ for (const site of entry.plan.sites) {
100
+ lines.push(`# scattered: ${site.component} at structure depth ${site.structureDepth}, ${site.fragments} runs`);
101
+ }
102
+ lines.push(wire);
103
+ return `${lines.join('\n')}\n`;
104
+ }
105
+ static readWire(file) {
106
+ const text = fs.readFileSync(file, 'utf8');
107
+ for (const line of text.split(/\r?\n/)) {
108
+ if (line.startsWith('8='))
109
+ return line;
110
+ }
111
+ throw new Error(`${file} contains no message - expected a line beginning 8=`);
112
+ }
113
+ }
114
+ exports.CorpusStore = CorpusStore;
115
+ //# sourceMappingURL=corpus-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus-store.js","sourceRoot":"","sources":["../../src/generator/corpus-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AA8D5B,MAAM,SAAS,GAAG,WAAW,CAAA;AAC7B,MAAM,cAAc,GAAG,eAAe,CAAA;AACtC,MAAM,cAAc,GAAG,eAAe,CAAA;AAEtC,MAAa,WAAW;IACtB,YAA6B,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IACzC,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,OAAO,EAAE,CAAA;QACxC,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;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,IAAI,EAAE,SAAS,CAAC,IAAI;SACrB,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,QAAQ,CAAE,KAAmB,EAAE,IAAY,EAAE,IAAY;QACtE,MAAM,KAAK,GAAa,EAAE,CAAA;QAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,MAAM,IAAI,EAAE,CAAC,CAAA;QACvC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;QAC7B,KAAK,CAAC,IAAI,CAAC,gBAAgB,KAAK,CAAC,UAAU,cAAc,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC1E,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,SAAS,uBAAuB,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,SAAS,OAAO,CAAC,CAAA;QAChH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;IAChC,CAAC;IAKO,MAAM,CAAC,QAAQ,CAAE,IAAY;QACnC,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAC1C,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACvC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBAAE,OAAO,IAAI,CAAA;QACxC,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,qDAAqD,CAAC,CAAA;IAC/E,CAAC;CACF;AAlGD,kCAkGC","sourcesContent":["import * as fs from 'fs'\nimport * as path from 'path'\nimport { IScatterPlan } from './scatter'\nimport { CaseOutcome } from './outcome'\nimport { IGeneratedCase } from './case-builder'\n\n/**\n * The corpus: edge cases kept as bytes, not as recipes.\n *\n * The generator is how a case is *found*; it is not what a case *is*. A seed reproduces\n * a message only while the generator is unchanged - adjust one probability in the value\n * conventions and the random stream reshuffles, so every seed produces a different\n * message and every recorded expectation quietly stops describing what it was written\n * for. A corpus that has to be regenerated to be read is not a corpus.\n *\n * So an entry is the two encodings, frozen, plus the expectation someone looked at and\n * agreed with. Adding one is: generate until the tool proposes something interesting,\n * read it, commit it. From then on it tests the same bytes forever, and it keeps\n * testing them if the generator is deleted.\n *\n * Layout, one directory per case:\n *\n * data/corpus/<name>/case.json metadata, plan and expected outcome\n * data/corpus/<name>/canonical.txt the contiguous encoding - the oracle\n * data/corpus/<name>/scattered.txt the legal re-ordering under test\n */\n\nexport interface ICorpusEntry {\n readonly name: string\n /** what this case is here to demonstrate, in a sentence */\n readonly note: string\n /** dictionary the case was built against, e.g. `repo44` */\n readonly dictionary: string\n /** session description used to encode and parse, relative to `data/` */\n readonly session: string\n readonly delimiter: string\n /** what the engine does with it today, agreed by whoever added the case */\n readonly expected: CaseOutcome\n /**\n * when `expected` is not `round-trips`, the leaf paths involved. Recorded so a change\n * in *how* a case fails is a test failure too, not just a change in whether it does.\n */\n readonly missing?: string[]\n readonly added?: string[]\n readonly changed?: string[]\n /** how the case was originally found - provenance, not a way to rebuild it */\n readonly origin?: {\n readonly scenario?: string\n readonly seed?: number\n readonly depth?: number\n readonly fragments?: number\n readonly asOf?: string\n }\n readonly plan: IScatterPlan\n}\n\nexport interface ILoadedCase {\n readonly entry: ICorpusEntry\n readonly canonical: string\n readonly scattered: string\n readonly directory: string\n}\n\nconst CASE_FILE = 'case.json'\nconst CANONICAL_FILE = 'canonical.txt'\nconst SCATTERED_FILE = 'scattered.txt'\n\nexport class CorpusStore {\n constructor (public readonly root: string) {\n }\n\n public names (): string[] {\n if (!fs.existsSync(this.root)) return []\n return fs.readdirSync(this.root)\n .filter(name => fs.existsSync(path.join(this.root, name, CASE_FILE)))\n .sort()\n }\n\n public load (name: string): ILoadedCase {\n const directory = path.join(this.root, name)\n const entry = JSON.parse(fs.readFileSync(path.join(directory, CASE_FILE), 'utf8')) as ICorpusEntry\n return {\n entry,\n canonical: CorpusStore.readWire(path.join(directory, CANONICAL_FILE)),\n scattered: CorpusStore.readWire(path.join(directory, SCATTERED_FILE)),\n directory\n }\n }\n\n public loadAll (): ILoadedCase[] {\n return this.names().map(name => this.load(name))\n }\n\n /**\n * A case file is a fixture a person is expected to read, so it is written with the\n * commentary a person needs: what the case demonstrates and what the engine does with\n * it, above the wire. Everything from the first `8=` is the message.\n */\n public save (entry: ICorpusEntry, canonical: string, scattered: string): string {\n const directory = path.join(this.root, entry.name)\n fs.mkdirSync(directory, { recursive: true })\n fs.writeFileSync(path.join(directory, CASE_FILE), `${JSON.stringify(entry, null, 2)}\\n`, 'utf8')\n fs.writeFileSync(\n path.join(directory, CANONICAL_FILE),\n CorpusStore.wireFile(entry, 'canonical - dictionary order, contiguous, the oracle', canonical),\n 'utf8')\n fs.writeFileSync(\n path.join(directory, SCATTERED_FILE),\n CorpusStore.wireFile(entry, 'scattered - the same bytes, legally re-ordered', scattered),\n 'utf8')\n return directory\n }\n\n public static fromCase (\n name: string,\n note: string,\n dictionary: string,\n session: string,\n delimiter: string,\n generated: IGeneratedCase,\n expected: CaseOutcome,\n detail: { missing: string[], added: string[], changed: string[] },\n asOf?: Date): ICorpusEntry {\n return {\n name,\n note,\n dictionary,\n session,\n delimiter,\n expected,\n missing: detail.missing.length > 0 ? detail.missing : undefined,\n added: detail.added.length > 0 ? detail.added : undefined,\n changed: detail.changed.length > 0 ? detail.changed : undefined,\n origin: {\n scenario: generated.name,\n seed: generated.seed,\n depth: generated.requestedDepth,\n asOf: asOf ? asOf.toISOString() : undefined\n },\n plan: generated.plan\n }\n }\n\n private static wireFile (entry: ICorpusEntry, what: string, wire: string): string {\n const lines: string[] = []\n lines.push(`# ${entry.name} - ${what}`)\n lines.push(`# ${entry.note}`)\n lines.push(`# dictionary ${entry.dictionary}, expected ${entry.expected}`)\n for (const site of entry.plan.sites) {\n lines.push(`# scattered: ${site.component} at structure depth ${site.structureDepth}, ${site.fragments} runs`)\n }\n lines.push(wire)\n return `${lines.join('\\n')}\\n`\n }\n\n /**\n * the message, ignoring the commentary above it\n */\n private static readWire (file: string): string {\n const text = fs.readFileSync(file, 'utf8')\n for (const line of text.split(/\\r?\\n/)) {\n if (line.startsWith('8=')) return line\n }\n throw new Error(`${file} contains no message - expected a line beginning 8=`)\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ export * from './rng';
2
+ export * from './instrument-universe';
3
+ export * from './market-context';
4
+ export * from './value-conventions';
5
+ export * from './realistic-generator';
6
+ export * from './applicability';
7
+ export * from './scenarios';
8
+ export * from './layout';
9
+ export * from './scatter';
10
+ export * from './outcome';
11
+ export * from './case-builder';
12
+ export * from './corpus-store';
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./rng"), exports);
18
+ __exportStar(require("./instrument-universe"), exports);
19
+ __exportStar(require("./market-context"), exports);
20
+ __exportStar(require("./value-conventions"), exports);
21
+ __exportStar(require("./realistic-generator"), exports);
22
+ __exportStar(require("./applicability"), exports);
23
+ __exportStar(require("./scenarios"), exports);
24
+ __exportStar(require("./layout"), exports);
25
+ __exportStar(require("./scatter"), exports);
26
+ __exportStar(require("./outcome"), exports);
27
+ __exportStar(require("./case-builder"), exports);
28
+ __exportStar(require("./corpus-store"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,wDAAqC;AACrC,mDAAgC;AAChC,sDAAmC;AACnC,wDAAqC;AACrC,kDAA+B;AAC/B,8CAA2B;AAC3B,2CAAwB;AACxB,4CAAyB;AACzB,4CAAyB;AACzB,iDAA8B;AAC9B,iDAA8B","sourcesContent":["export * from './rng'\nexport * from './instrument-universe'\nexport * from './market-context'\nexport * from './value-conventions'\nexport * from './realistic-generator'\nexport * from './applicability'\nexport * from './scenarios'\nexport * from './layout'\nexport * from './scatter'\nexport * from './outcome'\nexport * from './case-builder'\nexport * from './corpus-store'\n"]}