Citrus.model に対してシミュレーション機能が動くようにした.
・シミュレート時に,入力チャンネルの受信リソースとして,チャンネル外部のリソースが選ばれないようにした.(InputEventCellEditor.java)
・シミュレート時に,入力チャンネルの非受信リソースのパスパラメータにメッセージの内容が反映されていなかったのを修正.(Event.java)
・シミュレート時に,入力イベントに対して dependingParameters
の更新をしていなかったのを修正.(Simulator.java)
・シミュレート時に,チャンネルの出力側リソースの更新を行うときに,チャンネルセレクタの値を使っていなかったのを修正.(Simulator.java)
・シミュレート時に,子リソースや孫リソースのリソース階層が定義されていなかった場合にリソース定義をし,さらにリソース階層に対して型を定義するようにした.(SystemState.java)
・型が指定されていなかった場合でも祖先判定が落ちないようにした.(Type.java)
・子リソースの集合が初期化されていない場合があった.(ResourceHierarchy.java)
1 parent cb29f4f commit d09b7b74012647b31a5174eb94f9f4067caa94ec
Naoya Nitta authored on 1 Dec
Showing 6 changed files
View
2
■■■
AlgebraicDataflowArchitectureModel/src/application/simulator/InputEventCellEditor.java
ResourcePath eventResPath) {
if (((DataTransferChannel)ch).getInputResources().size() == 0) {//ioch Or normalch
for (ChannelMember out: ((DataTransferChannel)ch).getOutputChannelMembers()) {
ResourcePath resPath = out.getResource();
if (resId.isInstanceOf(resPath)) {//account.uid == acounts.123
if (!out.isOutside() && resId.isInstanceOf(resPath)) {//account.uid == acounts.123
eventResPath = resPath;
eventChs.add(((DataTransferChannel)ch));
String message = null;
Expression mesExp = out.getStateTransition().getMessageExpression();//sync(a,b)
View
2
■■■
AlgebraicDataflowArchitectureModel/src/models/algebra/Type.java
}
public boolean isAncestorOf(Type another) {
if (this.equals(another)) return true;
if (another.getParentTypes() == null) return false;
if (another == null || another.getParentTypes() == null) return false;
for (Type anothersParentType: another.getParentTypes()) {
if (isAncestorOf(anothersParentType)) return true;
}
return false;
View
2
■■■
AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/ResourceHierarchy.java
}
public ResourceHierarchy(ResourceHierarchy parent, Expression parameterExp, Type resourceStateType) {
this.parent = parent;
if (this.children == null) this.children = new HashSet<>();
this.resourceName = null;
this.numParameters = 1;
this.resourceStateType = resourceStateType;
if (parent != null) {
}
public ResourceHierarchy(ResourceHierarchy parent, int numParameters, Type resourceStateType) {
this.parent = parent;
if (this.children == null) this.children = new HashSet<>();
this.resourceName = null;
this.numParameters = numParameters;
this.resourceStateType = resourceStateType;
if (parent != null) {
View
AlgebraicDataflowArchitectureModel/src/simulator/Event.java
View
AlgebraicDataflowArchitectureModel/src/simulator/Simulator.java
View
AlgebraicDataflowArchitectureModel/src/simulator/SystemState.java