Pastey Crate Component Classification#
Pastey Crate Component Classification
|
status: valid
security: NO
safety: ASIL_B
|
||||
Step 1: Determine (P): the uncertainty of the Processes applied#
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:
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, |
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. |
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. |
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. (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 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) |
Pastey crate is determined as P = 2
Step 2: Determine (C): the uncertainty of finding systematic faults based on the Complexity#
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 |
|
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 -
(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 |
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) |
Pastey crate is determined as C = 1
Step 3: Determine (CLAS_OUT): the classification outcome#
P=1 |
P=2 |
P=3 |
|
|---|---|---|---|
C=1 |
Q |
Q |
QR |
C=2 |
QR |
QR |
QR |
C=3 |
QR |
QR |
NQ |
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)#
Step 5: Based on (CLAS_OUT) select the activities#
Pastey crate is classified as CLAS_OUT= Q.
Additional notes: Traceability: End-to-end traceability has been established using the LOBSTER tool within the score-crates repository. Although unit test results are not currently displayed in the generated reports due to a known limitation in Rust test result parsing (https://github.com/bmw-software-engineering/lobster/issues/589), all necessary traceability links are properly maintained. These include mappings between requirements, design elements, failure modes, control measures, and corresponding tests.
Toolchain Assurance: The crate is built and tested using the certified Ferrocene toolchain, which is maintained as part of the score_rust_toolchain repository. This ensures compliance with safety and reliability standards expected for Rust-based development.
Use of Standard Library Components in Pastey: The Pastey crate uses certified Rust core library components(https://github.com/AS1100K/pastey/pull/37), with limited usage of std::env, these modules are required to support environment variable handling within Pastey macros. Since they are sourced from the same certified toolchain, and use the same underlying components, their usage is considered safe and compliant within the crate.
Assessment reference document (template used) : https://eclipse-score.github.io/process_description/main/folder_templates/modules/module_name/component_name/docs/component_classification.html