-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstance.drawio
More file actions
154 lines (154 loc) · 16.8 KB
/
instance.drawio
File metadata and controls
154 lines (154 loc) · 16.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.3.6 Chrome/140.0.7339.249 Electron/38.8.0 Safari/537.36" version="29.3.6">
<diagram name="ComponentViewer Instance" id="d5">
<mxGraphModel dx="4178" dy="1953" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="4200" pageHeight="3400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" parent="1" style="text;html=1;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;fillColor=none;strokeColor=none;fontColor=#333333;" value="ComponentViewer Instance — Orchestrator, Init Pipeline and Update" vertex="1">
<mxGeometry height="50" width="1400" x="160" y="20" as="geometry" />
</mxCell>
<mxCell id="leg_title" parent="1" style="text;html=1;fontSize=13;fontStyle=1;align=left;fillColor=none;strokeColor=none;" value="Legend" vertex="1">
<mxGeometry height="24" width="80" x="50" y="80" as="geometry" />
</mxCell>
<mxCell id="leg1c" parent="1" style="rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="18" width="18" x="50" y="110" as="geometry" />
</mxCell>
<mxCell id="leg1t" parent="1" style="text;html=1;fontSize=11;align=left;fillColor=none;strokeColor=none;" value="Main class" vertex="1">
<mxGeometry height="18" width="120" x="76" y="110" as="geometry" />
</mxCell>
<mxCell id="leg2c" parent="1" style="rounded=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="18" width="18" x="50" y="136" as="geometry" />
</mxCell>
<mxCell id="leg2t" parent="1" style="text;html=1;fontSize=11;align=left;fillColor=none;strokeColor=none;" value="Pipeline step" vertex="1">
<mxGeometry height="18" width="120" x="76" y="136" as="geometry" />
</mxCell>
<mxCell id="leg3c" parent="1" style="rounded=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="" vertex="1">
<mxGeometry height="18" width="18" x="50" y="162" as="geometry" />
</mxCell>
<mxCell id="leg3t" parent="1" style="text;html=1;fontSize=11;align=left;fillColor=none;strokeColor=none;" value="Flow description" vertex="1">
<mxGeometry height="18" width="140" x="76" y="162" as="geometry" />
</mxCell>
<mxCell id="leg4c" parent="1" style="rounded=1;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;" value="" vertex="1">
<mxGeometry height="18" width="18" x="50" y="188" as="geometry" />
</mxCell>
<mxCell id="leg4t" parent="1" style="text;html=1;fontSize=11;align=left;fillColor=none;strokeColor=none;" value="Owned subsystem" vertex="1">
<mxGeometry height="18" width="150" x="76" y="188" as="geometry" />
</mxCell>
<mxCell id="i_cvi" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=top;align=left;spacingLeft=4;spacingTop=2;strokeWidth=2;" value="<p style="margin:0;text-align:center;font-size:15px;"><b>ComponentViewerInstance</b></p><hr size="1"/><p style="margin:4px 8px;font-size:11px;text-align:left;"><b>Static:</b><br/>_fileKeysByPath: Map&lt;string, string&gt;<br/>_fileKeyCounts: Map&lt;string, number&gt;<br/><br/><b>Instance:</b><br/>_model: ScvdComponentViewer<br/>_statementEngine: StatementEngine<br/>_guiTree: ScvdGuiTree<br/>_fileKey: string (derived from file path)<br/>_instanceKey: string (fileKey + counter)<br/>_scvdEvalContext: ScvdEvalContext</p><hr size="1"/><p style="margin:4px 8px;font-size:11px;text-align:left;">readModel(scvdFilePath, session, tracker)<br/>update() — refresh all values<br/>get model / statementEngine / guiTree</p>" vertex="1">
<mxGeometry height="380" width="460" x="216" y="104" as="geometry" />
</mxCell>
<mxCell id="i_step1" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 1: Read File</b><br/>readFile(scvdFilePath)<br/>Read raw SCVD XML content" vertex="1">
<mxGeometry height="80" width="300" x="200" y="640" as="geometry" />
</mxCell>
<mxCell id="i_step2" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 2: Inject Line Numbers</b><br/>injectLineNumbers(xmlContent)<br/>Add line tracking attributes" vertex="1">
<mxGeometry height="80" width="340" x="620" y="640" as="geometry" />
</mxCell>
<mxCell id="i_step3" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 3: Parse XML</b><br/>parseStringPromise(xml) via xml2js<br/>Convert to JSON structure" vertex="1">
<mxGeometry height="80" width="340" x="1080" y="640" as="geometry" />
</mxCell>
<mxCell id="i_step4" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 4: Build Model</b><br/>new ScvdComponentViewer()<br/>model.readXml(json)" vertex="1">
<mxGeometry height="80" width="300" x="196" y="780" as="geometry" />
</mxCell>
<mxCell id="i_step5" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 5: Create EvalContext</b><br/>new ScvdEvalContext()<br/>evalContext.init(session, tracker)" vertex="1">
<mxGeometry height="80" width="340" x="620" y="780" as="geometry" />
</mxCell>
<mxCell id="i_step6" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 6: Wire Execution Context</b><br/>model.setExecutionContextAll(ctx)" vertex="1">
<mxGeometry height="80" width="340" x="1080" y="780" as="geometry" />
</mxCell>
<mxCell id="i_step7" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 7: Configure</b><br/>model.configureAll()<br/>Recursive configure + clear caches" vertex="1">
<mxGeometry height="80" width="300" x="200" y="910" as="geometry" />
</mxCell>
<mxCell id="i_step8" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 8: Validate</b><br/>model.validateAll()<br/>Recursive validation" vertex="1">
<mxGeometry height="80" width="300" x="660" y="910" as="geometry" />
</mxCell>
<mxCell id="i_step9" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 9: Resolve Types</b><br/>new Resolver(model)<br/>resolver.resolve()" vertex="1">
<mxGeometry height="80" width="300" x="1080" y="920" as="geometry" />
</mxCell>
<mxCell id="i_step10" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 10: Calculate Typedefs</b><br/>model.calculateTypedefs()<br/>Compute sizes for all types" vertex="1">
<mxGeometry height="80" width="340" x="196" y="1030" as="geometry" />
</mxCell>
<mxCell id="i_step11" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 11: Build Statement Engine</b><br/>new StatementEngine(model, ctx)<br/>statementEngine.initialize()" vertex="1">
<mxGeometry height="80" width="380" x="630" y="1040" as="geometry" />
</mxCell>
<mxCell id="i_step12" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#d5e8d4;strokeColor=#82b366;align=center;verticalAlign=middle;" value="<b>Step 12: Create GUI Tree</b><br/>new ScvdGuiTree(instanceKey)<br/>Root node for tree view" vertex="1">
<mxGeometry height="80" width="340" x="1070" y="1040" as="geometry" />
</mxCell>
<mxCell id="i_update_flow" parent="1" style="rounded=1;whiteSpace=wrap;html=1;overflow=fill;fontSize=12;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;align=left;spacingLeft=4;spacingTop=2;strokeWidth=2;" value="<p style="margin:0;text-align:center;font-size:14px;"><b>update() Flow</b></p><hr size="1"/><p style="margin:4px 8px;font-size:12px;text-align:left;">1. guiTree.clear() — remove all children<br/><br/>2. statementEngine.executeAll(guiTree)<br/> — Resets caches (memory, eval, printf)<br/> — Primes target read cache (prefetch)<br/> — Walks statement tree depth-first<br/> — Each statement reads target data + populates GUI nodes<br/><br/>3. GUI tree now contains fresh name/value pairs<br/> ready for ComponentViewerTreeDataProvider</p>" vertex="1">
<mxGeometry height="280" width="360" x="1250" y="200" as="geometry" />
</mxCell>
<mxCell id="i_owned_model" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;align=center;" value="<i>SCVD Model</i><br/>(ScvdComponentViewer)" vertex="1">
<mxGeometry height="60" width="300" x="860" y="104" as="geometry" />
</mxCell>
<mxCell id="i_owned_eval" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;align=center;" value="<i>Evaluation Layer</i><br/>(ScvdEvalContext)" vertex="1">
<mxGeometry height="60" width="300" x="860" y="188" as="geometry" />
</mxCell>
<mxCell id="i_owned_engine" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;align=center;" value="<i>Statement Engine</i><br/>(StatementEngine)" vertex="1">
<mxGeometry height="60" width="300" x="860" y="264" as="geometry" />
</mxCell>
<mxCell id="i_owned_gui" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;align=center;" value="<i>GUI Tree</i><br/>(ScvdGuiTree)" vertex="1">
<mxGeometry height="60" width="300" x="860" y="340" as="geometry" />
</mxCell>
<mxCell id="i_owned_resolver" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;align=center;" value="<i>Resolver</i><br/>(used during init, not stored)" vertex="1">
<mxGeometry height="60" width="300" x="860" y="420" as="geometry" />
</mxCell>
<mxCell id="i_owned_datahosts" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f8cecc;strokeColor=#b85450;dashed=1;align=center;" value="<i>Data Hosts and Caches</i><br/>(inside ScvdEvalContext)" vertex="1">
<mxGeometry height="60" width="300" x="860" y="500" as="geometry" />
</mxCell>
<mxCell id="ie_arrow1" edge="1" parent="1" source="i_step1" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step2" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow2" edge="1" parent="1" source="i_step2" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step3" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow3" edge="1" parent="1" source="i_step3" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step4" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow4" edge="1" parent="1" source="i_step4" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step5" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow5" edge="1" parent="1" source="i_step5" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step6" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow6" edge="1" parent="1" source="i_step6" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step7" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow7" edge="1" parent="1" source="i_step7" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step8" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow8" edge="1" parent="1" source="i_step8" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step9" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow9" edge="1" parent="1" source="i_step9" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step10" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow10" edge="1" parent="1" source="i_step10" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step11" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_arrow11" edge="1" parent="1" source="i_step11" style="endArrow=open;endFill=0;endSize=12;strokeWidth=2;strokeColor=#82b366;" target="i_step12" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_own1" edge="1" parent="1" source="i_cvi" style="endArrow=open;endFill=0;endSize=10;strokeWidth=1.5;dashed=1;strokeColor=#b85450;fontSize=10;fontStyle=2;labelBackgroundColor=#FFFFFF;" target="i_owned_model" value="_model">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_own2" edge="1" parent="1" source="i_cvi" style="endArrow=open;endFill=0;endSize=10;strokeWidth=1.5;dashed=1;strokeColor=#b85450;fontSize=10;fontStyle=2;labelBackgroundColor=#FFFFFF;" target="i_owned_eval" value="_scvdEvalContext">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_own3" edge="1" parent="1" source="i_cvi" style="endArrow=open;endFill=0;endSize=10;strokeWidth=1.5;dashed=1;strokeColor=#b85450;fontSize=10;fontStyle=2;labelBackgroundColor=#FFFFFF;" target="i_owned_engine" value="_statementEngine">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_own4" edge="1" parent="1" source="i_cvi" style="endArrow=open;endFill=0;endSize=10;strokeWidth=1.5;dashed=1;strokeColor=#b85450;fontSize=10;fontStyle=2;labelBackgroundColor=#FFFFFF;" target="i_owned_gui" value="_guiTree">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_own5" edge="1" parent="1" source="i_cvi" style="endArrow=open;endFill=0;endSize=10;strokeWidth=1.5;dashed=1;strokeColor=#b85450;fontSize=10;fontStyle=2;labelBackgroundColor=#FFFFFF;" target="i_owned_resolver" value="transient">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ie_own6" edge="1" parent="1" source="i_cvi" style="endArrow=open;endFill=0;endSize=10;strokeWidth=1.5;dashed=1;strokeColor=#b85450;fontSize=10;fontStyle=2;labelBackgroundColor=#FFFFFF;" target="i_owned_datahosts" value="inside evalCtx">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="i_pipeline_label" parent="1" style="text;html=1;fontSize=16;fontStyle=1;align=center;fillColor=none;strokeColor=none;fontColor=#82b366;" value="readModel() Pipeline (Steps 1-12)" vertex="1">
<mxGeometry height="40" width="500" x="400" y="560" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>