I am testing out PySysML2 with some of the examples distributed in the 2024-09 - SysML v2 Pilot Implementation release. The example I am currently working on is the Camera Example (pulled into its own repo for ease of testing).
Observations so far.
part def Camera {
private import PictureTaking::*;
perform action takePicture[*] :> PictureTaking::takePicture;
part focusingSubsystem {
perform takePicture.focus;
}
part imagingSubsystem {
perform takePicture.shoot;
}
}package PictureTaking {
part def Exposure;
action def Focus { out xrsl: Exposure; }
action def Shoot { in xsf: Exposure; }
action takePicture {
action focus: Focus[1];
flow focus.xrsl to shoot.xsf;
action shoot: Shoot[1];
}
}
PySysML2 CLI Output (e.g. errors)
ANTLR runtime and generated code versions disagree: 4.10!=4.13.2
ANTLR runtime and generated code versions disagree: 4.10!=4.13.2
line 2:1 mismatched input 'private' expecting {'}', 'actor', 'attribute', 'comment', 'connection', 'connect', 'doc', 'item', 'part', 'port', 'ref', 'in', 'out', COMMENT_LONG}
line 4:1 extraneous input 'perform' expecting {<EOF>, 'actor', 'attribute', 'comment', 'connect', 'doc', 'import', 'item', 'package', 'part', 'port', 'ref', 'use', 'in', 'out', COMMENT_LONG}
line 4:27 token recognition error at: '[*'
line 4:29 token recognition error at: ']'
line 7:2 mismatched input 'perform' expecting {'}', 'actor', 'attribute', 'comment', 'connection', 'connect', 'doc', 'item', 'part', 'port', 'ref', 'in', 'out', COMMENT_LONG}
line 11:2 mismatched input 'perform' expecting {'}', 'actor', 'attribute', 'comment', 'connection', 'connect', 'doc', 'item', 'part', 'port', 'ref', 'in', 'out', COMMENT_LONG}
line 17:1 extraneous input 'action' expecting {'}', 'actor', 'attribute', 'comment', 'connect', 'doc', 'item', 'package', 'part', 'port', 'ref', 'use', 'in', 'out', COMMENT_LONG}
line 18:1 extraneous input 'action' expecting {<EOF>, 'actor', 'attribute', 'comment', 'connect', 'doc', 'import', 'item', 'package', 'part', 'port', 'ref', 'use', 'in', 'out', COMMENT_LONG}
line 21:21 token recognition error at: '[1]'
line 23:21 token recognition error at: '[1]'
Using output directory: /home/kasm-user/Repos/sysmlv2-camera-example-tests/dist
Exporting to JSON...
Exporting to png...
I am testing out PySysML2 with some of the examples distributed in the 2024-09 - SysML v2 Pilot Implementation release. The example I am currently working on is the Camera Example (pulled into its own repo for ease of testing).
Observations so far.
make.sh build.Combined SysML Input File (CombinedCameraModel.sysml)
PySysML2 command:
pysysml2 export ./dist/CombinedCameraModel.sysml --output-dir ./dist --format json,pngPySysML2 CLI Output (e.g. errors)