Skip to content

Commit

Permalink
Updated for 2023-11.
Browse files Browse the repository at this point in the history
  • Loading branch information
seidewitz committed Dec 13, 2023
1 parent 43dcb2a commit 17d2e77
Show file tree
Hide file tree
Showing 31 changed files with 521 additions and 457 deletions.
Binary file modified doc/1-Kernel_Modeling_Language.pdf
Binary file not shown.
Binary file modified doc/2a-OMG_Systems_Modeling_Language.pdf
Binary file not shown.
Binary file modified doc/2b-SysML_v1_to_v2_Transformation.pdf
Binary file not shown.
Binary file modified doc/3-Systems_Modeling_API_and_Services.pdf
Binary file not shown.
Binary file modified doc/Intro to the SysML v2 Language-Textual Notation.pdf
Binary file not shown.
Binary file modified install/eclipse/org.omg.sysml.site.zip
Binary file not shown.
Binary file modified install/jupyter/README.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion install/jupyter/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@echo off

set /A SYSML_VERSION="0.36.0"
set /A SYSML_VERSION="0.37.0"

echo --- Step 1: Testing Conda installation ---
where conda
Expand Down
4 changes: 2 additions & 2 deletions install/jupyter/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

set -e

SYSML_VERSION="0.36.0"
SYSML_VERSION="0.37.0"

echo "--- Step 1: Testing Conda installation ---"
command -v conda || (echo "Conda is not installed. Please install Conda and re-run." && return 1)
Expand All @@ -33,7 +33,7 @@ java -version

echo "--- Step 3: Installing Jupyter SysML kernel and dependencies ---"
jupyter kernelspec remove sysml -f > /dev/null 2>&1 || true
conda install "jupyter-sysml-kernel=$SYSML_VERSION" python=3.* jupyterlab=2.* graphviz=2.* nodejs=14.* -c conda-forge -y
conda install "jupyter-sysml-kernel=$SYSML_VERSION" python=3.* jupyterlab=2.* graphviz=2.* nodejs=15.* -c conda-forge -y

