• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2


Commit MetaInfo

Revision5fe4f028e4acddef550d8a026f27c595bee58112 (tree)
Time2023-10-09 18:15:38
AuthorAlbert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

Some rst/uml diagrams added on TestDoubles/AIGR :protocols

Change Summary

Incremental Difference

diff -r b8d358473d84 -r 5fe4f028e4ac DocParts/Design/00.OLD-Peg.rst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DocParts/Design/00.OLD-Peg.rst Mon Oct 09 11:15:38 2023 +0200
@@ -0,0 +1,139 @@
1+OLD-Peg Diagram
2+===============
3+
4+This anayse/design(?) date from around 2021/2022
5+
6+.. UML::
7+
8+ @startuml
9+
10+ package _base {
11+
12+ abstract AST_BASE {
13+ -_parse_tree
14+ +position()
15+ +position_end()
16+ ~serialize()
17+ }
18+
19+ class ID {
20+ +name
21+ #validate_or_raise()
22+ }
23+
24+ ID =|> AST_BASE
25+ }
26+
27+ package MixIns #Gray {
28+
29+ class MixIn_value_attribute<MixIn> {
30+ _value
31+ value()
32+ }
33+
34+ class MixIn_expr_attribute<MixIn> {
35+ _expr
36+ expr()
37+ }
38+
39+ class MixIn_children_tuple<MixIn> {
40+ _children :Tuple
41+ __len__()
42+ __getitem__()
43+ __iter__()
44+ }
45+ }
46+
47+ package Peg #0077ff {
48+
49+ abstract PEG
50+ AST_BASE <|== PEG
51+
52+
53+
54+ abstract Terminal
55+ PEG <|== Terminal
56+ MixIn_value_attribute <|... Terminal
57+ Terminal <|== StrTerm
58+ Terminal <|== RexExpTerm
59+ Terminal <|== Number
60+
61+ abstract Markers #Orange
62+ annotation EOF #Orange
63+ PEG <|== Markers
64+ Markers <|== EOF
65+
66+ abstract NonTerminal
67+ PEG <|== NonTerminal
68+ abstract Expression
69+ NonTerminal <|== Expression
70+
71+ class Setting {
72+ name : ID
73+ value
74+ }
75+ PEG <|== Setting
76+
77+ class Rule {
78+ name :ID
79+ expr :[] Expression
80+ }
81+ NonTerminal <|== Rule
82+
83+ interface Rules
84+ PEG <|== Rules
85+ MixIn_children_tuple <|... Rules
86+ Rules <|== ParseRules
87+ Rules <|== Settings
88+
89+ class Grammar {
90+ +all_rules :Rules
91+ -parse_rules :ParseRules
92+ -settings :Settings
93+ }
94+ NonTerminal <|== Grammar
95+
96+
97+ abstract Group
98+ Expression <|== Group
99+ Group <|== UnorderedGroup
100+ MixIn_expr_attribute <|... UnorderedGroup
101+ abstract Quantity
102+ Group <|== Quantity
103+ MixIn_expr_attribute <|... Quantity
104+ Expression <|== Sequence
105+ MixIn_children_tuple <|... Sequence
106+
107+ Expression <|== OrderedChoice
108+ MixIn_children_tuple <|... OrderedChoice
109+
110+ class Optional << (?, #0077ff) >>
111+ Quantity <|== Optional
112+ class ZeroOrMore << (*, #0077ff) >>
113+ Quantity <|== ZeroOrMore
114+ class OneOrMore << (+, #0077ff) >>
115+ Quantity <|== OneOrMore
116+
117+ abstract Predicate
118+ Expression <|== Predicate
119+ MixIn_expr_attribute <|... Predicate
120+ class AndPredicate << (&, #0077ff) notconsuming >>
121+ Predicate <|== AndPredicate
122+ class NotPredicate << (! ,#0077ff) not consuming >>
123+ Predicate <|== NotPredicate
124+
125+ }
126+ @enduml
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
diff -r b8d358473d84 -r 5fe4f028e4ac DocParts/Design/231005-aigr-CompProto.rst
--- a/DocParts/Design/231005-aigr-CompProto.rst Sun Oct 08 23:28:37 2023 +0200
+++ b/DocParts/Design/231005-aigr-CompProto.rst Mon Oct 09 11:15:38 2023 +0200
@@ -1,4 +1,8 @@
1-AIGR:: ComponentInterface and Protocols (231005)
1+.. -*- plantuml -*-
2+.. filename: date of start
3+.. date in title: last version
4+
5+AIGR:: ComponentInterface and Protocols (231009)
26 ================================================
37
48 .. uml::
@@ -6,65 +10,41 @@
610 @startuml
711
812 abstract AIGR
9- class CompomnentInterface
13+ class ComponentInterface
1014 class Protocol
1115 class EventProtocol
1216 class Port {
1317 - direction :PortDirection
1418 - type :PortType
1519 }
16-
17-
1820 abstract ProtocolWrapper {
1921 -based_on\n(the Generic Protocol)
2022 }
21-
2223 class Argument <<(S,lightgreen)>> {
2324 +value :Any
2425 +name :Optional[Str]
2526 }
26-
2727 class TypedParameters <<(S,lightgreen)>> {
2828 +name :str
2929 +type :Type
3030 }
31-
3231 class Type <<(T,lightblue)>>
32+ '--------------------
3333
34- AIGR <-- Protocol
35- AIGR <-- Event
36- AIGR <-- CompomnentInterface
37-
38- CompomnentInterface <--- CompomnentInterface: based_on
39- CompomnentInterface *-- "*" Port
40-
34+ ComponentInterface <--- ComponentInterface: based_on
35+ Port "*" -* ComponentInterface
4136
4237 Protocol <--- Protocol: based_on
4338 Protocol <-- EventProtocol
4439 Protocol <-- ProtocolWrapper
4540
46-
4741 ProtocolWrapper *- "+"Argument
4842
49- EventProtocol *-- "*" Event: events
43+ EventProtocol *- "*" Event: events
5044 Event *-- "*" TypedParameters : typedParameters
5145 Event o- "?" Type: returns
5246
53- Port o--- Protocol: type
54-
55-
56- package ToDesign <<Rectangle>> #gray {
57- class Compomnent
58- class CompomnentImplementation
59- Compomnent *- CompomnentInterface
60- Compomnent *- CompomnentImplementation
47+ Port o. Protocol: type
6148
62- }
49+ @enduml
6350
64- package ToDo/Later <<Rectangle>> #gray {
65- Protocol <- DataProtocol
66- Protocol <-- StreamProtocol
67-
68- }
69- @enduml
70-
diff -r b8d358473d84 -r 5fe4f028e4ac DocParts/Design/231009_TD-AIGR_3ptotocols.rst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DocParts/Design/231009_TD-AIGR_3ptotocols.rst Mon Oct 09 11:15:38 2023 +0200
@@ -0,0 +1,42 @@
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 SimpleSieve <<EventProtocol>>
35+ SlowStart <-- SimpleSieve: based_on
36+
37+ object input <<Event>> {
38+ try :int
39+ }
40+ SimpleSieve *--input
41+
42+ @enduml
diff -r b8d358473d84 -r 5fe4f028e4ac DocParts/Design/OLD-Peg.rst
--- a/DocParts/Design/OLD-Peg.rst Sun Oct 08 23:28:37 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
1-OLD-Peg Diagram
2-===============
3-
4-This anayse/design(?) date from around 2021/2022
5-
6-.. UML::
7-
8- @startuml
9-
10- package _base {
11-
12- abstract AST_BASE {
13- -_parse_tree
14- +position()
15- +position_end()
16- ~serialize()
17- }
18-
19- class ID {
20- +name
21- #validate_or_raise()
22- }
23-
24- ID =|> AST_BASE
25- }
26-
27- package MixIns #Gray {
28-
29- class MixIn_value_attribute<MixIn> {
30- _value
31- value()
32- }
33-
34- class MixIn_expr_attribute<MixIn> {
35- _expr
36- expr()
37- }
38-
39- class MixIn_children_tuple<MixIn> {
40- _children :Tuple
41- __len__()
42- __getitem__()
43- __iter__()
44- }
45- }
46-
47- package Peg #0077ff {
48-
49- abstract PEG
50- AST_BASE <|== PEG
51-
52-
53-
54- abstract Terminal
55- PEG <|== Terminal
56- MixIn_value_attribute <|... Terminal
57- Terminal <|== StrTerm
58- Terminal <|== RexExpTerm
59- Terminal <|== Number
60-
61- abstract Markers #Orange
62- annotation EOF #Orange
63- PEG <|== Markers
64- Markers <|== EOF
65-
66- abstract NonTerminal
67- PEG <|== NonTerminal
68- abstract Expression
69- NonTerminal <|== Expression
70-
71- class Setting {
72- name : ID
73- value
74- }
75- PEG <|== Setting
76-
77- class Rule {
78- name :ID
79- expr :[] Expression
80- }
81- NonTerminal <|== Rule
82-
83- interface Rules
84- PEG <|== Rules
85- MixIn_children_tuple <|... Rules
86- Rules <|== ParseRules
87- Rules <|== Settings
88-
89- class Grammar {
90- +all_rules :Rules
91- -parse_rules :ParseRules
92- -settings :Settings
93- }
94- NonTerminal <|== Grammar
95-
96-
97- abstract Group
98- Expression <|== Group
99- Group <|== UnorderedGroup
100- MixIn_expr_attribute <|... UnorderedGroup
101- abstract Quantity
102- Group <|== Quantity
103- MixIn_expr_attribute <|... Quantity
104- Expression <|== Sequence
105- MixIn_children_tuple <|... Sequence
106-
107- Expression <|== OrderedChoice
108- MixIn_children_tuple <|... OrderedChoice
109-
110- class Optional << (?, #0077ff) >>
111- Quantity <|== Optional
112- class ZeroOrMore << (*, #0077ff) >>
113- Quantity <|== ZeroOrMore
114- class OneOrMore << (+, #0077ff) >>
115- Quantity <|== OneOrMore
116-
117- abstract Predicate
118- Expression <|== Predicate
119- MixIn_expr_attribute <|... Predicate
120- class AndPredicate << (&, #0077ff) notconsuming >>
121- Predicate <|== AndPredicate
122- class NotPredicate << (! ,#0077ff) not consuming >>
123- Predicate <|== NotPredicate
124-
125- }
126- @enduml
127-
128-
129-
130-
131-
132-
133-
134-
135-
136-
137-
138-
139-