@sigloch/contracts 10.10.0 → 10.13.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * FC-01..FC-03 — FCHAIN quality rules (CR-121 Phase 1).
2
+ * FC-02..FC-05 — FCHAIN quality rules (CR-121 Phase 1; FC-05 CR-SM-363).
3
3
  */
4
4
  import type { OntologyGraph } from './ontology.js';
5
5
  import type { RuleDefinition, RuleViolation } from './rules.js';
@@ -7,5 +7,6 @@ import type { MetricPolicy } from './policy.js';
7
7
  export declare function fc02LeafUcHasFchain(graph: OntologyGraph): RuleViolation[];
8
8
  export declare function fc03FchainFlat(graph: OntologyGraph): RuleViolation[];
9
9
  export declare function fc04ActorBounded(graph: OntologyGraph): RuleViolation[];
10
+ export declare function fc05ChainConnected(graph: OntologyGraph): RuleViolation[];
10
11
  export declare const FC_RULES: RuleDefinition[];
11
12
  export declare function evaluateFCRules(graph: OntologyGraph, policy: MetricPolicy): RuleViolation[];
@@ -96,6 +96,137 @@ export function fc04ActorBounded(graph) {
96
96
  }));
97
97
  }
98
98
  // ---------------------------------------------------------------------------
99
+ // FC-05: FCHAIN ist gerichtet zusammenhaengend (CR-SM-363).
100
+ //
101
+ // Eine FCHAIN ist grammatisch eine Menge (`FCHAIN -compose-> FUNC`); die Reihenfolge entsteht
102
+ // erst aus Erzeuger -> Verbraucher (`FUNC -io-> FLOW -io-> FUNC`, beide Enden Glied). Bilden die
103
+ // Glieder darueber mehr als EINE (schwache) Komponente, beschreibt jede Kettenkennzahl etwas,
104
+ // das es nicht gibt. IO-01 sieht das nicht: es verbindet zwei Glieder schon, wenn beide
105
+ // denselben FLOW konsumieren. Gemessen (graphcode spike-kettenkennzahlen, 76 Ketten): 20
106
+ // zerfallen ohne jede Regel.
107
+ //
108
+ // Je Nebenkomponente (alles ausser der groessten; Gleichstand nach kleinster ID — Gate 5) die
109
+ // Ursache:
110
+ // - `missing-link`: Haupt- und Nebenteil sind ueber eine FUNC AUSSERHALB der Kette verbunden
111
+ // (Glied -> FLOW -> X -> FLOW -> Glied) — der verbindende Schritt gehoert in die Kette.
112
+ // Nur eine FUNC ist ein fehlendes Glied: ein Weg ueber einen ACTOR geht ueber die
113
+ // Systemgrenze, und einen ACTOR kann keine Kette aufnehmen.
114
+ // - `bag`: sonst — keine FUNC verbindet die Teile: ein fehlender FLOW zwischen Gliedern oder
115
+ // parallele Dienste an einer gemeinsamen Quelle (dann ist die Kette zu teilen).
116
+ // Traegt die Kette ein Glied ohne io-Eingang oder -Ausgang, gehoert sie zuerst R-31 — FC-05
117
+ // schweigt, bis alle Glieder verdrahtet sind (keine Doppelmeldung, s. u.). Eingang/Ausgang der Kette fragt FC-04 (streng: ACTOR) — eine Kette ohne
118
+ // jeden Eingang hat auch keinen ACTOR-Eingang, FC-05 schweigt deshalb dazu (eine Ursache, ein
119
+ // Befund). EIN Befund je Kette, die Komponenten im Kontext (CR-SM-242).
120
+ // ---------------------------------------------------------------------------
121
+ export function fc05ChainConnected(graph) {
122
+ const idx = indexOf(graph);
123
+ // Erzeuger/Verbraucher je FLOW — ueber alle Typen (FUNC oder ACTOR).
124
+ const producers = new Map();
125
+ const consumers = new Map();
126
+ const wiredIn = new Set();
127
+ const wiredOut = new Set();
128
+ for (const t of idx.tracesOfType('io')) {
129
+ if (idx.typeOf(t.target) === 'FLOW') {
130
+ (producers.get(t.target) ?? producers.set(t.target, []).get(t.target)).push(t.source);
131
+ wiredOut.add(t.source);
132
+ }
133
+ if (idx.typeOf(t.source) === 'FLOW') {
134
+ (consumers.get(t.source) ?? consumers.set(t.source, []).get(t.source)).push(t.target);
135
+ wiredIn.add(t.target);
136
+ }
137
+ }
138
+ const successors = new Map();
139
+ for (const [flow, ps] of producers) {
140
+ for (const p of ps) {
141
+ const set = successors.get(p) ?? successors.set(p, new Set()).get(p);
142
+ for (const c of consumers.get(flow) ?? [])
143
+ if (c !== p)
144
+ set.add(c);
145
+ }
146
+ }
147
+ const succ = (id) => successors.get(id) ?? new Set();
148
+ const violations = [];
149
+ for (const fc of idx.elementsOfType('FCHAIN')) {
150
+ const members = [...new Set(idx.out(fc.id, 'compose').map(t => t.target).filter(id => idx.typeOf(id) === 'FUNC'))].sort();
151
+ if (members.length < 2)
152
+ continue;
153
+ // Ein Glied ohne io-Eingang oder -Ausgang ist R-31s Befund — und er kann genau die Bruecke
154
+ // sein, die fehlt. Solange eines da ist, urteilt FC-05 nicht (eine Ursache, ein Befund):
155
+ // gemessen an graphcode FCHAIN-capture, wo `FUNC-decode` ohne Ausgang sonst einen Sack vortaeuscht.
156
+ if (members.some(f => !wiredIn.has(f) || !wiredOut.has(f)))
157
+ continue;
158
+ const inChain = new Set(members);
159
+ // Schwache Komponenten ueber Glied -> Glied.
160
+ const adj = new Map(members.map(m => [m, new Set()]));
161
+ for (const a of members) {
162
+ for (const b of succ(a))
163
+ if (inChain.has(b)) {
164
+ adj.get(a).add(b);
165
+ adj.get(b).add(a);
166
+ }
167
+ }
168
+ const seen = new Set();
169
+ const comps = [];
170
+ for (const m of members) {
171
+ if (seen.has(m))
172
+ continue;
173
+ const comp = [m];
174
+ seen.add(m);
175
+ for (let i = 0; i < comp.length; i++) {
176
+ for (const n of adj.get(comp[i]))
177
+ if (!seen.has(n)) {
178
+ seen.add(n);
179
+ comp.push(n);
180
+ }
181
+ }
182
+ comps.push(comp.sort());
183
+ }
184
+ if (comps.length < 2)
185
+ continue;
186
+ comps.sort((a, b) => b.length - a.length || a[0].localeCompare(b[0]));
187
+ const main = new Set(comps[0]);
188
+ // Aussen-FUNCs X mit from -> X -> to.
189
+ const bridges = (from, to) => {
190
+ const via = new Set();
191
+ for (const a of from) {
192
+ for (const x of succ(a)) {
193
+ if (inChain.has(x) || idx.typeOf(x) !== 'FUNC')
194
+ continue;
195
+ if ([...succ(x)].some(b => to.has(b)))
196
+ via.add(x);
197
+ }
198
+ }
199
+ return [...via];
200
+ };
201
+ const side = [];
202
+ for (const comp of comps.slice(1)) {
203
+ const set = new Set(comp);
204
+ const via = [...new Set([...bridges(main, set), ...bridges(set, main)])].sort();
205
+ side.push({ members: comp, cause: via.length > 0 ? 'missing-link' : 'bag', via });
206
+ }
207
+ if (side.length === 0)
208
+ continue;
209
+ const missing = [...new Set(side.flatMap(c => c.via))].sort();
210
+ const hints = [];
211
+ if (missing.length > 0)
212
+ hints.push(`add the missing link(s) as members: ${missing.map(f => `\`${fc.id} -compose-> ${f}\``).join(', ')}`);
213
+ // `bag` sagt nur: KEINE Aussen-FUNC verbindet die Teile. Das ist entweder ein fehlender FLOW
214
+ // zwischen zwei Gliedern (gemessen: graphcode FCHAIN-generation-states, Uebergabe an
215
+ // graph_suggest nicht modelliert) oder ein Sack paralleler Dienste — der Hinweis nennt beides.
216
+ if (side.some(c => c.cause === 'bag'))
217
+ hints.push('connect the parts with a FLOW from a producer member to a consumer member if they are one chain of effects — otherwise split the chain, one FCHAIN per chain of effects');
218
+ violations.push({
219
+ rule_id: 'FC-05',
220
+ severity: 'warning',
221
+ element_id: fc.id,
222
+ message: `${fc.id} falls apart into ${comps.length} unconnected parts along producer -> consumer (${side.map(c => `${c.members.join('+')}: ${c.cause}`).join('; ')})`,
223
+ fix_hint: `Via graph_mutate Format-E, ${hints.join('; or ')}`,
224
+ context: { element_type: fc.type, element_name: fc.name, side_components: side },
225
+ });
226
+ }
227
+ return violations;
228
+ }
229
+ // ---------------------------------------------------------------------------
99
230
  // Aggregated
100
231
  // ---------------------------------------------------------------------------
101
232
  export const FC_RULES = [
@@ -105,6 +236,7 @@ export const FC_RULES = [
105
236
  // eine Kette mit n verschachtelten FUNCs erzeugt n Verstoesse gegen einen Beitrag von 1.
106
237
  { id: 'FC-03', name: 'FCHAIN is flat', severity: 'warning', evaluate: fc03FchainFlat, domain: ['FUNC'] },
107
238
  { id: 'FC-04', name: 'FCHAIN actor-bounded (trigger+consumer)', severity: 'warning', evaluate: fc04ActorBounded, domain: ['FCHAIN'] },
239
+ { id: 'FC-05', name: 'FCHAIN is connected (producer -> consumer)', severity: 'warning', evaluate: fc05ChainConnected, domain: ['FCHAIN'] },
108
240
  ];
109
241
  // CR-SM-236: `policy` wird durchgereicht, auch wo diese Familie heute keine Schwelle hat —
110
242
  // ein Sonderweg je Familie waere genau der zweite Pfad, den der Regelsatz verbietet.
@@ -1,13 +1,16 @@
1
1
  /**
2
2
  * CR-182: FMEA/FTA Risk Rules + NFR Budget Overshoot Detection.
3
3
  * FM-01: Risk-REQ missing FMEA attributes (severity, occurrence, detection).
4
- * FM-02: Risk-REQ without mitigation (compose→REQ(kinds∋mitigation)).
4
+ * FM-02: Risk-REQ without mitigation (compose→REQ(role=mitigation)).
5
+ * CR-SM-365: "Risk-REQ" heisst `attributes.role === 'risk'` (Leser `readReqRole`), nicht mehr
6
+ * `kinds ∋ risk` — die Rolle ist die Motivation der Anforderung, nicht ihre Art. Kein
7
+ * zweiter Pfad ueber `kinds`: ein Altgraph faellt hier still, bis er migriert ist.
5
8
  * FM-03: risk REQ with Action Priority High and no passed verification.
6
9
  * NFR-01: measured exceeds budget for an NFR dimension. CR-228 splits the target
7
10
  * by dimension nature: physical budgets (weight/power/cost) live on the part
8
11
  * (MOD); behavioral budgets (timing/memory-throughput) on the FCHAIN/FUNC.
9
12
  */
10
- import { TestRefsSchema } from './ontology.js';
13
+ import { readReqRole, readTestRefs } from './ontology.js';
11
14
  import { actionPriority, apMethod } from './action-priority.js';
12
15
  const PHYSICAL_BUDGET_PAIRS = [
13
16
  ['costBudget', 'measuredCost', 'cost'],
@@ -20,12 +23,19 @@ const BEHAVIORAL_BUDGET_PAIRS = [
20
23
  ];
21
24
  const PHYSICAL_BUDGET_TYPES = ['MOD'];
22
25
  const BEHAVIORAL_BUDGET_TYPES = ['FUNC', 'FCHAIN'];
26
+ /** Traegt das Element die FMEA-Rolle `role`? Einziger Weg der FM-Regeln (CR-SM-365). */
27
+ const hasRole = (e, role) => {
28
+ if (e.type !== 'REQ')
29
+ return false;
30
+ const r = readReqRole(e.attributes);
31
+ return r.state === 'bound' && r.value === role;
32
+ };
23
33
  // ---------------------------------------------------------------------------
24
34
  // FM-01: Risk-REQ without FMEA attributes
25
35
  // ---------------------------------------------------------------------------
26
36
  export function fm01MissingFmeaAttributes(graph) {
27
37
  return graph.elements
28
- .filter(e => e.type === 'REQ' && e.kinds?.includes('risk'))
38
+ .filter(e => hasRole(e, 'risk'))
29
39
  .filter(e => {
30
40
  const a = e.attributes ?? {};
31
41
  return a['severity'] == null || a['occurrence'] == null || a['detection'] == null;
@@ -52,20 +62,20 @@ export function fm01MissingFmeaAttributes(graph) {
52
62
  // FM-02: Risk-REQ without mitigation
53
63
  // ---------------------------------------------------------------------------
54
64
  export function fm02MissingMitigation(graph) {
55
- const riskReqs = graph.elements.filter(e => e.type === 'REQ' && e.kinds?.includes('risk'));
65
+ const riskReqs = graph.elements.filter(e => hasRole(e, 'risk'));
56
66
  return riskReqs
57
67
  .filter(riskReq => {
58
- // Check: compose trace from riskReq to a REQ with kinds∋mitigation
68
+ // Check: compose trace from riskReq to a REQ with role=mitigation
59
69
  return !graph.traces.some(t => t.source === riskReq.id &&
60
70
  t.type === 'compose' &&
61
- graph.elements.some(el => el.id === t.target && el.type === 'REQ' && el.kinds?.includes('mitigation')));
71
+ graph.elements.some(el => el.id === t.target && hasRole(el, 'mitigation')));
62
72
  })
63
73
  .map(e => ({
64
74
  rule_id: 'FM-02',
65
75
  severity: 'warning',
66
76
  element_id: e.id,
67
- message: `${e.id} is a risk REQ without a mitigation REQ (compose→REQ[mitigation])`,
68
- fix_hint: 'Create a mitigation REQ and link via compose trace',
77
+ message: `${e.id} is a risk REQ without a mitigation REQ (compose→REQ[role=mitigation])`,
78
+ fix_hint: 'Create a REQ with attributes.role="mitigation" (kinds functional or non-functional) and link it via compose trace',
69
79
  }));
70
80
  }
71
81
  // ---------------------------------------------------------------------------
@@ -80,7 +90,7 @@ export function fm03HighRiskUnverified(graph, policy) {
80
90
  const threshold = policy.riskRpn;
81
91
  if (threshold === null)
82
92
  return [];
83
- const riskReqs = graph.elements.filter(e => e.type === 'REQ' && e.kinds?.includes('risk'));
93
+ const riskReqs = graph.elements.filter(e => hasRole(e, 'risk'));
84
94
  return riskReqs
85
95
  .filter(riskReq => {
86
96
  const a = riskReq.attributes ?? {};
@@ -106,10 +116,10 @@ export function fm03HighRiskUnverified(graph, policy) {
106
116
  graph.elements.some(el => {
107
117
  if (el.id !== t.source || el.type !== 'TEST')
108
118
  return false;
109
- const parsed = TestRefsSchema.safeParse(el.attributes?.testRefs);
110
- if (!parsed.success)
119
+ const parsed = readTestRefs(el.attributes);
120
+ if (parsed.state !== 'bound')
111
121
  return false; // keine Bindung → keine Evidenz
112
- return parsed.data.every(ref => ref.result === 'passed');
122
+ return parsed.value.every(ref => ref.result === 'passed');
113
123
  }));
114
124
  return !hasPassedTest;
115
125
  })
@@ -41,30 +41,16 @@
41
41
  *
42
42
  * @author andreas@siglochconsulting
43
43
  */
44
+ import { z } from 'zod/v4';
44
45
  import type { OntologyGraph } from './ontology.js';
45
46
  /** Eine Zeile je FUNC — mit Schwelle oder ohne, wie `ModuleMetrics` je MOD (CR-SM-232). */
46
- export interface FunctionCriticality {
47
- funcId: string;
48
- funcName: string;
49
- /**
50
- * Wirkketten, die diese FUNC komponieren — R-30s Definition: direkte
51
- * `FCHAIN -compose-> FUNC`-Kante, keine Vererbung ueber Vorfahren.
52
- *
53
- * `0` ist eine AUSSAGE, kein fehlender Wert: bei einem Blatt ist es R-30s Befund, bei einem
54
- * zerlegten Block der von FC-03 erzwungene Normalzustand. Wer die beiden unterscheiden muss,
55
- * fragt `decomposedFuncs()` — diese Datei tut es bewusst nicht (sie waere sonst an `rules.ts`
56
- * gebunden und fuer `rules.ts` nicht mehr importierbar).
57
- */
58
- chains: number;
59
- /**
60
- * Use Cases, die ueber diese Ketten an der FUNC haengen (`UC -compose-> FCHAIN`).
61
- *
62
- * Nicht aus `chains` ableitbar und auch nicht dasselbe: eine FUNC in drei Ketten EINES Use
63
- * Case ist etwas anderes als eine in drei Ketten dreier Use Cases. Gemessen an graphcode
64
- * faellt die Zahl regelmaessig kleiner aus als `chains` (FUNC-mutate: 11 Ketten, 7 UCs).
65
- */
66
- useCases: number;
67
- }
47
+ export declare const FunctionCriticality: z.ZodObject<{
48
+ funcId: z.ZodString;
49
+ funcName: z.ZodString;
50
+ chains: z.ZodNumber;
51
+ useCases: z.ZodNumber;
52
+ }, z.core.$strip>;
53
+ export type FunctionCriticality = z.infer<typeof FunctionCriticality>;
68
54
  /**
69
55
  * Kritikalitaet je FUNC, kritischste zuerst.
70
56
  *
@@ -1,4 +1,72 @@
1
+ /**
2
+ * CR-SM-314 — wie kritisch ist eine Funktion? Ketten und Use Cases, als ZAHL.
3
+ *
4
+ * Die Frage stammt aus dem Betrieb und hat drei Abnehmer, die bis hierher jeder fuer sich
5
+ * geraten haben: **Blast Radius** einer Aenderung, **Kritikalitaet** einer Funktion,
6
+ * **Rollout-Reihenfolge**. Alle drei fragen dasselbe: an wie vielen Wirkketten haengt dieses
7
+ * Stueck, und wie viele Use Cases stehen dahinter.
8
+ *
9
+ * ## Die Definition ist GELIEHEN, nicht neu
10
+ *
11
+ * "Eine FUNC ist in einer Kette" heisst hier woertlich, was R-30 darunter versteht: eine
12
+ * direkte `FCHAIN -compose-> FUNC`-Kante. Keine Vererbung ueber compose-Vorfahren.
13
+ *
14
+ * Der Rollup wurde GEMESSEN und VERWORFEN: ueber 17 Familiengraphen haetten Vorfahren-Ketten
15
+ * die Grundgesamtheit von 224 auf 227 FUNCs gehoben — drei Stueck. Er kauft nichts und waere
16
+ * eine ZWEITE Vorstellung davon, wozu eine Funktion gehoert, neben R-30s. Genau die Drift, gegen
17
+ * die `module-crossings.ts` gebaut wurde (CR-SM-276). Ein zerlegter Block misst deshalb 0, und
18
+ * das ist richtig: FC-03 verbietet ein Kettenglied mit verschachtelter Zerlegung, ein Block KANN
19
+ * die Kante gar nicht tragen.
20
+ *
21
+ * ## Diese Datei URTEILT NICHT
22
+ *
23
+ * Kein `infrastructure`-Flag, keine Schwelle, keine Severity. Ein Flag waere ein Urteil in der
24
+ * MESSUNG, und die Schwelle gehoert in `MetricPolicy` (`criticality.infrastructure`) — dieselbe
25
+ * Trennung, die `moduleMetrics` gegen MT-01/MT-02 haelt: die Zahl steht in jeder Zeile, ob eine
26
+ * Regel sie liest oder nicht.
27
+ *
28
+ * ## Warum sie nur `ontology` und `graph-index` importiert
29
+ *
30
+ * Damit `rules.ts` sie konsumieren darf. R-21 braucht dieselbe Kettenzahl fuer seine
31
+ * Infrastruktur-Ausnahme (CR-SM-313); rechnete die Regel sie selbst, haetten wir zwei
32
+ * Kettenbegriffe im selben Paket. EINE Rechnung, ZWEI Abnehmer — Vorbild `module-crossings.ts`,
33
+ * das aus demselben Grund keinen Regelcode importiert.
34
+ *
35
+ * ## Gemessen (17 Familiengraphen, 2026-09-12)
36
+ *
37
+ * 278 FUNCs liegen in mindestens einer Kette: 224 in genau einer, 37 in zwei, 6 in drei, 8 in
38
+ * vier, je eine in fuenf, sechs und elf. Ein duenner Schwanz ohne Plateau — aus der FORM dieser
39
+ * Verteilung ist keine Schwelle abzulesen (derselbe Befund wie bei `instability`, CR-SM-293).
40
+ * Ablesbar ist sie an ihrer WIRKUNG, und das steht bei `criticality` in der Policy.
41
+ *
42
+ * @author andreas@siglochconsulting
43
+ */
44
+ import { z } from 'zod/v4';
1
45
  import { indexOf } from './graph-index.js';
46
+ /** Eine Zeile je FUNC — mit Schwelle oder ohne, wie `ModuleMetrics` je MOD (CR-SM-232). */
47
+ // CR-SM-361: ein Zod-Vertrag, kein Typ — `functionCriticality` prueft seine Ausgabe.
48
+ export const FunctionCriticality = z.object({
49
+ funcId: z.string(),
50
+ funcName: z.string(),
51
+ /**
52
+ * Wirkketten, die diese FUNC komponieren — R-30s Definition: direkte
53
+ * `FCHAIN -compose-> FUNC`-Kante, keine Vererbung ueber Vorfahren.
54
+ *
55
+ * `0` ist eine AUSSAGE, kein fehlender Wert: bei einem Blatt ist es R-30s Befund, bei einem
56
+ * zerlegten Block der von FC-03 erzwungene Normalzustand. Wer die beiden unterscheiden muss,
57
+ * fragt `decomposedFuncs()` — diese Datei tut es bewusst nicht (sie waere sonst an `rules.ts`
58
+ * gebunden und fuer `rules.ts` nicht mehr importierbar).
59
+ */
60
+ chains: z.number().int().nonnegative(),
61
+ /**
62
+ * Use Cases, die ueber diese Ketten an der FUNC haengen (`UC -compose-> FCHAIN`).
63
+ *
64
+ * Nicht aus `chains` ableitbar und auch nicht dasselbe: eine FUNC in drei Ketten EINES Use
65
+ * Case ist etwas anderes als eine in drei Ketten dreier Use Cases. Gemessen an graphcode
66
+ * faellt die Zahl regelmaessig kleiner aus als `chains` (FUNC-mutate: 11 Ketten, 7 UCs).
67
+ */
68
+ useCases: z.number().int().nonnegative(),
69
+ });
2
70
  /**
3
71
  * Kritikalitaet je FUNC, kritischste zuerst.
4
72
  *
@@ -65,7 +133,9 @@ export function functionCriticality(graph) {
65
133
  ucs.add(uc);
66
134
  return { funcId: fn.id, funcName: fn.name, chains: chains.size, useCases: ucs.size };
67
135
  });
68
- return rows.sort((a, b) => b.chains - a.chains ||
136
+ const sorted = rows.sort((a, b) => b.chains - a.chains ||
69
137
  b.useCases - a.useCases ||
70
138
  (a.funcId < b.funcId ? -1 : a.funcId > b.funcId ? 1 : 0));
139
+ z.array(FunctionCriticality).parse(sorted); // CR-SM-361: der Erzeuger prueft seinen Vertrag
140
+ return sorted;
71
141
  }
@@ -11,18 +11,18 @@
11
11
  */
12
12
  export declare const GRAMMAR_SNAPSHOT: {
13
13
  readonly versions: {
14
- readonly ontology: "9.1.0";
15
- readonly metaModel: "5.2.0";
16
- readonly rules: "31.0.0";
14
+ readonly ontology: "10.1.0";
15
+ readonly metaModel: "6.0.0";
16
+ readonly rules: "34.0.0";
17
17
  };
18
18
  readonly elementTypes: readonly ["ACTOR", "CR", "FCHAIN", "FLOW", "FUNC", "MOD", "MS", "REQ", "SCHEMA", "SYS", "TEST", "UC"];
19
19
  readonly traceTypes: readonly ["allocate", "compose", "io", "relation", "satisfy", "verify"];
20
- readonly patterns: readonly ["ACTOR -io-> FLOW", "CR -relation-> FUNC", "CR -relation-> MOD", "CR -relation-> MS", "CR -relation-> REQ", "CR -relation-> SCHEMA", "CR -relation-> UC", "FCHAIN -compose-> FUNC [1..*]", "FCHAIN -satisfy-> REQ", "FLOW -io-> ACTOR", "FLOW -io-> FUNC", "FLOW -relation-> SCHEMA [1]", "FUNC -allocate-> MOD [0..1]", "FUNC -compose-> FUNC [0..*]", "FUNC -io-> FLOW", "FUNC -satisfy-> REQ where target.kinds in {functional,postcondition,precondition}", "MOD -compose-> MOD [0..*]", "MOD -satisfy-> REQ where target.kinds in {mitigation,non-functional,risk}", "MS -compose-> FUNC", "MS -compose-> REQ", "MS -compose-> UC", "MS -relation-> MS label=depends-on", "REQ -compose-> REQ [0..*]", "SYS -compose-> MOD [0..*]", "SYS -compose-> REQ [0..*]", "SYS -compose-> SYS [0..*]", "SYS -compose-> UC [1..*]", "SYS -satisfy-> REQ where target.kinds in {mitigation,non-functional,risk}", "TEST -verify-> REQ", "TEST -verify-> SCHEMA", "UC -compose-> FCHAIN [1..*]", "UC -compose-> REQ [1..*]"];
20
+ readonly patterns: readonly ["ACTOR -io-> FLOW", "CR -relation-> FUNC", "CR -relation-> MOD", "CR -relation-> MS", "CR -relation-> REQ", "CR -relation-> SCHEMA", "CR -relation-> UC", "FCHAIN -compose-> FUNC [1..*]", "FCHAIN -satisfy-> REQ where target.kinds in {non-functional}", "FLOW -io-> ACTOR", "FLOW -io-> FUNC", "FLOW -relation-> SCHEMA [1]", "FUNC -allocate-> MOD [0..1]", "FUNC -compose-> FUNC [0..*]", "FUNC -io-> FLOW", "FUNC -satisfy-> REQ where target.kinds in {functional}", "MOD -compose-> MOD [0..*]", "MOD -satisfy-> REQ where target.kinds in {non-functional}", "MS -compose-> FUNC", "MS -compose-> REQ", "MS -compose-> UC", "MS -relation-> MS label=depends-on", "REQ -compose-> REQ [0..*]", "SYS -compose-> MOD [0..*]", "SYS -compose-> REQ [0..*]", "SYS -compose-> SYS [0..*]", "SYS -compose-> UC [1..*]", "SYS -satisfy-> REQ where target.kinds in {non-functional}", "TEST -verify-> REQ", "TEST -verify-> SCHEMA", "UC -compose-> FCHAIN [1..*]", "UC -compose-> REQ [1..*]"];
21
21
  readonly elementColumns: readonly ["OntologyElement.attributes", "OntologyElement.created_at", "OntologyElement.description", "OntologyElement.id", "OntologyElement.kinds", "OntologyElement.method", "OntologyElement.name", "OntologyElement.status", "OntologyElement.type", "OntologyElement.updated_at", "Trace.attributes", "Trace.created_at", "Trace.label", "Trace.source", "Trace.target", "Trace.type", "Trace.verified_at", "Trace.weight"];
22
- readonly attributes: readonly ["CR.rationale: string", "CR.spike: boolean", "CR.status: enum", "FLOW.protocol: string", "FLOW.qos: string", "FUNC.concept: boolean", "FUNC.external: boolean", "FUNC.measuredMs: number", "FUNC.realRef: object", "FUNC.safety_relevant: boolean", "FUNC.sourceFile: string", "FUNC.timingBudgetMs: number", "MOD.concept: boolean", "MOD.external: boolean", "MOD.kind: string", "MOD.path: string", "MOD.realRef: object", "REQ.detection: number", "REQ.occurrence: number", "REQ.severity: number", "SCHEMA.concept: boolean", "SCHEMA.contract: string", "SCHEMA.external: boolean", "SCHEMA.realRef: object", "TEST.concept: boolean", "TEST.sourceFile: string", "TEST.testRefs: array", "UC.operatingMode: string"];
23
- readonly rules: readonly ["AF-01 (warning) domain=[graph]", "AF-02 (warning) domain=[graph]", "AF-03 (warning) domain=[graph]", "AF-04 (warning) domain=[graph]", "AF-05 (warning) domain=[graph]", "BQ-01 (warning) domain=[REQ]", "BQ-02 (warning) domain=[REQ]", "BQ-04 (warning) domain=[REQ]", "BQ-06 (warning) domain=[REQ]", "BQ-07 (warning) domain=[REQ]", "BW-02 (warning) domain=[FUNC]", "CL-01 (warning) domain=[ACTOR]", "CR-01 (warning) domain=[MOD]", "CR-R01 (warning) domain=[CR]", "CR-R02 (warning) domain=[CR]", "CR-R03 (warning) domain=[all]", "FC-02 (warning) domain=[UC]", "FC-03 (warning) domain=[FUNC]", "FC-04 (warning) domain=[FCHAIN]", "FM-01 (warning) domain=[REQ]", "FM-02 (warning) domain=[REQ]", "FM-03 (warning) domain=[REQ]", "IO-01 (warning) domain=[FUNC]", "IO-02 (error) domain=[FLOW]", "IR-01 (warning) domain=[graph]", "MS-01 (warning) domain=[MS]", "MS-02 (warning) domain=[MS]", "MS-03 (info) domain=[CR]", "MT-01 (warning) domain=[MOD]", "MT-02 (info) domain=[MOD]", "MT-04 (info) domain=[FUNC]", "ND-01 (warning) domain=[FUNC]", "ND-02 (warning) domain=[SCHEMA]", "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD]", "R-01 (error) domain=[REQ]", "R-02 (warning) domain=[FUNC]", "R-04 (warning) domain=[MOD]", "R-05 (warning) domain=[TEST]", "R-08 (error) domain=[all]", "R-10 (warning) domain=[FLOW]", "R-12 (warning) domain=[FUNC]", "R-15 (warning) domain=[FCHAIN]", "R-16 (warning) domain=[ACTOR]", "R-17 (warning) domain=[SYS]", "R-18 (error) domain=[all]", "R-19 (warning) domain=[TEST]", "R-20 (warning) domain=[FUNC]", "R-21 (warning) domain=[FCHAIN,FUNC]", "R-22 (warning) domain=[FUNC]", "R-23 (warning) domain=[MOD]", "R-26 (warning) domain=[SCHEMA]", "R-29 (error) domain=[TEST]", "R-30 (warning) domain=[FUNC]", "R-31 (warning) domain=[FUNC]", "R-32 (warning) domain=[SCHEMA]", "RC-01 (warning) domain=[FUNC]", "RC-02 (warning) domain=[TEST]", "RC-03 (warning) domain=[SCHEMA]", "RC-04 (warning) domain=[SCHEMA]", "RC-05 (warning) domain=[MOD]", "RC-06 (warning) domain=[FUNC,MOD,SCHEMA]", "RC-07 (warning) domain=[CR,SYS]", "RD-01 (warning) domain=[REQ]", "RD-02 (warning) domain=[REQ]", "RD-03 (info) domain=[REQ]", "RD-04 (warning) domain=[FUNC,MOD,SYS]", "RD-05 (warning) domain=[FUNC,MOD,SYS]", "SC-02 (warning) domain=[SCHEMA]", "TR-01 (warning) domain=[graph]", "UC-01 (warning) domain=[UC]", "UC-02 (warning) domain=[UC]", "UC-03 (warning) domain=[UC]", "UC-04 (warning) domain=[UC]", "UC-05 (info) domain=[UC]", "UC-06 (info) domain=[UC]", "VR-01 (info) domain=[TEST]"];
24
- readonly conformanceRules: readonly ["RC-01 (warning)", "RC-02 (warning)", "RC-03 (warning)", "RC-04 (warning)", "RC-05 (warning)", "RC-06 (warning)", "RC-07 (warning)"];
22
+ readonly attributes: readonly ["CR.rationale: string", "CR.spike: boolean", "CR.status: enum", "FLOW.sync: enum", "FUNC.concept: boolean", "FUNC.external: boolean", "FUNC.measuredMs: number", "FUNC.realRef: object", "FUNC.safety_relevant: boolean", "FUNC.sourceFile: string", "FUNC.timingBudgetMs: number", "MOD.concept: boolean", "MOD.external: boolean", "MOD.kind: string", "MOD.path: string", "MOD.realRef: object", "REQ.detection: number", "REQ.occurrence: number", "REQ.role: enum", "REQ.severity: number", "SCHEMA.concept: boolean", "SCHEMA.contract: string", "SCHEMA.external: boolean", "SCHEMA.realRef: object", "TEST.concept: boolean", "TEST.sourceFile: string", "TEST.testRefs: array", "UC.operatingMode: string"];
23
+ readonly rules: readonly ["AF-01 (warning) domain=[graph]", "AF-02 (warning) domain=[graph]", "AF-03 (warning) domain=[graph]", "AF-04 (warning) domain=[graph]", "AF-05 (warning) domain=[graph]", "BQ-01 (warning) domain=[REQ]", "BQ-02 (warning) domain=[REQ]", "BQ-04 (warning) domain=[REQ]", "BQ-06 (warning) domain=[REQ]", "BQ-07 (warning) domain=[REQ]", "BW-02 (warning) domain=[FUNC]", "CL-01 (warning) domain=[ACTOR]", "CR-01 (warning) domain=[MOD]", "CR-R01 (warning) domain=[CR]", "CR-R02 (warning) domain=[CR]", "CR-R03 (warning) domain=[all]", "CR-R05 (warning) domain=[REQ]", "FC-02 (warning) domain=[UC]", "FC-03 (warning) domain=[FUNC]", "FC-04 (warning) domain=[FCHAIN]", "FC-05 (warning) domain=[FCHAIN]", "FM-01 (warning) domain=[REQ]", "FM-02 (warning) domain=[REQ]", "FM-03 (warning) domain=[REQ]", "IO-01 (warning) domain=[FUNC]", "IO-02 (error) domain=[FLOW]", "IR-01 (warning) domain=[graph]", "MS-01 (warning) domain=[MS]", "MS-02 (warning) domain=[MS]", "MS-03 (info) domain=[CR]", "MT-01 (warning) domain=[MOD]", "MT-02 (warning) domain=[MOD]", "MT-04 (info) domain=[FUNC]", "ND-01 (warning) domain=[FUNC]", "ND-02 (warning) domain=[SCHEMA]", "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD]", "R-01 (error) domain=[REQ]", "R-02 (warning) domain=[FUNC]", "R-04 (warning) domain=[MOD]", "R-05 (warning) domain=[TEST]", "R-08 (error) domain=[all]", "R-10 (warning) domain=[FLOW]", "R-12 (warning) domain=[FUNC]", "R-15 (warning) domain=[FCHAIN]", "R-16 (warning) domain=[ACTOR]", "R-17 (warning) domain=[SYS]", "R-18 (error) domain=[all]", "R-19 (warning) domain=[TEST]", "R-20 (warning) domain=[FUNC]", "R-21 (warning) domain=[FCHAIN,FUNC]", "R-22 (warning) domain=[FUNC]", "R-23 (warning) domain=[MOD]", "R-26 (warning) domain=[SCHEMA]", "R-29 (error) domain=[TEST]", "R-30 (warning) domain=[FUNC]", "R-31 (warning) domain=[FUNC]", "R-32 (warning) domain=[SCHEMA]", "RC-01 (warning) domain=[FUNC]", "RC-02 (warning) domain=[TEST]", "RC-03 (warning) domain=[SCHEMA]", "RC-04 (warning) domain=[SCHEMA]", "RC-05 (warning) domain=[MOD]", "RC-06 (warning) domain=[FUNC,MOD,SCHEMA]", "RC-07 (warning) domain=[CR,SYS]", "RC-08 (warning) domain=[SCHEMA]", "RC-09 (warning) domain=[SCHEMA]", "RC-10 (warning) domain=[MOD]", "RD-01 (warning) domain=[REQ]", "RD-02 (warning) domain=[REQ]", "RD-04 (warning) domain=[FUNC,MOD,SYS]", "RD-05 (warning) domain=[FUNC,MOD,SYS]", "SC-02 (warning) domain=[SCHEMA]", "TR-01 (warning) domain=[graph]", "UC-01 (warning) domain=[UC]", "UC-02 (warning) domain=[UC]", "UC-03 (warning) domain=[UC]", "UC-04 (warning) domain=[UC]", "VR-01 (info) domain=[TEST]"];
24
+ readonly conformanceRules: readonly ["RC-01 (warning)", "RC-02 (warning)", "RC-03 (warning)", "RC-04 (warning)", "RC-05 (warning)", "RC-06 (warning)", "RC-07 (warning)", "RC-08 (warning)", "RC-09 (warning)", "RC-10 (warning)"];
25
25
  readonly policy: readonly ["apTable = null", "boundaryWidth = {warning:5}", "criticality = {infrastructure:3}", "crossingFlows = {warning:3}", "decompositionBreadth = {min:3,warning:9}", "instability = null", "lcom4 = {info:4,warning:6}", "riskRpn = 100"];
26
- readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-04", "BQ-06", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R02", "CR-R03", "FC-02", "FC-03", "FC-04", "FM-01", "FM-02", "FM-03", "IO-01", "IO-02", "IR-01", "MS-01", "MS-02", "MS-03", "MT-01", "MT-02", "MT-04", "ND-01", "ND-02", "NFR-01", "R-01", "R-02", "R-04", "R-05", "R-08", "R-10", "R-12", "R-15", "R-16", "R-17", "R-18", "R-19", "R-20", "R-21", "R-22", "R-23", "R-26", "R-29", "R-30", "R-31", "R-32", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RD-01", "RD-02", "RD-03", "RD-04", "RD-05", "SC-02", "TR-01", "UC-01", "UC-02", "UC-03", "UC-04", "UC-05", "UC-06", "VR-01"];
27
- readonly exports: readonly ["ACCEPTED_FINDINGS_ATTRIBUTE", "AF_RULES", "ALL_RULE_DEFS", "AO_RULES", "AcceptedFindingSchema", "ActionPriority", "AnalysisArtifactId", "AnalysisFreshnessStampSchema", "ApTableSchema", "BOUNDED_PATTERNS", "BQ_RULES", "CLOSED_STATUS", "CODE_CONFORMANCE_RULES", "CR_RULES", "CodeFactsSchema", "DEFAULT_METRIC_POLICY", "DIMENSION_READINESS_DELTA_NAME", "DIMENSION_READINESS_NAME", "ELEMENT_ATTRIBUTES", "ELEMENT_DESCRIPTIONS", "ElementType", "ElementUid", "FC_RULES", "FM_RULES", "FileFactsSchema", "ImportEdgeSchema", "MAX_SLUG_LENGTH", "META_MODEL_VERSION", "MODELING_ELEMENT_TYPES", "MT_RULES", "MetricPolicySchema", "ND_RULES", "ONTOLOGY_VERSION", "OntologyElement", "OntologyGraph", "PHASE_READINESS_NAME", "PhaseGate", "READINESS_SCORED_PROFILES", "REQUIRED_PATTERNS", "RULES_VERSION", "RULE_HELP", "RULE_TASKS", "RULE_TO_DIMENSION", "RULE_TO_PHASE", "ReadinessDimension", "ReadinessReport", "ReadinessScore", "RealRefSchema", "RepoRelativePathSchema", "ReqKind", "RuleSeverity", "RuleViolation", "SC_RULES", "SteerSpace", "SteerTerm", "TASK_ENTRY", "TASK_OUTCOME_RULES", "TASK_OWNED_RULES", "TRACE_PATTERNS", "TestRefSchema", "TestRefsSchema", "TestResult", "Trace", "TraceType", "UC_RULES", "V3_RULES", "VIEW_RULES", "VerificationMethod", "ViolationCandidate", "ViolationContext", "acceptedRuleIds", "actionPriority", "admittingAlternatives", "allocationCohesion", "apMethod", "assumptionReviewPromoted", "attributeTypeOf", "boxContracts", "bq01Unambiguous", "bq02Verifiable", "bq04Necessary", "bq06Conforming", "bq07Complete", "bw02WhiteboxWidth", "chainsByFunc", "cl01ConopsCompleteness", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateTaskOutcomeRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc02LeafUcHasFchain", "fc03FchainFlat", "fc04ActorBounded", "flowProducers", "fm01MissingFmeaAttributes", "fm02MissingMitigation", "fm03HighRiskUnverified", "funcSimilarity", "funcSubtree", "functionCriticality", "getRuleDefsForProfile", "hydrateAttrValue", "importCoverage", "indexOf", "io01CrossModuleCompleteness", "isElementUid", "isValidTrace", "jaccard", "maxOccurs", "minOccurs", "moduleCrossings", "moduleMetrics", "mt01Instability", "mt02Lcom4", "mt04WhiteboxLcom4", "nd01FuncNearDuplicate", "nd02SchemaNearDuplicate", "nfr01BudgetOvershoot", "normalizeReqKinds", "pairsAbove", "parseElementUid", "sc02IsReferenced", "schemaSimilarity", "setBQ04SimilarityMatrix", "subtreeFuncs", "taskOf", "toElementUid", "toEvaluableGraph", "tokens", "traceRejection", "tradeDecisionRecorded", "tryParseElementUid", "uc01HasRequirements", "uc02HasActor", "uc03HasScenario", "uc04GoalDefined", "uc05HasPostcondition", "uc06HasPrecondition", "vr01TestNoResult", "whiteboxContractCount"];
26
+ readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-04", "BQ-06", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R02", "CR-R03", "CR-R05", "FC-02", "FC-03", "FC-04", "FC-05", "FM-01", "FM-02", "FM-03", "IO-01", "IO-02", "IR-01", "MS-01", "MS-02", "MS-03", "MT-01", "MT-02", "MT-04", "ND-01", "ND-02", "NFR-01", "R-01", "R-02", "R-04", "R-05", "R-08", "R-10", "R-12", "R-15", "R-16", "R-17", "R-18", "R-19", "R-20", "R-21", "R-22", "R-23", "R-26", "R-29", "R-30", "R-31", "R-32", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RD-01", "RD-02", "RD-04", "RD-05", "SC-02", "TR-01", "UC-01", "UC-02", "UC-03", "UC-04", "VR-01"];
27
+ readonly exports: readonly ["ACCEPTED_FINDINGS_ATTRIBUTE", "AF_RULES", "ALL_RULE_DEFS", "AO_RULES", "AcceptedFindingSchema", "ActionPriority", "AnalysisArtifactId", "AnalysisFreshnessStampSchema", "ApTableSchema", "BOUNDED_PATTERNS", "BQ_RULES", "CLOSED_STATUS", "CODE_CONFORMANCE_RULES", "CR_RULES", "CodeFactsSchema", "DEFAULT_METRIC_POLICY", "DIMENSION_READINESS_DELTA_NAME", "DIMENSION_READINESS_NAME", "ELEMENT_ATTRIBUTES", "ELEMENT_DESCRIPTIONS", "ElementType", "ElementUid", "FC_RULES", "FM_RULES", "FileFactsSchema", "FlowSync", "FunctionCriticality", "ImportEdgeSchema", "MAX_SLUG_LENGTH", "META_MODEL_VERSION", "MODELING_ELEMENT_TYPES", "MT_RULES", "MetricPolicySchema", "ModuleMetrics", "ND_RULES", "ONTOLOGY_VERSION", "OntologyElement", "OntologyGraph", "PHASE_READINESS_NAME", "PhaseGate", "READINESS_SCORED_PROFILES", "REQUIRED_PATTERNS", "RULES_VERSION", "RULE_HELP", "RULE_PRECONDITION", "RULE_TASKS", "RULE_TO_DIMENSION", "RULE_TO_PHASE", "ReadinessDimension", "ReadinessReport", "ReadinessScore", "RealRefSchema", "RepoRelativePathSchema", "ReqKind", "ReqRole", "RuleSeverity", "RuleViolation", "SC_RULES", "SteerSpace", "SteerTerm", "TASK_ENTRY", "TASK_OUTCOME_RULES", "TASK_OWNED_RULES", "TRACE_PATTERNS", "TestRefSchema", "TestRefsSchema", "TestResult", "Trace", "TraceType", "UC_RULES", "V3_RULES", "VIEW_RULES", "VerificationMethod", "ViolationCandidate", "ViolationContext", "acceptedRuleIds", "actionPriority", "admittingAlternatives", "allocationCohesion", "apMethod", "assumptionReviewPromoted", "attributeTypeOf", "boxContracts", "bq01Unambiguous", "bq02Verifiable", "bq04Necessary", "bq06Conforming", "bq07Complete", "bw02WhiteboxWidth", "chainsByFunc", "cl01ConopsCompleteness", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateTaskOutcomeRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc02LeafUcHasFchain", "fc03FchainFlat", "fc04ActorBounded", "fc05ChainConnected", "flowProducers", "fm01MissingFmeaAttributes", "fm02MissingMitigation", "fm03HighRiskUnverified", "funcSimilarity", "funcSubtree", "functionCriticality", "getRuleDefsForProfile", "hydrateAttrValue", "importCoverage", "indexOf", "io01CrossModuleCompleteness", "isElementUid", "isValidTrace", "jaccard", "maxOccurs", "minOccurs", "moduleCrossings", "moduleMetrics", "mt01Instability", "mt02Lcom4", "mt04WhiteboxLcom4", "nd01FuncNearDuplicate", "nd02SchemaNearDuplicate", "nfr01BudgetOvershoot", "normalizeReqKinds", "pairsAbove", "parseElementUid", "readFlowSync", "readRealRef", "readReqRole", "readTestRefs", "ruleApplies", "sc02IsReferenced", "schemaSimilarity", "setBQ04SimilarityMatrix", "subtreeFuncs", "taskOf", "toElementUid", "toEvaluableGraph", "tokens", "traceRejection", "tradeDecisionRecorded", "tryParseElementUid", "uc01HasRequirements", "uc02HasActor", "uc03HasScenario", "uc04GoalDefined", "vr01TestNoResult", "whiteboxContractCount"];
28
28
  };
@@ -11,9 +11,9 @@
11
11
  */
12
12
  export const GRAMMAR_SNAPSHOT = {
13
13
  versions: {
14
- ontology: "9.1.0",
15
- metaModel: "5.2.0",
16
- rules: "31.0.0",
14
+ ontology: "10.1.0",
15
+ metaModel: "6.0.0",
16
+ rules: "34.0.0",
17
17
  },
18
18
  elementTypes: [
19
19
  "ACTOR",
@@ -46,16 +46,16 @@ export const GRAMMAR_SNAPSHOT = {
46
46
  "CR -relation-> SCHEMA",
47
47
  "CR -relation-> UC",
48
48
  "FCHAIN -compose-> FUNC [1..*]",
49
- "FCHAIN -satisfy-> REQ",
49
+ "FCHAIN -satisfy-> REQ where target.kinds in {non-functional}",
50
50
  "FLOW -io-> ACTOR",
51
51
  "FLOW -io-> FUNC",
52
52
  "FLOW -relation-> SCHEMA [1]",
53
53
  "FUNC -allocate-> MOD [0..1]",
54
54
  "FUNC -compose-> FUNC [0..*]",
55
55
  "FUNC -io-> FLOW",
56
- "FUNC -satisfy-> REQ where target.kinds in {functional,postcondition,precondition}",
56
+ "FUNC -satisfy-> REQ where target.kinds in {functional}",
57
57
  "MOD -compose-> MOD [0..*]",
58
- "MOD -satisfy-> REQ where target.kinds in {mitigation,non-functional,risk}",
58
+ "MOD -satisfy-> REQ where target.kinds in {non-functional}",
59
59
  "MS -compose-> FUNC",
60
60
  "MS -compose-> REQ",
61
61
  "MS -compose-> UC",
@@ -65,7 +65,7 @@ export const GRAMMAR_SNAPSHOT = {
65
65
  "SYS -compose-> REQ [0..*]",
66
66
  "SYS -compose-> SYS [0..*]",
67
67
  "SYS -compose-> UC [1..*]",
68
- "SYS -satisfy-> REQ where target.kinds in {mitigation,non-functional,risk}",
68
+ "SYS -satisfy-> REQ where target.kinds in {non-functional}",
69
69
  "TEST -verify-> REQ",
70
70
  "TEST -verify-> SCHEMA",
71
71
  "UC -compose-> FCHAIN [1..*]",
@@ -95,8 +95,7 @@ export const GRAMMAR_SNAPSHOT = {
95
95
  "CR.rationale: string",
96
96
  "CR.spike: boolean",
97
97
  "CR.status: enum",
98
- "FLOW.protocol: string",
99
- "FLOW.qos: string",
98
+ "FLOW.sync: enum",
100
99
  "FUNC.concept: boolean",
101
100
  "FUNC.external: boolean",
102
101
  "FUNC.measuredMs: number",
@@ -111,6 +110,7 @@ export const GRAMMAR_SNAPSHOT = {
111
110
  "MOD.realRef: object",
112
111
  "REQ.detection: number",
113
112
  "REQ.occurrence: number",
113
+ "REQ.role: enum",
114
114
  "REQ.severity: number",
115
115
  "SCHEMA.concept: boolean",
116
116
  "SCHEMA.contract: string",
@@ -138,9 +138,11 @@ export const GRAMMAR_SNAPSHOT = {
138
138
  "CR-R01 (warning) domain=[CR]",
139
139
  "CR-R02 (warning) domain=[CR]",
140
140
  "CR-R03 (warning) domain=[all]",
141
+ "CR-R05 (warning) domain=[REQ]",
141
142
  "FC-02 (warning) domain=[UC]",
142
143
  "FC-03 (warning) domain=[FUNC]",
143
144
  "FC-04 (warning) domain=[FCHAIN]",
145
+ "FC-05 (warning) domain=[FCHAIN]",
144
146
  "FM-01 (warning) domain=[REQ]",
145
147
  "FM-02 (warning) domain=[REQ]",
146
148
  "FM-03 (warning) domain=[REQ]",
@@ -151,7 +153,7 @@ export const GRAMMAR_SNAPSHOT = {
151
153
  "MS-02 (warning) domain=[MS]",
152
154
  "MS-03 (info) domain=[CR]",
153
155
  "MT-01 (warning) domain=[MOD]",
154
- "MT-02 (info) domain=[MOD]",
156
+ "MT-02 (warning) domain=[MOD]",
155
157
  "MT-04 (info) domain=[FUNC]",
156
158
  "ND-01 (warning) domain=[FUNC]",
157
159
  "ND-02 (warning) domain=[SCHEMA]",
@@ -184,9 +186,11 @@ export const GRAMMAR_SNAPSHOT = {
184
186
  "RC-05 (warning) domain=[MOD]",
185
187
  "RC-06 (warning) domain=[FUNC,MOD,SCHEMA]",
186
188
  "RC-07 (warning) domain=[CR,SYS]",
189
+ "RC-08 (warning) domain=[SCHEMA]",
190
+ "RC-09 (warning) domain=[SCHEMA]",
191
+ "RC-10 (warning) domain=[MOD]",
187
192
  "RD-01 (warning) domain=[REQ]",
188
193
  "RD-02 (warning) domain=[REQ]",
189
- "RD-03 (info) domain=[REQ]",
190
194
  "RD-04 (warning) domain=[FUNC,MOD,SYS]",
191
195
  "RD-05 (warning) domain=[FUNC,MOD,SYS]",
192
196
  "SC-02 (warning) domain=[SCHEMA]",
@@ -195,8 +199,6 @@ export const GRAMMAR_SNAPSHOT = {
195
199
  "UC-02 (warning) domain=[UC]",
196
200
  "UC-03 (warning) domain=[UC]",
197
201
  "UC-04 (warning) domain=[UC]",
198
- "UC-05 (info) domain=[UC]",
199
- "UC-06 (info) domain=[UC]",
200
202
  "VR-01 (info) domain=[TEST]",
201
203
  ],
202
204
  conformanceRules: [
@@ -207,6 +209,9 @@ export const GRAMMAR_SNAPSHOT = {
207
209
  "RC-05 (warning)",
208
210
  "RC-06 (warning)",
209
211
  "RC-07 (warning)",
212
+ "RC-08 (warning)",
213
+ "RC-09 (warning)",
214
+ "RC-10 (warning)",
210
215
  ],
211
216
  policy: [
212
217
  "apTable = null",
@@ -235,9 +240,11 @@ export const GRAMMAR_SNAPSHOT = {
235
240
  "CR-R01",
236
241
  "CR-R02",
237
242
  "CR-R03",
243
+ "CR-R05",
238
244
  "FC-02",
239
245
  "FC-03",
240
246
  "FC-04",
247
+ "FC-05",
241
248
  "FM-01",
242
249
  "FM-02",
243
250
  "FM-03",
@@ -281,9 +288,11 @@ export const GRAMMAR_SNAPSHOT = {
281
288
  "RC-05",
282
289
  "RC-06",
283
290
  "RC-07",
291
+ "RC-08",
292
+ "RC-09",
293
+ "RC-10",
284
294
  "RD-01",
285
295
  "RD-02",
286
- "RD-03",
287
296
  "RD-04",
288
297
  "RD-05",
289
298
  "SC-02",
@@ -292,8 +301,6 @@ export const GRAMMAR_SNAPSHOT = {
292
301
  "UC-02",
293
302
  "UC-03",
294
303
  "UC-04",
295
- "UC-05",
296
- "UC-06",
297
304
  "VR-01",
298
305
  ],
299
306
  exports: [
@@ -322,12 +329,15 @@ export const GRAMMAR_SNAPSHOT = {
322
329
  "FC_RULES",
323
330
  "FM_RULES",
324
331
  "FileFactsSchema",
332
+ "FlowSync",
333
+ "FunctionCriticality",
325
334
  "ImportEdgeSchema",
326
335
  "MAX_SLUG_LENGTH",
327
336
  "META_MODEL_VERSION",
328
337
  "MODELING_ELEMENT_TYPES",
329
338
  "MT_RULES",
330
339
  "MetricPolicySchema",
340
+ "ModuleMetrics",
331
341
  "ND_RULES",
332
342
  "ONTOLOGY_VERSION",
333
343
  "OntologyElement",
@@ -338,6 +348,7 @@ export const GRAMMAR_SNAPSHOT = {
338
348
  "REQUIRED_PATTERNS",
339
349
  "RULES_VERSION",
340
350
  "RULE_HELP",
351
+ "RULE_PRECONDITION",
341
352
  "RULE_TASKS",
342
353
  "RULE_TO_DIMENSION",
343
354
  "RULE_TO_PHASE",
@@ -347,6 +358,7 @@ export const GRAMMAR_SNAPSHOT = {
347
358
  "RealRefSchema",
348
359
  "RepoRelativePathSchema",
349
360
  "ReqKind",
361
+ "ReqRole",
350
362
  "RuleSeverity",
351
363
  "RuleViolation",
352
364
  "SC_RULES",
@@ -405,6 +417,7 @@ export const GRAMMAR_SNAPSHOT = {
405
417
  "fc02LeafUcHasFchain",
406
418
  "fc03FchainFlat",
407
419
  "fc04ActorBounded",
420
+ "fc05ChainConnected",
408
421
  "flowProducers",
409
422
  "fm01MissingFmeaAttributes",
410
423
  "fm02MissingMitigation",
@@ -433,6 +446,11 @@ export const GRAMMAR_SNAPSHOT = {
433
446
  "normalizeReqKinds",
434
447
  "pairsAbove",
435
448
  "parseElementUid",
449
+ "readFlowSync",
450
+ "readRealRef",
451
+ "readReqRole",
452
+ "readTestRefs",
453
+ "ruleApplies",
436
454
  "sc02IsReferenced",
437
455
  "schemaSimilarity",
438
456
  "setBQ04SimilarityMatrix",
@@ -448,8 +466,6 @@ export const GRAMMAR_SNAPSHOT = {
448
466
  "uc02HasActor",
449
467
  "uc03HasScenario",
450
468
  "uc04GoalDefined",
451
- "uc05HasPostcondition",
452
- "uc06HasPrecondition",
453
469
  "vr01TestNoResult",
454
470
  "whiteboxContractCount",
455
471
  ],