echo "--- Step 4: Installing JupyterLab SysML extension ---"
jupyter labextension uninstall @systems-modeling/jupyterlab-sysml > /dev/null 2>&1 || true
Expand Down
13 changes: 13 additions & 0 deletions kerml/src/examples/Simple Tests/Behaviors.kerml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package Behaviors {
behavior A {
in x;
out y = b.y1;
composite step b : B {
in x1 = A::x;
}
}
behavior B specializes A {
in x1;
out y1;
}
}
33 changes: 18 additions & 15 deletions kerml/src/examples/Simple Tests/Expressions.kerml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,24 @@ package Expressions {
d1 = x.?{in xx; xx != null};
e = x->reduce {in s; in t; s + t}->reduce '+';

behavior w specializes ControlPerformances::LoopPerformance { inout v: Integer;
in expr redefines whileTest {v > 3}
in step redefines body : Performances::Performance {
step decrement {
out v_decr : Integer = v - 1;
}
succession decrement then update;
step update : FeatureReferencingPerformances::FeatureWritePerformance {
in redefines onOccurrence = w::self {
feature redefines startingAt : w {
inout feature redefines accessedFeature redefines v;
}
}
inout replacementValues = decrement.v_decr;
}
behavior w { inout v : Integer;
step : ControlPerformances::LoopPerformance {
in expr whileTest {v > 3}
in expr untilTest;
in step body {
step decrement {
out v_decr : Integer = v - 1;
}
succession decrement then update;
step update : FeatureReferencingPerformances::FeatureWritePerformance {
in redefines onOccurrence = w::self {
feature redefines startingAt : w {
inout feature redefines accessedFeature redefines v;
}
}
inout replacementValues = decrement.v_decr;
}
}
}
}

Expand Down
14 changes: 6 additions & 8 deletions sysml.library/Domain Libraries/Geometry/SpatialItems.sysml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ standard library package SpatialItems {
private import Time::TimeInstantValue;
private import ScalarValues::Natural;
private import ISQ::universalCartesianSpatial3dCoordinateFrame;
private import ISQ::Position3dVector;
private import ISQ::Displacement3dVector;
private import VectorFunctions::isZeroVector;
private import SequenceFunctions::isEmpty;
private import ControlFunctions::forAll;
Expand Down Expand Up @@ -97,9 +99,8 @@ standard library package SpatialItems {
in timeInstant : TimeInstantValue[1];
in enclosingItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default enclosingItem.localClock;
return positionVector : VectorQuantityValue[1] {
return positionVector : Position3dVector[1] {
attribute :>> mRef = enclosingItem.coordinateFrame;
attribute :>> isBound = true;
}
}

Expand All @@ -113,9 +114,8 @@ standard library package SpatialItems {
in point : Point[1];
in enclosingItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default enclosingItem.localClock;
return positionVector : VectorQuantityValue[1] {
return positionVector : Position3dVector[1] {
attribute :>> mRef = enclosingItem.coordinateFrame;
attribute :>> isBound = true;
}
}

Expand All @@ -132,9 +132,8 @@ standard library package SpatialItems {
in timeInstant : TimeInstantValue[1];
in spatialItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default spatialItem.localClock;
return displacementVector : VectorQuantityValue[1] {
return displacementVector : Displacement3dVector[1] {
attribute :>> mRef = spatialItem.coordinateFrame;
attribute :>> isBound = false;
}
}

Expand All @@ -149,9 +148,8 @@ standard library package SpatialItems {
in point2 : Point[1];
in spatialItem :>> 'frame' : SpatialItem[1];
in clock : Clock[1] default spatialItem.localClock;
return displacementVector : VectorQuantityValue[1] {
return displacementVector : Displacement3dVector[1] {
attribute :>> mRef = spatialItem.coordinateFrame;
attribute :>> isBound = false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ standard library package Time {
import ISQSpaceTime::TimeUnit;
import ISQSpaceTime::time;

readonly part universalClock : Clock[1] = Clocks::universalClock {
readonly part universalClock : Clock[1] :> Clocks::universalClock {
doc
/*
* universalClock is a single Clock that can be used as a default universal time reference.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ standard library package BaseFunctions {
abstract function '#'{ in seq: Anything[0..*] ordered nonunique; in index: Positive[1..*] ordered nonunique;
return : Anything[0..1];
}
abstract function ','{ in seq1: Anything[0..*] ordered nonunique; seq2: Anything[0..*] ordered nonunique;
abstract function ','{ in seq1: Anything[0..*] ordered nonunique; in seq2: Anything[0..*] ordered nonunique;
return : Anything[0..*] ordered nonunique;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ standard library package DataFunctions {
abstract function '<=' { in x: DataValue[1]; in y: DataValue[1]; return : Boolean[1]; }
abstract function '>=' { in x: DataValue[1]; in y: DataValue[1]; return : Boolean[1]; }

abstract function Max { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; }
abstract function Min { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; }
abstract function max { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; }
abstract function min { in x: DataValue[1]; in y: DataValue[1]; return : DataValue[1]; }

abstract function '..' { in lower: DataValue[1]; in upper: DataValue[1]; return : DataValue[0..*] ordered; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ standard library package ScalarFunctions {
abstract function '<=' specializes DataFunctions::'<=' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : Boolean[1]; }
abstract function '>=' specializes DataFunctions::'>=' { in x: ScalarValue[1]; in y: ScalarValue[1]; return : Boolean[1]; }

abstract function max specializes DataFunctions::Max { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; }
abstract function min specializes DataFunctions::Min { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; }
abstract function max specializes DataFunctions::max { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; }
abstract function min specializes DataFunctions::min { in x: ScalarValue[1]; in y: ScalarValue[1]; return : ScalarValue[1]; }

abstract function '..' specializes DataFunctions::'..' { in lower: ScalarValue[1]; in upper: ScalarValue[1]; return : ScalarValue[0..*]; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ standard library package Clocks {
private import ScalarValues::NumericalValue;
private import ScalarValues::Real;
private import Occurrences::Occurrence;
private import Occurrences::Life;
private import ControlFunctions::forAll;

readonly feature universalClock : Clock[1] {
private struct UniversalClockLife[1] :> Clock, Life {
doc
/*
* UniversalClockLife is the classifier of the singleton Life of the universalClock.
*/
}

feature universalClock : UniversalClockLife[1] {
doc
/*
* universalClock is a single Clock that can be used as a default universal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,18 @@ standard library package ControlPerformances {
inv { not ifTest() == elseClause->notEmpty() }
}

behavior IfThenElsePerformance specializes IfThenPerformance, IfElsePerformance {
behavior IfThenElsePerformance specializes IfThenPerformance {
doc
/*
* An IfThenElsePerformance is an IfThenPerformance and an IfElsePerformance.
* An IfThenElsePerformance is an IfThenPerformance with an additional elseClause that
* occurs after and only after the ifTest evaluation is false.
*/

in redefines ifTest;
in redefines thenClause;
in elseClause : Occurrence[0..1];
succession ifTest[1] then elseClause[0..1];
inv { not ifTest() == elseClause->notEmpty() }
}

behavior LoopPerformance specializes Performance {
Expand Down
124 changes: 62 additions & 62 deletions sysml.library/Kernel Libraries/Kernel Semantic Library/Links.kerml
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
standard library package Links {
doc
/*
* This package defines associations and features that are related to the typing of links.
*/
doc
/*
* This package defines associations and features that are related to the typing of links.
*/

private import Base::Anything;
private import Base::things;
abstract assoc Link specializes Anything {
doc
/*
* Link is the most general association between two or more things.
*/
private import Base::Anything;
private import Base::things;
abstract assoc Link specializes Anything {
doc
/*
* Link is the most general association between two or more things.
*/

readonly feature participant: Anything[2..*] nonunique ordered;
}

assoc all BinaryLink specializes Link {
doc
/*
* BinaryLink is the most general binary association between exactly two things,
* nominally directed from source to target.
*/

feature participant: Anything[2] nonunique ordered redefines Link::participant;

readonly end feature source: Anything[0..*] subsets participant;
readonly end feature target: Anything[0..*] subsets participant;
}

assoc all SelfLink specializes BinaryLink {
doc
/*
* SelfLink is a binary association in which the things at the two ends are asserted
* to be the same.
*/

end feature thisThing: Anything[1] redefines source subsets sameThing, sameThing.self;
end feature sameThing: Anything[1] redefines target subsets thisThing;
}

abstract feature links: Link[0..*] nonunique subsets things {
doc
/*
* links is the most general feature of links between individuals.
*/
}

abstract feature binaryLinks: BinaryLink[0..*] nonunique subsets links {
doc
/*
* binaryLinks is a specialization of links restricted to type BinaryLink.
*/
}

abstract feature selfLinks: SelfLink[0..*] nonunique subsets binaryLinks {
doc
/*
* selfLinks is a specialization of binaryLinks restricted to type SelfLink.
*/
readonly feature participant: Anything[2..*] nonunique ordered;
}

assoc all BinaryLink specializes Link {
doc
/*
* BinaryLink is the most general binary association between exactly two things,
* nominally directed from source to target.
*/

feature participant: Anything[2] nonunique ordered redefines Link::participant;

readonly end feature source: Anything[0..*] nonunique subsets participant;
readonly end feature target: Anything[0..*] nonunique subsets participant;
}

assoc all SelfLink specializes BinaryLink {
doc
/*
* SelfLink is a binary association in which the things at the two ends are asserted
* to be the same.
*/

end feature thisThing: Anything[1] redefines source subsets sameThing, sameThing.self;
end feature sameThing: Anything[1] redefines target subsets thisThing;
}

abstract feature links: Link[0..*] nonunique subsets things {
doc
/*
* links is the most general feature of links between individuals.
*/
}

abstract feature binaryLinks: BinaryLink[0..*] nonunique subsets links {
doc
/*
* binaryLinks is a specialization of links restricted to type BinaryLink.
*/
}

abstract feature selfLinks: SelfLink[0..*] nonunique subsets binaryLinks {
doc
/*
* selfLinks is a specialization of binaryLinks restricted to type SelfLink.
*/

end feature thisThing: Anything[1] redefines SelfLink::thisThing, binaryLinks::source;
end feature sameThing: Anything[1] redefines SelfLink::sameThing, binaryLinks::target;
}

end feature thisThing: Anything[1] redefines SelfLink::thisThing, binaryLinks::source;
end feature sameThing: Anything[1] redefines SelfLink::sameThing, binaryLinks::target;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ standard library package Observation {

private import ScalarValues::Boolean;
private import Occurrences::Occurrence;
private import Occurrences::Life;
private import SequenceFunctions::including;
private import SequenceFunctions::excluding;
private import ControlFunctions::select;
Expand All @@ -16,7 +17,14 @@ standard library package Observation {
private import FeatureReferencingPerformances::BooleanEvaluationResultToMonitorPerformance;
private import Transfers::TransferBefore;

readonly feature defaultMonitor[1] : ChangeMonitor {
private struct DefaultMonitorLife[1] :> ChangeMonitor, Life {
doc
/*
* DefaultMonitorLife is the classifier of the singleton Life of the defaultMonitor.
*/
}

feature defaultMonitor[1] : DefaultMonitorLife {
doc
/*
* defaultMonitor is a single ChangeMonitor that can be used as a default.
Expand Down
Loading

0 comments on commit 17d2e77

Please sign in to comment.