A lobster config file (by default lobster.conf
) declares the tracing
policy. The syntax is fairly simple and best explained by example.
- A lobster config file
lobster.conf
In lobster.conf file declaration might look like this:
requirements "Requirements"{
source: "trlc.lobster";
}
-
Source:
The source attribute assignstrlc.lobster
,python.lobster
file. -
trace to: The trace to attribute declares the trace to: "Requirements"; This declares that the items in this level are expected to be linked to items from report.
implementation "code" {
source: "python.lobster";
trace to: "Requirements";
}
The core feature is an item level, and there are three kinds:
- requirements (for things like trlc, codebeamer, systemweaver, doors, ...)
- implementation (for things like code or models)
- activity (for things like tests, proofs, argumentation, ...)
requirements "Requirements"{
source: "trlc.lobster";
}
implementation "code" {
source: "python.lobster";
trace to: "Requirements";
}
In order to generate the tracing.html
file we need to execute below scripts in sequential order
-
- In our vanilla example we used trlc requirement, python implementation, cpp implementation and codebeamer. For that we need to generate .lobster file.
For example:
trlc.lobster
,python.lobser
,cpp.lobster
,codebeamer.lobser
- In our vanilla example we used trlc requirement, python implementation, cpp implementation and codebeamer. For that we need to generate .lobster file.
For example:
-
trlc
lobster-trlc . --config-file="lobster-trlc.conf" --out="trlc.lobster"
This is the link for lobster-tool-trlc - Our lobster repository package - lobster-tool-trlc
- Annotations for trlc - lobster-trace is present inside the function body.
python
lobster-python . --out="python.lobster"
This is the link for lobster-tool-python - Our lobster repository package - lobster-tool-python
- Annotations for python - lobster-trace is present inside the function body.
cpp
lobster-cpp . --clang-tidy="../llvm-project/build/bin/clang-tidy" --out="cpp.lobster"
This is the link for lobster-tool-cpp - Our lobster repository package - lobster-tool-cpp
- Annotations for cpp - lobster-trace is present inside the function body.
codebeamer
lobser-codebeamer . --out=codebeamer.lobster
This is the link for lobster-tool-codebeamer - Our lobster repository package - lobster-tool-codebeamer
- Annotations for codebeamer - lobster-trace is present outside the function body.
-
- After generating the .lobster file next step is to generate the
report.lobster
file, which has all the information about the requirement, implementation, activity.
- After generating the .lobster file next step is to generate the
lobster-report --lobster-config="lobster.config" --out="report.lobster"
-
- Once the
report.lobster
is generated then next step is to generate thetracing.html
file and any user can easily read that file and can find the traces in the file.
- Once the
lobster-html-report report.lobster --out="tracing.html"
-
To generate the clang-tidy file, make sure that your apt is working well on wsl/Linux env.
-
Clone this repository -
https://github.com/bmw-software-engineering/llvm-project
-
Below 2 dependencies required for clang-tidy creation.
sudo apt install cmake
sudo apt install ninja-build
-
Below 2 commands need to execute to generate the build folder.
cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra' -DCMAKE_BUILD_TYPE=Release
cmake --build build
-
Once you generate the build folder you can see the clang-tidy file in
./build/bin
folder. -
To generate the cpp.lobster file, you need to make sure that your llvm-project and lobster-demo project should be in same directory.