|
| 1 | +Pastey - Safety Qualification Results |
| 2 | +===================================== |
| 3 | + |
| 4 | +Crate Information |
| 5 | +----------------- |
| 6 | + |
| 7 | +**Crate Name:** pastey |
| 8 | + |
| 9 | +**Type:** Procedural Macro (proc-macro) |
| 10 | + |
| 11 | +**Purpose:** A small-sized procedural macro providing identifier pasting and case modification capabilities with environment variable support. |
| 12 | + |
| 13 | +**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. |
| 14 | + |
| 15 | +**Repository:** https://github.com/as1100k/pastey |
| 16 | + |
| 17 | +**Documentation:** https://docs.rs/pastey/0.2.1/pastey/ |
| 18 | + |
| 19 | +**Crate Version:** 0.2.1 |
| 20 | + |
| 21 | +**Key Characteristics:** |
| 22 | + |
| 23 | +* Single public interface (one main macro function) |
| 24 | +* 917 lines of code (excluding tests and comments) |
| 25 | +* No unsafe code |
| 26 | +* Comprehensive test suite covering unit and integration tests |
| 27 | +* CI/CD with multi-version Rust testing (nightly, beta, stable, 1.54) |
| 28 | +* LLVM-based code coverage reporting |
| 29 | + |
| 30 | +**Qualification Date:** .... |
| 31 | + |
| 32 | +**Assessed By:** .... |
| 33 | + |
| 34 | +Safety Qualification Assessment |
| 35 | +-------------------------------- |
| 36 | + |
| 37 | +Step 1: Determine (P): the uncertainty of the Processes applied |
| 38 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 39 | + |
| 40 | +.. list-table:: |
| 41 | + :header-rows: 1 |
| 42 | + :widths: 5 50 10 35 |
| 43 | + |
| 44 | + * - Id |
| 45 | + - Indicator for applying process |
| 46 | + - Result |
| 47 | + - Rationale for result |
| 48 | + |
| 49 | + * - 1 |
| 50 | + - Are rules, state-of-the art processes applied for the design, implementation and verification? |
| 51 | + - PE |
| 52 | + - The project follows standard Rust open-source practices. |
| 53 | + |
| 54 | + CI verifications include: |
| 55 | + |
| 56 | + * test suite (4 Rust versions: nightly, beta, stable, 1.54) |
| 57 | + * MSRV check |
| 58 | + * Documentation generation |
| 59 | + * Clippy linting strict warnings enforced (-Dwarnings) |
| 60 | + * Miri UB detection |
| 61 | + * dependency staleness checks |
| 62 | + |
| 63 | + 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. |
| 64 | + |
| 65 | + * - 2 |
| 66 | + - Are requirements available? |
| 67 | + - PE |
| 68 | + - 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. |
| 69 | + |
| 70 | + CHANGELOG entries, and linked GitHub issues for all kind of new development. |
| 71 | + |
| 72 | + * - 3 |
| 73 | + - Are design specifications available? |
| 74 | + - PE |
| 75 | + - 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. |
| 76 | + |
| 77 | + * - 4 |
| 78 | + - Are specifications for functionalities and properties available (architecture)? |
| 79 | + - PE |
| 80 | + - 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. |
| 81 | + |
| 82 | + * - 5 |
| 83 | + - Are configuration specification and data available, if applicable? |
| 84 | + - HE |
| 85 | + - Not applicable. |
| 86 | + |
| 87 | + The crate does not use any runtime configuration, environment-based settings, or configuration files. So no configuration specification is applicable or needed. |
| 88 | + |
| 89 | + * - 6 |
| 90 | + - Are verification measures including tests and reports available? |
| 91 | + - HE |
| 92 | + - Comprehensive test suite exists, test files covering unit tests, integration tests (tests). |
| 93 | + |
| 94 | + An LLVM-based code coverage report is generated and available at index.html. |
| 95 | + |
| 96 | +Step 2: Determine (C): the uncertainty of finding systematic faults based on the Complexity |
| 97 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 98 | + |
| 99 | +.. list-table:: |
| 100 | + :header-rows: 1 |
| 101 | + :widths: 5 40 30 10 10 20 |
| 102 | + |
| 103 | + * - Id |
| 104 | + - Indicator for high Complexity |
| 105 | + - Complexity measure Tool |
| 106 | + - Result |
| 107 | + - Number |
| 108 | + - Comment |
| 109 | + |
| 110 | + * - 1 |
| 111 | + - High amount of Lines of Code |
| 112 | + - Lines of Code (without comments) (generated code is excluded, e.g. ProtoCmpl) |
| 113 | + - NH |
| 114 | + - 917 |
| 115 | + - Excluding tests |
| 116 | + |
| 117 | + * - 2 |
| 118 | + - Unsafe code used / total unsafe code |
| 119 | + - LoUC+N: lines of unsafe code with safety note. LoUC: lines of unsafe code, no safety note |
| 120 | + - NH |
| 121 | + - 0 |
| 122 | + - No unsafe code |
| 123 | + |
| 124 | + * - 3 |
| 125 | + - Test exists / Coverage (Function, Line) |
| 126 | + - Existing Tests Coverage |
| 127 | + - NH |
| 128 | + - Comprehensive test suite with LLVM-based code coverage report available |
| 129 | + - With this PR https://github.com/AS1100K/pastey/pull/28, code coverage is - |
| 130 | + * 100% function coverage |
| 131 | + * 96.5% line coverage (C0) (missing lines are for error handling paths in the code, which are difficult to cover with tests) |
| 132 | + * 93.2% branch coverage(C1) (missing branches are for error handling paths in the code, which are difficult to cover with tests) |
| 133 | + |
| 134 | + * - 4 |
| 135 | + - High amount of public function interfaces |
| 136 | + - Number of public function interfaces |
| 137 | + - NH |
| 138 | + - 1 |
| 139 | + - pastey macro has only 1 function |
| 140 | + |
| 141 | + * - 5 |
| 142 | + - High amount of function parameters |
| 143 | + - Number of parameters |
| 144 | + - NH |
| 145 | + - 1 |
| 146 | + - TokenStream is a only parameter for proc macro |
| 147 | + |
| 148 | +Step 3: Determine (CLAS_OUT): the classification outcome |
| 149 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 150 | + |
| 151 | +.. list-table:: |
| 152 | + :header-rows: 1 |
| 153 | + :widths: 20 20 20 20 |
| 154 | + |
| 155 | + * - |
| 156 | + - C=1 |
| 157 | + - C=2 |
| 158 | + - C=3 |
| 159 | + |
| 160 | + * - P=1 |
| 161 | + - Q |
| 162 | + - Q |
| 163 | + - QR |
| 164 | + |
| 165 | + * - P=2 |
| 166 | + - QR |
| 167 | + - QR |
| 168 | + - QR |
| 169 | + |
| 170 | + * - P=3 |
| 171 | + - QR |
| 172 | + - QR |
| 173 | + - NQ |
| 174 | + |
| 175 | +**Result: Classification Outcome** |
| 176 | + |
| 177 | +Based on the assessment: |
| 178 | + |
| 179 | +* P (Processes) = 1 |
| 180 | +* C (Complexity) = 2 |
| 181 | +* **CLAS_OUT (Classification Outcome) = Q** |
| 182 | + |
| 183 | +**Classification Results:** |
| 184 | + |
| 185 | +* **Q:** Follow the processes for qualification of software components in a safety context. |
| 186 | +* **QR:** Follow the process for pre-existing software architectural elements. |
| 187 | +* **NQ:** Do not use this element in safety context. |
| 188 | + |
| 189 | + |
| 190 | +Assessment References document: https://eclipse-score.github.io/score/main/modules/feo/feo/docs/component_classification.html |
0 commit comments