Skip to content

Commit 0f22f53

Browse files
committed
[rules score]: update documentation
- add User Guide - Refactor Index - extend rule reference
1 parent ef4f686 commit 0f22f53

19 files changed

Lines changed: 2027 additions & 548 deletions

bazel/rules/rules_score/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ sphinx_module(
109109
[
110110
"docs/**/*.rst",
111111
"docs/**/*.puml",
112+
"docs/**/*.md",
112113
],
113114
allow_empty = True,
114115
),
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
14+
@startuml MySeooc_FTA
15+
16+
!include fta_metamodel.puml
17+
18+
$TopEvent("KVS returns stale data after power loss", "MySeooc.FM_001")
19+
20+
$OrGate("OG_1", "MySeooc.FM_001")
21+
22+
$BasicEvent("Write not flushed to storage", "MySeooc.RC_001", "OG_1")
23+
$BasicEvent("Corruption on unclean shutdown", "MySeooc.RC_002", "OG_1")
24+
25+
@enduml
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
14+
@startuml MySeooc_PublicApi
15+
16+
interface "KeyValueStore" as KVS {
17+
+ write(key: string, value: bytes): Result
18+
+ read(key: string): Optional<bytes>
19+
}
20+
21+
@enduml
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
14+
@startuml MySeooc_StaticDesign
15+
16+
package "MySeooc" as MySeooc <<SEooC>> {
17+
component "KvsComponent" as KvsComponent <<component>> {
18+
component "KeyValueStore" as KeyValueStore <<unit>>
19+
component "StorageBackend" as StorageBackend <<unit>>
20+
}
21+
}
22+
23+
@enduml
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
14+
@startuml MySeooc_WriteSequence
15+
16+
actor Caller
17+
participant KeyValueStore
18+
participant StorageBackend
19+
20+
Caller -> KeyValueStore : write(key, value)
21+
KeyValueStore -> StorageBackend : flush()
22+
StorageBackend --> KeyValueStore : OK
23+
KeyValueStore --> Caller : Result::Ok
24+
25+
@enduml
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
14+
' AND gate: flat bottom + elliptic arch on top
15+
sprite $and <svg width="60" height="70" viewBox="0 0 60 70" xmlns="http://www.w3.org/2000/svg">
16+
<path d="M 8,58 H 52 V 35 A 22,27 0 0,0 8,35 L 8,58 Z" fill="white" stroke="black" stroke-width="2.5"/>
17+
</svg>
18+
19+
' OR gate: pointed top, bowed sides, concave bottom
20+
sprite $or <svg width="60" height="70" viewBox="0 0 60 70" xmlns="http://www.w3.org/2000/svg">
21+
<path d="M 30,8 C 55,25 54,42 52,58 Q 30,48 8,58 C 6,42 5,25 30,8 Z" fill="white" stroke="black" stroke-width="2.5"/>
22+
</svg>
23+
24+
' Transfer-In gate: upward triangle
25+
sprite $transferin <svg width="60" height="70" viewBox="0 0 60 70" xmlns="http://www.w3.org/2000/svg">
26+
<polygon points="30,8 52,60 8,60" fill="white" stroke="black" stroke-width="2.5"/>
27+
</svg>
28+
29+
'skinparam linetype polyline
30+
'skinparam linetype ortho
31+
32+
!procedure $TopEvent($name, $alias)
33+
rectangle "$name" as $alias
34+
!endprocedure
35+
36+
!procedure $IntermediateEvent($name, $alias, $connection)
37+
rectangle "$name" as $alias
38+
$alias -u-> $connection
39+
!endprocedure
40+
41+
!procedure $BasicEvent($name, $alias, $connection)
42+
usecase "$name" as $alias
43+
$alias -u-> $connection
44+
!endprocedure
45+
46+
!procedure $AndGate($alias, $connection)
47+
rectangle " " <<$and>> as $alias
48+
$alias -u-> $connection
49+
!endprocedure
50+
51+
!procedure $OrGate($alias, $connection)
52+
rectangle " " <<$or>> as $alias
53+
$alias -u-> $connection
54+
!endprocedure
55+
56+
!procedure $TransferInGate($alias, $connection)
57+
rectangle " " <<$transferin>> as $alias
58+
$alias -u-> $connection
59+
!endprocedure

