-
Notifications
You must be signed in to change notification settings - Fork 3
SysML v2 Website #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adriancostin-sd
wants to merge
12
commits into
master
Choose a base branch
from
websiteV2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
SysML v2 Website #104
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5f30729
Add Website
TomBursch d298893
remove ma landing
adriancostin-sd 39173b2
test release vsix file
adriancostin-sd cb5f349
test release vsix 2
adriancostin-sd f268137
test release vsix 3
adriancostin-sd 45b3a38
test release vsix 4
adriancostin-sd 422aa6a
test release vsix 5
adriancostin-sd 3c0a9bb
fix vsix deployment
adriancostin-sd d2c0868
revert publishing of vsix to pre test values
adriancostin-sd 928efa8
update website
adriancostin-sd 21fed78
added more SpesML doc
adriancostin-sd e81497e
add feedback
adriancostin-sd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # (c) https://github.com/MontiCore/monticore | ||
|
|
||
| # .github/workflows/prepare_pages.yml | ||
| name: Prepare and deploy pages | ||
|
|
||
| # Preprocess the docs, build a site directory and push its contents to the gh-pages branch | ||
|
|
||
| concurrency: # run this test workflow only once per branch | ||
| group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| paths: | ||
| - docs/** | ||
| - mkdocs.yml | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | ||
| name: Build and Push | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.9' | ||
|
|
||
| - name: Install python packages | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install mkdocs mkdocs-material mike | ||
| git clone https://monticore:[email protected]/se/infrastructure/monticore-pygments-highlighting.git | ||
| pip install -r ./monticore-pygments-highlighting/requirements.txt | ||
| pip install ./monticore-pygments-highlighting | ||
|
|
||
| - name: Configure Git user | ||
| run: | | ||
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "github-actions[bot]" | ||
|
|
||
| - name: Build and deploy pages | ||
| run: mkdocs gh-deploy --force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <!-- (c) https://github.com/MontiCore/monticore --> | ||
| # For Developers | ||
|
|
||
| ## Building the Tool from the Sources | ||
|
|
||
| As alternative to a download, it is possible to build an executable JAR of the | ||
| tool from the source files located in GitHub. In order to build an executable | ||
| Jar of the tool with Bash from the source files available in GitHub, execute the | ||
| following commands. | ||
|
|
||
| First, clone the repository: | ||
| ```bash | ||
| git clone https://github.com/MontiCore/sysmlv2.git | ||
| ``` | ||
|
|
||
| Change the directory to the root directory of the cloned sources: | ||
| ```bash | ||
| cd sysmlv2 | ||
| ``` | ||
|
|
||
| Then build the source files with gradle. To this effect, execute the following | ||
| two command: | ||
|
|
||
| ```bash | ||
| ./gradlew :language:shadowJar | ||
| ``` | ||
| Please ensure that you have Java 21 JRE installed and gradle is set up to use it. | ||
|
|
||
| Congratulations! The executable JAR file `language-7.*.*-SNAPSHOT-mc-tool.jar` is | ||
| now in the directory `language/target/libs`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| hide: | ||
| - toc | ||
| --- | ||
| <!-- (c) https://github.com/MontiCore/monticore --> | ||
| # Tools & Editors | ||
|
|
||
| You have multiple options to choose from for working with SysML v2. | ||
| You can build SysML v2 models with any text editor or integrated development environment (IDE) in combination with the [CLI](./Setup.md#run-the-cli). | ||
|
|
||
| Though there are some editors that provide a better experience for SysML such as SysON and SysIDE. | ||
|
adriancostin-sd marked this conversation as resolved.
Outdated
|
||
|
|
||
|
|
||
| ## Visual Studio Code | ||
|
|
||
| 1. To install VS Code, follow their [instructions](https://code.visualstudio.com/docs/setup/setup-overview). | ||
| 2. Install the SysML v2 extension. | ||
| 1. Download the `.vsix` extension from the [releases page](https://github.com/MontiCore/sysmlv2/releases/tag/snapshot). | ||
| 2. Start VS Code. | ||
| 3. Go to the extension tab → Click `...` → Install from VSIX → Select the previously downloaded extension. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <!-- (c) https://github.com/MontiCore/monticore --> | ||
| # Hello, World! | ||
| You're now ready to start with your first system. | ||
|
adriancostin-sd marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <!-- (c) https://github.com/MontiCore/monticore --> | ||
| # Setup SysML v2 | ||
|
|
||
| SysML v2 runs on any platform. In the following tutorials, we will use the CLI. | ||
|
|
||
|
|
||
| #### Run the CLI | ||
|
|
||
| To run the CLI manually, you need to have [Java 21](https://www.oracle.com/de/java/technologies/downloads/#java21) installed. | ||
| Next, download the [SysML v2 Tool jar](https://www.monticore.de/download/MCSysMLv2.jar). | ||
|
|
||
| You can then run the tool with: | ||
|
|
||
| ```bash | ||
| java -jar MCSysMLv2.jar | ||
| ``` | ||
|
|
||
| exemplary usage: | ||
|
|
||
| ``` | ||
| java -jar MCSysMLv2.jar -h | ||
| java -jar MCSysMLv2.jar -i Car.sysml -pp | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| You can find detailed descriptions and available parameters in the [usage](./Users.md) section. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <!-- (c) https://github.com/MontiCore/monticore --> | ||
| # For Users | ||
|
|
||
| ## Tool Download and Use | ||
|
|
||
| * [**Download SysML v2 Tool**](https://www.monticore.de/download/MCSysMLv2.jar) | ||
|
|
||
| The SysML v2 tool offers options for processing SysML v2 models. It provides through the CLI as follows: | ||
|
|
||
| `java -jar MCSysMLv2.jar [-h] -i <fileName> [-path <p>] [-pp [<file>]] [-s [<file>]]` | ||
|
|
||
| where the arguments are: | ||
|
|
||
| | Option | Explanation | | ||
| |--------------------------|--------------------------------------------------------------------------------------------| | ||
| | -ex,--extended | Runs additional checks assuring models are fit for semantic analysis using [MontiBelle](https://www.se-rwth.de/projects/#MontiBelle) | | ||
|
adriancostin-sd marked this conversation as resolved.
Outdated
|
||
| | -h,--help | Prints this help dialog | | ||
| | -i,--input <file> | Reads the source file (mandatory) and parses the contents | | ||
| | -path <arg> | Sets the artifact path for imported symbols, space separated. | | ||
| | -pp,--prettyprint <file> | Prints the AST to stdout or the specified file (optional) | | ||
| | -r,--report <dir> | Prints reports of the artifact to the specified directory. | | ||
| | -s,--symboltable <file> | Serialized the Symbol table of the given artifact. | | ||
| | -v,--version | Prints version information | | ||
|
adriancostin-sd marked this conversation as resolved.
Outdated
|
||
|
|
||
| exemplary usage: | ||
|
|
||
| ```bash | ||
| java -jar MCSysMLv2.jar -h | ||
| java -jar MCSysMLv2.jar -i Car.sysml -pp | ||
| ``` | ||
|
|
||
| ##### Prerequisites | ||
|
adriancostin-sd marked this conversation as resolved.
Outdated
|
||
|
|
||
| To run the tool, it is required to install a Java 21 JRE. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| icon: material/rocket-launch | ||
| hide: | ||
| - toc | ||
| --- | ||
| <!-- (c) https://github.com/MontiCore/monticore --> | ||
| # Getting Started | ||
|
|
||
| Let's start your SysML journey! In this chapter, we will show you how to start your first Project and introduce you to the basic concepts of SysML. | ||
|
|
||
| We provide documentation for both **users** who want to use the SysML v2 tool and **developers** who want to build or extend it. | ||
|
|
||
| * [For Users](./Users.md): Download and run the CLI tool. | ||
| * [For Developers](./Developers.md): Build the tool from source and set up your development environment. | ||
|
|
||
| !!! question "Found a problem with the documentation?" | ||
| If you find an error or something is not understandable, please file an [issue](../index.md#found-an-issue) for it. | ||
| This will help others reading the documentation in the future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # Stream Library & Writing Stream Specifications | ||
|
|
||
| The Stream Library provides standard components and definitions for working with streams in SpesML. | ||
| Here you can find [stream expressions](https://monticore.github.io/monticore/monticore-grammar/src/main/grammars/de/monticore/Grammars/#streamexpressionsmc4-stable) | ||
| and the [stream method library](https://github.com/MontiCore/monticore/tree/dev/monticore-libraries/stream-symbols/src/main/symtabdefinition). | ||
| The modeling with SpesML v2 works seamlessly with the MontiCore parser. | ||
|
|
||
| ## Specifying Timing | ||
| Timing can be specified in multiple ways using user defined keywords: | ||
|
|
||
| 1. At the interface level over ports: | ||
|
|
||
| ```#event port x;``` | ||
|
|
||
| 2. On the behavioral level: | ||
|
|
||
| ```#sync satisfy requirement {...}``` | ||
|
|
||
| !!! warning | ||
| Note that 1. & 2. are **mutually** exclusive. | ||
|
|
||
| The default timing is `event`. | ||
|
|
||
| Stream specifications contain properties written over the input and output of components' ports. | ||
|
|
||
| ## Components | ||
| Components use standard syntax and must declare its ports (packages beind optional): | ||
| ``` | ||
| part def A { | ||
| port input: PortType1; | ||
| port output: ~PortType1; | ||
|
|
||
| ... | ||
| } | ||
| ``` | ||
| ## Ports | ||
| Port types must exist and feature at least one attribute: | ||
| ``` | ||
| port def PortType1 { | ||
| attribute value: int; | ||
| } | ||
| ``` | ||
| Attribute types have to be standardized java types (int, double, float, short, long, boolean, byte, | ||
| char, String), nat or user defined: | ||
| ``` | ||
| attribute def UserDefinedType1 { | ||
| attribute field1: int; | ||
| } | ||
| ``` | ||
|
|
||
| ``` | ||
| enum def UserDefinedEnum1 { | ||
| enum E1; | ||
| enum E2; | ||
| } | ||
| ``` | ||
|
|
||
| ## Stream Specifications | ||
| Stream specifications can be expressed in SysML v2 as asserted constraints if there are no assumptions about the environment. | ||
| ``` | ||
| assert constraint c1 { | ||
| input.value == <1,2> | ||
| } | ||
| ``` | ||
| The stream of messages over a port can be recalled by field accesses over the port usage attribute. When accessed in specifications these field accesses have an | ||
| implicit stream type. For example `input.value` in component `A` has the type `EventStream<int>`. | ||
| In the case of port definitions with singular attributes we provide syntactic sugar by writing `output` instead of `output.value` | ||
| as it is unambiguous that a stream access is. | ||
| This is especially useful when chaining methods over streams. | ||
|
|
||
| More complex specifications can be written as assumption/guarantee pairs through requirements. Multiple assumptions and multiple guarantees are allowed. | ||
| Each requirement corresponds to a property. | ||
| ``` | ||
| satisfy requirement r1 { | ||
| assume constraint c2 { | ||
| input.value == <1> | ||
| } | ||
| require constraint c3 { | ||
| output.value == input.value | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Parameters | ||
| Stream specifications can also be parametrized with the parameter being set at initialization of the part. | ||
| ``` | ||
| part A { | ||
| ... | ||
|
|
||
| final attribute maxValue: int; | ||
|
|
||
| assert constraint c4 { | ||
| input.value.first() >= maxValue; | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Methods | ||
| The stream method library and all stream expressions can be used inside specifications: | ||
| ``` | ||
| output.value.length() == (input.value()^^<2>).length() | ||
| ``` | ||
|
|
||
| ## OCLExpressions | ||
| It is usual to use first-order logic expressions in specifications. These can be embedded through OCLExpressions (which also include SetExpressions): | ||
| ``` | ||
| forall t in nat: | ||
| !input.value.nth(t).isEmpty() || input.values.nth(t) isIn {0} | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # SpesML v2 Reference | ||
|
|
||
| Welcome to the SpesML v2 reference documentation. The SpesML v2 is constituted of a methodology and a SysML v2 language | ||
| profile. From a technical perspective, the profile is an extension of the SysML expressions with: | ||
|
|
||
| - [Stream Library](StreamLibrary.md) | ||
| - [OCL expressions](https://github.com/MontiCore/ocl) | ||
| - [MontiCore type system based on Java types](https://monticore.github.io/monticore/monticore-grammar/src/main/java/de/monticore/types3/TypeSystem3/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # SpesML v2 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That whole site is strange. Shouldn't we instead be explaining SysML v2 syntax, common error codes, and concepts (especially libraries?). |
||
|
|
||
| SpesML v2 is a modeling language based on the [SPES framework](https://www.se-rwth.de/publications/Model-Based-Systems-Engineering-with-the-SPES-Modeling-Language-A-SysML-Workbench-for-the-SPES-Methodology.pdf) | ||
| currently in development. The SPES methodology defines a rigorous formal semantic | ||
| applicable on the SysML v2 centered around specifying components through complete | ||
| communication histories and stream-processing functions . The language shown | ||
| below is a SysML v2 profile. There are currently two types of specifications | ||
| supported: black-box through history-oriented specifications and glass-box | ||
| through state machines. | ||
|
|
||
| ## Exemplary Model: SumUp | ||
|
|
||
| The following model demonstrates a simple `SumUp` component specified in SpesML v2: | ||
|
|
||
|  | ||
|
|
||
| ```sysmlv2 | ||
| port def Naturals { | ||
| in attribute val: nat; | ||
| } | ||
|
|
||
| part def SumUp { | ||
| #untimed port x: Naturals; | ||
| #untimed port y: ~Naturals; | ||
|
|
||
| satisfy requirement { | ||
| assume constraint InfStream { | ||
| x.hasInfiniteLen() | ||
| } | ||
|
|
||
| require constraint IncrementInplace { | ||
| forall nat t: | ||
| y.nth(t+1) == x.nth(t) + y.nth(t) | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| The SpesML v2 leverages underspecification as a core asset for high-level specifications, | ||
| which can be thoroughly expressed through history-oriented stream-processing specifications. | ||
| To this end we provide a [stream library](../Reference/StreamLibrary.md) for | ||
| stream processing functions which can be applied to streams. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should limit our description on the tools that work with our parser. After all, this is a documentation of the sysml v2 parser. And for this, I currently only see one tooling option, namely visual studio code?