diff --git a/AlgebraicDataflowArchitectureModel/models/SamplePULL.dtram b/AlgebraicDataflowArchitectureModel/models/SamplePULL.dtram new file mode 100644 index 0000000..0c06ae8 --- /dev/null +++ b/AlgebraicDataflowArchitectureModel/models/SamplePULL.dtram @@ -0,0 +1,21 @@ +model { + channel setAChannel { + out a(aValue:Int, setA(value)) == value + } + channel outBChannel { + in a(aValue:Int, calcB(aValue)) == aValue + out b(bValue:Int ,calcB(aValue)) == aValue * 2 + } + channel outCChannel { + in a(aValue:Int, calcC(aValue)) == aValue + out c(cValue:Int, calcC(aValue)) == aValue + 1 + } +} +geometry { + node r a:250,170,80,30 + node r b:580,80,80,30 + node r c:590,280,80,30 + node ioc setAChannel:90,170,30,30 + node c outBChannel:430,80,30,30 + node c outCChannel:440,280,30,30 +} diff --git a/AlgebraicDataflowArchitectureModel/models/SamplePUSH.dtram b/AlgebraicDataflowArchitectureModel/models/SamplePUSH.dtram new file mode 100644 index 0000000..c07e68b --- /dev/null +++ b/AlgebraicDataflowArchitectureModel/models/SamplePUSH.dtram @@ -0,0 +1,15 @@ +model { + channel setAChannel { + out a(aValue:Int, setA(value)) == value + } + channel updateBChannel { + in a(aValue:Int, updateB(aValue)) == aValue + out b(bValue:Int, updateB(aValue)) == bValue + aValue + } +} +geometry { + node r a:270,270,80,30 + node r b:660,270,80,30 + node ioc setAChannel:90,240,100,90 + node c updateBChannel:460,240,100,90 +} diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java index 0ea75bf..d718ef7 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowDelegationStage.java @@ -154,6 +154,9 @@ terminals.add(terminal); } } + + if(curState != ControlFlowDelegationStageStatus.SELECTING_AN_EDGE) return; + if (terminals.size() == 2) { graph.removeCells(new mxCell[] {cell}); graph.clearSelection();