bazel/rules/rules_score/docs/rules_score_overview.puml renamed to bazel/rules/rules_score/docs/_assets/rules_score_overview.puml

File renamed without changes.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
14+
@startuml seooc_flow
15+
16+
skinparam linetype ortho
17+
skinparam defaultTextAlignment center
18+
skinparam ArrowFontSize 11
19+
skinparam ArrowFontStyle italic
20+
21+
skinparam rectangle {
22+
BackgroundColor<<input>> #EFF6FB
23+
BorderColor<<input>> #0066B1
24+
BackgroundColor<<rule>> #FFF8E1
25+
BorderColor<<rule>> #F9A825
26+
BackgroundColor<<output>> #E8F5E9
27+
BorderColor<<output>> #388E3C
28+
}
29+
30+
' ── Inputs ──────────────────────────────────────────────────────────────────
31+
rectangle "System Requirements\n(.trlc)" <<input>> as asr_in
32+
rectangle "Feature Requirements\n(.trlc)" <<input>> as feat_in
33+
rectangle "Component Requirements\n(.trlc)" <<input>> as comp_in
34+
rectangle "Assumptions of Use\n(.trlc)" <<input>> as aou_in
35+
rectangle "Architecture Diagrams\n(.puml / .svg)" <<input>> as arch_in
36+
rectangle "Unit Design Diagrams\n(.puml / .rst)" <<input>> as ud_in
37+
rectangle "Implementation\n(cc_library / py_library…)" <<input>> as impl_in
38+
rectangle "Tests\n(cc_test / py_test…)" <<input>> as tests_in
39+
rectangle "Failure Modes\n(.trlc)" <<input>> as fm_in
40+
rectangle "Control Measures\n(.trlc)" <<input>> as cm_in
41+
rectangle "FTA Diagrams\n(.puml)" <<input>> as fta_in
42+
43+
' ── Bazel Rules ─────────────────────────────────────────────────────────────
44+
rectangle "assumed_system_requirements" <<rule>> as asr_r
45+
rectangle "feature_requirements" <<rule>> as feat_r
46+
rectangle "component_requirements" <<rule>> as comp_r
47+
rectangle "assumptions_of_use" <<rule>> as aou_r
48+
rectangle "architectural_design" <<rule>> as arch_r
49+
rectangle "unit_design" <<rule>> as ud_r
50+
rectangle "unit" <<rule>> as unit_r
51+
rectangle "component" <<rule>> as comp_r2
52+
rectangle "fmea" <<rule>> as fmea_r
53+
rectangle "dependability_analysis" <<rule>> as da_r
54+
rectangle "dependable_element" <<rule>> as de_r
55+
56+
' ── Outputs ──────────────────────────────────────────────────────────────────
57+
rectangle "HTML Documentation\n+ Traceability Report" <<output>> as out
58+
59+
' ── Connections ──────────────────────────────────────────────────────────────
60+
asr_in --> asr_r
61+
feat_in --> feat_r
62+
comp_in --> comp_r
63+
aou_in --> aou_r
64+
arch_in --> arch_r
65+
ud_in --> ud_r
66+
impl_in --> unit_r
67+
tests_in --> unit_r
68+
fm_in --> fmea_r
69+
cm_in --> fmea_r
70+
fta_in --> fmea_r
71+
72+
asr_r --> feat_r : deps
73+
asr_r --> aou_r
74+
feat_r --> aou_r : requirements
75+
feat_r --> de_r
76+
comp_r --> comp_r2 : requirements
77+
78+
ud_r --> unit_r : unit_design
79+
unit_r --> comp_r2 : components
80+
fmea_r --> da_r : fmea
81+
82+
arch_r --> de_r : architectural_design
83+
aou_r --> de_r : assumptions_of_use
84+
comp_r2 --> de_r : components
85+
da_r --> de_r : dependability_analysis
86+
87+
de_r --> out
88+
89+
@enduml

0 commit comments

Comments
 (0)