• R/O
  • SSH

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン0a19ae72ffee29f969aa58f518b813a2b8b17a3c (tree)
日時2023-11-09 06:11:16
作者Albert Mietus < albert AT mietus DOT nl >
コミッターAlbert Mietus < albert AT mietus DOT nl >

ログメッセージ

more AR docs

変更サマリ

差分

diff -r 4a39e9695548 -r 0a19ae72ffee CCastle/DocParts/Design/01.Architecture/01.AIGR_pipeline.rst
--- a/CCastle/DocParts/Design/01.Architecture/01.AIGR_pipeline.rst Wed Nov 08 16:17:52 2023 +0100
+++ b/CCastle/DocParts/Design/01.Architecture/01.AIGR_pipeline.rst Wed Nov 08 22:11:16 2023 +0100
@@ -28,7 +28,7 @@
2828 |BR|
2929 Alternatively, each component can be a process, where te several processes communicate with e.g. unix-pipes, or
3030 network-connections). And there are many more option, not only separated in space, but also in time: As the AIGR can be
31-serialised [#pickle]_, it is possible to save it in file, and read it for the next component, later ...
31+serialised [#pickle]_, it is possible to save it in file, and read it for the next component, later ...
3232
3333 .. Important:: Although it is possible to saving a (pickled) AIGR, that component (nor action) is **NOT** a `Writer`!
3434
@@ -67,10 +67,10 @@
6767
6868 .. uml:: AIGR_Transformers.puml
6969 :align: right
70+ :scale: 50%
7071
7172 FSM
7273 ---
73-
7474 In Castle, one can directly describe a FSM (see: :ref:`FSMs-are-needed`) including advance/extended variants. Like
7575 the non-deterministic “NFA”s, and the “State-Charts” (known from UML), with orthogonale regions and hierarchically
7676 ‘superstates’. See :need:`U_FSM_Syntax` for the demands.
@@ -104,7 +104,7 @@
104104 the receiving event-handler expect a traditional call, will not work. By choosing one Machinery-Transformer, all
105105 bolt-and nuts will fit.
106106
107-.. caution:: This is not an requirement
107+.. caution:: This is **not** an requirement!
108108
109109 One can imagine, that (eventually) a Mixed-Machinery is used. Ultimately, only the details of each (individual)
110110 connection should be aligned.
@@ -163,11 +163,49 @@
163163
164164 .. _AIGR_component:
165165
166+The AIGR auxiliary component
167+============================
168+
169+The `AIGR` *auxiliary* component describes & handles the ‘:ref:`AIGR`’ and is used by all regulair components. Sometimes
170+it (the `AIGR`) is called an `“intermediate language” (‘IM’), or “intermediate representation” (‘IR’)
171+<https://en.wikipedia.org/wiki/Intermediate_representation>`__. Many existing IMs are quite “flat”, low-level and very
172+operational, like `RTL <https://en.wikipedia.org/wiki/Register_transfer_language>`__ or `SSA
173+<https://en.wikipedia.org/wiki/Static_single-assignment_form>`__ -- they are great to convert code to assembly.
166174
167175
168-The AIGR auxiliary component
169-============================
170-ToDo
176+
177+.. uml:: AIGR-exampleSieve.puml
178+ :align: right
179+ :scale: 70%
180+ :caption: The *Sieve Protocols*, as example of a AIGR (part)
181+
182+For the *CCastle Workshop Tools*, a more abstract representation is chosen, with more structure. Visually, it resembles
183+a tree, but without the need to have a single root (making it a “forest”), and with interconnects (making it a
184+graph). Structurally, it is not dissimular to the XLM/DOM, known by many webpages; but again without the “single
185+document-root” -- the DOM has interconnects, known as “links” (a term not used in the AIGR).
186+|BR|
187+The AIGR reminds also to the AST (of CCastle), after all, each language construct is “stored” in the AIGR. Some see it as a
188+semantically parsed AST. A namedID (like a variable, or function) in the source, when in the same namespace denotes the
189+same artifact -- even it is mention at several places (and can have aliases). In the AIGR it is the same ‘node’ having
190+multiple incoming ‘edges’ -- and so, violates the tree’s non-cycle rule.
191+
192+The AIGR-component describes all possible elements, and the relations (so it is a bit like the XML `DTD
193+<https://en.wikipedia.org/wiki/Document_type_definition>`__ or `Schema
194+<https://en.wikipedia.org/wiki/XML_schema>`__). And has (will have) general routines to facilitate handling the AIGR.
195+|BR|
196+By example, you can expect routines to “save” an AIGR to file, and “load” is later.
197+
198+.. warning:: Although the AIGR is a graph, the AIGR-component will **not** be able to visualize that graph.
199+
200+ Other workshop tools may do that, and probably use the AIGR-component to read it. The visualising is part of that
201+ tool
202+
203+
204+Currently, the AIGR is in the design phase, and may change.
205+|BR|
206+For that reason, only a Python dataclass reference model is available (Work-in-Progress). The (unit & behaviour) tests
207+and TesDoubles make it quite understandable. Once, it will be fully documented (and versioned) And available for
208+multiple languages (including Castle :-)
171209
172210
173211
diff -r 4a39e9695548 -r 0a19ae72ffee CCastle/DocParts/Design/01.Architecture/AIGR-exampleSieve.puml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCastle/DocParts/Design/01.Architecture/AIGR-exampleSieve.puml Wed Nov 08 22:11:16 2023 +0100
@@ -0,0 +1,40 @@
1+@startuml
2+!include AR_skins.inc
3+
4+folder "AIGR example" #c0c0c0 {
5+object StartSieve <<EventProtocol>>
6+object runTo <<Event>>{
7+ max: int
8+}
9+object newMax <<Event>> {
10+ max: int
11+}
12+ StartSieve *-- runTo
13+ StartSieve *-- newMax
14+
15+
16+object SlowStart << EventProtocol>>
17+object queue_max <<TypedParameter>> {
18+ :int
19+}
20+object setMax <<Event>> {
21+ setMax :int
22+}
23+ SlowStart *-- setMax
24+ SlowStart *- queue_max
25+
26+object "SlowStart(1)" as SlowStart_1 <<ProtocolWrapper>> {
27+ queue_max=1
28+}
29+ SlowStart <-- SlowStart_1: based on
30+
31+
32+object SimpleSieve <<EventProtocol>>
33+ SlowStart_1 <-- SimpleSieve: based_on
34+
35+object input <<Event>> {
36+ try :int
37+}
38+ SimpleSieve *--input
39+}
40+@enduml
diff -r 4a39e9695548 -r 0a19ae72ffee CCastle/DocParts/Design/01.Architecture/AIGR_Transformers.puml
--- a/CCastle/DocParts/Design/01.Architecture/AIGR_Transformers.puml Wed Nov 08 16:17:52 2023 +0100
+++ b/CCastle/DocParts/Design/01.Architecture/AIGR_Transformers.puml Wed Nov 08 22:11:16 2023 +0100
@@ -1,8 +1,8 @@
11 @startuml
22 skin rose
3-'!include AR_skins.inc
3+!include AR_skins.inc
44 left to right direction
5-scale 0.5
5+
66
77 ''NOTE: Old RTD/plantuml.1.2020.2.jar syntax!
88
diff -r 4a39e9695548 -r 0a19ae72ffee CCastle/DocParts/Design/01.Architecture/AR_skins.inc
--- a/CCastle/DocParts/Design/01.Architecture/AR_skins.inc Wed Nov 08 16:17:52 2023 +0100
+++ b/CCastle/DocParts/Design/01.Architecture/AR_skins.inc Wed Nov 08 22:11:16 2023 +0100
@@ -27,3 +27,9 @@
2727 BorderColor #000066
2828 BackgroundColor #eeeeff
2929 }
30+
31+skinparam object {
32+ BorderColor #000066
33+ BackgroundColor white
34+ FontColor #000066
35+}
diff -r 4a39e9695548 -r 0a19ae72ffee CCastle/DocParts/Design/50.notes/231009a_TD-AIGR_3protocols.rst
--- a/CCastle/DocParts/Design/50.notes/231009a_TD-AIGR_3protocols.rst Wed Nov 08 16:17:52 2023 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
1-.. -*- plantuml -*-
2-
3-TestDoubles/AIGR: The protocols of the Sieve
4-============================================
5-
6-.. uml::
7-
8- @startuml
9-
10- object StartSieve <<EventProtocol>>
11- object runTo <<Event>>{
12- max: int
13- }
14- object newMax <<Event>> {
15- max: int
16- }
17- StartSieve *-- runTo
18- StartSieve *-- newMax
19-
20- '---
21-
22- object SlowStart << EventProtocol>>
23- object queue_max <<TypedParameter>> {
24- :int
25- }
26- object setMax <<Event>> {
27- setMax :int
28- }
29- SlowStart *-- setMax
30- SlowStart *- queue_max
31-
32- '---
33-
34- object "SlowStart(1)" as SlowStart_1 <<ProtocolWrapper>> {
35- queue_max=1
36- }
37- SlowStart <-- SlowStart_1: based on
38-
39-
40- '---
41-
42- object SimpleSieve <<EventProtocol>>
43- SlowStart_1 <-- SimpleSieve: based_on
44-
45- object input <<Event>> {
46- try :int
47- }
48- SimpleSieve *--input
49-
50- @enduml