StarterKit Validation Workflow¶
Overview¶
The StarterKit validation workflow lets you evaluate RTA-SQF against an RTA-CAR StarterKit installed on your machine, producing a Sarif result that you can inspect with any Sarif viewer.
The workflow automates the steps needed to run the os command
on a StarterKit:
it discovers the RTA-CAR versions installed on the local Windows machine;
it lets you select the version to validate;
it generates a
compile_commands.jsonfor the selected StarterKit (see the compilation database description in Compile Commands and Compiler Built-ins);it runs the
oscommand against that StarterKit;it collects the Sarif result in a dedicated output folder.
The result serves two purposes: it lets you evaluate the RTA-SQF product on a real project, and it gives you a safety-qualification result for the StarterKit code that you can review with a Sarif viewer.
Note
Platform
The validation script relies on the Windows registry to discover installed RTA-CAR versions, so it runs on Windows only.
Prerequisites¶
Before running the workflow, make sure the following tools are available:
Tool |
Purpose |
|---|---|
Python 3.7+ |
Runs the validation script. |
CMake 3.20+ |
Runs the configure step that produces |
MinGW Make |
Build-system generator used by CMake to export |
RTA-SQF |
The |
RTA-CAR StarterKit |
An installed RTA-CAR version providing the StarterKit to validate. |
Running the Workflow¶
The simplest way to validate a StarterKit is to run the orchestration script without arguments. It guides you through the selection interactively:
python validate_starterkit.py
The script lists the installed RTA-CAR versions and asks you to choose one:
Found 2 RTA-CAR installations:
[1] RTA-CAR 12.9.0
Path: C:\ETAS\RTA-CAR_12.9.0\
[2] RTA-CAR 12.12.0pr2
Path: C:\ETAS\RTA-CAR_12.12.0pr2\
Select installation [1-2, or 0 to cancel]:
After you select a version, the script generates the compilation database,
locates the rta-sqf executable, and runs the os command.
Choosing the output folder¶
By default the results are written to a rta_sqf_validation folder created
in the current working directory. Use the --outdir option to choose a
different location:
python validate_starterkit.py --outdir="C:\Validation"
Selecting the RTA-SQF executable¶
The script auto-detects the rta-sqf executable. If auto-detection fails,
or to validate with a specific build, pass its path explicitly:
python validate_starterkit.py --rtasqf-exe="C:\Tools\rta-sqf.exe"
Output Structure¶
All artifacts are isolated under the output folder (--outdir):
<outdir>/
|-- compile_commands/
| \-- compile_commands.json # generated compilation database
\-- rta_sqf_result/
|-- rta-sqf-result.sarif # Sarif validation result
\-- rta-sqf.log # internal log file
The generated compile_commands.json is the input passed to the
os command through the --os-compile-db option; the
rta_sqf_result folder is passed as the --out-dir value. For the meaning
of these options see Calling Options, and for the structure of the
compilation database see Compile Commands and Compiler Built-ins.
Reviewing the Result¶
Open the rta-sqf-result.sarif file with a Sarif viewer (for example the
Visual Studio Code Sarif Viewer extension) to inspect the results for each AoU.
The interpretation of the Kind and Level properties, and the iterative
review process, are described in Working with RTA-SQF.
Note
StarterKit is not modified
The workflow runs only the CMake configure step and redirects the CMake binary directory outside the StarterKit. No file inside the StarterKit installation is created or modified.
Equivalent Manual Invocation¶
The orchestration script is a convenience wrapper. If you already have a
compile_commands.json for your project, you can run the os
command directly, as described in Calling Options:
rta-sqf os --os-compile-db="C:\path\to\compile_commands.json" --out-dir=".\rta_sqf_result"