From cb69f51322cec7b3fe1778cdec02a87d72bf0ede Mon Sep 17 00:00:00 2001 From: bharatgoswami Date: Mon, 13 Apr 2026 13:13:33 +0200 Subject: [PATCH 1/5] pastey crate Safety qualification analysis report --- .../pastey/result.rst | 190 ++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 external_crate_safety_qualification/pastey/result.rst diff --git a/external_crate_safety_qualification/pastey/result.rst b/external_crate_safety_qualification/pastey/result.rst new file mode 100644 index 0000000..3f4cebf --- /dev/null +++ b/external_crate_safety_qualification/pastey/result.rst @@ -0,0 +1,190 @@ +Pastey - Safety Qualification Results +===================================== + +Crate Information +----------------- + +**Crate Name:** pastey + +**Type:** Procedural Macro (proc-macro) + +**Purpose:** A small-sized procedural macro providing identifier pasting and case modification capabilities with environment variable support. + +**Description:** Pastey is a Rust procedural macro crate designed to provide convenient syntax for identifier construction. It supports various features including identifier pasting, case modifiers (uppercase, lowercase, snake_case, etc.), ``env!`` macro support, raw mode, and replace modifiers. + +**Repository:** https://github.com/as1100k/pastey + +**Documentation:** https://docs.rs/pastey/0.2.1/pastey/ + +**Crate Version:** 0.2.1 + +**Key Characteristics:** + +* Single public interface (one main macro function) +* 917 lines of code (excluding tests and comments) +* No unsafe code +* Comprehensive test suite covering unit and integration tests +* CI/CD with multi-version Rust testing (nightly, beta, stable, 1.54) +* LLVM-based code coverage reporting + +**Qualification Date:** .... + +**Assessed By:** .... + +Safety Qualification Assessment +-------------------------------- + +Step 1: Determine (P): the uncertainty of the Processes applied +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 5 50 10 35 + + * - Id + - Indicator for applying process + - Result + - Rationale for result + + * - 1 + - Are rules, state-of-the art processes applied for the design, implementation and verification? + - PE + - The project follows standard Rust open-source practices. + + CI verifications include: + + * test suite (4 Rust versions: nightly, beta, stable, 1.54) + * MSRV check + * Documentation generation + * Clippy linting strict warnings enforced (-Dwarnings) + * Miri UB detection + * dependency staleness checks + + This is a small-size proc-macro so relevant details are in the crate documentation, which includes usage, feature overview, brief detail of macro, APIs and use-cases examples. + + * - 2 + - Are requirements available? + - PE + - As this is small size procedural macro crate so functional requirements are partially captured in crate documentation as expected macro behaviors (identifier pasting, case modifiers, ``env!`` support, raw mode, replace modifier) with each feature explanation. + + CHANGELOG entries, and linked GitHub issues for all kind of new development. + + * - 3 + - Are design specifications available? + - PE + - It is small crate structure with one public interface so it does not required UML/Class diagram but all the relevant details are part of crate document. + + * - 4 + - Are specifications for functionalities and properties available (architecture)? + - PE + - It is small procedural macro so crate documentation contains the partially specifications for functionalities and their properties through feature descriptions, usage examples, and modifier tables. + + * - 5 + - Are configuration specification and data available, if applicable? + - HE + - Not applicable. + + The crate does not use any runtime configuration, environment-based settings, or configuration files. So no configuration specification is applicable or needed. + + * - 6 + - Are verification measures including tests and reports available? + - HE + - Comprehensive test suite exists, test files covering unit tests, integration tests (tests). + + An LLVM-based code coverage report is generated and available at index.html. + +Step 2: Determine (C): the uncertainty of finding systematic faults based on the Complexity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 5 40 30 10 10 20 + + * - Id + - Indicator for high Complexity + - Complexity measure Tool + - Result + - Number + - Comment + + * - 1 + - High amount of Lines of Code + - Lines of Code (without comments) (generated code is excluded, e.g. ProtoCmpl) + - NH + - 917 + - Excluding tests + + * - 2 + - Unsafe code used / total unsafe code + - LoUC+N: lines of unsafe code with safety note. LoUC: lines of unsafe code, no safety note + - NH + - 0 + - No unsafe code + + * - 3 + - Test exists / Coverage (Function, Line) + - Existing Tests Coverage + - NH + - Comprehensive test suite with LLVM-based code coverage report available + - With this PR https://github.com/AS1100K/pastey/pull/28, code coverage is - + * 100% function coverage + * 96.5% line coverage (C0) (missing lines are for error handling paths in the code, which are difficult to cover with tests) + * 93.2% branch coverage(C1) (missing branches are for error handling paths in the code, which are difficult to cover with tests) + + * - 4 + - High amount of public function interfaces + - Number of public function interfaces + - NH + - 1 + - pastey macro has only 1 function + + * - 5 + - High amount of function parameters + - Number of parameters + - NH + - 1 + - TokenStream is a only parameter for proc macro + +Step 3: Determine (CLAS_OUT): the classification outcome +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 20 20 20 20 + + * - + - C=1 + - C=2 + - C=3 + + * - P=1 + - Q + - Q + - QR + + * - P=2 + - QR + - QR + - QR + + * - P=3 + - QR + - QR + - NQ + +**Result: Classification Outcome** + +Based on the assessment: + +* P (Processes) = 1 +* C (Complexity) = 2 +* **CLAS_OUT (Classification Outcome) = Q** + +**Classification Results:** + +* **Q:** Follow the processes for qualification of software components in a safety context. +* **QR:** Follow the process for pre-existing software architectural elements. +* **NQ:** Do not use this element in safety context. + + +Assessment References document: https://eclipse-score.github.io/score/main/modules/feo/feo/docs/component_classification.html From 07e1386c413148e286471181d5821e9b075da868 Mon Sep 17 00:00:00 2001 From: bharatgoswami Date: Wed, 15 Apr 2026 17:00:33 +0200 Subject: [PATCH 2/5] pastey crate safety qualification matrix --- .../pastey/result.rst | 331 ++++++++++-------- 1 file changed, 185 insertions(+), 146 deletions(-) diff --git a/external_crate_safety_qualification/pastey/result.rst b/external_crate_safety_qualification/pastey/result.rst index 3f4cebf..b1c9783 100644 --- a/external_crate_safety_qualification/pastey/result.rst +++ b/external_crate_safety_qualification/pastey/result.rst @@ -1,190 +1,229 @@ -Pastey - Safety Qualification Results -===================================== +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* + +Pastey Crate Component Classification +========================================== + +.. document:: Pastey Crate Component Classification + :id: doc__PASTEY_CRATE_COMP_CLASS + :status: valid + :safety: ASIL_B + :security: NO + :realizes: wp__sw_component_class + :tags: pre-existing, software-component, classification, Rust, proc-macro + + +| Classification of Pastey Crate as a software component in the context of S-CORE. +| +| Repository: https://github.com/as1100k/pastey +| Documentation: https://docs.rs/pastey/0.2.1/pastey/ +| Crate Version: 0.2.1 +| Additional documentation considered: +| https://crates.io/crates/pastey -Crate Information ------------------ -**Crate Name:** pastey +Step 1: Determine (P): the uncertainty of the Processes applied +--------------------------------------------------------------- -**Type:** Procedural Macro (proc-macro) +| Apply the process measures to determine (P). +| The result of a process measure shall have as outcome [HE, PE, NE] +| - HE: High Evidence +| - PE: Partly Evidence but Manageable +| - NE: No Evidence -**Purpose:** A small-sized procedural macro providing identifier pasting and case modification capabilities with environment variable support. +.. list-table:: Determine (P) + :header-rows: 1 -**Description:** Pastey is a Rust procedural macro crate designed to provide convenient syntax for identifier construction. It supports various features including identifier pasting, case modifiers (uppercase, lowercase, snake_case, etc.), ``env!`` macro support, raw mode, and replace modifiers. + * - Id + - Indicator for applying process + - Result + - Rationale for result -**Repository:** https://github.com/as1100k/pastey + * - 1 + - Are rules, state-of-the art processes applied for the design, implementation and verification? + - PE + - The project follows standard Rust open-source practices. -**Documentation:** https://docs.rs/pastey/0.2.1/pastey/ + CI verifications include: -**Crate Version:** 0.2.1 + * test suite (4 Rust versions: nightly, beta, stable, 1.54) + * MSRV check + * Documentation generation + * Clippy linting strict warnings enforced (-Dwarnings) + * Miri UB detection + * dependency staleness checks + * CHANGELOG entries for new features and bug fixes in CHANGELOG.md + * Maintaining GitHub issues for all kind of new development. -**Key Characteristics:** + This is a small-size proc-macro so relevant details are in the crate documentation, which includes usage, feature overview, brief detail of macro, APIs and use-cases examples. -* Single public interface (one main macro function) -* 917 lines of code (excluding tests and comments) -* No unsafe code -* Comprehensive test suite covering unit and integration tests -* CI/CD with multi-version Rust testing (nightly, beta, stable, 1.54) -* LLVM-based code coverage reporting + * - 2 + - Are requirements available? + - PE + - As this is small size procedural macro crate so functional requirements are partially captured in crate documentation as expected macro behaviors (identifier pasting, case modifiers, ``env!`` support, raw mode, replace modifier) with each feature explanation. + (crate documentation - https://docs.rs/pastey/0.2.1/pastey/) -**Qualification Date:** .... + * - 3 + - Are specifications for functionalities and properties available (architecture)? + - PE + - It is small procedural macro so crate documentation contains the partially specifications for functionalities and their properties through feature descriptions, usage examples, and modifier tables. -**Assessed By:** .... + * - 4 + - Are design specifications available? + - PE + - It is small crate structure with one public interface so it does not required UML/Class diagram but all the relevant details are part of crate document. -Safety Qualification Assessment --------------------------------- + * - 5 + - Are configuration specification and data available, if applicable? + - HE + - Not applicable. -Step 1: Determine (P): the uncertainty of the Processes applied -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + The crate does not use any runtime configuration, environment-based settings, or configuration files. So no configuration specification is applicable or needed. + + * - 6 + - Are verification measures including tests and reports available? + - HE + - Comprehensive test suite exists, test files covering unit tests, integration tests. + (test suite - https://github.com/AS1100K/pastey/tree/master/pastey-test-suite) + + An LLVM-based code coverage report is generated and available at index.html. + + +| (P=1) shall be selected when none of the determined process measures indicate PE or NE. +| (P=2) shall be selected when at least one of the determined process measures indicate PE or NE, but the gaps evaluated are acceptable, means +| the risk of systematic faults due to these gaps is sufficiently low or manageable by mitigating the gaps. +| (P=3) in all other cases. +| + +Pastey crate is determined as **P = 2** -.. list-table:: - :header-rows: 1 - :widths: 5 50 10 35 - - * - Id - - Indicator for applying process - - Result - - Rationale for result - - * - 1 - - Are rules, state-of-the art processes applied for the design, implementation and verification? - - PE - - The project follows standard Rust open-source practices. - - CI verifications include: - - * test suite (4 Rust versions: nightly, beta, stable, 1.54) - * MSRV check - * Documentation generation - * Clippy linting strict warnings enforced (-Dwarnings) - * Miri UB detection - * dependency staleness checks - - This is a small-size proc-macro so relevant details are in the crate documentation, which includes usage, feature overview, brief detail of macro, APIs and use-cases examples. - - * - 2 - - Are requirements available? - - PE - - As this is small size procedural macro crate so functional requirements are partially captured in crate documentation as expected macro behaviors (identifier pasting, case modifiers, ``env!`` support, raw mode, replace modifier) with each feature explanation. - - CHANGELOG entries, and linked GitHub issues for all kind of new development. - - * - 3 - - Are design specifications available? - - PE - - It is small crate structure with one public interface so it does not required UML/Class diagram but all the relevant details are part of crate document. - - * - 4 - - Are specifications for functionalities and properties available (architecture)? - - PE - - It is small procedural macro so crate documentation contains the partially specifications for functionalities and their properties through feature descriptions, usage examples, and modifier tables. - - * - 5 - - Are configuration specification and data available, if applicable? - - HE - - Not applicable. - - The crate does not use any runtime configuration, environment-based settings, or configuration files. So no configuration specification is applicable or needed. - - * - 6 - - Are verification measures including tests and reports available? - - HE - - Comprehensive test suite exists, test files covering unit tests, integration tests (tests). - - An LLVM-based code coverage report is generated and available at index.html. Step 2: Determine (C): the uncertainty of finding systematic faults based on the Complexity -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------------------------------------------------------------- + +| Apply the complexity measures to determine (C). +| The result of a complexity measure shall have as outcome [NH, HM, NM] +| - NH: Not High +| - HM: High but Manageable +| - NM: high and Not Manageable + +.. list-table:: Determine (C) + :header-rows: 1 + + * - Id + - Indicator for high Complexity + - Complexity measure Tool + - Result + - Number + + * - 1 + - High amount of Lines of Code + - Lines of Code (without comments) (generated code is excluded, e.g. ProtoCmpl) + - NH + - 917 (Excluding tests) + + * - 2 + - Unsafe code used / total unsafe code + - Count: + * LoUC+N: lines of unsafe code with safety note + * LoUC : lines of unsafe code, no safety note + - NH + - 0 (No unsafe code) + + * - 3 + - | Test exists / Coverage (Function, Line) + | (maybe better: testability, but how to measure?) + - Existing Tests Coverage + - NH + - Comprehensive test suite with LLVM-based code coverage report available. + With this PR https://github.com/AS1100K/pastey/pull/28, code coverage is - + + * 100% function coverage + * 96.5% line coverage (C0) (missing lines are for error handling paths in the code, which are difficult to cover with tests) + * 93.2% branch coverage(C1) (missing branches are for error handling paths in the code, which are difficult to cover with tests) + + * - 4 + - High amount of public function interfaces + - Number of public function interfaces + - NH + - 1 (pastey macro has only 1 function) + + * - 5 + - High amount of function parameters + - Number of parameters + - NH + - 1 (TokenStream is the only parameter for proc macro) + + +| (C=1) shall be selected when none of the determined complexity measures indicate HM or NM. +| (C=2) shall be selected when at least one of the determined complexity measures indicate HM or NM, but the gaps evaluated are acceptable, means +| the risk of systematic faults due to these gaps is sufficiently low in the context of S-CORE or manageable by mitigating the gaps. +| (C=3) in all other cases. +| + +Pastey crate is determined as **C = 1** -.. list-table:: - :header-rows: 1 - :widths: 5 40 30 10 10 20 - - * - Id - - Indicator for high Complexity - - Complexity measure Tool - - Result - - Number - - Comment - - * - 1 - - High amount of Lines of Code - - Lines of Code (without comments) (generated code is excluded, e.g. ProtoCmpl) - - NH - - 917 - - Excluding tests - - * - 2 - - Unsafe code used / total unsafe code - - LoUC+N: lines of unsafe code with safety note. LoUC: lines of unsafe code, no safety note - - NH - - 0 - - No unsafe code - - * - 3 - - Test exists / Coverage (Function, Line) - - Existing Tests Coverage - - NH - - Comprehensive test suite with LLVM-based code coverage report available - - With this PR https://github.com/AS1100K/pastey/pull/28, code coverage is - - * 100% function coverage - * 96.5% line coverage (C0) (missing lines are for error handling paths in the code, which are difficult to cover with tests) - * 93.2% branch coverage(C1) (missing branches are for error handling paths in the code, which are difficult to cover with tests) - - * - 4 - - High amount of public function interfaces - - Number of public function interfaces - - NH - - 1 - - pastey macro has only 1 function - - * - 5 - - High amount of function parameters - - Number of parameters - - NH - - 1 - - TokenStream is a only parameter for proc macro Step 3: Determine (CLAS_OUT): the classification outcome -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------------------------------------- + +| Select CLAS_OUT depending on the determined values of (C) and (P) .. list-table:: :header-rows: 1 :widths: 20 20 20 20 - * - - - C=1 - - C=2 - - C=3 + * - + - P=1 + - P=2 + - P=3 - * - P=1 + * - C=1 - Q - Q - QR - * - P=2 + * - C=2 - QR - QR - QR - * - P=3 + * - C=3 - QR - QR - NQ -**Result: Classification Outcome** -Based on the assessment: +Pastey crate is classified as **CLAS_OUT= Q**, as it has **P = 2** and **C = 1**. + +Step 4: Document all results and rationale for choosing (P) and (C) and (CLAS_OUT) +---------------------------------------------------------------------------------- +| Resuts: +| - P = 2 (Partly Evidence but Manageable) due to some process measures indicating PE, but the gaps are acceptable and manageable, as the crate is small size procedural macro with comprehensive documentation and testing practices in place. +| - C = 1 (Not High) as all complexity measures indicate NH. +| - CLAS_OUT = Q (Qualified) based on the combination of P = 2 and C = 1 according to the classification criteria. -* P (Processes) = 1 -* C (Complexity) = 2 -* **CLAS_OUT (Classification Outcome) = Q** -**Classification Results:** +Step 5: Based on (CLAS_OUT) select the activities +------------------------------------------------- -* **Q:** Follow the processes for qualification of software components in a safety context. -* **QR:** Follow the process for pre-existing software architectural elements. -* **NQ:** Do not use this element in safety context. +Pastey crate is classified as **CLAS_OUT= Q**. +| As soon as the change request containing this is in status "Accepted", the module safety plan for the component development is adapted based on the following: (select according to above result) +| - Q: Follow the processes for qualification of software components in a safety context. +| - QR: Follow the process for pre-existing software architectural elements +| - NQ: Do no use this element in safety context +| -Assessment References document: https://eclipse-score.github.io/score/main/modules/feo/feo/docs/component_classification.html +Assessment reference document (template used) : https://eclipse-score.github.io/process_description/main/folder_templates/modules/module_name/component_name/docs/component_classification.html \ No newline at end of file From 92e4b4f7afe5ae0160e8e22c53d02661c605ea87 Mon Sep 17 00:00:00 2001 From: bharatgoswami Date: Mon, 20 Apr 2026 07:20:59 +0200 Subject: [PATCH 3/5] Added pastey crate requirement document * Requirement for pastey crate and test case traceability * Updated classfication document --- .../pastey/docs/component_classification.rst | 14 +- docs/pastey/docs/requirement/index.rst | 160 ++++++++++++++++++ 2 files changed, 169 insertions(+), 5 deletions(-) rename external_crate_safety_qualification/pastey/result.rst => docs/pastey/docs/component_classification.rst (89%) create mode 100644 docs/pastey/docs/requirement/index.rst diff --git a/external_crate_safety_qualification/pastey/result.rst b/docs/pastey/docs/component_classification.rst similarity index 89% rename from external_crate_safety_qualification/pastey/result.rst rename to docs/pastey/docs/component_classification.rst index b1c9783..32f246f 100644 --- a/external_crate_safety_qualification/pastey/result.rst +++ b/docs/pastey/docs/component_classification.rst @@ -16,7 +16,7 @@ Pastey Crate Component Classification ========================================== .. document:: Pastey Crate Component Classification - :id: doc__PASTEY_CRATE_COMP_CLASS + :id: doc_PASTEY_CRATE_COMP_CLASS :status: valid :safety: ASIL_B :security: NO @@ -58,6 +58,7 @@ Step 1: Determine (P): the uncertainty of the Processes applied CI verifications include: * test suite (4 Rust versions: nightly, beta, stable, 1.54) + * Code Coverage generation with LLVM-based tools (strickly 100% line coverage is required for pull request approval) * MSRV check * Documentation generation * Clippy linting strict warnings enforced (-Dwarnings) @@ -71,7 +72,7 @@ Step 1: Determine (P): the uncertainty of the Processes applied * - 2 - Are requirements available? - PE - - As this is small size procedural macro crate so functional requirements are partially captured in crate documentation as expected macro behaviors (identifier pasting, case modifiers, ``env!`` support, raw mode, replace modifier) with each feature explanation. + - Requirement specification is available in score-crates repository, in the form of AOU requirements, which are traceable to test cases in the test suite. (crate documentation - https://docs.rs/pastey/0.2.1/pastey/) * - 3 @@ -96,8 +97,10 @@ Step 1: Determine (P): the uncertainty of the Processes applied - HE - Comprehensive test suite exists, test files covering unit tests, integration tests. (test suite - https://github.com/AS1100K/pastey/tree/master/pastey-test-suite) + (test suite result can be generated by creating a pull request e.g. - https://github.com/AS1100K/pastey/pull/30/checks or by running tests locally with `cargo test` command) - An LLVM-based code coverage report is generated and available at index.html. + An LLVM-based code coverage report is generated and available at provided CI link, with 100% function coverage, 100% line coverage, and 100% branch coverage. + (coverage report can be generate by creating a pull request e.g. - https://github.com/AS1100K/pastey/pull/30/checks) | (P=1) shall be selected when none of the determined process measures indicate PE or NE. @@ -150,8 +153,9 @@ Step 2: Determine (C): the uncertainty of finding systematic faults based on the With this PR https://github.com/AS1100K/pastey/pull/28, code coverage is - * 100% function coverage - * 96.5% line coverage (C0) (missing lines are for error handling paths in the code, which are difficult to cover with tests) - * 93.2% branch coverage(C1) (missing branches are for error handling paths in the code, which are difficult to cover with tests) + * 100% line coverage + * 100% branch coverage + (coverage report can be generate by creating a pull request e.g. - https://github.com/AS1100K/pastey/pull/30/checks or by running tests locally with `cargo test` command) * - 4 - High amount of public function interfaces diff --git a/docs/pastey/docs/requirement/index.rst b/docs/pastey/docs/requirement/index.rst new file mode 100644 index 0000000..a5d1de6 --- /dev/null +++ b/docs/pastey/docs/requirement/index.rst @@ -0,0 +1,160 @@ +Requirements +============ + +.. document:: Pastey Crate Requirements Traceability Matrix + :id: doc__pastey_aou + :status: valid + :safety: NO + :security: NO + :realizes: wp__requirements_comp + +.. aou_req:: Identifier Pasting + :id: pastey_req__pasting__1 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + Identifiers listed inside ``[< ... >]`` within a ``paste!`` invocation must + be concatenated into a single identifier. Whitespace between tokens inside + ``[< ... >]`` must be ignored. Example: ``[]`` produces ``QRST``. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_basic::test`` + +.. aou_req:: Case Modifier — lower + :id: pastey_req__case__1 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:lower`` modifier must convert the pasted value to lowercase using + ``str::to_lowercase``. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_to_lower::test_to_lower`` + +.. aou_req:: Case Modifier — upper + :id: pastey_req__case__2 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:upper`` modifier must convert the pasted value to uppercase using + ``str::to_uppercase``. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_to_upper::test_to_upper`` + +.. aou_req:: Case Modifier — snake + :id: pastey_req__case__3 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:snake`` modifier must convert the pasted value to snake_case. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_to_snake::test_to_snake`` + +.. aou_req:: Case Modifier — camel / upper_camel + :id: pastey_req__case__4 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:camel`` and ``:upper_camel`` modifiers must convert the pasted value + to UpperCamelCase. Behaviour must match the ``paste`` crate baseline. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_to_camel::test_to_camel`` + +.. aou_req:: Case Modifier — lower_camel + :id: pastey_req__case__5 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:lower_camel`` modifier must convert the pasted value to lowerCamelCase. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_to_lower_camel::test_to_lower_camel`` + +.. aou_req:: Case Modifier — camel_edge + :id: pastey_req__case__6 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:camel_edge`` modifier must convert the pasted value to UpperCamelCase + while preserving edge-case boundaries (e.g. consecutive uppercase letters). + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_to_camel_edge::test_to_camel_edge`` + +.. aou_req:: Environment Variable Expansion + :id: pastey_req__env__1 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + ``env!("VAR_NAME")`` inside ``[< ... >]`` must resolve to the value of the + named environment variable at compile time. Hyphens in the resolved value + must be replaced with underscores. An undefined variable must produce a + compile error. + + Test case traceability: + - `pastey-test-suite/tests/test_expr.rs ` - ``test_env_literal``, ``test_env_present`` + +.. aou_req:: Replace Modifier + :id: pastey_req__replace__1 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + The ``:replace(from, to)`` modifier must perform string replacement on the + preceding pasted value using ``str::replace`` semantics. The ``from`` and + ``to`` arguments each accept a string literal, char literal, identifier, or + single-token macro interpolation. More than one token in either argument must + produce a compile error. A missing preceding value must produce a compile error. + Incorrect syntax (wrong separator, missing parentheses, extra tokens) must + produce a compile error. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_replace_string_literal::test_replace``, ``test_replace::test_replace`` + +.. aou_req:: Raw Identifier Generation + :id: pastey_req__raw__1 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + Prefixing a token inside ``[< ... >]`` with ``#`` must enable raw mode, + producing a raw identifier (``r#ident``). The ``#`` token must only be + permitted as the first token inside ``[< ... >]``, any other position must + produce a compile error. + + Test case traceability: + - `pastey-test-suite/tests/test_item.rs ` - ``test_raw_mode::test_fn``, ``test_item_raw_mode_paste::test_raw_ident_via_item`` + +.. aou_req:: Documentation String Concatenation + :id: pastey_req__doc__1 + :reqtype: Functional + :security: NO + :safety: NO + :status: valid + + Arguments to a ``#[doc = ...]`` attribute inside a ``paste!`` invocation must + be implicitly concatenated to form a single documentation string. + + Test case traceability: + - `pastey-test-suite/tests/test_doc.rs ` - ``test_paste_doc``, ``test_escaping``, ``test_literals``, ``test_case``, ``test_stringify`` From 0143483758f2b76c07d9256e29ad24bcd7d0e4a2 Mon Sep 17 00:00:00 2001 From: bharatgoswami Date: Mon, 11 May 2026 07:50:22 +0200 Subject: [PATCH 4/5] Updated requirement detail --- docs/pastey/docs/component_classification.rst | 7 +- docs/pastey/docs/requirement/index.rst | 160 ------------------ 2 files changed, 4 insertions(+), 163 deletions(-) delete mode 100644 docs/pastey/docs/requirement/index.rst diff --git a/docs/pastey/docs/component_classification.rst b/docs/pastey/docs/component_classification.rst index 32f246f..5042b95 100644 --- a/docs/pastey/docs/component_classification.rst +++ b/docs/pastey/docs/component_classification.rst @@ -16,7 +16,7 @@ Pastey Crate Component Classification ========================================== .. document:: Pastey Crate Component Classification - :id: doc_PASTEY_CRATE_COMP_CLASS + :id: doc__pastey_crate_comp_class :status: valid :safety: ASIL_B :security: NO @@ -72,8 +72,9 @@ Step 1: Determine (P): the uncertainty of the Processes applied * - 2 - Are requirements available? - PE - - Requirement specification is available in score-crates repository, in the form of AOU requirements, which are traceable to test cases in the test suite. - (crate documentation - https://docs.rs/pastey/0.2.1/pastey/) + - Requirement specification is available in score-crates repository, in the form of trlc. + - it containts the system, feature and component requirements, with traceability between them. + (PR - https://github.com/eclipse-score/score-crates/pull/33) * - 3 - Are specifications for functionalities and properties available (architecture)? diff --git a/docs/pastey/docs/requirement/index.rst b/docs/pastey/docs/requirement/index.rst deleted file mode 100644 index a5d1de6..0000000 --- a/docs/pastey/docs/requirement/index.rst +++ /dev/null @@ -1,160 +0,0 @@ -Requirements -============ - -.. document:: Pastey Crate Requirements Traceability Matrix - :id: doc__pastey_aou - :status: valid - :safety: NO - :security: NO - :realizes: wp__requirements_comp - -.. aou_req:: Identifier Pasting - :id: pastey_req__pasting__1 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - Identifiers listed inside ``[< ... >]`` within a ``paste!`` invocation must - be concatenated into a single identifier. Whitespace between tokens inside - ``[< ... >]`` must be ignored. Example: ``[]`` produces ``QRST``. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_basic::test`` - -.. aou_req:: Case Modifier — lower - :id: pastey_req__case__1 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:lower`` modifier must convert the pasted value to lowercase using - ``str::to_lowercase``. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_to_lower::test_to_lower`` - -.. aou_req:: Case Modifier — upper - :id: pastey_req__case__2 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:upper`` modifier must convert the pasted value to uppercase using - ``str::to_uppercase``. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_to_upper::test_to_upper`` - -.. aou_req:: Case Modifier — snake - :id: pastey_req__case__3 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:snake`` modifier must convert the pasted value to snake_case. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_to_snake::test_to_snake`` - -.. aou_req:: Case Modifier — camel / upper_camel - :id: pastey_req__case__4 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:camel`` and ``:upper_camel`` modifiers must convert the pasted value - to UpperCamelCase. Behaviour must match the ``paste`` crate baseline. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_to_camel::test_to_camel`` - -.. aou_req:: Case Modifier — lower_camel - :id: pastey_req__case__5 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:lower_camel`` modifier must convert the pasted value to lowerCamelCase. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_to_lower_camel::test_to_lower_camel`` - -.. aou_req:: Case Modifier — camel_edge - :id: pastey_req__case__6 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:camel_edge`` modifier must convert the pasted value to UpperCamelCase - while preserving edge-case boundaries (e.g. consecutive uppercase letters). - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_to_camel_edge::test_to_camel_edge`` - -.. aou_req:: Environment Variable Expansion - :id: pastey_req__env__1 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - ``env!("VAR_NAME")`` inside ``[< ... >]`` must resolve to the value of the - named environment variable at compile time. Hyphens in the resolved value - must be replaced with underscores. An undefined variable must produce a - compile error. - - Test case traceability: - - `pastey-test-suite/tests/test_expr.rs ` - ``test_env_literal``, ``test_env_present`` - -.. aou_req:: Replace Modifier - :id: pastey_req__replace__1 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - The ``:replace(from, to)`` modifier must perform string replacement on the - preceding pasted value using ``str::replace`` semantics. The ``from`` and - ``to`` arguments each accept a string literal, char literal, identifier, or - single-token macro interpolation. More than one token in either argument must - produce a compile error. A missing preceding value must produce a compile error. - Incorrect syntax (wrong separator, missing parentheses, extra tokens) must - produce a compile error. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_replace_string_literal::test_replace``, ``test_replace::test_replace`` - -.. aou_req:: Raw Identifier Generation - :id: pastey_req__raw__1 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - Prefixing a token inside ``[< ... >]`` with ``#`` must enable raw mode, - producing a raw identifier (``r#ident``). The ``#`` token must only be - permitted as the first token inside ``[< ... >]``, any other position must - produce a compile error. - - Test case traceability: - - `pastey-test-suite/tests/test_item.rs ` - ``test_raw_mode::test_fn``, ``test_item_raw_mode_paste::test_raw_ident_via_item`` - -.. aou_req:: Documentation String Concatenation - :id: pastey_req__doc__1 - :reqtype: Functional - :security: NO - :safety: NO - :status: valid - - Arguments to a ``#[doc = ...]`` attribute inside a ``paste!`` invocation must - be implicitly concatenated to form a single documentation string. - - Test case traceability: - - `pastey-test-suite/tests/test_doc.rs ` - ``test_paste_doc``, ``test_escaping``, ``test_literals``, ``test_case``, ``test_stringify`` From b22dbcd0784fb70d282d42b904432c912ee388c8 Mon Sep 17 00:00:00 2001 From: bharatgoswami Date: Mon, 11 May 2026 09:09:46 +0200 Subject: [PATCH 5/5] Updated clasification file --- docs/pastey/docs/component_classification.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/pastey/docs/component_classification.rst b/docs/pastey/docs/component_classification.rst index 5042b95..a233c4c 100644 --- a/docs/pastey/docs/component_classification.rst +++ b/docs/pastey/docs/component_classification.rst @@ -72,9 +72,8 @@ Step 1: Determine (P): the uncertainty of the Processes applied * - 2 - Are requirements available? - PE - - Requirement specification is available in score-crates repository, in the form of trlc. - - it containts the system, feature and component requirements, with traceability between them. - (PR - https://github.com/eclipse-score/score-crates/pull/33) + - As this is small size procedural macro crate so functional requirements are partially captured in crate documentation as expected macro behaviors (identifier pasting, case modifiers, ``env!`` support, raw mode, replace modifier) with each feature explanation. + (crate documentation - https://docs.rs/pastey/0.2.1/pastey/) * - 3 - Are specifications for functionalities and properties available (architecture)?