Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ consumers, and its portability (any SysML v2 tool, or an executing engine).
- Never reuse an OMG standard-library package name.
- `.kerml` only for KerML-only content; everything else is `.sysml`.

### Rendering and view vocabulary

Use a standard filtered view wherever one exists; a library name is only an
optional shorter form of it. The extension libraries are for what standard
SysML cannot express: mixed diagrams, results from runs, and layout. A
proposal for new rendering or view vocabulary must show that no standard view
(a `GeneralView`, `GridView`, `InterconnectionView` or other standard view
with a filter) expresses the same diagram.

## Documentation

- A top-level `doc` that says NON-NORMATIVE and what the library is for.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ non-normative OpenSysML library; other tools resolve it when given the
| MigrationMetadata | MigrationMetadata.sysml | What a migration from another modelling language had to make up because the source left it unstated. | Any SysML v2 tool |
| OOSEM | OOSEM.sysml | Object-Oriented Systems Engineering Method artefacts, viewpoints and product views. | Any SysML v2 tool |
| OpenSysMLMathFunctions | OpenSysMLMathFunctions.kerml | exp, ln, log, atan2, ceiling and the Integer quotient the Kernel Function Library omits. | Executing engine |
| OpenSysMLRenderings | OpenSysMLRenderings.sysml | Renderings and views for case and mixed diagrams. `CaseView`/`asCaseDiagram` is a shorter way to write a standard `GeneralView` filtered on case-family metaclasses; the standard route is added by [OpenSysML#886](https://github.com/Open-MBEE/OpenSysML/pull/886). `MixedView`/`asMixedDiagram` is extension-only. | Any SysML v2 tool |
| RandomFunctions | RandomFunctions.kerml | Seeded random draws: uniform, uniformInteger, triangular, normal. | Executing engine |
| Simulation | Simulation.sysml | How a behavior is meant to be run: run count, draw resolution, clock, Monte Carlo. | Executing engine |
| StateActivity | StateActivity.kerml | `isActive`: a derived Boolean that is true while a state usage is in its state machine's active configuration. | Executing engine |
| StateMachines | StateMachines.sysml | Pseudostates (choice, junction, shallow/deep history) the grammar has no production for. | Executing engine |
| StateSpaceIntegration | StateSpaceIntegration.sysml | Fixed-step (Euler/RK4) running of StateSpaceRepresentation dynamics. | Executing engine |
| Stochastic | Stochastic.sysml | Probability metadata for branches; a tool unaware of it runs the branches as an unweighted choice. | Executing engine |
Expand Down
53 changes: 53 additions & 0 deletions engine-contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,41 @@
"internal/translate/migrate/opaque.go"
]
},
{
"name": "OpenSysMLRenderings",
"kind": "package",
"consumers": [
"internal/ir/view/view.go"
]
},
{
"name": "OpenSysMLRenderings::CaseView",
"kind": "element",
"consumers": [
"internal/ir/view/view.go"
]
},
{
"name": "OpenSysMLRenderings::MixedView",
"kind": "element",
"consumers": [
"internal/ir/view/view.go"
]
},
{
"name": "OpenSysMLRenderings::asCaseDiagram",
"kind": "element",
"consumers": [
"internal/ir/view/view.go"
]
},
{
"name": "OpenSysMLRenderings::asMixedDiagram",
"kind": "element",
"consumers": [
"internal/ir/view/view.go"
]
},
{
"name": "RandomFunctions",
"kind": "package",
Expand Down Expand Up @@ -927,6 +962,24 @@
"internal/exec/simresults/simresults.go"
]
},
{
"name": "StateActivity",
"kind": "package",
"consumers": [
"internal/semantic/semantics/state_activity.go"
]
},
{
"name": "StateActivity::isActive",
"kind": "element",
"consumers": [
"internal/semantic/semantics/state_activity.go",
"internal/exec/runtime/state_activity.go",
"internal/semantic/resolve/featured.go",
"internal/translate/codegen/compile_rec.go",
"internal/check/passes/nonstandard_notation.go"
]
},
{
"name": "StateMachines",
"kind": "package",
Expand Down
4 changes: 4 additions & 0 deletions libraries/DocumentQueries.sysml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ library package DocumentQueries {
* small square on the part's border named beside it, or every port,
* labelled name : Type. Minimal when absent. */
attribute ports : String[0..1];
/* overlay: "verdicts", for a requirement diagram: runs the verification
* cases verifying each requirement and colours and labels it by their
* verdicts. Purely structural when absent. */
attribute overlay : String[0..1];
ref source : Element[0..1];
}

Expand Down
19 changes: 19 additions & 0 deletions libraries/OpenSysMLRenderings.sysml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
library package OpenSysMLRenderings {
doc /*
* NON-NORMATIVE rendering vocabulary for case and mixed diagrams.
* Models using it are valid SysML v2 and depend on this OpenSysML library.
*/

private import Views::*;

rendering asCaseDiagram : GraphicalRendering[1] :> renderings;
rendering asMixedDiagram : GraphicalRendering[1] :> renderings;

view def CaseView {
render asCaseDiagram;
}

view def MixedView {
render asMixedDiagram;
}
}
33 changes: 33 additions & 0 deletions libraries/StateActivity.kerml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
library package StateActivity {
doc
/*
* NON-NORMATIVE. This package is an OpenSysML extension, not part of the OMG KerML
* or SysML standard library: it declares a readable Boolean that tells whether a
* state usage is in the active configuration of its state machine, which neither
* States.sysml (StateAction, stateActions, substates) nor StatePerformances.kerml
* declares. The vendored OMG files are unmodified.
*
* A model that reads it writes `import StateActivity::*;` and then names the feature
* on a state usage, `fill.isActive`. The import is what resolves the name: a feature
* declared `featured by` a type is read by OpenSysML as a feature of every usage
* conforming to that type reached by a feature chain written where the feature is
* visible, a reading no other tool makes. Without the import the member is unresolved,
* exactly as in a conforming tool, and `nonstandard-notation` reports the import.
*/

private import ScalarValues::Boolean;
private import States::StateAction;

derived feature isActive : Boolean[1] featured by StateAction {
doc
/*
* True exactly while the featuring state is in the active configuration of its
* state machine when the expression reading it is evaluated: a composite state
* while any of its substates is, a state of a parallel region together with the
* states of its sibling regions, and a state during its own entry and exit
* behaviors. False during a transition's effect, whose source has been exited and
* whose target not yet entered, and for a state of a machine that has not started,
* has ended or is not executing. Derived: no behavior writes it.
*/
}
}
Loading
Loading