Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ docs(
"mount_at": "examples",
},
],
data = [
external_needs = [
"@score_process_description//:needs_json",
],
project = "Module Template Project",
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ register_toolchains("@llvm_toolchain//:all")

# tooling
bazel_dep(name = "score_tooling", version = "1.3.1", dev_dependency = True)
bazel_dep(name = "aspect_rules_lint", version = "2.3.0", dev_dependency = True)
bazel_dep(name = "aspect_rules_lint", version = "2.5.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2", dev_dependency = True)

#docs-as-code
Expand Down
21 changes: 18 additions & 3 deletions examples/docs/architecture_modeling_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Feature Architecture File
.. feat:: Feature 1
:id: feat__mtef
:security: YES
:safety: QM
:safety: ASIL_B
:status: valid
:version: 1

Expand All @@ -38,7 +38,7 @@ Feature Architecture File
.. feat_arc_sta:: Feature 1 Static View
:id: feat_arc_sta__example_feature__sta
:security: YES
:safety: QM
:safety: ASIL_B
:status: valid
:version: 1
:includes: logic_arc_int__example_feature__if_1, logic_arc_int__example_feature__if_2, logic_arc_int__example_feature__if_3
Expand Down Expand Up @@ -243,6 +243,7 @@ Feature or Component Architecture File(s)
:version: 1
:implements: logic_arc_int__example_feature__if_1
:consists_of: comp__mod_temp_archex_sub_component_1, comp__mod_temp_archex_sub_component_2, comp__mod_temp_archex_sub_component_3
:fulfils: aou_req__example_feature__example_req
:belongs_to: feat__mtef

Example Component 1 description.
Expand All @@ -251,6 +252,7 @@ Feature or Component Architecture File(s)
:id: comp__mod_temp_component_example_2
:security: YES
:safety: ASIL_B
:fulfils: aou_req__example_feature__example_req
:status: valid
:version: 1
:implements: logic_arc_int__example_feature__if_2
Expand Down Expand Up @@ -291,6 +293,7 @@ Feature or Component Architecture File(s)
:status: valid
:version: 1
:safety: ASIL_B
:fulfils: aou_req__example_feature__example_req
:security: NO
:uses: logic_arc_int__example_feature__if_2
:implements: logic_arc_int__example_feature__if_1
Expand All @@ -306,6 +309,7 @@ Feature or Component Architecture File(s)
:status: valid
:version: 1
:safety: ASIL_B
:fulfils: aou_req__example_feature__example_req
:security: NO
:uses: logic_arc_int__example_feature__if_2
:implements: logic_arc_int__example_feature__if_2
Expand All @@ -321,6 +325,7 @@ Feature or Component Architecture File(s)
:status: valid
:version: 1
:safety: ASIL_B
:fulfils: aou_req__example_feature__example_req
:security: NO
:belongs_to: feat__mtef

Expand Down Expand Up @@ -361,6 +366,16 @@ Requirements for the Example

The feature shall provide the functionality to ....

.. aou_req:: Example Assumption of Use Req
:id: aou_req__example_feature__example_req
:reqtype: Process
:security: YES
:safety: ASIL_B
:status: valid
:version: 1

The Component User shall use the feature within its specified operating conditions.

.. comp_req:: Example Component Req
:id: comp_req__example_feature__example_req
:reqtype: Functional
Expand All @@ -369,6 +384,6 @@ Requirements for the Example
:derived_from: feat_req__example_feature__example_req
:status: valid
:version: 1
:satisfied_by: comp__mod_temp_component_example_2
:satisfied_by: comp__mod_temp_component_example_2, comp__mod_temp_archex_sub_component_2

The component shall provide the Logical Operation 4 to get the ..
1 change: 1 addition & 0 deletions score/component_example/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ docs_bundle(
code_targets = [
":component_example",
],
primary_need_id = "comp__mod_temp_component_name_template",
source_dir = "docs",
visibility = ["//visibility:public"],
)
20 changes: 9 additions & 11 deletions score/component_example/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@
:status: draft
:version: 1
:safety: ASIL_B
:security: YES
:security: NO
:realizes: wp__cmpt_request
:tags: template

.. code-block:: rst

.. comp:: Component Name
:id: comp__mod_temp_component_name_template
:security: YES
:safety: ASIL_B
:status: valid
:implements: logic_arc_int__example_feature__if_1
:version: 1
:belongs_to: feat__mtef
.. comp:: Component Name
:id: comp__mod_temp_component_name_template
:security: YES
:safety: ASIL_B
:status: valid
:implements: logic_arc_int__example_feature__if_1
:version: 1
:belongs_to: feat__mtef

.. attention::
The above directives must be updated according to your Component.
Expand Down
24 changes: 11 additions & 13 deletions score/component_example/docs/requirements/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,19 @@
Functional Requirements
-----------------------

.. code-block:: rst

.. comp_req:: Some Title
:id: comp_req__mod_temp_component_name__some_title
:reqtype: Process
:security: YES
:safety: ASIL_B
:derived_from: feat_req__example_feature__example_req
:status: valid
:version: 1
:satisfied_by: comp__mod_temp_component_name_template
.. comp_req:: Some Title
:id: comp_req__mod_temp_component_name__some_title
:reqtype: Functional
:security: YES
:safety: ASIL_B
:derived_from: feat_req__example_feature__example_req
:status: valid
:version: 1
:satisfied_by: comp__mod_temp_component_name_template

The Component shall do xyz to another component to bring it to this condition at this time
The component shall return the greeting "Hello, <name>!" for a given name through make_hello_message.

Note: (optional, not to be verified)
Note: (optional, not to be verified)

.. attention::
The above directive must be updated according to your component requirements.
Expand Down
1 change: 1 addition & 0 deletions score/component_example/src/component_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ std::string make_hello() {
return "Hello";
}

// req-traceability: comp_req__mod_temp_component_name__some_title
std::string make_hello_message(const std::string& name) {
return make_hello() + ", " + name + "!";
}
Expand Down
5 changes: 5 additions & 0 deletions score/component_example/tests/component_example_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ namespace component_example {

// Component Integration Test (CIT) for component_example component.
TEST(ComponentExampleTest, MakeHelloMessageReturnsExpectedGreeting) {
RecordProperty("PartiallyVerifies", "comp_req__mod_temp_component_name__some_title");
RecordProperty("TestType", "requirements-based");
RecordProperty("DerivationTechnique", "requirements-analysis");
RecordProperty("Description", "Verify make_hello_message returns the greeting for each name.");

EXPECT_EQ(make_hello_message("World"), "Hello, World!");
EXPECT_EQ(make_hello_message("SCORE"), "Hello, SCORE!");
}
Expand Down
Loading