nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.02k stars 1.29k forks source link

(Re)introduce the MBSE methodology in F´ #1536

Closed ThibFrgsGmz closed 3 months ago

ThibFrgsGmz commented 2 years ago
F´ Version 4.x
Affected Component Topology Design/Assembly

Feature Description

It would be great to be able to perform the "High Level Design" step of F' by a graphical tool inspired by the MBSE methodology, or even to fully reintroduce the MBSE methodology in F'.

Rationale

Currently, the topology is visualized once it has been assembled in the "Assemble Topology" step with the FPL/FPV tools.

Therefore, this does not allow all stakeholders to have a good idea of the overall topology of the software system and to see potential design flaws (not to mention the fact that some system engineers do not want to write lines of code and learn a new language).

On the EU/France side, the MBSE Eclipse Capella tool is becoming more and more popular for creating a software system using the MBSE methodology in the space domain.

Maybe there are elements to analyze to introduce them in the framework?

There is also the RAFCON framework from DLR, and TASTE from ESA/ESTEC that might be interesting to look at briefly.

LeStarch commented 2 years ago

@bocchino I think this issue is one for you to think on.

bocchino commented 2 years ago

You can use the FPL/FPV tools to sketch the design before writing an FPP model. This solution is lightweight and is available now. One could also generate FPP From an MBSE model, but this is future work.

To sketch the design, you can specify a topology directly in the FPL text input format, demonstrated here:

https://github.com/fprime-community/fprime-layout/blob/main/examples/ref/RateGroups/RateGroups.txt

Then you can run the sketch through the tools to generate pictures.

capsulecorplab commented 2 years ago

Might I also suggest considering OML as a modeling language of choice? It's text-based (i.e., can more easily be version controlled with git), is open-source, and is maintained by JPL.

capsulecorplab commented 2 years ago

I'm currently going through the OML tutorial. I can imagine a workflow where an ontology for FPP is defined in OML, which can then be queried as json (using the Fuseki+Gradle toolchain) and transpiled to PlantUML (for generating UML diagrams) or FPP, using a template language.

ThibFrgsGmz commented 2 years ago

An interesting conference on the subject: Diagrams as Code 2.0 - Simon Brown - GOTO 2021.

Here is the absract of the conference:

"Diagrams as code are becoming a popular way to diagram software architecture, especially for high-level, long-lived documentation. You write the diagram source in a text-based domain-specific language (e.g., PlantUML or Mermaid) or in a programming language, and render the diagrams using web tools or command lines.

The advantages are well understood: writing the diagram source as text allows for easy integration into software development practices and tool chains, and the automatic layout features allow authors to focus on the content.

The problem with this approach is that it is easy for diagrams to get out of sync. This is where the concept of "diagrams as code 2.0" comes in, which allows us to define a software architecture model and the views we want to see, resulting in a consistent set of diagrams generated for us. [...]"

ThibFrgsGmz commented 2 years ago

Thanks for the tip @bocchino, I'll take a look.

So what I describe is consistent with what you say about "generating FPP models with an MBSE tool". If it sticks to macroscopic visualization of the topology, that should do the trick.

In my experience, I don't think this type of tool can be relevant when you want to specify implementation details,

capsulecorplab commented 2 years ago

@bocchino is there documentation on how to setup/run the FPL/FPV tools?

bocchino commented 2 years ago

The README files explain how to install and use the tools.

https://github.com/fprime-community/fprime-layout https://github.com/fprime-community/fprime-visual

thomas-bc commented 1 year ago

Another way to go about this could be to generate the FPP files out of a MBSE model. I have worked on https://github.com/Open-MBEE/Comodo which takes in a UML model and generates different types of textual representation (or code) out of it. Comodo is neat in that it allows to add your own rules for generating things fairly easily. Adding an "FPP" target is definitely doable with some work.

thomas-bc commented 3 months ago

I am going to close this at there does not seem to be action items at this time. If more discussion is needed, let's open up a Discussion!

Note that there are ongoing (community) efforts to explore the realm of visual editors

For posterity: fprime-util visualize is a quick shortcut to visualize a topology.