From 7cddf42c0928254e31f92c5fb96f1a14df1ebaa6 Mon Sep 17 00:00:00 2001 From: asv Date: Fri, 28 Jan 2005 12:13:55 +0000 Subject: [PATCH] Updated example graphs from Jean Rahuel. Mainly Switch nodes in the graphs were modified. --- examples/GraphGOTO.py | 166 +-- examples/GraphGOTO.xml | 193 ++- examples/GraphSwitch.py | 262 ++-- examples/GraphSwitch.xml | 521 ++++--- examples/GraphSwitch1.py | 266 ++-- examples/GraphSwitch1.xml | 525 ++++---- examples/GraphSwitch2.py | 17 +- examples/GraphSwitch2.xml | 47 +- examples/GraphSwitchCheckDefault1.py | 2 + examples/GraphSwitchCheckDefault1.xml | 50 +- examples/GraphSwitchCheckDefault2.py | 100 +- examples/GraphSwitchCheckDefault2.xml | 100 +- examples/GraphSwitchOutput.py | 90 +- examples/GraphSwitchOutput.xml | 102 +- examples/GraphSwitchs.py | 479 +++---- examples/GraphSwitchs.xml | 1001 +++++++------- examples/SyrStruct.py | 841 ++++++------ examples/SyrStruct.xml | 1787 +++++++++++++------------ 18 files changed, 3330 insertions(+), 3219 deletions(-) diff --git a/examples/GraphGOTO.py b/examples/GraphGOTO.py index 4d555c2..eb27bdf 100644 --- a/examples/GraphGOTO.py +++ b/examples/GraphGOTO.py @@ -1,41 +1,41 @@ -# Generated python file of Graph GraphGOTO +# Generated python file of Graph GraphGOTO_2 from SuperV import * -# Graph creation of GraphGOTO -def DefGraphGOTO() : - GraphGOTO = Graph( 'GraphGOTO' ) - GraphGOTO.SetName( 'GraphGOTO' ) - GraphGOTO.SetAuthor( 'JR' ) - GraphGOTO.SetComment( 'Syracuse algorithm' ) - GraphGOTO.Coords( 0 , 0 ) +# Graph creation of GraphGOTO_2 +def DefGraphGOTO_2() : + GraphGOTO_2 = Graph( 'GraphGOTO_2' ) + GraphGOTO_2.SetName( 'GraphGOTO_2' ) + GraphGOTO_2.SetAuthor( 'JR' ) + GraphGOTO_2.SetComment( 'Syracuse algorithm' ) + GraphGOTO_2.Coords( 0 , 0 ) # Creation of Factory Nodes - test_ISEVEN = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) + test_ISEVEN = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) test_ISEVEN.SetName( 'test_ISEVEN' ) test_ISEVEN.SetAuthor( '' ) test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) - test_ISEVEN.Coords( 195 , 417 ) + test_ISEVEN.Coords( 204 , 420 ) Itest_ISEVENanInteger = test_ISEVEN.GetInPort( 'anInteger' ) Itest_ISEVENGate = test_ISEVEN.GetInPort( 'Gate' ) Otest_ISEVENBoolEven = test_ISEVEN.GetOutPort( 'BoolEven' ) Otest_ISEVENGate = test_ISEVEN.GetOutPort( 'Gate' ) - test_ISONE = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) + test_ISONE = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) test_ISONE.SetName( 'test_ISONE' ) test_ISONE.SetAuthor( '' ) test_ISONE.SetContainer( 'localhost/FactoryServer' ) test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) - test_ISONE.Coords( 201 , 145 ) + test_ISONE.Coords( 208 , 155 ) Itest_ISONEanInteger = test_ISONE.GetInPort( 'anInteger' ) Itest_ISONEGate = test_ISONE.GetInPort( 'Gate' ) Otest_ISONEBoolOne = test_ISONE.GetOutPort( 'BoolOne' ) Otest_ISONEGate = test_ISONE.GetOutPort( 'Gate' ) - m3p1 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) + m3p1 = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) m3p1.SetName( 'm3p1' ) m3p1.SetAuthor( '' ) m3p1.SetContainer( 'localhost/FactoryServer' ) @@ -46,7 +46,7 @@ def DefGraphGOTO() : Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' ) Om3p1Gate = m3p1.GetOutPort( 'Gate' ) - div2 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2 = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) @@ -57,7 +57,7 @@ def DefGraphGOTO() : Odiv2anInteger = div2.GetOutPort( 'anInteger' ) Odiv2Gate = div2.GetOutPort( 'Gate' ) - incr = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr.SetName( 'incr' ) incr.SetAuthor( '' ) incr.SetContainer( 'localhost/FactoryServer' ) @@ -68,7 +68,7 @@ def DefGraphGOTO() : OincraNewCount = incr.GetOutPort( 'aNewCount' ) OincrGate = incr.GetOutPort( 'Gate' ) - incr_1 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr_1 = GraphGOTO_2.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr_1.SetName( 'incr_1' ) incr_1.SetAuthor( '' ) incr_1.SetContainer( 'localhost/FactoryServer' ) @@ -84,11 +84,11 @@ def DefGraphGOTO() : Pylabel_begin.append( 'def label_begin( NB , KB ):' ) Pylabel_begin.append( ' print "label_begin",NB,KB' ) Pylabel_begin.append( ' return NB,KB' ) - label_begin = GraphGOTO.INode( 'label_begin' , Pylabel_begin ) + label_begin = GraphGOTO_2.INode( 'label_begin' , Pylabel_begin ) label_begin.SetName( 'label_begin' ) label_begin.SetAuthor( '' ) label_begin.SetComment( 'Python function' ) - label_begin.Coords( 9 , 250 ) + label_begin.Coords( 10 , 260 ) Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' ) Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' ) Ilabel_beginGate = label_begin.GetInPort( 'Gate' ) @@ -100,11 +100,11 @@ def DefGraphGOTO() : Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' ) Pylabel_test.append( ' print "label_begin",ValEven,ValOne,NB,KB' ) Pylabel_test.append( ' return ValEven,ValOne,NB,KB' ) - label_test = GraphGOTO.INode( 'label_test' , Pylabel_test ) + label_test = GraphGOTO_2.INode( 'label_test' , Pylabel_test ) label_test.SetName( 'label_test' ) label_test.SetAuthor( '' ) label_test.SetComment( 'Python function' ) - label_test.Coords( 396 , 193 ) + label_test.Coords( 400 , 220 ) Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' ) Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' ) Ilabel_testNT = label_test.InPort( 'NT' , 'long' ) @@ -133,11 +133,11 @@ def DefGraphGOTO() : Pytest.append( ' Odd = 0' ) Pytest.append( ' Even = ValEven' ) Pytest.append( ' return Finished,Incr,Even,Odd,NT,KT' ) - test,EndSwitch_OneEven = GraphGOTO.SNode( 'Switch_OneEven' , Pytest ) + test,EndSwitch_OneEven = GraphGOTO_2.SNode( 'Switch_OneEven' , Pytest ) EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' ) EndSwitch_OneEven.SetAuthor( '' ) EndSwitch_OneEven.SetComment( 'Compute Node' ) - EndSwitch_OneEven.Coords( 1256 , 305 ) + EndSwitch_OneEven.Coords( 1331 , 310 ) PyEndSwitch_OneEven = [] PyEndSwitch_OneEven.append( 'def EndSwitch_OneEven( Finished , K ):' ) PyEndSwitch_OneEven.append( ' print "label_begin",Finished,K' ) @@ -152,7 +152,7 @@ def DefGraphGOTO() : test.SetName( 'test' ) test.SetAuthor( '' ) test.SetComment( 'Compute Node' ) - test.Coords( 595 , 239 ) + test.Coords( 596 , 260 ) ItestValOne = test.InPort( 'ValOne' , 'long' ) ItestValEven = test.InPort( 'ValEven' , 'long' ) ItestNT = test.InPort( 'NT' , 'long' ) @@ -170,11 +170,11 @@ def DefGraphGOTO() : Pycontrol_m3p1 = [] Pycontrol_m3p1.append( 'def control_m3p1( N , K ):' ) Pycontrol_m3p1.append( ' return 0,1,N,K' ) - control_m3p1 = GraphGOTO.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' ) + control_m3p1 = GraphGOTO_2.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' ) control_m3p1.SetName( 'control_m3p1' ) control_m3p1.SetAuthor( '' ) control_m3p1.SetComment( 'Compute Node' ) - control_m3p1.Coords( 1073 , 87 ) + control_m3p1.Coords( 1073 , 86 ) Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' ) Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' ) Icontrol_m3p1Gate = control_m3p1.GetInPort( 'Gate' ) @@ -187,7 +187,7 @@ def DefGraphGOTO() : Pycontrol_div2 = [] Pycontrol_div2.append( 'def control_div2( N , NB ) :' ) Pycontrol_div2.append( ' return N,NB' ) - control_div2 = GraphGOTO.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) + control_div2 = GraphGOTO_2.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) control_div2.SetName( 'control_div2' ) control_div2.SetAuthor( '' ) control_div2.SetComment( 'Compute Node' ) @@ -200,93 +200,82 @@ def DefGraphGOTO() : Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' ) # Creation of Links - Ltest_ISEVENBoolEvenlabel_testValEven = GraphGOTO.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) - Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 369 , 273 ) - Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 370 , 498 ) + Ltest_ISEVENBoolEvenlabel_testValEven = GraphGOTO_2.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 374 , 290 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 374 , 491 ) - Ltest_ISONEBoolOnelabel_testValOne = GraphGOTO.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) - Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 385 , 303 ) - Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 384 , 225 ) + Ltest_ISONEBoolOnelabel_testValOne = GraphGOTO_2.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 385 , 311 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 385 , 226 ) - Lm3p1anEvenIntegercontrol_m3p1N = GraphGOTO.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + Lm3p1anEvenIntegercontrol_m3p1N = GraphGOTO_2.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) - Ldiv2anIntegercontrol_div2N = GraphGOTO.Link( Odiv2anInteger , Icontrol_div2N ) + Ldiv2anIntegercontrol_div2N = GraphGOTO_2.Link( Odiv2anInteger , Icontrol_div2N ) - LincraNewCountcontrol_m3p1K = GraphGOTO.Link( OincraNewCount , Icontrol_m3p1K ) - LincraNewCountcontrol_m3p1K.AddCoord( 1 , 1048 , 139 ) + LincraNewCountcontrol_m3p1K = GraphGOTO_2.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 1048 , 135 ) LincraNewCountcontrol_m3p1K.AddCoord( 2 , 1048 , 241 ) - Lincr_1aNewCountcontrol_div2K = GraphGOTO.Link( Oincr_1aNewCount , Icontrol_div2K ) + Lincr_1aNewCountcontrol_div2K = GraphGOTO_2.Link( Oincr_1aNewCount , Icontrol_div2K ) - Llabel_beginNTlabel_testNT = GraphGOTO.Link( Olabel_beginNT , Ilabel_testNT ) + Llabel_beginNTlabel_testNT = GraphGOTO_2.Link( Olabel_beginNT , Ilabel_testNT ) - Llabel_beginNTtest_ISONEanInteger = GraphGOTO.Link( Olabel_beginNT , Itest_ISONEanInteger ) - Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 192 , 226 ) + Llabel_beginNTtest_ISONEanInteger = GraphGOTO_2.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 191 , 225 ) Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 191 , 331 ) - Llabel_beginNTtest_ISEVENanInteger = GraphGOTO.Link( Olabel_beginNT , Itest_ISEVENanInteger ) - Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 191 , 494 ) - Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 192 , 331 ) + Llabel_beginNTtest_ISEVENanInteger = GraphGOTO_2.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 190 , 491 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 190 , 331 ) - Llabel_beginKTlabel_testKT = GraphGOTO.Link( Olabel_beginKT , Ilabel_testKT ) + Llabel_beginKTlabel_testKT = GraphGOTO_2.Link( Olabel_beginKT , Ilabel_testKT ) - Llabel_testValEventestValEven = GraphGOTO.Link( Olabel_testValEven , ItestValEven ) - Llabel_testValEventestValEven.AddCoord( 1 , 587 , 318 ) - Llabel_testValEventestValEven.AddCoord( 2 , 570 , 318 ) - Llabel_testValEventestValEven.AddCoord( 3 , 569 , 272 ) + Llabel_testValEventestValEven = GraphGOTO_2.Link( Olabel_testValEven , ItestValEven ) - Llabel_testValOnetestValOne = GraphGOTO.Link( Olabel_testValOne , ItestValOne ) - Llabel_testValOnetestValOne.AddCoord( 1 , 585 , 273 ) - Llabel_testValOnetestValOne.AddCoord( 2 , 586 , 303 ) + Llabel_testValOnetestValOne = GraphGOTO_2.Link( Olabel_testValOne , ItestValOne ) - Llabel_testNTtestNT = GraphGOTO.Link( Olabel_testNT , ItestNT ) + Llabel_testNTtestNT = GraphGOTO_2.Link( Olabel_testNT , ItestNT ) - Llabel_testKTtestKT = GraphGOTO.Link( Olabel_testKT , ItestKT ) + Llabel_testKTtestKT = GraphGOTO_2.Link( Olabel_testKT , ItestKT ) - LtestFinishedEndSwitch_OneEvenFinished = GraphGOTO.Link( OtestFinished , IEndSwitch_OneEvenFinished ) + LtestFinishedEndSwitch_OneEvenFinished = GraphGOTO_2.Link( OtestFinished , IEndSwitch_OneEvenFinished ) - LtestEvenincr_1Gate = GraphGOTO.Link( OtestEven , Iincr_1Gate ) + LtestEvenincr_1Gate = GraphGOTO_2.Link( OtestEven , Iincr_1Gate ) - LtestEvendiv2Gate = GraphGOTO.Link( OtestEven , Idiv2Gate ) - LtestEvendiv2Gate.AddCoord( 1 , 793 , 561 ) - LtestEvendiv2Gate.AddCoord( 2 , 794 , 310 ) + LtestEvendiv2Gate = GraphGOTO_2.Link( OtestEven , Idiv2Gate ) - LtestOddincrGate = GraphGOTO.Link( OtestOdd , IincrGate ) + LtestOddincrGate = GraphGOTO_2.Link( OtestOdd , IincrGate ) - LtestOddm3p1Gate = GraphGOTO.Link( OtestOdd , Im3p1Gate ) - LtestOddm3p1Gate.AddCoord( 1 , 778 , 138 ) - LtestOddm3p1Gate.AddCoord( 2 , 780 , 328 ) + LtestOddm3p1Gate = GraphGOTO_2.Link( OtestOdd , Im3p1Gate ) - LtestNm3p1anOddInteger = GraphGOTO.Link( OtestN , Im3p1anOddInteger ) - LtestNm3p1anOddInteger.AddCoord( 1 , 808 , 113 ) - LtestNm3p1anOddInteger.AddCoord( 2 , 807 , 352 ) + LtestNm3p1anOddInteger = GraphGOTO_2.Link( OtestN , Im3p1anOddInteger ) + LtestNm3p1anOddInteger.AddCoord( 1 , 808 , 116 ) + LtestNm3p1anOddInteger.AddCoord( 2 , 806 , 372 ) - LtestNdiv2anEvenInteger = GraphGOTO.Link( OtestN , Idiv2anEvenInteger ) + LtestNdiv2anEvenInteger = GraphGOTO_2.Link( OtestN , Idiv2anEvenInteger ) LtestNdiv2anEvenInteger.AddCoord( 1 , 806 , 537 ) - LtestNdiv2anEvenInteger.AddCoord( 2 , 807 , 351 ) + LtestNdiv2anEvenInteger.AddCoord( 2 , 806 , 373 ) - LtestKEndSwitch_OneEvenK = GraphGOTO.Link( OtestK , IEndSwitch_OneEvenK ) + LtestKEndSwitch_OneEvenK = GraphGOTO_2.Link( OtestK , IEndSwitch_OneEvenK ) - LtestKincraCount = GraphGOTO.Link( OtestK , IincraCount ) - LtestKincraCount.AddCoord( 1 , 773 , 236 ) - LtestKincraCount.AddCoord( 2 , 773 , 370 ) + LtestKincraCount = GraphGOTO_2.Link( OtestK , IincraCount ) - LtestKincr_1aCount = GraphGOTO.Link( OtestK , Iincr_1aCount ) - LtestKincr_1aCount.AddCoord( 1 , 774 , 409 ) - LtestKincr_1aCount.AddCoord( 2 , 773 , 368 ) + LtestKincr_1aCount = GraphGOTO_2.Link( OtestK , Iincr_1aCount ) - LtestDefaultEndSwitch_OneEvenDefault = GraphGOTO.Link( OtestDefault , IEndSwitch_OneEvenDefault ) - LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 1 , 840 , 381 ) - LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 2 , 839 , 394 ) + LtestDefaultEndSwitch_OneEvenDefault = GraphGOTO_2.Link( OtestDefault , IEndSwitch_OneEvenDefault ) + LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 1 , 1319 , 385 ) + LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 2 , 1319 , 577 ) + LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 3 , 779 , 577 ) + LtestDefaultEndSwitch_OneEvenDefault.AddCoord( 4 , 778 , 415 ) - Lcontrol_m3p1Gatelabel_testGate = GraphGOTO.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) - Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 388 , 388 ) + Lcontrol_m3p1Gatelabel_testGate = GraphGOTO_2.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 389 , 375 ) Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 389 , 597 ) - Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1441 , 604 ) - Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1441 , 199 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1519 , 602 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1508 , 201 ) - Lcontrol_div2Gatelabel_beginGate = GraphGOTO.Link( Ocontrol_div2Gate , Ilabel_beginGate ) - Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 4 , 388 ) + Lcontrol_div2Gatelabel_beginGate = GraphGOTO_2.Link( Ocontrol_div2Gate , Ilabel_beginGate ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 3 , 373 ) Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 3 , 587 ) Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1307 , 586 ) Lcontrol_div2Gatelabel_beginGate.AddCoord( 4 , 1307 , 528 ) @@ -299,14 +288,7 @@ def DefGraphGOTO() : #OtestIncr = test.GetOutPort( 'Incr' ) #OEndSwitch_OneEvenFinished = EndSwitch_OneEven.GetOutPort( 'Finished' ) #OEndSwitch_OneEvenK = EndSwitch_OneEven.GetOutPort( 'K' ) - return GraphGOTO + return GraphGOTO_2 -GraphGOTO = DefGraphGOTO() - -GraphGOTO.Run() - -GraphGOTO.DoneW() - -GraphGOTO.PrintPorts() - +GraphGOTO_2 = DefGraphGOTO_2() diff --git a/examples/GraphGOTO.xml b/examples/GraphGOTO.xml index fc3884b..c946118 100644 --- a/examples/GraphGOTO.xml +++ b/examples/GraphGOTO.xml @@ -30,7 +30,7 @@ 17/1/2005 - 13:44:46 - 17/1/2005 - 13:47:40 + 18/1/2005 - 16:11:13 2.0 JR ? @@ -56,14 +56,14 @@ BoolEven - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? localhost/FactoryServer C_ISEVEN from SyrComponent - 195 - 417 + 204 + 420 SyrComponent SyrComponent @@ -82,14 +82,14 @@ BoolOne - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? localhost/FactoryServer C_ISONE from SyrComponent - 201 - 145 + 208 + 155 SyrComponent SyrComponent @@ -108,8 +108,8 @@ anEvenInteger - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? localhost/FactoryServer @@ -134,8 +134,8 @@ anInteger - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? localhost/FactoryServer @@ -160,8 +160,8 @@ aNewCount - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? localhost/FactoryServer @@ -186,8 +186,8 @@ aNewCount - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? localhost/FactoryServer @@ -223,14 +223,14 @@ - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? ? Python function - 9 - 250 + 10 + 260 ? ? @@ -272,14 +272,14 @@ - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? ? Python function - 396 - 193 + 400 + 220 ? ? @@ -339,14 +339,14 @@ - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? ? Compute Node - 595 - 239 + 596 + 260 ? ? @@ -376,14 +376,14 @@ - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? ? Compute Node - 1256 - 305 + 1331 + 310 ? ? @@ -418,14 +418,14 @@ control_m3p1 - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? ? Compute Node 1073 - 87 + 86 ? ? @@ -454,8 +454,8 @@ control_div2 - 17/1/2005 - 13:45:36 - 17/1/2005 - 13:45:36 + 18/1/2005 - 16:11:13 + 18/1/2005 - 16:11:13 2.0 ? ? @@ -470,11 +470,11 @@ ValEven -369 - 273 +374 + 290 -370 - 498 +374 + 491 test_ISONE BoolOne @@ -483,10 +483,10 @@ 385 - 303 + 311 -384 - 225 +385 + 226 m3p1 anEvenInteger @@ -507,7 +507,7 @@ 1048 - 139 + 135 1048 241 @@ -530,8 +530,8 @@ anInteger -192 - 226 +191 + 225 191 331 @@ -542,10 +542,10 @@ anInteger -191 - 494 +190 + 491 -192 +190 331 label_begin @@ -558,28 +558,13 @@ ValEven test ValEven - - -587 - 318 - -570 - 318 - -569 - 272 + label_test ValOne test ValOne - - -585 - 273 - -586 - 303 + label_test NT @@ -609,13 +594,7 @@ Even div2 Gate - - -793 - 561 - -794 - 310 + test Odd @@ -627,13 +606,7 @@ Odd m3p1 Gate - - -778 - 138 - -780 - 328 + test N @@ -642,10 +615,10 @@ 808 - 113 + 116 -807 - 352 +806 + 372 test N @@ -656,8 +629,8 @@ 806 537 -807 - 351 +806 + 373 test K @@ -669,25 +642,13 @@ K incr aCount - - -773 - 236 - -773 - 370 + test K incr_1 aCount - - -774 - 409 - -773 - 368 + test Default @@ -695,11 +656,17 @@ Default -840 - 381 +1319 + 385 + +1319 + 577 -839 - 394 +779 + 577 + +778 + 415 control_m3p1 Gate @@ -707,17 +674,17 @@ Gate -388 - 388 +389 + 375 389 597 -1441 - 604 +1519 + 602 -1441 - 199 +1508 + 201 control_div2 Gate @@ -725,8 +692,8 @@ Gate -4 - 388 +3 + 373 3 587 diff --git a/examples/GraphSwitch.py b/examples/GraphSwitch.py index 8515637..04c5ee6 100644 --- a/examples/GraphSwitch.py +++ b/examples/GraphSwitch.py @@ -2,129 +2,141 @@ # Generated python file of Graph GraphSwitch from SuperV import * -# Graph creation -GraphSwitch = Graph( 'GraphSwitch' ) -GraphSwitch.SetName( 'GraphSwitch' ) -GraphSwitch.SetAuthor( '' ) -GraphSwitch.SetComment( '' ) -GraphSwitch.Coords( 0 , 0 ) -# Creation of Factory Nodes - -# Creation of InLine Nodes -PyIsOdd = [] -PyIsOdd.append( 'from time import * ' ) -PyIsOdd.append( 'def IsOdd(a) : ' ) -PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) -PyIsOdd.append( ' sleep( 1 ) ' ) -PyIsOdd.append( ' return a ' ) -IsOdd = GraphSwitch.INode( 'IsOdd' , PyIsOdd ) -IsOdd.SetName( 'IsOdd' ) -IsOdd.SetAuthor( '' ) -IsOdd.SetComment( 'Python function' ) -IsOdd.Coords( 388 , 50 ) -IsOdd.InPort( 'a' , 'long' ) -IsOdd.OutPort( 'a' , 'long' ) - -# Creation of Loop Nodes -PyInitLoopSwitch = [] -PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) -PyInitLoopSwitch.append( ' return Index,Min,Max ' ) -PyMoreInitLoopSwitch = [] -PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) -PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) -PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) -PyMoreInitLoopSwitch.append( ' else : ' ) -PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) -PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) -PyNextInitLoopSwitch = [] -PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) -PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) -PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) -InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) -EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) -EndOfInitLoopSwitch.SetAuthor( '' ) -EndOfInitLoopSwitch.SetComment( '' ) -EndOfInitLoopSwitch.Coords( 766 , 127 ) -InitLoopSwitch.SetName( 'InitLoopSwitch' ) -InitLoopSwitch.SetAuthor( '' ) -InitLoopSwitch.SetComment( '' ) -InitLoopSwitch.Coords( 10 , 129 ) -InitLoopSwitch.InPort( 'Index' , 'long' ) -InitLoopSwitch.InPort( 'Min' , 'long' ) -InitLoopSwitch.InPort( 'Max' , 'long' ) -InitLoopSwitch.OutPort( 'Index' , 'long' ) -InitLoopSwitch.OutPort( 'Min' , 'long' ) -InitLoopSwitch.OutPort( 'Max' , 'long' ) - -# Creation of Switch Nodes -PySwitch = [] -PySwitch.append( 'from time import * ' ) -PySwitch.append( 'def Switch(a) : ' ) -PySwitch.append( ' if ( a & 1 ) == 0 : ' ) -PySwitch.append( ' sleep(1) ' ) -PySwitch.append( ' return a & 1,1-(a&1),a ' ) -Switch,EndOfSwitch = GraphSwitch.SNode( 'Switch' , PySwitch ) -EndOfSwitch.SetName( 'EndOfSwitch' ) -EndOfSwitch.SetAuthor( '' ) -EndOfSwitch.SetComment( '' ) -EndOfSwitch.Coords( 587 , 126 ) -PyEndOfSwitch = [] -EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) -EndOfSwitch.InPort( 'a' , 'long' ) -EndOfSwitch.OutPort( 'a' , 'long' ) -Switch.SetName( 'Switch' ) -Switch.SetAuthor( '' ) -Switch.SetComment( '' ) -Switch.Coords( 186 , 130 ) -Switch.InPort( 'a' , 'long' ) -Switch.OutPort( 'Odd' , 'long' ) -Switch.OutPort( 'Even' , 'int' ) -Switch.OutPort( 'a' , 'int' ) - -# Creation of Links -IsOdda = IsOdd.Port( 'a' ) -EndOfSwitcha = GraphSwitch.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) -EndOfSwitcha.AddCoord( 1 , 571 , 161 ) -EndOfSwitcha.AddCoord( 2 , 571 , 131 ) - -InitLoopSwitchIndex = InitLoopSwitch.Port( 'Index' ) -Switcha = GraphSwitch.Link( InitLoopSwitchIndex , Switch.Port( 'a' ) ) - -InitLoopSwitchMin = InitLoopSwitch.Port( 'Min' ) -EndOfInitLoopSwitchMin = GraphSwitch.Link( InitLoopSwitchMin , EndOfInitLoopSwitch.Port( 'Min' ) ) - -InitLoopSwitchMax = InitLoopSwitch.Port( 'Max' ) -EndOfInitLoopSwitchMax = GraphSwitch.Link( InitLoopSwitchMax , EndOfInitLoopSwitch.Port( 'Max' ) ) - -SwitchOdd = Switch.Port( 'Odd' ) -IsOddInGate = GraphSwitch.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) - -Switcha = Switch.Port( 'a' ) -IsOdda = GraphSwitch.Link( Switcha , IsOdd.Port( 'a' ) ) -IsOdda.AddCoord( 1 , 372 , 129 ) -IsOdda.AddCoord( 2 , 371 , 223 ) - -SwitchDefault = Switch.Port( 'Default' ) -EndOfSwitchDefault = GraphSwitch.Link( SwitchDefault , EndOfSwitch.Port( 'Default' ) ) -EndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) -EndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) - -EndOfSwitcha = EndOfSwitch.Port( 'a' ) -EndOfInitLoopSwitchIndex = GraphSwitch.Link( EndOfSwitcha , EndOfInitLoopSwitch.Port( 'Index' ) ) - -# Creation of Input datas -InitLoopSwitchIndex = InitLoopSwitch.Input( 'Index' , 0) -InitLoopSwitchMin = InitLoopSwitch.Input( 'Min' , 0) -InitLoopSwitchMax = InitLoopSwitch.Input( 'Max' , 100) - -# Creation of Output variables -EndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.Port( 'Index' ) -EndOfInitLoopSwitchMin = EndOfInitLoopSwitch.Port( 'Min' ) -EndOfInitLoopSwitchMax = EndOfInitLoopSwitch.Port( 'Max' ) -SwitchEven = Switch.Port( 'Even' ) - -GraphSwitch.Run() -GraphSwitch.DoneW() -print GraphSwitch.State() -GraphSwitch.PrintPorts() +# Graph creation of GraphSwitch +def DefGraphSwitch() : + GraphSwitch = Graph( 'GraphSwitch' ) + GraphSwitch.SetName( 'GraphSwitch' ) + GraphSwitch.SetAuthor( '' ) + GraphSwitch.SetComment( '' ) + GraphSwitch.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyIsOdd = [] + PyIsOdd.append( 'from time import * ' ) + PyIsOdd.append( 'def IsOdd(a) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphSwitch.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 389 , 65 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoopSwitch = [] + PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoopSwitch.append( ' return Index,Min,Max ' ) + PyMoreInitLoopSwitch = [] + PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) + PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) + PyMoreInitLoopSwitch.append( ' else : ' ) + PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) + PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInitLoopSwitch = [] + PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) + PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) + PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) + InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 776 , 170 ) + PyEndOfInitLoopSwitch = [] + EndOfInitLoopSwitch.SetPyFunction( '' , PyEndOfInitLoopSwitch ) + IInitLoopSwitchDoLoop = InitLoopSwitch.GetInPort( 'DoLoop' ) + IInitLoopSwitchIndex = InitLoopSwitch.InPort( 'Index' , 'long' ) + IInitLoopSwitchMin = InitLoopSwitch.InPort( 'Min' , 'long' ) + IInitLoopSwitchMax = InitLoopSwitch.InPort( 'Max' , 'long' ) + IInitLoopSwitchGate = InitLoopSwitch.GetInPort( 'Gate' ) + OInitLoopSwitchDoLoop = InitLoopSwitch.GetOutPort( 'DoLoop' ) + OInitLoopSwitchIndex = InitLoopSwitch.GetOutPort( 'Index' ) + OInitLoopSwitchMin = InitLoopSwitch.GetOutPort( 'Min' ) + OInitLoopSwitchMax = InitLoopSwitch.GetOutPort( 'Max' ) + IEndOfInitLoopSwitchDoLoop = EndOfInitLoopSwitch.GetInPort( 'DoLoop' ) + IEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetInPort( 'Index' ) + IEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetInPort( 'Min' ) + IEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetInPort( 'Max' ) + IEndOfInitLoopSwitchGate = EndOfInitLoopSwitch.GetInPort( 'Gate' ) + OEndOfInitLoopSwitchDoLoop = EndOfInitLoopSwitch.GetOutPort( 'DoLoop' ) + OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + OEndOfInitLoopSwitchGate = EndOfInitLoopSwitch.GetOutPort( 'Gate' ) + InitLoopSwitch.SetName( 'InitLoopSwitch' ) + InitLoopSwitch.SetAuthor( '' ) + InitLoopSwitch.SetComment( 'Compute Node' ) + InitLoopSwitch.Coords( 10 , 129 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(a) : ' ) + PySwitch.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' return a & 1,1-(a&1),a ' ) + Switch,EndOfSwitch = GraphSwitch.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 582 , 170 ) + PyEndOfSwitch = [] + EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' ) + OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' ) + OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 194 , 129 ) + ISwitcha = Switch.InPort( 'a' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchOdd = Switch.OutPort( 'Odd' , 'long' ) + OSwitchEven = Switch.OutPort( 'Even' , 'int' ) + OSwitcha = Switch.OutPort( 'a' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitch.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha.AddCoord( 1 , 564 , 201 ) + LIsOddaEndOfSwitcha.AddCoord( 2 , 564 , 137 ) + + LInitLoopSwitchIndexSwitcha = GraphSwitch.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitch.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitch.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitch.Link( OSwitchOdd , IIsOddGate ) + + LSwitchaIsOdda = GraphSwitch.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 371 , 136 ) + LSwitchaIsOdda.AddCoord( 2 , 371 , 200 ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitch.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitch.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( 0 ) + IInitLoopSwitchMax.Input( 100 ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + return GraphSwitch + + +GraphSwitch = DefGraphSwitch() diff --git a/examples/GraphSwitch.xml b/examples/GraphSwitch.xml index f25242c..770cffa 100644 --- a/examples/GraphSwitch.xml +++ b/examples/GraphSwitch.xml @@ -1,345 +1,344 @@ - + + ? - ? - GraphSwitch - 1 - ? - + ? + GraphSwitch + 1 + ? + GraphSwitch - + long - InitLoopSwitch\Index - + InitLoopSwitch__Index + long - InitLoopSwitch\Min - + InitLoopSwitch__Min + long - InitLoopSwitch\Max - + InitLoopSwitch__Max + long - EndOfInitLoopSwitch\Index - + EndOfInitLoopSwitch__Index + long - EndOfInitLoopSwitch\Min - + EndOfInitLoopSwitch__Min + long - EndOfInitLoopSwitch\Max - + EndOfInitLoopSwitch__Max + int - Switch\Even - - - 1/10/2003 - 17:23:54 - 13/10/2003 - 10:53:44 - 1.05 - ? - ? - ? - 0 - 0 - + Switch__Even + + + 1/10/2003 - 17:23:54 + 19/1/2005 - 15:34:39 + 1.05 + ? + ? + ? + 0 + 0 + ? - ? - IsOdd - 3 - ? - + ? + IsOdd + 3 + ? + IsOdd - + long - a - + a + long - a - - + a + + IsOdd - - - - - - 13/10/2003 - 10:53:44 - 13/10/2003 - 10:53:44 - 1.05 - ? - ? - Python function - 388 - 50 - + + + + + + 19/1/2005 - 15:34:39 + 19/1/2005 - 15:34:39 + 1.05 + ? + ? + Python function + 389 + 65 + ? - ? - InitLoopSwitch - 4 - EndOfInitLoopSwitch - + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + InitLoopSwitch - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - + Max + + InitLoop - - - + + + MoreLoop - - - - - - - + + + + + + + NextLoop - - - - 13/10/2003 - 10:53:44 - 13/10/2003 - 10:53:44 - 1.05 - ? - ? - ? - 10 - 129 - + + + + 19/1/2005 - 15:34:39 + 19/1/2005 - 15:34:39 + 1.05 + ? + ? + Compute Node + 10 + 129 + ? - ? - EndOfInitLoopSwitch - 5 - InitLoopSwitch - + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + EndOfInitLoopSwitch - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - - - 13/10/2003 - 10:53:44 - 13/10/2003 - 10:53:44 - 1.05 - ? - ? - ? - 766 - 127 - + Max + + + +? + + 19/1/2005 - 15:34:39 + 19/1/2005 - 15:34:39 + 1.05 + ? + ? + Compute Node + 776 + 170 + ? - ? - Switch - 6 - EndOfSwitch - + ? + Switch + 6 + EndOfSwitch + Switch - + long - a - + a + long - Odd - + Odd + int - Even - + Even + int - a - - + a + + Switch - - - - - - 13/10/2003 - 10:53:44 - 13/10/2003 - 10:53:44 - 1.05 - ? - ? - ? - 186 - 130 - + + + + + + 19/1/2005 - 15:34:39 + 19/1/2005 - 15:34:39 + 1.05 + ? + ? + Compute Node + 194 + 129 + ? - ? - EndOfSwitch - 7 - Switch - + ? + EndOfSwitch + 7 + Switch + EndOfSwitch - + long - a - + a + long - a - - - - 13/10/2003 - 10:53:44 - 13/10/2003 - 10:53:44 - 1.05 - ? - ? - ? - 587 - 126 - + a + + + +? + + 19/1/2005 - 15:34:39 + 19/1/2005 - 15:34:39 + 1.05 + ? + ? + Compute Node + 582 + 170 + IsOdd - a - EndOfSwitch - a - + a + EndOfSwitch + a + -571 - 161 - -571 - 131 - +564 + 201 + +564 + 137 + InitLoopSwitch - DoLoop - EndOfInitLoopSwitch - DoLoop - - + DoLoop + EndOfInitLoopSwitch + DoLoop + + InitLoopSwitch - Index - Switch - a - - + Index + Switch + a + + InitLoopSwitch - Min - EndOfInitLoopSwitch - Min - - + Min + EndOfInitLoopSwitch + Min + + InitLoopSwitch - Max - EndOfInitLoopSwitch - Max - - + Max + EndOfInitLoopSwitch + Max + + EndOfInitLoopSwitch - DoLoop - InitLoopSwitch - DoLoop - - + DoLoop + InitLoopSwitch + DoLoop + + Switch - Odd - IsOdd - InGate - - + Odd + IsOdd + Gate + + Switch - a - IsOdd - a - + a + IsOdd + a + -372 - 129 - 371 - 223 - + 136 + +371 + 200 + Switch - Default - EndOfSwitch - Default - - -572 - 194 - -571 - 257 - + Default + EndOfSwitch + Default + + EndOfSwitch - a - EndOfInitLoopSwitch - Index - - + a + EndOfInitLoopSwitch + Index + + GraphSwitch - InitLoopSwitch\Index - InitLoopSwitch - Index - + InitLoopSwitch__Index + InitLoopSwitch + Index + 3 - 0 - - + 0 + + GraphSwitch - InitLoopSwitch\Min - InitLoopSwitch - Min - + InitLoopSwitch__Min + InitLoopSwitch + Min + 3 - 0 - - + 0 + + GraphSwitch - InitLoopSwitch\Max - InitLoopSwitch - Max - + InitLoopSwitch__Max + InitLoopSwitch + Max + 3 - 100 - + 100 + diff --git a/examples/GraphSwitch1.py b/examples/GraphSwitch1.py index 0af4722..7a150e9 100755 --- a/examples/GraphSwitch1.py +++ b/examples/GraphSwitch1.py @@ -2,130 +2,144 @@ # Generated python file of Graph GraphSwitch1 from SuperV import * -# Graph creation -GraphSwitch1 = Graph( 'GraphSwitch1' ) -GraphSwitch1.SetName( 'GraphSwitch1' ) -GraphSwitch1.SetAuthor( '' ) -GraphSwitch1.SetComment( '' ) -GraphSwitch1.Coords( 0 , 0 ) -# Creation of Factory Nodes - -# Creation of InLine Nodes -PyIsOdd = [] -PyIsOdd.append( 'from time import * ' ) -PyIsOdd.append( 'def IsOdd(a) : ' ) -PyIsOdd.append( ' print a,"IsOdd (GraphSwitch1)" ' ) -PyIsOdd.append( ' sleep( 1 ) ' ) -PyIsOdd.append( ' return a ' ) -IsOdd = GraphSwitch1.INode( 'IsOdd' , PyIsOdd ) -IsOdd.SetName( 'IsOdd' ) -IsOdd.SetAuthor( '' ) -IsOdd.SetComment( 'Python function' ) -IsOdd.Coords( 388 , 50 ) -IsOdd.InPort( 'a' , 'long' ) -IsOdd.OutPort( 'a' , 'long' ) - -# Creation of Loop Nodes -PyInitLoop = [] -PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) -PyInitLoop.append( ' return Index,Min,Max ' ) -PyMoreInitLoop = [] -PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) -PyMoreInitLoop.append( ' if Index <= Max : ' ) -PyMoreInitLoop.append( ' DoLoop = 1 ' ) -PyMoreInitLoop.append( ' else : ' ) -PyMoreInitLoop.append( ' DoLoop = 0 ' ) -PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) -PyNextInitLoop = [] -PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) -PyNextInitLoop.append( ' Index = Index + 1 ' ) -PyNextInitLoop.append( ' return Index,Min,Max ' ) -InitLoop,EndOfInitLoop = GraphSwitch1.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) -EndOfInitLoop.SetName( 'EndOfInitLoop' ) -EndOfInitLoop.SetAuthor( '' ) -EndOfInitLoop.SetComment( '' ) -EndOfInitLoop.Coords( 766 , 127 ) -InitLoop.SetName( 'InitLoop' ) -InitLoop.SetAuthor( '' ) -InitLoop.SetComment( '' ) -InitLoop.Coords( 10 , 129 ) -InitLoop.InPort( 'Index' , 'long' ) -InitLoop.InPort( 'Min' , 'long' ) -InitLoop.InPort( 'Max' , 'long' ) -InitLoop.OutPort( 'Index' , 'long' ) -InitLoop.OutPort( 'Min' , 'long' ) -InitLoop.OutPort( 'Max' , 'long' ) - -# Creation of Switch Nodes -PySwitch = [] -PySwitch.append( 'from time import * ' ) -PySwitch.append( 'def Switch(a) : ' ) -PySwitch.append( ' if ( a & 1 ) == 0 : ' ) -PySwitch.append( ' sleep(1) ' ) -PySwitch.append( ' return a & 1,1-(a&1),a ' ) -Switch,EndOfSwitch = GraphSwitch1.SNode( 'Switch' , PySwitch ) -EndOfSwitch.SetName( 'EndOfSwitch' ) -EndOfSwitch.SetAuthor( '' ) -EndOfSwitch.SetComment( '' ) -EndOfSwitch.Coords( 587 , 126 ) -PyEndOfSwitch = [] -EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) -EndOfSwitch.InPort( 'a' , 'long' ) -EndOfSwitch.OutPort( 'a' , 'long' ) -Switch.SetName( 'Switch' ) -Switch.SetAuthor( '' ) -Switch.SetComment( '' ) -Switch.Coords( 186 , 130 ) -Switch.InPort( 'a' , 'long' ) -Switch.OutPort( 'Odd' , 'long' ) -Switch.OutPort( 'Even' , 'int' ) -Switch.OutPort( 'a' , 'int' ) - -# Creation of Links -IsOdda = IsOdd.Port( 'a' ) -EndOfSwitcha = GraphSwitch1.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) -EndOfSwitcha.AddCoord( 1 , 571 , 161 ) -EndOfSwitcha.AddCoord( 2 , 571 , 131 ) - -InitLoopIndex = InitLoop.Port( 'Index' ) -Switcha = GraphSwitch1.Link( InitLoopIndex , Switch.Port( 'a' ) ) - -InitLoopMin = InitLoop.Port( 'Min' ) -EndOfInitLoopMin = GraphSwitch1.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) - -InitLoopMax = InitLoop.Port( 'Max' ) -EndOfInitLoopMax = GraphSwitch1.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) - -SwitchOdd = Switch.Port( 'Odd' ) -IsOddInGate = GraphSwitch1.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) - -SwitchEven = Switch.Port( 'Even' ) -EndOfSwitchDefault = GraphSwitch1.Link( SwitchEven , EndOfSwitch.Port( 'Default' ) ) - -Switcha = Switch.Port( 'a' ) -IsOdda = GraphSwitch1.Link( Switcha , IsOdd.Port( 'a' ) ) -IsOdda.AddCoord( 1 , 372 , 129 ) -IsOdda.AddCoord( 2 , 371 , 223 ) - -EndOfSwitcha = GraphSwitch1.Link( Switcha , EndOfSwitch.Port( 'a' ) ) -EndOfSwitcha.AddCoord( 1 , 571 , 161 ) -EndOfSwitcha.AddCoord( 2 , 570 , 221 ) - -EndOfSwitcha = EndOfSwitch.Port( 'a' ) -EndOfInitLoopIndex = GraphSwitch1.Link( EndOfSwitcha , EndOfInitLoop.Port( 'Index' ) ) - -# Creation of Input datas -InitLoopIndex = InitLoop.Input( 'Index' , 0) -InitLoopMin = InitLoop.Input( 'Min' , 0) -InitLoopMax = InitLoop.Input( 'Max' , 100) - -# Creation of Output variables -EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) -EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) -EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) - -GraphSwitch1.Run() -GraphSwitch1.DoneW() -print GraphSwitch1.State() -GraphSwitch1.PrintPorts() +# Graph creation of GraphSwitch1 +def DefGraphSwitch1() : + GraphSwitch1 = Graph( 'GraphSwitch1' ) + GraphSwitch1.SetName( 'GraphSwitch1' ) + GraphSwitch1.SetAuthor( '' ) + GraphSwitch1.SetComment( '' ) + GraphSwitch1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyIsOdd = [] + PyIsOdd.append( 'from time import * ' ) + PyIsOdd.append( 'def IsOdd(a) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphSwitch1)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphSwitch1.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 389 , 65 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoop = [] + PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoop.append( ' return Index,Min,Max ' ) + PyMoreInitLoop = [] + PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreInitLoop.append( ' if Index <= Max : ' ) + PyMoreInitLoop.append( ' DoLoop = 1 ' ) + PyMoreInitLoop.append( ' else : ' ) + PyMoreInitLoop.append( ' DoLoop = 0 ' ) + PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInitLoop = [] + PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) + PyNextInitLoop.append( ' Index = Index + 1 ' ) + PyNextInitLoop.append( ' return Index,Min,Max ' ) + InitLoop,EndOfInitLoop = GraphSwitch1.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) + EndOfInitLoop.SetName( 'EndOfInitLoop' ) + EndOfInitLoop.SetAuthor( '' ) + EndOfInitLoop.SetComment( 'Compute Node' ) + EndOfInitLoop.Coords( 768 , 126 ) + PyEndOfInitLoop = [] + EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop ) + IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' ) + IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' ) + IInitLoopMin = InitLoop.InPort( 'Min' , 'long' ) + IInitLoopMax = InitLoop.InPort( 'Max' , 'long' ) + IInitLoopGate = InitLoop.GetInPort( 'Gate' ) + OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' ) + OInitLoopIndex = InitLoop.GetOutPort( 'Index' ) + OInitLoopMin = InitLoop.GetOutPort( 'Min' ) + OInitLoopMax = InitLoop.GetOutPort( 'Max' ) + IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' ) + IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' ) + IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' ) + IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' ) + IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' ) + OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' ) + OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' ) + InitLoop.SetName( 'InitLoop' ) + InitLoop.SetAuthor( '' ) + InitLoop.SetComment( 'Compute Node' ) + InitLoop.Coords( 10 , 129 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(a) : ' ) + PySwitch.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' return a & 1,1-(a&1),a ' ) + Switch,EndOfSwitch = GraphSwitch1.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 587 , 126 ) + PyEndOfSwitch = [] + EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' ) + OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' ) + OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 195 , 130 ) + ISwitcha = Switch.InPort( 'a' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchOdd = Switch.OutPort( 'Odd' , 'long' ) + OSwitchEven = Switch.OutPort( 'Even' , 'int' ) + OSwitcha = Switch.OutPort( 'a' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitch1.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha.AddCoord( 1 , 571 , 158 ) + LIsOddaEndOfSwitcha.AddCoord( 2 , 571 , 136 ) + + LInitLoopIndexSwitcha = GraphSwitch1.Link( OInitLoopIndex , ISwitcha ) + + LInitLoopMinEndOfInitLoopMin = GraphSwitch1.Link( OInitLoopMin , IEndOfInitLoopMin ) + + LInitLoopMaxEndOfInitLoopMax = GraphSwitch1.Link( OInitLoopMax , IEndOfInitLoopMax ) + + LSwitchOddIsOddGate = GraphSwitch1.Link( OSwitchOdd , IIsOddGate ) + + LSwitchEvenEndOfSwitchDefault = GraphSwitch1.Link( OSwitchEven , IEndOfSwitchDefault ) + + LSwitchaIsOdda = GraphSwitch1.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 375 , 136 ) + LSwitchaIsOdda.AddCoord( 2 , 375 , 201 ) + + LSwitchaEndOfSwitcha = GraphSwitch1.Link( OSwitcha , IEndOfSwitcha ) + LSwitchaEndOfSwitcha.AddCoord( 1 , 571 , 161 ) + LSwitchaEndOfSwitcha.AddCoord( 2 , 570 , 221 ) + + LEndOfSwitchaEndOfInitLoopIndex = GraphSwitch1.Link( OEndOfSwitcha , IEndOfInitLoopIndex ) + + # Input datas + IInitLoopIndex.Input( 0 ) + IInitLoopMin.Input( 0 ) + IInitLoopMax.Input( 100 ) + + # Output Ports of the graph + #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + return GraphSwitch1 + + +GraphSwitch1 = DefGraphSwitch1() diff --git a/examples/GraphSwitch1.xml b/examples/GraphSwitch1.xml index bff16b1..556f16b 100755 --- a/examples/GraphSwitch1.xml +++ b/examples/GraphSwitch1.xml @@ -1,348 +1,353 @@ - + + ? - ? - GraphSwitch1 - 1 - ? - + ? + GraphSwitch1 + 1 + ? + GraphSwitch1 - + long - InitLoop\Index - + InitLoop__Index + long - InitLoop\Min - + InitLoop__Min + long - InitLoop\Max - + InitLoop__Max + long - EndOfInitLoop\Index - + EndOfInitLoop__Index + long - EndOfInitLoop\Min - + EndOfInitLoop__Min + long - EndOfInitLoop\Max - - - 1/10/2003 - 17:12:48 - 13/10/2003 - 10:54:20 - 1.05 - ? - ? - ? - 0 - 0 - + EndOfInitLoop__Max + + + 1/10/2003 - 17:12:48 + 19/1/2005 - 15:36:46 + 1.05 + ? + ? + ? + 0 + 0 + ? - ? - IsOdd - 3 - ? - + ? + IsOdd + 3 + ? + IsOdd - + long - a - + a + long - a - - + a + + IsOdd - - - - - - 13/10/2003 - 10:54:20 - 13/10/2003 - 10:54:20 - 1.05 - ? - ? - Python function - 388 - 50 - + + + + + + 19/1/2005 - 15:36:46 + 19/1/2005 - 15:36:46 + 1.05 + ? + ? + Python function + 389 + 65 + ? - ? - InitLoop - 4 - EndOfInitLoop - + ? + InitLoop + 4 + EndOfInitLoop + InitLoop - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - + Max + + InitLoop - - - + + + MoreLoop - - - - - - - + + + + + + + NextLoop - - - - 13/10/2003 - 10:54:20 - 13/10/2003 - 10:54:20 - 1.05 - ? - ? - ? - 10 - 129 - + + + + 19/1/2005 - 15:36:46 + 19/1/2005 - 15:36:46 + 1.05 + ? + ? + Compute Node + 10 + 129 + ? - ? - EndOfInitLoop - 5 - InitLoop - + ? + EndOfInitLoop + 5 + InitLoop + EndOfInitLoop - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - - - 13/10/2003 - 10:54:20 - 13/10/2003 - 10:54:20 - 1.05 - ? - ? - ? - 766 - 127 - + Max + + + +? + + 19/1/2005 - 15:36:46 + 19/1/2005 - 15:36:46 + 1.05 + ? + ? + Compute Node + 768 + 126 + ? - ? - Switch - 6 - EndOfSwitch - + ? + Switch + 6 + EndOfSwitch + Switch - + long - a - + a + long - Odd - + Odd + int - Even - + Even + int - a - - + a + + Switch - - - - - - 13/10/2003 - 10:54:20 - 13/10/2003 - 10:54:20 - 1.05 - ? - ? - ? - 186 - 130 - + + + + + + 19/1/2005 - 15:36:46 + 19/1/2005 - 15:36:46 + 1.05 + ? + ? + Compute Node + 195 + 130 + ? - ? - EndOfSwitch - 7 - Switch - + ? + EndOfSwitch + 7 + Switch + EndOfSwitch - + long - a - + a + long - a - - - - 13/10/2003 - 10:54:20 - 13/10/2003 - 10:54:20 - 1.05 - ? - ? - ? - 587 - 126 - + a + + + +? + + 19/1/2005 - 15:36:46 + 19/1/2005 - 15:36:46 + 1.05 + ? + ? + Compute Node + 587 + 126 + IsOdd - a - EndOfSwitch - a - + a + EndOfSwitch + a + 571 - 161 - + 158 + 571 - 131 - + 136 + InitLoop - DoLoop - EndOfInitLoop - DoLoop - - + DoLoop + EndOfInitLoop + DoLoop + + InitLoop - Index - Switch - a - - + Index + Switch + a + + InitLoop - Min - EndOfInitLoop - Min - - + Min + EndOfInitLoop + Min + + InitLoop - Max - EndOfInitLoop - Max - - + Max + EndOfInitLoop + Max + + EndOfInitLoop - DoLoop - InitLoop - DoLoop - - + DoLoop + InitLoop + DoLoop + + Switch - Odd - IsOdd - InGate - - + Odd + IsOdd + Gate + + Switch - Even - EndOfSwitch - Default - - + Even + EndOfSwitch + Default + + Switch - a - IsOdd - a - + a + IsOdd + a + -372 - 129 - -371 - 223 - +375 + 136 + +375 + 201 + Switch - a - EndOfSwitch - a - + a + EndOfSwitch + a + 571 - 161 - + 161 + 570 - 221 - + 221 + EndOfSwitch - a - EndOfInitLoop - Index - - + a + EndOfInitLoop + Index + + GraphSwitch1 - InitLoop\Index - InitLoop - Index - + InitLoop__Index + InitLoop + Index + 3 - 0 - - + 0 + + GraphSwitch1 - InitLoop\Min - InitLoop - Min - + InitLoop__Min + InitLoop + Min + 3 - 0 - - + 0 + + GraphSwitch1 - InitLoop\Max - InitLoop - Max - + InitLoop__Max + InitLoop + Max + 3 - 100 - + 100 + diff --git a/examples/GraphSwitch2.py b/examples/GraphSwitch2.py index 3bdae8d..bd57970 100644 --- a/examples/GraphSwitch2.py +++ b/examples/GraphSwitch2.py @@ -66,7 +66,7 @@ def DefGraphSwitch_1_1() : EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) EndOfInitLoopSwitch.SetAuthor( '' ) EndOfInitLoopSwitch.SetComment( 'Compute Node' ) - EndOfInitLoopSwitch.Coords( 766 , 127 ) + EndOfInitLoopSwitch.Coords( 775 , 169 ) PyEndOfInitLoopSwitch = [] EndOfInitLoopSwitch.SetPyFunction( '' , PyEndOfInitLoopSwitch ) IInitLoopSwitchDoLoop = InitLoopSwitch.GetInPort( 'DoLoop' ) @@ -95,18 +95,17 @@ def DefGraphSwitch_1_1() : # Creation of Switch Nodes PySwitch = [] - PySwitch.append( 'from time import * ' ) - PySwitch.append( 'def Switch(a) : ' ) - PySwitch.append( ' if a <= 0 : ' ) - PySwitch.append( ' return 0,0,a ' ) - PySwitch.append( ' if ( a & 1 ) == 0 : ' ) - PySwitch.append( ' sleep(1) ' ) - PySwitch.append( ' return a & 1,1-(a&1),a ' ) + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(a) : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' if a <= 0 : ' ) + PySwitch.append( ' return 0,0,a ' ) + PySwitch.append( ' return a & 1,1-(a&1),a ' ) Switch,EndOfSwitch = GraphSwitch_1_1.SNode( 'Switch' , PySwitch ) EndOfSwitch.SetName( 'EndOfSwitch' ) EndOfSwitch.SetAuthor( '' ) EndOfSwitch.SetComment( 'Compute Node' ) - EndOfSwitch.Coords( 580 , 147 ) + EndOfSwitch.Coords( 583 , 169 ) PyEndOfSwitch = [] EndOfSwitch.SetPyFunction( 'EndSwitch_1' , PyEndOfSwitch ) IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) diff --git a/examples/GraphSwitch2.xml b/examples/GraphSwitch2.xml index 98d34c1..68f85a1 100644 --- a/examples/GraphSwitch2.xml +++ b/examples/GraphSwitch2.xml @@ -33,7 +33,7 @@ 1/10/2003 - 17:23:54 - 12/1/2005 - 17:7:20 + 20/1/2005 - 12:38:11 1.05 ? ? @@ -66,8 +66,8 @@ - 12/1/2005 - 17:7:20 - 12/1/2005 - 17:7:20 + 20/1/2005 - 12:38:11 + 20/1/2005 - 12:38:11 1.05 ? ? @@ -122,8 +122,8 @@ - 12/1/2005 - 17:7:20 - 12/1/2005 - 17:7:20 + 20/1/2005 - 12:38:11 + 20/1/2005 - 12:38:11 1.05 ? ? @@ -163,14 +163,14 @@ ? - 12/1/2005 - 17:7:20 - 12/1/2005 - 17:7:20 + 20/1/2005 - 12:38:11 + 20/1/2005 - 12:38:11 1.05 ? ? Compute Node - 766 - 127 + 775 + 169 ? ? @@ -196,8 +196,8 @@ - 12/1/2005 - 17:7:20 - 12/1/2005 - 17:7:20 + 20/1/2005 - 12:38:11 + 20/1/2005 - 12:38:11 2.0 ? ? @@ -230,15 +230,14 @@ Switch - - - - - - - - 12/1/2005 - 17:7:20 - 12/1/2005 - 17:7:20 + + + + + + + 20/1/2005 - 12:38:11 + 20/1/2005 - 12:38:11 2.0 ? ? @@ -266,14 +265,14 @@ EndSwitch_1 - 12/1/2005 - 17:7:20 - 12/1/2005 - 17:7:20 + 20/1/2005 - 12:38:11 + 20/1/2005 - 12:38:11 2.0 ? ? Compute Node - 580 - 147 + 583 + 169 IsOdd diff --git a/examples/GraphSwitchCheckDefault1.py b/examples/GraphSwitchCheckDefault1.py index a7cbc2a..fcbb4cc 100644 --- a/examples/GraphSwitchCheckDefault1.py +++ b/examples/GraphSwitchCheckDefault1.py @@ -281,6 +281,8 @@ def DefGraphSwitchCheckDefault1() : LSwitchdefaultDefaultGate.AddCoord( 1 , 363 , 707 ) LSwitchdefaultDefaultGate.AddCoord( 2 , 362 , 239 ) + LSwitchDefaultEndOfSwitchDefault = GraphSwitchCheckDefault1.Link( OSwitchDefault , IEndOfSwitchDefault ) + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckDefault1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) # Input datas diff --git a/examples/GraphSwitchCheckDefault1.xml b/examples/GraphSwitchCheckDefault1.xml index 317bc92..fe70c0d 100644 --- a/examples/GraphSwitchCheckDefault1.xml +++ b/examples/GraphSwitchCheckDefault1.xml @@ -9,7 +9,7 @@ 1 ? -GraphSwitchCheckDefault +GraphSwitchCheckDefault1 long @@ -33,7 +33,7 @@ 13/1/2005 - 12:21:43 - 13/1/2005 - 12:28:19 + 14/1/2005 - 17:54:11 2.0 JR ? @@ -66,8 +66,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -99,8 +99,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -135,8 +135,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -171,8 +171,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -209,8 +209,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -247,8 +247,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -305,8 +305,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -349,8 +349,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -400,8 +400,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -435,8 +435,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 14/1/2005 - 17:51:6 + 14/1/2005 - 17:51:6 2.0 ? ? @@ -670,6 +670,12 @@ 362 239 +Switch + Default + EndOfSwitch + Default + + EndOfSwitch a EndOfInitLoopSwitch diff --git a/examples/GraphSwitchCheckDefault2.py b/examples/GraphSwitchCheckDefault2.py index e26b64a..d33f06e 100644 --- a/examples/GraphSwitchCheckDefault2.py +++ b/examples/GraphSwitchCheckDefault2.py @@ -1,15 +1,15 @@ -# Generated python file of Graph GraphSwitchCheckDefault1 +# Generated python file of Graph GraphSwitchCheckDefault2 from SuperV import * -# Graph creation of GraphSwitchCheckDefault1 -def DefGraphSwitchCheckDefault1() : - GraphSwitchCheckDefault1 = Graph( 'GraphSwitchCheckDefault1' ) - GraphSwitchCheckDefault1.SetName( 'GraphSwitchCheckDefault1' ) - GraphSwitchCheckDefault1.SetAuthor( 'JR' ) - GraphSwitchCheckDefault1.SetComment( '' ) - GraphSwitchCheckDefault1.Coords( 0 , 0 ) +# Graph creation of GraphSwitchCheckDefault2 +def DefGraphSwitchCheckDefault2() : + GraphSwitchCheckDefault2 = Graph( 'GraphSwitchCheckDefault2' ) + GraphSwitchCheckDefault2.SetName( 'GraphSwitchCheckDefault2' ) + GraphSwitchCheckDefault2.SetAuthor( 'JR' ) + GraphSwitchCheckDefault2.SetComment( '' ) + GraphSwitchCheckDefault2.Coords( 0 , 0 ) # Creation of Factory Nodes @@ -20,7 +20,7 @@ def DefGraphSwitchCheckDefault1() : PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) PyIsOdd.append( ' sleep( 1 ) ' ) PyIsOdd.append( ' return a ' ) - IsOdd = GraphSwitchCheckDefault1.INode( 'IsOdd' , PyIsOdd ) + IsOdd = GraphSwitchCheckDefault2.INode( 'IsOdd' , PyIsOdd ) IsOdd.SetName( 'IsOdd' ) IsOdd.SetAuthor( '' ) IsOdd.SetComment( 'Python function' ) @@ -36,7 +36,7 @@ def DefGraphSwitchCheckDefault1() : PyIsEven.append( ' print a,"IsEven (GraphSwitch)" ' ) PyIsEven.append( ' sleep( 1 ) ' ) PyIsEven.append( ' return a ' ) - IsEven = GraphSwitchCheckDefault1.INode( 'IsEven' , PyIsEven ) + IsEven = GraphSwitchCheckDefault2.INode( 'IsEven' , PyIsEven ) IsEven.SetName( 'IsEven' ) IsEven.SetAuthor( '' ) IsEven.SetComment( 'Compute Node' ) @@ -52,7 +52,7 @@ def DefGraphSwitchCheckDefault1() : PyPrintOdd.append( ' print "Print ",a,Branch ' ) PyPrintOdd.append( ' sleep(1) ' ) PyPrintOdd.append( ' return Branch ' ) - PrintOdd = GraphSwitchCheckDefault1.INode( 'Print' , PyPrintOdd ) + PrintOdd = GraphSwitchCheckDefault2.INode( 'Print' , PyPrintOdd ) PrintOdd.SetName( 'PrintOdd' ) PrintOdd.SetAuthor( '' ) PrintOdd.SetComment( 'Compute Node' ) @@ -69,7 +69,7 @@ def DefGraphSwitchCheckDefault1() : PyPrintEven.append( ' print "Print ",a,Branch ' ) PyPrintEven.append( ' sleep(1) ' ) PyPrintEven.append( ' return Branch ' ) - PrintEven = GraphSwitchCheckDefault1.INode( 'Print_1' , PyPrintEven ) + PrintEven = GraphSwitchCheckDefault2.INode( 'Print_1' , PyPrintEven ) PrintEven.SetName( 'PrintEven' ) PrintEven.SetAuthor( '' ) PrintEven.SetComment( 'Compute Node' ) @@ -85,7 +85,7 @@ def DefGraphSwitchCheckDefault1() : PyEmptyNode.append( 'def EmptyNode(a,Branch) : ' ) PyEmptyNode.append( ' sleep(1) ' ) PyEmptyNode.append( ' return a,Branch ' ) - EmptyNode = GraphSwitchCheckDefault1.INode( 'EmptyNode' , PyEmptyNode ) + EmptyNode = GraphSwitchCheckDefault2.INode( 'EmptyNode' , PyEmptyNode ) EmptyNode.SetName( 'EmptyNode' ) EmptyNode.SetAuthor( '' ) EmptyNode.SetComment( 'Compute Node' ) @@ -102,7 +102,7 @@ def DefGraphSwitchCheckDefault1() : PyDefault.append( 'def Default(a,Branch) : ' ) PyDefault.append( ' sleep(1) ' ) PyDefault.append( ' return a,Branch ' ) - Default = GraphSwitchCheckDefault1.INode( 'Default' , PyDefault ) + Default = GraphSwitchCheckDefault2.INode( 'Default' , PyDefault ) Default.SetName( 'Default' ) Default.SetAuthor( '' ) Default.SetComment( 'Compute Node' ) @@ -119,11 +119,11 @@ def DefGraphSwitchCheckDefault1() : PyPuta.append( 'def Puta(a) : ' ) PyPuta.append( ' sleep(1) ' ) PyPuta.append( ' return a ' ) - Puta = GraphSwitchCheckDefault1.INode( 'Puta' , PyPuta ) + Puta = GraphSwitchCheckDefault2.INode( 'Puta' , PyPuta ) Puta.SetName( 'Puta' ) Puta.SetAuthor( '' ) Puta.SetComment( 'Compute Node' ) - Puta.Coords( 658 , 472 ) + Puta.Coords( 665 , 486 ) IPutaa = Puta.InPort( 'a' , 'long' ) IPutaGate = Puta.GetInPort( 'Gate' ) OPutaa = Puta.OutPort( 'a' , 'long' ) @@ -134,7 +134,7 @@ def DefGraphSwitchCheckDefault1() : PyPutBranch.append( 'def PutBranch(Branch) : ' ) PyPutBranch.append( ' sleep(1) ' ) PyPutBranch.append( ' return Branch ' ) - PutBranch = GraphSwitchCheckDefault1.INode( 'PutBranch' , PyPutBranch ) + PutBranch = GraphSwitchCheckDefault2.INode( 'PutBranch' , PyPutBranch ) PutBranch.SetName( 'PutBranch' ) PutBranch.SetAuthor( '' ) PutBranch.SetComment( 'Compute Node' ) @@ -162,7 +162,7 @@ def DefGraphSwitchCheckDefault1() : PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) PyNextInitLoopSwitch.append( ' Index = Index - 1 ' ) PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) - InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchCheckDefault1.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchCheckDefault2.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) EndOfInitLoopSwitch.SetAuthor( '' ) EndOfInitLoopSwitch.SetComment( 'Compute Node' ) @@ -210,7 +210,7 @@ def DefGraphSwitchCheckDefault1() : PySwitch.append( ' else : ' ) PySwitch.append( ' Branch = "Odd" ' ) PySwitch.append( ' return a & 1,1-(a&1),a,Branch,0 ' ) - Switch,EndOfSwitch = GraphSwitchCheckDefault1.SNode( 'Switch' , PySwitch ) + Switch,EndOfSwitch = GraphSwitchCheckDefault2.SNode( 'Switch' , PySwitch ) EndOfSwitch.SetName( 'EndOfSwitch' ) EndOfSwitch.SetAuthor( '' ) EndOfSwitch.SetComment( 'Compute Node' ) @@ -240,82 +240,84 @@ def DefGraphSwitchCheckDefault1() : OSwitchDefault = Switch.GetOutPort( 'Default' ) # Creation of Links - LIsOddaEmptyNodea = GraphSwitchCheckDefault1.Link( OIsOdda , IEmptyNodea ) + LIsOddaEmptyNodea = GraphSwitchCheckDefault2.Link( OIsOdda , IEmptyNodea ) LIsOddaEmptyNodea.AddCoord( 1 , 646 , 78 ) - LPrintOddBranchEmptyNodeBranch = GraphSwitchCheckDefault1.Link( OPrintOddBranch , IEmptyNodeBranch ) + LIsEvenaEndOfSwitcha = GraphSwitchCheckDefault2.Link( OIsEvena , IEndOfSwitcha ) - LEmptyNodeaEndOfSwitcha = GraphSwitchCheckDefault1.Link( OEmptyNodea , IEndOfSwitcha ) + LPrintOddBranchEmptyNodeBranch = GraphSwitchCheckDefault2.Link( OPrintOddBranch , IEmptyNodeBranch ) - LEmptyNodeBranchEndOfSwitchBranch = GraphSwitchCheckDefault1.Link( OEmptyNodeBranch , IEndOfSwitchBranch ) + LPrintEvenBranchEndOfSwitchBranch = GraphSwitchCheckDefault2.Link( OPrintEvenBranch , IEndOfSwitchBranch ) - LDefaultaEndOfSwitcha = GraphSwitchCheckDefault1.Link( ODefaulta , IEndOfSwitcha ) + LEmptyNodeaEndOfSwitcha = GraphSwitchCheckDefault2.Link( OEmptyNodea , IEndOfSwitcha ) - LDefaultaPutaa = GraphSwitchCheckDefault1.Link( ODefaulta , IPutaa ) + LEmptyNodeBranchEndOfSwitchBranch = GraphSwitchCheckDefault2.Link( OEmptyNodeBranch , IEndOfSwitchBranch ) - LDefaultBranchEndOfSwitchBranch = GraphSwitchCheckDefault1.Link( ODefaultBranch , IEndOfSwitchBranch ) + LDefaultaPutaa = GraphSwitchCheckDefault2.Link( ODefaulta , IPutaa ) - LDefaultBranchPutBranchBranch = GraphSwitchCheckDefault1.Link( ODefaultBranch , IPutBranchBranch ) + LDefaultBranchPutBranchBranch = GraphSwitchCheckDefault2.Link( ODefaultBranch , IPutBranchBranch ) - LInitLoopSwitchIndexSwitcha = GraphSwitchCheckDefault1.Link( OInitLoopSwitchIndex , ISwitcha ) + LInitLoopSwitchIndexSwitcha = GraphSwitchCheckDefault2.Link( OInitLoopSwitchIndex , ISwitcha ) - LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchCheckDefault1.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchCheckDefault2.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) - LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchCheckDefault1.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchCheckDefault2.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) - LSwitchOddIsOddGate = GraphSwitchCheckDefault1.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate = GraphSwitchCheckDefault2.Link( OSwitchOdd , IIsOddGate ) LSwitchOddIsOddGate.AddCoord( 1 , 401 , 101 ) LSwitchOddIsOddGate.AddCoord( 2 , 401 , 160 ) - LSwitchOddPrintOddGate = GraphSwitchCheckDefault1.Link( OSwitchOdd , IPrintOddGate ) + LSwitchOddPrintOddGate = GraphSwitchCheckDefault2.Link( OSwitchOdd , IPrintOddGate ) LSwitchOddPrintOddGate.AddCoord( 1 , 401 , 245 ) LSwitchOddPrintOddGate.AddCoord( 2 , 401 , 159 ) - LSwitchEvenIsEvenGate = GraphSwitchCheckDefault1.Link( OSwitchEven , IIsEvenGate ) + LSwitchEvenIsEvenGate = GraphSwitchCheckDefault2.Link( OSwitchEven , IIsEvenGate ) LSwitchEvenIsEvenGate.AddCoord( 1 , 392 , 533 ) LSwitchEvenIsEvenGate.AddCoord( 2 , 392 , 182 ) - LSwitchEvenPrintEvenGate = GraphSwitchCheckDefault1.Link( OSwitchEven , IPrintEvenGate ) + LSwitchEvenPrintEvenGate = GraphSwitchCheckDefault2.Link( OSwitchEven , IPrintEvenGate ) LSwitchEvenPrintEvenGate.AddCoord( 1 , 392 , 403 ) LSwitchEvenPrintEvenGate.AddCoord( 2 , 392 , 181 ) - LSwitchaIsOdda = GraphSwitchCheckDefault1.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda = GraphSwitchCheckDefault2.Link( OSwitcha , IIsOdda ) LSwitchaIsOdda.AddCoord( 1 , 382 , 78 ) LSwitchaIsOdda.AddCoord( 2 , 382 , 199 ) - LSwitchaIsEvena = GraphSwitchCheckDefault1.Link( OSwitcha , IIsEvena ) + LSwitchaIsEvena = GraphSwitchCheckDefault2.Link( OSwitcha , IIsEvena ) LSwitchaIsEvena.AddCoord( 1 , 381 , 509 ) LSwitchaIsEvena.AddCoord( 2 , 382 , 200 ) - LSwitchaPrintOdda = GraphSwitchCheckDefault1.Link( OSwitcha , IPrintOdda ) + LSwitchaPrintOdda = GraphSwitchCheckDefault2.Link( OSwitcha , IPrintOdda ) - LSwitchaPrintEvena = GraphSwitchCheckDefault1.Link( OSwitcha , IPrintEvena ) + LSwitchaPrintEvena = GraphSwitchCheckDefault2.Link( OSwitcha , IPrintEvena ) LSwitchaPrintEvena.AddCoord( 1 , 381 , 361 ) LSwitchaPrintEvena.AddCoord( 2 , 382 , 200 ) - LSwitchaDefaulta = GraphSwitchCheckDefault1.Link( OSwitcha , IDefaulta ) + LSwitchaDefaulta = GraphSwitchCheckDefault2.Link( OSwitcha , IDefaulta ) LSwitchaDefaulta.AddCoord( 1 , 382 , 663 ) LSwitchaDefaulta.AddCoord( 2 , 382 , 199 ) - LSwitchBranchPrintOddBranch = GraphSwitchCheckDefault1.Link( OSwitchBranch , IPrintOddBranch ) + LSwitchBranchPrintOddBranch = GraphSwitchCheckDefault2.Link( OSwitchBranch , IPrintOddBranch ) - LSwitchBranchPrintEvenBranch = GraphSwitchCheckDefault1.Link( OSwitchBranch , IPrintEvenBranch ) + LSwitchBranchPrintEvenBranch = GraphSwitchCheckDefault2.Link( OSwitchBranch , IPrintEvenBranch ) LSwitchBranchPrintEvenBranch.AddCoord( 1 , 369 , 381 ) LSwitchBranchPrintEvenBranch.AddCoord( 2 , 369 , 219 ) - LSwitchBranchDefaultBranch = GraphSwitchCheckDefault1.Link( OSwitchBranch , IDefaultBranch ) + LSwitchBranchDefaultBranch = GraphSwitchCheckDefault2.Link( OSwitchBranch , IDefaultBranch ) LSwitchBranchDefaultBranch.AddCoord( 1 , 370 , 683 ) LSwitchBranchDefaultBranch.AddCoord( 2 , 370 , 220 ) - LSwitchdefaultDefaultGate = GraphSwitchCheckDefault1.Link( OSwitchdefault , IDefaultGate ) + LSwitchdefaultDefaultGate = GraphSwitchCheckDefault2.Link( OSwitchdefault , IDefaultGate ) LSwitchdefaultDefaultGate.AddCoord( 1 , 363 , 707 ) LSwitchdefaultDefaultGate.AddCoord( 2 , 362 , 239 ) - LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckDefault1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + LSwitchDefaultEndOfSwitchDefault = GraphSwitchCheckDefault2.Link( OSwitchDefault , IEndOfSwitchDefault ) - LPutaaEndOfSwitcha = GraphSwitchCheckDefault1.Link( OPutaa , IEndOfSwitcha ) + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckDefault2.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) - LPutBranchBranchEndOfSwitchBranch = GraphSwitchCheckDefault1.Link( OPutBranchBranch , IEndOfSwitchBranch ) + LPutaaEndOfSwitcha = GraphSwitchCheckDefault2.Link( OPutaa , IEndOfSwitcha ) + + LPutBranchBranchEndOfSwitchBranch = GraphSwitchCheckDefault2.Link( OPutBranchBranch , IEndOfSwitchBranch ) # Input datas IInitLoopSwitchIndex.Input( 0 ) @@ -323,12 +325,10 @@ def DefGraphSwitchCheckDefault1() : IInitLoopSwitchMax.Input( 10 ) # Output Ports of the graph - #OIsEvena = IsEven.GetOutPort( 'a' ) - #OPrintEvenBranch = PrintEven.GetOutPort( 'Branch' ) #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) - return GraphSwitchCheckDefault1 + return GraphSwitchCheckDefault2 -GraphSwitchCheckDefault1 = DefGraphSwitchCheckDefault1() +GraphSwitchCheckDefault2 = DefGraphSwitchCheckDefault2() diff --git a/examples/GraphSwitchCheckDefault2.xml b/examples/GraphSwitchCheckDefault2.xml index 3022d34..ba59f46 100644 --- a/examples/GraphSwitchCheckDefault2.xml +++ b/examples/GraphSwitchCheckDefault2.xml @@ -5,11 +5,11 @@ ? ? - GraphSwitchCheckDefault1 + GraphSwitchCheckDefault2 1 ? -GraphSwitchCheckDefault1 +GraphSwitchCheckDefault1_1_1 long @@ -22,12 +22,6 @@ InitLoopSwitch__Max -long - IsEven__a - -string - PrintEven__Branch - long EndOfInitLoopSwitch__Index @@ -39,7 +33,7 @@ 13/1/2005 - 12:21:43 - 13/1/2005 - 12:33:25 + 19/1/2005 - 12:15:25 2.0 JR ? @@ -72,8 +66,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -105,8 +99,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -141,8 +135,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -177,8 +171,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -215,8 +209,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -253,8 +247,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -311,8 +305,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -355,8 +349,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -406,8 +400,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -441,8 +435,8 @@ - 13/1/2005 - 12:23:17 - 13/1/2005 - 12:23:17 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -473,14 +467,14 @@ - 13/1/2005 - 12:31:48 - 13/1/2005 - 12:31:48 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? Compute Node - 658 - 472 + 665 + 486 ? ? @@ -505,8 +499,8 @@ - 13/1/2005 - 12:32:11 - 13/1/2005 - 12:32:11 + 19/1/2005 - 12:15:25 + 19/1/2005 - 12:15:25 2.0 ? ? @@ -524,12 +518,24 @@ 646 78 +IsEven + a + EndOfSwitch + a + + PrintOdd Branch EmptyNode Branch +PrintEven + Branch + EndOfSwitch + Branch + + EmptyNode a EndOfSwitch @@ -542,24 +548,12 @@ Branch -Default - a - EndOfSwitch - a - - Default a Puta a -Default - Branch - EndOfSwitch - Branch - - Default Branch PutBranch @@ -740,6 +734,12 @@ 362 239 +Switch + Default + EndOfSwitch + Default + + EndOfSwitch a EndOfInitLoopSwitch @@ -759,7 +759,7 @@ -GraphSwitchCheckDefault1 +GraphSwitchCheckDefault2 InitLoopSwitch__Index InitLoopSwitch Index @@ -768,7 +768,7 @@ 0 -GraphSwitchCheckDefault1 +GraphSwitchCheckDefault2 InitLoopSwitch__Min InitLoopSwitch Min @@ -777,7 +777,7 @@ -5 -GraphSwitchCheckDefault1 +GraphSwitchCheckDefault2 InitLoopSwitch__Max InitLoopSwitch Max diff --git a/examples/GraphSwitchOutput.py b/examples/GraphSwitchOutput.py index 2c9c777..a9c8a71 100644 --- a/examples/GraphSwitchOutput.py +++ b/examples/GraphSwitchOutput.py @@ -1,56 +1,60 @@ -# Generated python file of Graph GraphSwitch_1_1 +# Generated python file of Graph GraphSwitch_1_1_2 from SuperV import * -# Graph creation of GraphSwitch_1_1 -def DefGraphSwitch_1_1() : - GraphSwitch_1_1 = Graph( 'GraphSwitch_1_1' ) - GraphSwitch_1_1.SetName( 'GraphSwitch_1_1' ) - GraphSwitch_1_1.SetAuthor( '' ) - GraphSwitch_1_1.SetComment( '' ) - GraphSwitch_1_1.Coords( 0 , 0 ) +# Graph creation of GraphSwitch_1_1_2 +def DefGraphSwitch_1_1_2() : + GraphSwitch_1_1_2 = Graph( 'GraphSwitch_1_1_2' ) + GraphSwitch_1_1_2.SetName( 'GraphSwitch_1_1_2' ) + GraphSwitch_1_1_2.SetAuthor( '' ) + GraphSwitch_1_1_2.SetComment( '' ) + GraphSwitch_1_1_2.Coords( 0 , 0 ) # Creation of Factory Nodes # Creation of InLine Nodes PyIsOdd = [] - PyIsOdd.append( 'from time import * ' ) - PyIsOdd.append( 'def IsOdd(a) : ' ) - PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) - PyIsOdd.append( ' sleep( 1 ) ' ) - PyIsOdd.append( ' return a ' ) - IsOdd = GraphSwitch_1_1.INode( 'IsOdd' , PyIsOdd ) + PyIsOdd.append( 'from time import * ' ) + PyIsOdd.append( 'def IsOdd(a,Branch) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a,Branch ' ) + IsOdd = GraphSwitch_1_1_2.INode( 'IsOdd' , PyIsOdd ) IsOdd.SetName( 'IsOdd' ) IsOdd.SetAuthor( '' ) IsOdd.SetComment( 'Python function' ) IsOdd.Coords( 388 , 50 ) IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddBranch = IsOdd.InPort( 'Branch' , 'string' ) IIsOddGate = IsOdd.GetInPort( 'Gate' ) OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddBranch = IsOdd.OutPort( 'Branch' , 'string' ) OIsOddGate = IsOdd.GetOutPort( 'Gate' ) PyIsEven = [] - PyIsEven.append( 'from time import * ' ) - PyIsEven.append( 'def IsEven(a) : ' ) - PyIsEven.append( ' print a,"IsEven (GraphSwitch)" ' ) - PyIsEven.append( ' sleep( 1 ) ' ) - PyIsEven.append( ' return a ' ) - IsEven = GraphSwitch_1_1.INode( 'IsEven' , PyIsEven ) + PyIsEven.append( 'from time import * ' ) + PyIsEven.append( 'def IsEven(a,Branch) : ' ) + PyIsEven.append( ' print a,"IsEven (GraphSwitch)" ' ) + PyIsEven.append( ' sleep( 1 ) ' ) + PyIsEven.append( ' return a,Branch ' ) + IsEven = GraphSwitch_1_1_2.INode( 'IsEven' , PyIsEven ) IsEven.SetName( 'IsEven' ) IsEven.SetAuthor( '' ) IsEven.SetComment( 'Compute Node' ) IsEven.Coords( 395 , 334 ) IIsEvena = IsEven.InPort( 'a' , 'long' ) + IIsEvenBranch = IsEven.InPort( 'Branch' , 'string' ) IIsEvenGate = IsEven.GetInPort( 'Gate' ) OIsEvena = IsEven.OutPort( 'a' , 'long' ) + OIsEvenBranch = IsEven.OutPort( 'Branch' , 'string' ) OIsEvenGate = IsEven.GetOutPort( 'Gate' ) PyPrint = [] PyPrint.append( 'def Print(a,Branch) : ' ) PyPrint.append( ' print "Print ",Branch ' ) PyPrint.append( ' return a,Branch ' ) - Print = GraphSwitch_1_1.INode( 'Print' , PyPrint ) + Print = GraphSwitch_1_1_2.INode( 'Print' , PyPrint ) Print.SetName( 'Print' ) Print.SetAuthor( '' ) Print.SetComment( 'Compute Node' ) @@ -66,7 +70,7 @@ def DefGraphSwitch_1_1() : PyPrint_1.append( 'def Print_1(a,Branch) : ' ) PyPrint_1.append( ' print "Print ",Branch ' ) PyPrint_1.append( ' return a,Branch ' ) - Print_1 = GraphSwitch_1_1.INode( 'Print_1' , PyPrint_1 ) + Print_1 = GraphSwitch_1_1_2.INode( 'Print_1' , PyPrint_1 ) Print_1.SetName( 'Print_1' ) Print_1.SetAuthor( '' ) Print_1.SetComment( 'Compute Node' ) @@ -94,7 +98,7 @@ def DefGraphSwitch_1_1() : PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) PyNextInitLoopSwitch.append( ' Index = Index - 1 ' ) PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) - InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch_1_1.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch_1_1_2.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) EndOfInitLoopSwitch.SetAuthor( '' ) EndOfInitLoopSwitch.SetComment( 'Compute Node' ) @@ -138,7 +142,7 @@ def DefGraphSwitch_1_1() : PySwitch.append( ' Branch = 'Odd' ' ) PySwitch.append( ' sleep(1) ' ) PySwitch.append( ' return a & 1,1-(a&1),a,Branch,0 ' ) - Switch,EndOfSwitch = GraphSwitch_1_1.SNode( 'Switch' , PySwitch ) + Switch,EndOfSwitch = GraphSwitch_1_1_2.SNode( 'Switch' , PySwitch ) EndOfSwitch.SetName( 'EndOfSwitch' ) EndOfSwitch.SetAuthor( '' ) EndOfSwitch.SetComment( 'Compute Node' ) @@ -163,35 +167,39 @@ def DefGraphSwitch_1_1() : OSwitchDefault = Switch.GetOutPort( 'Default' ) # Creation of Links - LIsOddaPrinta = GraphSwitch_1_1.Link( OIsOdda , IPrinta ) + LIsOddaPrinta = GraphSwitch_1_1_2.Link( OIsOdda , IPrinta ) - LInitLoopSwitchIndexSwitcha = GraphSwitch_1_1.Link( OInitLoopSwitchIndex , ISwitcha ) + LIsOddBranchPrintBranch = GraphSwitch_1_1_2.Link( OIsOddBranch , IPrintBranch ) - LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitch_1_1.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + LInitLoopSwitchIndexSwitcha = GraphSwitch_1_1_2.Link( OInitLoopSwitchIndex , ISwitcha ) - LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitch_1_1.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitch_1_1_2.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) - LIsEvenaPrint_1a = GraphSwitch_1_1.Link( OIsEvena , IPrint_1a ) + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitch_1_1_2.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) - LSwitchOddIsOddGate = GraphSwitch_1_1.Link( OSwitchOdd , IIsOddGate ) + LIsEvenaPrint_1a = GraphSwitch_1_1_2.Link( OIsEvena , IPrint_1a ) - LSwitchEvenIsEvenGate = GraphSwitch_1_1.Link( OSwitchEven , IIsEvenGate ) + LIsEvenBranchPrint_1Branch = GraphSwitch_1_1_2.Link( OIsEvenBranch , IPrint_1Branch ) - LSwitchaIsOdda = GraphSwitch_1_1.Link( OSwitcha , IIsOdda ) + LSwitchOddIsOddGate = GraphSwitch_1_1_2.Link( OSwitchOdd , IIsOddGate ) - LSwitchaIsEvena = GraphSwitch_1_1.Link( OSwitcha , IIsEvena ) + LSwitchEvenIsEvenGate = GraphSwitch_1_1_2.Link( OSwitchEven , IIsEvenGate ) - LSwitchBranchPrintBranch = GraphSwitch_1_1.Link( OSwitchBranch , IPrintBranch ) + LSwitchaIsOdda = GraphSwitch_1_1_2.Link( OSwitcha , IIsOdda ) - LSwitchBranchPrint_1Branch = GraphSwitch_1_1.Link( OSwitchBranch , IPrint_1Branch ) + LSwitchaIsEvena = GraphSwitch_1_1_2.Link( OSwitcha , IIsEvena ) - LSwitchDefaultEndOfSwitchDefault = GraphSwitch_1_1.Link( OSwitchDefault , IEndOfSwitchDefault ) + LSwitchBranchIsOddBranch = GraphSwitch_1_1_2.Link( OSwitchBranch , IIsOddBranch ) - LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitch_1_1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + LSwitchBranchIsEvenBranch = GraphSwitch_1_1_2.Link( OSwitchBranch , IIsEvenBranch ) - LPrintaEndOfSwitcha = GraphSwitch_1_1.Link( OPrinta , IEndOfSwitcha ) + LSwitchDefaultEndOfSwitchDefault = GraphSwitch_1_1_2.Link( OSwitchDefault , IEndOfSwitchDefault ) - LPrint_1aEndOfSwitcha = GraphSwitch_1_1.Link( OPrint_1a , IEndOfSwitcha ) + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitch_1_1_2.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + LPrintaEndOfSwitcha = GraphSwitch_1_1_2.Link( OPrinta , IEndOfSwitcha ) + + LPrint_1aEndOfSwitcha = GraphSwitch_1_1_2.Link( OPrint_1a , IEndOfSwitcha ) # Input datas IInitLoopSwitchIndex.Input( 0 ) @@ -205,7 +213,7 @@ def DefGraphSwitch_1_1() : #OSwitchdefault = Switch.GetOutPort( 'default' ) #OPrintBranch = Print.GetOutPort( 'Branch' ) #OPrint_1Branch = Print_1.GetOutPort( 'Branch' ) - return GraphSwitch_1_1 + return GraphSwitch_1_1_2 -GraphSwitch_1_1 = DefGraphSwitch_1_1() +GraphSwitch_1_1_2 = DefGraphSwitch_1_1_2() diff --git a/examples/GraphSwitchOutput.xml b/examples/GraphSwitchOutput.xml index 86d6720..d48c3a0 100644 --- a/examples/GraphSwitchOutput.xml +++ b/examples/GraphSwitchOutput.xml @@ -5,11 +5,11 @@ ? ? - GraphSwitch_1_1 + GraphSwitch_1_1_2 1 ? -GraphSwitch_1_1 +GraphSwitch_1_1_2 long @@ -42,7 +42,7 @@ 1/10/2003 - 17:23:54 - 13/1/2005 - 11:21:30 + 20/1/2005 - 13:2:4 1.05 ? ? @@ -61,22 +61,28 @@ long - a + a + +string + Branch long - a + a + +string + Branch IsOdd - - - - - - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + + + + + + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 1.05 ? ? @@ -131,8 +137,8 @@ - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 1.05 ? ? @@ -172,8 +178,8 @@ ? - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 1.05 ? ? @@ -191,22 +197,28 @@ long - a + a + +string + Branch long - a + a + +string + Branch IsEven - - - - - - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + + + + + + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 2.0 ? ? @@ -256,8 +268,8 @@ - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 2.0 ? ? @@ -285,8 +297,8 @@ EndSwitch_1 - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 2.0 ? ? @@ -300,7 +312,7 @@ 3 ? -Void +Print long @@ -322,8 +334,8 @@ - 13/1/2005 - 11:17:18 - 13/1/2005 - 11:17:18 + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 2.0 ? ? @@ -359,8 +371,8 @@ - 13/1/2005 - 11:20:58 - 13/1/2005 - 11:20:58 + 20/1/2005 - 13:0:10 + 20/1/2005 - 13:0:10 2.0 ? ? @@ -375,6 +387,12 @@ a +IsOdd + Branch + Print + Branch + + InitLoopSwitch DoLoop EndOfInitLoopSwitch @@ -411,6 +429,12 @@ a +IsEven + Branch + Print_1 + Branch + + Switch Odd IsOdd @@ -437,13 +461,13 @@ Switch Branch - Print + IsOdd Branch Switch Branch - Print_1 + IsEven Branch @@ -472,7 +496,7 @@ -GraphSwitch_1_1 +GraphSwitch_1_1_2 InitLoopSwitch__Index InitLoopSwitch Index @@ -481,7 +505,7 @@ 0 -GraphSwitch_1_1 +GraphSwitch_1_1_2 InitLoopSwitch__Min InitLoopSwitch Min @@ -490,7 +514,7 @@ -5 -GraphSwitch_1_1 +GraphSwitch_1_1_2 InitLoopSwitch__Max InitLoopSwitch Max diff --git a/examples/GraphSwitchs.py b/examples/GraphSwitchs.py index bf78c81..716db20 100755 --- a/examples/GraphSwitchs.py +++ b/examples/GraphSwitchs.py @@ -1,232 +1,259 @@ -# Generated python file of Graph GraphSwitch +# Generated python file of Graph GraphSwitchs from SuperV import * -# Graph creation -GraphSwitchs = Graph( 'GraphSwitchs' ) -GraphSwitchs.SetName( 'GraphSwitchs' ) -GraphSwitchs.SetAuthor( '' ) -GraphSwitchs.SetComment( '' ) -GraphSwitchs.Coords( 0 , 0 ) -# Creation of Factory Nodes +# Graph creation of GraphSwitchs +def DefGraphSwitchs() : + GraphSwitchs = Graph( 'GraphSwitchs' ) + GraphSwitchs.SetName( 'GraphSwitchs' ) + GraphSwitchs.SetAuthor( '' ) + GraphSwitchs.SetComment( '' ) + GraphSwitchs.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyIsOdd = [] + PyIsOdd.append( 'from time import * ' ) + PyIsOdd.append( 'def IsOdd(a) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphSwitchs.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 388 , 50 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + PyIsOdd_1 = [] + PyIsOdd_1.append( 'from time import * ' ) + PyIsOdd_1.append( 'def IsOdd(a) : ' ) + PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' ) + PyIsOdd_1.append( ' sleep( 1 ) ' ) + PyIsOdd_1.append( ' return a ' ) + IsOdd_1 = GraphSwitchs.INode( 'IsOdd' , PyIsOdd_1 ) + IsOdd_1.SetName( 'IsOdd_1' ) + IsOdd_1.SetAuthor( '' ) + IsOdd_1.SetComment( 'Python function' ) + IsOdd_1.Coords( 419 , 308 ) + IIsOdd_1a = IsOdd_1.InPort( 'a' , 'long' ) + IIsOdd_1Gate = IsOdd_1.GetInPort( 'Gate' ) + OIsOdd_1a = IsOdd_1.OutPort( 'a' , 'long' ) + OIsOdd_1Gate = IsOdd_1.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoopSwitch = [] + PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoopSwitch.append( ' return Index,Min,Max ' ) + PyMoreInitLoopSwitch = [] + PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) + PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) + PyMoreInitLoopSwitch.append( ' else : ' ) + PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) + PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInitLoopSwitch = [] + PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) + PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) + PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) + InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchs.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 766 , 127 ) + PyEndOfInitLoopSwitch = [] + EndOfInitLoopSwitch.SetPyFunction( '' , PyEndOfInitLoopSwitch ) + IInitLoopSwitchDoLoop = InitLoopSwitch.GetInPort( 'DoLoop' ) + IInitLoopSwitchIndex = InitLoopSwitch.InPort( 'Index' , 'long' ) + IInitLoopSwitchMin = InitLoopSwitch.InPort( 'Min' , 'long' ) + IInitLoopSwitchMax = InitLoopSwitch.InPort( 'Max' , 'long' ) + IInitLoopSwitchGate = InitLoopSwitch.GetInPort( 'Gate' ) + OInitLoopSwitchDoLoop = InitLoopSwitch.GetOutPort( 'DoLoop' ) + OInitLoopSwitchIndex = InitLoopSwitch.GetOutPort( 'Index' ) + OInitLoopSwitchMin = InitLoopSwitch.GetOutPort( 'Min' ) + OInitLoopSwitchMax = InitLoopSwitch.GetOutPort( 'Max' ) + IEndOfInitLoopSwitchDoLoop = EndOfInitLoopSwitch.GetInPort( 'DoLoop' ) + IEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetInPort( 'Index' ) + IEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetInPort( 'Min' ) + IEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetInPort( 'Max' ) + IEndOfInitLoopSwitchGate = EndOfInitLoopSwitch.GetInPort( 'Gate' ) + OEndOfInitLoopSwitchDoLoop = EndOfInitLoopSwitch.GetOutPort( 'DoLoop' ) + OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + OEndOfInitLoopSwitchGate = EndOfInitLoopSwitch.GetOutPort( 'Gate' ) + InitLoopSwitch.SetName( 'InitLoopSwitch' ) + InitLoopSwitch.SetAuthor( '' ) + InitLoopSwitch.SetComment( 'Compute Node' ) + InitLoopSwitch.Coords( 10 , 129 ) + + PyInitLoop = [] + PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoop.append( ' return Index,Min,Max ' ) + PyMoreInitLoop = [] + PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreInitLoop.append( ' if Index <= Max : ' ) + PyMoreInitLoop.append( ' DoLoop = 1 ' ) + PyMoreInitLoop.append( ' else : ' ) + PyMoreInitLoop.append( ' DoLoop = 0 ' ) + PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInitLoop = [] + PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) + PyNextInitLoop.append( ' Index = Index + 1 ' ) + PyNextInitLoop.append( ' return Index,Min,Max ' ) + InitLoop,EndOfInitLoop = GraphSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) + EndOfInitLoop.SetName( 'EndOfInitLoop' ) + EndOfInitLoop.SetAuthor( '' ) + EndOfInitLoop.SetComment( 'Compute Node' ) + EndOfInitLoop.Coords( 783 , 381 ) + PyEndOfInitLoop = [] + EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop ) + IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' ) + IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' ) + IInitLoopMin = InitLoop.InPort( 'Min' , 'long' ) + IInitLoopMax = InitLoop.InPort( 'Max' , 'long' ) + IInitLoopGate = InitLoop.GetInPort( 'Gate' ) + OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' ) + OInitLoopIndex = InitLoop.GetOutPort( 'Index' ) + OInitLoopMin = InitLoop.GetOutPort( 'Min' ) + OInitLoopMax = InitLoop.GetOutPort( 'Max' ) + IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' ) + IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' ) + IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' ) + IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' ) + IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' ) + OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' ) + OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' ) + InitLoop.SetName( 'InitLoop' ) + InitLoop.SetAuthor( '' ) + InitLoop.SetComment( 'Compute Node' ) + InitLoop.Coords( 10 , 388 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(a) : ' ) + PySwitch.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' return a & 1,1-(a&1),a ' ) + Switch,EndOfSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 587 , 126 ) + PyEndOfSwitch = [] + EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchDefault = EndOfSwitch.GetInPort( 'Default' ) + OEndOfSwitcha = EndOfSwitch.OutPort( 'a' , 'long' ) + OEndOfSwitchGate = EndOfSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 186 , 130 ) + ISwitcha = Switch.InPort( 'a' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchOdd = Switch.OutPort( 'Odd' , 'long' ) + OSwitchEven = Switch.OutPort( 'Even' , 'int' ) + OSwitcha = Switch.OutPort( 'a' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + PySwitch_1 = [] + PySwitch_1.append( 'from time import * ' ) + PySwitch_1.append( 'def Switch(a) : ' ) + PySwitch_1.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch_1.append( ' sleep(1) ' ) + PySwitch_1.append( ' return a & 1,1-(a&1),a ' ) + Switch_1,EndSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch_1 ) + EndSwitch.SetName( 'EndSwitch' ) + EndSwitch.SetAuthor( '' ) + EndSwitch.SetComment( 'Compute Node' ) + EndSwitch.Coords( 605 , 382 ) + PyEndSwitch = [] + EndSwitch.SetPyFunction( '' , PyEndSwitch ) + IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) + IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) + OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' ) + OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) + Switch_1.SetName( 'Switch_1' ) + Switch_1.SetAuthor( '' ) + Switch_1.SetComment( 'Compute Node' ) + Switch_1.Coords( 193 , 388 ) + ISwitch_1a = Switch_1.InPort( 'a' , 'long' ) + ISwitch_1Gate = Switch_1.GetInPort( 'Gate' ) + OSwitch_1Odd = Switch_1.OutPort( 'Odd' , 'long' ) + OSwitch_1Even = Switch_1.OutPort( 'Even' , 'int' ) + OSwitch_1a = Switch_1.OutPort( 'a' , 'int' ) + OSwitch_1Default = Switch_1.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchs.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha.AddCoord( 1 , 573 , 160 ) + LIsOddaEndOfSwitcha.AddCoord( 2 , 572 , 130 ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchs.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchs.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchs.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchs.Link( OSwitchOdd , IIsOddGate ) + + LSwitchaIsOdda = GraphSwitchs.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 365 , 129 ) + LSwitchaIsOdda.AddCoord( 2 , 365 , 222 ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchs.Link( OSwitchDefault , IEndOfSwitchDefault ) + LSwitchDefaultEndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) + LSwitchDefaultEndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchs.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + LIsOdd_1aEndSwitcha = GraphSwitchs.Link( OIsOdd_1a , IEndSwitcha ) + LIsOdd_1aEndSwitcha.AddCoord( 1 , 599 , 416 ) + LIsOdd_1aEndSwitcha.AddCoord( 2 , 598 , 389 ) + + LInitLoopIndexSwitch_1a = GraphSwitchs.Link( OInitLoopIndex , ISwitch_1a ) + + LInitLoopMinEndOfInitLoopMin = GraphSwitchs.Link( OInitLoopMin , IEndOfInitLoopMin ) + + LInitLoopMaxEndOfInitLoopMax = GraphSwitchs.Link( OInitLoopMax , IEndOfInitLoopMax ) + + LSwitch_1OddIsOdd_1Gate = GraphSwitchs.Link( OSwitch_1Odd , IIsOdd_1Gate ) + + LSwitch_1EvenEndSwitchDefault = GraphSwitchs.Link( OSwitch_1Even , IEndSwitchDefault ) + + LSwitch_1aIsOdd_1a = GraphSwitchs.Link( OSwitch_1a , IIsOdd_1a ) + LSwitch_1aIsOdd_1a.AddCoord( 1 , 379 , 387 ) + LSwitch_1aIsOdd_1a.AddCoord( 2 , 378 , 481 ) + + LEndSwitchaEndOfInitLoopIndex = GraphSwitchs.Link( OEndSwitcha , IEndOfInitLoopIndex ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( 0 ) + IInitLoopSwitchMax.Input( 20 ) + IInitLoopIndex.Input( 0 ) + IInitLoopMin.Input( 0 ) + IInitLoopMax.Input( 20 ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + return GraphSwitchs -# Creation of InLine Nodes -PyIsOdd = [] -PyIsOdd.append( 'from time import * ' ) -PyIsOdd.append( 'def IsOdd(a) : ' ) -PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' ) -PyIsOdd.append( ' sleep( 1 ) ' ) -PyIsOdd.append( ' return a ' ) -IsOdd = GraphSwitchs.INode( 'IsOdd' , PyIsOdd ) -IsOdd.SetName( 'IsOdd' ) -IsOdd.SetAuthor( '' ) -IsOdd.SetComment( 'Python function' ) -IsOdd.Coords( 388 , 50 ) -IsOdd.InPort( 'a' , 'long' ) -IsOdd.OutPort( 'a' , 'long' ) -PyIsOdd_1 = [] -PyIsOdd_1.append( 'from time import * ' ) -PyIsOdd_1.append( 'def IsOdd(a) : ' ) -PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' ) -PyIsOdd_1.append( ' sleep( 1 ) ' ) -PyIsOdd_1.append( ' return a ' ) -IsOdd_1 = GraphSwitchs.INode( 'IsOdd' , PyIsOdd_1 ) -IsOdd_1.SetName( 'IsOdd_1' ) -IsOdd_1.SetAuthor( '' ) -IsOdd_1.SetComment( 'Python function' ) -IsOdd_1.Coords( 419 , 308 ) -IsOdd_1.InPort( 'a' , 'long' ) -IsOdd_1.OutPort( 'a' , 'long' ) - -# Creation of Loop Nodes -PyInitLoopSwitch = [] -PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) -PyInitLoopSwitch.append( ' return Index,Min,Max ' ) -PyMoreInitLoopSwitch = [] -PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) -PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) -PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) -PyMoreInitLoopSwitch.append( ' else : ' ) -PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) -PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) -PyNextInitLoopSwitch = [] -PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) -PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) -PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) -InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchs.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) -EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) -EndOfInitLoopSwitch.SetAuthor( '' ) -EndOfInitLoopSwitch.SetComment( '' ) -EndOfInitLoopSwitch.Coords( 766 , 127 ) -InitLoopSwitch.SetName( 'InitLoopSwitch' ) -InitLoopSwitch.SetAuthor( '' ) -InitLoopSwitch.SetComment( '' ) -InitLoopSwitch.Coords( 10 , 129 ) -InitLoopSwitch.InPort( 'Index' , 'long' ) -InitLoopSwitch.InPort( 'Min' , 'long' ) -InitLoopSwitch.InPort( 'Max' , 'long' ) -InitLoopSwitch.OutPort( 'Index' , 'long' ) -InitLoopSwitch.OutPort( 'Min' , 'long' ) -InitLoopSwitch.OutPort( 'Max' , 'long' ) - -PyInitLoop = [] -PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) -PyInitLoop.append( ' return Index,Min,Max ' ) -PyMoreInitLoop = [] -PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) -PyMoreInitLoop.append( ' if Index <= Max : ' ) -PyMoreInitLoop.append( ' DoLoop = 1 ' ) -PyMoreInitLoop.append( ' else : ' ) -PyMoreInitLoop.append( ' DoLoop = 0 ' ) -PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) -PyNextInitLoop = [] -PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) -PyNextInitLoop.append( ' Index = Index + 1 ' ) -PyNextInitLoop.append( ' return Index,Min,Max ' ) -InitLoop,EndOfInitLoop = GraphSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) -EndOfInitLoop.SetName( 'EndOfInitLoop' ) -EndOfInitLoop.SetAuthor( '' ) -EndOfInitLoop.SetComment( '' ) -EndOfInitLoop.Coords( 783 , 381 ) -InitLoop.SetName( 'InitLoop' ) -InitLoop.SetAuthor( '' ) -InitLoop.SetComment( '' ) -InitLoop.Coords( 10 , 388 ) -InitLoop.InPort( 'Index' , 'long' ) -InitLoop.InPort( 'Min' , 'long' ) -InitLoop.InPort( 'Max' , 'long' ) -InitLoop.OutPort( 'Index' , 'long' ) -InitLoop.OutPort( 'Min' , 'long' ) -InitLoop.OutPort( 'Max' , 'long' ) - -# Creation of Switch Nodes -PySwitch = [] -PySwitch.append( 'from time import * ' ) -PySwitch.append( 'def Switch(a) : ' ) -PySwitch.append( ' if ( a & 1 ) == 0 : ' ) -PySwitch.append( ' sleep(1) ' ) -PySwitch.append( ' return a & 1,1-(a&1),a ' ) -Switch,EndOfSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch ) -EndOfSwitch.SetName( 'EndOfSwitch' ) -EndOfSwitch.SetAuthor( '' ) -EndOfSwitch.SetComment( '' ) -EndOfSwitch.Coords( 587 , 126 ) -PyEndOfSwitch = [] -EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) -EndOfSwitch.InPort( 'a' , 'long' ) -EndOfSwitch.OutPort( 'a' , 'long' ) -Switch.SetName( 'Switch' ) -Switch.SetAuthor( '' ) -Switch.SetComment( '' ) -Switch.Coords( 186 , 130 ) -Switch.InPort( 'a' , 'long' ) -Switch.OutPort( 'Odd' , 'long' ) -Switch.OutPort( 'Even' , 'int' ) -Switch.OutPort( 'a' , 'int' ) - -PySwitch_1 = [] -PySwitch_1.append( 'from time import * ' ) -PySwitch_1.append( 'def Switch(a) : ' ) -PySwitch_1.append( ' if ( a & 1 ) == 0 : ' ) -PySwitch_1.append( ' sleep(1) ' ) -PySwitch_1.append( ' return a & 1,1-(a&1),a ' ) -Switch_1,EndSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch_1 ) -EndSwitch.SetName( 'EndSwitch' ) -EndSwitch.SetAuthor( '' ) -EndSwitch.SetComment( '' ) -EndSwitch.Coords( 605 , 382 ) -PyEndSwitch = [] -EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) -EndSwitch.InPort( 'a' , 'long' ) -EndSwitch.OutPort( 'a' , 'long' ) -Switch_1.SetName( 'Switch_1' ) -Switch_1.SetAuthor( '' ) -Switch_1.SetComment( '' ) -Switch_1.Coords( 193 , 388 ) -Switch_1.InPort( 'a' , 'long' ) -Switch_1.OutPort( 'Odd' , 'long' ) -Switch_1.OutPort( 'Even' , 'int' ) -Switch_1.OutPort( 'a' , 'int' ) - -# Creation of Links -IsOdda = IsOdd.Port( 'a' ) -EndOfSwitcha = GraphSwitchs.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) -EndOfSwitcha.AddCoord( 1 , 573 , 160 ) -EndOfSwitcha.AddCoord( 2 , 572 , 130 ) - -InitLoopSwitchIndex = InitLoopSwitch.Port( 'Index' ) -Switcha = GraphSwitchs.Link( InitLoopSwitchIndex , Switch.Port( 'a' ) ) - -InitLoopSwitchMin = InitLoopSwitch.Port( 'Min' ) -EndOfInitLoopSwitchMin = GraphSwitchs.Link( InitLoopSwitchMin , EndOfInitLoopSwitch.Port( 'Min' ) ) - -InitLoopSwitchMax = InitLoopSwitch.Port( 'Max' ) -EndOfInitLoopSwitchMax = GraphSwitchs.Link( InitLoopSwitchMax , EndOfInitLoopSwitch.Port( 'Max' ) ) - -SwitchOdd = Switch.Port( 'Odd' ) -IsOddInGate = GraphSwitchs.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) - -Switcha = Switch.Port( 'a' ) -IsOdda = GraphSwitchs.Link( Switcha , IsOdd.Port( 'a' ) ) -IsOdda.AddCoord( 1 , 365 , 129 ) -IsOdda.AddCoord( 2 , 365 , 222 ) - -SwitchDefault = Switch.Port( 'Default' ) -EndOfSwitchDefault = GraphSwitchs.Link( SwitchDefault , EndOfSwitch.Port( 'Default' ) ) -EndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) -EndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) - -EndOfSwitcha = EndOfSwitch.Port( 'a' ) -EndOfInitLoopSwitchIndex = GraphSwitchs.Link( EndOfSwitcha , EndOfInitLoopSwitch.Port( 'Index' ) ) - -IsOdd_1a = IsOdd_1.Port( 'a' ) -EndSwitcha = GraphSwitchs.Link( IsOdd_1a , EndSwitch.Port( 'a' ) ) -EndSwitcha.AddCoord( 1 , 599 , 416 ) -EndSwitcha.AddCoord( 2 , 598 , 389 ) - -InitLoopIndex = InitLoop.Port( 'Index' ) -Switch_1a = GraphSwitchs.Link( InitLoopIndex , Switch_1.Port( 'a' ) ) - -InitLoopMin = InitLoop.Port( 'Min' ) -EndOfInitLoopMin = GraphSwitchs.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) - -InitLoopMax = InitLoop.Port( 'Max' ) -EndOfInitLoopMax = GraphSwitchs.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) - -Switch_1Odd = Switch_1.Port( 'Odd' ) -IsOdd_1InGate = GraphSwitchs.Link( Switch_1Odd , IsOdd_1.Port( 'InGate' ) ) - -Switch_1Even = Switch_1.Port( 'Even' ) -EndSwitchDefault = GraphSwitchs.Link( Switch_1Even , EndSwitch.Port( 'Default' ) ) - -Switch_1a = Switch_1.Port( 'a' ) -IsOdd_1a = GraphSwitchs.Link( Switch_1a , IsOdd_1.Port( 'a' ) ) -IsOdd_1a.AddCoord( 1 , 379 , 387 ) -IsOdd_1a.AddCoord( 2 , 378 , 481 ) - -EndSwitcha = EndSwitch.Port( 'a' ) -EndOfInitLoopIndex = GraphSwitchs.Link( EndSwitcha , EndOfInitLoop.Port( 'Index' ) ) - -# Creation of Input datas -InitLoopSwitchIndex = InitLoopSwitch.Input( 'Index' , 0) -InitLoopSwitchMin = InitLoopSwitch.Input( 'Min' , 0) -InitLoopSwitchMax = InitLoopSwitch.Input( 'Max' , 100) -InitLoopIndex = InitLoop.Input( 'Index' , 0) -InitLoopMin = InitLoop.Input( 'Min' , 0) -InitLoopMax = InitLoop.Input( 'Max' , 100) - -# Creation of Output variables -EndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.Port( 'Index' ) -EndOfInitLoopSwitchMin = EndOfInitLoopSwitch.Port( 'Min' ) -EndOfInitLoopSwitchMax = EndOfInitLoopSwitch.Port( 'Max' ) -SwitchEven = Switch.Port( 'Even' ) -EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) -EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) -EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) - -GraphSwitchs.Run() -GraphSwitchs.DoneW() -print GraphSwitchs.State() -GraphSwitchs.PrintPorts() +GraphSwitchs = DefGraphSwitchs() diff --git a/examples/GraphSwitchs.xml b/examples/GraphSwitchs.xml index 059040e..f018951 100755 --- a/examples/GraphSwitchs.xml +++ b/examples/GraphSwitchs.xml @@ -1,655 +1,664 @@ - + + ? - ? - GraphSwitchs - 1 - ? - -GraphSwitchs - + ? + GraphSwitchs_1 + 1 + ? + +GraphSwitchs_1 + long - InitLoopSwitch\Index - + InitLoopSwitch__Index + long - InitLoopSwitch\Min - + InitLoopSwitch__Min + long - InitLoopSwitch\Max - + InitLoopSwitch__Max + long - InitLoop\Index - + InitLoop__Index + long - InitLoop\Min - + InitLoop__Min + long - InitLoop\Max - + InitLoop__Max + long - EndOfInitLoopSwitch\Index - + EndOfInitLoopSwitch__Index + long - EndOfInitLoopSwitch\Min - + EndOfInitLoopSwitch__Min + long - EndOfInitLoopSwitch\Max - + EndOfInitLoopSwitch__Max + int - Switch\Even - + Switch__Even + long - EndOfInitLoop\Index - + EndOfInitLoop__Index + long - EndOfInitLoop\Min - + EndOfInitLoop__Min + long - EndOfInitLoop\Max - - - 14/10/2003 - 10:29:4 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 0 - 0 - + EndOfInitLoop__Max + + + 14/10/2003 - 10:29:4 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + ? + 0 + 0 + ? - ? - IsOdd - 3 - ? - + ? + IsOdd + 3 + ? + IsOdd - + long - a - + a + long - a - - + a + + IsOdd - - - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - Python function - 388 - 50 - + + + + + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Python function + 388 + 50 + ? - ? - InitLoopSwitch - 4 - EndOfInitLoopSwitch - + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + InitLoopSwitch - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - + Max + + InitLoop - - - + + + MoreLoop - - - - - - - + + + + + + + NextLoop - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 10 - 129 - + + + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 10 + 129 + ? - ? - EndOfInitLoopSwitch - 5 - InitLoopSwitch - + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + EndOfInitLoopSwitch - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 766 - 127 - + Max + + + +? + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 766 + 127 + ? - ? - Switch - 6 - EndOfSwitch - + ? + Switch + 6 + EndOfSwitch + Switch - + long - a - + a + long - Odd - + Odd + int - Even - + Even + int - a - - + a + + Switch - - - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 186 - 130 - + + + + + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 186 + 130 + ? - ? - EndOfSwitch - 7 - Switch - + ? + EndOfSwitch + 7 + Switch + EndOfSwitch - + long - a - + a + long - a - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 587 - 126 - + a + + + +? + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 587 + 126 + ? - ? - IsOdd_1 - 3 - ? - + ? + IsOdd_1 + 3 + ? + IsOdd_1 - + long - a - + a + long - a - - + a + + IsOdd - - - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - Python function - 419 - 308 - + + + + + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Python function + 419 + 308 + ? - ? - InitLoop - 4 - EndOfInitLoop - + ? + InitLoop + 4 + EndOfInitLoop + InitLoop - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - + Max + + InitLoop - - - + + + MoreLoop - - - - - - - + + + + + + + NextLoop - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 10 - 388 - + + + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 10 + 388 + ? - ? - EndOfInitLoop - 5 - InitLoop - + ? + EndOfInitLoop + 5 + InitLoop + EndOfInitLoop - + long - Index - + Index + long - Min - + Min + long - Max - + Max + long - Index - + Index + long - Min - + Min + long - Max - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 783 - 381 - + Max + + + +? + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 783 + 381 + ? - ? - Switch_1 - 6 - EndSwitch - + ? + Switch_1 + 6 + EndSwitch + Switch_1 - + long - a - + a + long - Odd - + Odd + int - Even - + Even + int - a - - + a + + Switch - - - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 193 - 388 - + + + + + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 193 + 388 + ? - ? - EndSwitch - 7 - Switch_1 - + ? + EndSwitch + 7 + Switch_1 + EndSwitch - + long - a - + a + long - a - - - - 16/10/2003 - 10:57:24 - 16/10/2003 - 10:57:24 - 1.05 - ? - ? - ? - 605 - 382 - + a + + + +? + + 20/1/2005 - 18:31:38 + 20/1/2005 - 18:31:38 + 1.05 + ? + ? + Compute Node + 605 + 382 + IsOdd - a - EndOfSwitch - a - + a + EndOfSwitch + a + 573 - 160 - + 160 + 572 - 130 - + 130 + InitLoopSwitch - DoLoop - EndOfInitLoopSwitch - DoLoop - - + DoLoop + EndOfInitLoopSwitch + DoLoop + + InitLoopSwitch - Index - Switch - a - - + Index + Switch + a + + InitLoopSwitch - Min - EndOfInitLoopSwitch - Min - - + Min + EndOfInitLoopSwitch + Min + + InitLoopSwitch - Max - EndOfInitLoopSwitch - Max - - + Max + EndOfInitLoopSwitch + Max + + EndOfInitLoopSwitch - DoLoop - InitLoopSwitch - DoLoop - - + DoLoop + InitLoopSwitch + DoLoop + + Switch - Odd - IsOdd - InGate - - + Odd + IsOdd + Gate + + Switch - a - IsOdd - a - + a + IsOdd + a + 365 - 129 - + 129 + 365 - 222 - + 222 + Switch - Default - EndOfSwitch - Default - + Default + EndOfSwitch + Default + 572 - 194 - + 194 + 571 - 257 - + 257 + EndOfSwitch - a - EndOfInitLoopSwitch - Index - - + a + EndOfInitLoopSwitch + Index + + IsOdd_1 - a - EndSwitch - a - + a + EndSwitch + a + 599 - 416 - + 416 + 598 - 389 - + 389 + InitLoop - DoLoop - EndOfInitLoop - DoLoop - - + DoLoop + EndOfInitLoop + DoLoop + + InitLoop - Index - Switch_1 - a - - + Index + Switch_1 + a + + InitLoop - Min - EndOfInitLoop - Min - - + Min + EndOfInitLoop + Min + + InitLoop - Max - EndOfInitLoop - Max - - + Max + EndOfInitLoop + Max + + EndOfInitLoop - DoLoop - InitLoop - DoLoop - - + DoLoop + InitLoop + DoLoop + + Switch_1 - Odd - IsOdd_1 - InGate - - + Odd + IsOdd_1 + Gate + + Switch_1 - Even - EndSwitch - Default - - + Even + EndSwitch + Default + + Switch_1 - a - IsOdd_1 - a - + a + IsOdd_1 + a + 379 - 387 - + 387 + 378 - 481 - + 481 + EndSwitch - a - EndOfInitLoop - Index - - + a + EndOfInitLoop + Index + + -GraphSwitchs - InitLoopSwitch\Index - InitLoopSwitch - Index - +GraphSwitchs_1 + InitLoopSwitch__Index + InitLoopSwitch + Index + 3 - 0 - - -GraphSwitchs - InitLoopSwitch\Min - InitLoopSwitch - Min - + 0 + + +GraphSwitchs_1 + InitLoopSwitch__Min + InitLoopSwitch + Min + 3 - 0 - - -GraphSwitchs - InitLoopSwitch\Max - InitLoopSwitch - Max - + 0 + + +GraphSwitchs_1 + InitLoopSwitch__Max + InitLoopSwitch + Max + 3 - 100 - - -GraphSwitchs - InitLoop\Index - InitLoop - Index - + 20 + + +GraphSwitchs_1 + InitLoop__Index + InitLoop + Index + 3 - 0 - - -GraphSwitchs - InitLoop\Min - InitLoop - Min - + 0 + + +GraphSwitchs_1 + InitLoop__Min + InitLoop + Min + 3 - 0 - - -GraphSwitchs - InitLoop\Max - InitLoop - Max - + 0 + + +GraphSwitchs_1 + InitLoop__Max + InitLoop + Max + 3 - 100 - + 20 + diff --git a/examples/SyrStruct.py b/examples/SyrStruct.py index 1809102..bd009be 100644 --- a/examples/SyrStruct.py +++ b/examples/SyrStruct.py @@ -2,402 +2,447 @@ # Generated python file of Graph SyrStruct from SuperV import * -# Graph creation -SyrStruct = Graph( 'SyrStruct' ) -SyrStruct.SetName( 'SyrStruct' ) -SyrStruct.SetAuthor( 'JR' ) -SyrStruct.SetComment( 'Syracuse algorithm' ) -SyrStruct.Coords( 0 , 0 ) - -# Creation of Factory Nodes - -m3 = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3' ) -m3.SetName( 'm3' ) -m3.SetAuthor( '' ) -m3.SetContainer( 'localhost/FactoryServer' ) -m3.SetComment( 'C_M3 from SyrComponent' ) -m3.Coords( 672 , 28 ) - -m3incr = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) -m3incr.SetName( 'm3incr' ) -m3incr.SetAuthor( '' ) -m3incr.SetContainer( 'localhost/FactoryServer' ) -m3incr.SetComment( 'C_INCR from SyrComponent' ) -m3incr.Coords( 898 , 29 ) - -incra = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) -incra.SetName( 'incra' ) -incra.SetAuthor( '' ) -incra.SetContainer( 'localhost/FactoryServer' ) -incra.SetComment( 'C_INCR from SyrComponent' ) -incra.Coords( 803 , 195 ) - -div2 = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) -div2.SetName( 'div2' ) -div2.SetAuthor( '' ) -div2.SetContainer( 'localhost/FactoryServer' ) -div2.SetComment( 'C_DIV2 from SyrComponent' ) -div2.Coords( 810 , 435 ) - -incrb = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) -incrb.SetName( 'incrb' ) -incrb.SetAuthor( '' ) -incrb.SetContainer( 'localhost/FactoryServer' ) -incrb.SetComment( 'C_INCR from SyrComponent' ) -incrb.Coords( 809 , 574 ) - -# Creation of InLine Nodes -PySyrComponent = [] -PySyrComponent.append( 'from LifeCycleCORBA import * ' ) -PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) -PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) -PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) -PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) -PySyrComponent.append( ' return ComponentRef ' ) -SyrComponent = SyrStruct.INode( 'SyrComponent' , PySyrComponent ) -SyrComponent.SetName( 'SyrComponent' ) -SyrComponent.SetAuthor( '' ) -SyrComponent.SetComment( 'SyrComponent( aContainer , aComponent )' ) -SyrComponent.Coords( 0 , 0 ) -SyrComponent.InPort( 'aContainer' , 'string' ) -SyrComponent.InPort( 'aComponent' , 'string' ) -SyrComponent.OutPort( 'SyrComponentobjref' , 'objref' ) - -# Creation of Loop Nodes -PyforN = [] -PyforN.append( 'def InitN( NN , K , SyrComponent , min , max ) : ' ) -PyforN.append( ' N = max ' ) -PyforN.append( ' if min > 0 : ' ) -PyforN.append( ' if max >= min : ' ) -PyforN.append( ' N = min ' ) -PyforN.append( ' return N,K,SyrComponent,min,max ' ) -PyMoreforN = [] -PyMoreforN.append( 'def MoreN( NN , KK , SyrComponent , min , max ) : ' ) -PyMoreforN.append( ' N = NN ' ) -PyMoreforN.append( ' OutLoop = 0 ' ) -PyMoreforN.append( ' if max > NN : ' ) -PyMoreforN.append( ' OutLoop = 1 ' ) -PyMoreforN.append( ' return OutLoop,N,0,SyrComponent,min,max ' ) -PyNextforN = [] -PyNextforN.append( 'def NextN( NN , KK , SyrComponent , min , max ) : ' ) -PyNextforN.append( ' N = NN + 1 ' ) -PyNextforN.append( ' K = KK ' ) -PyNextforN.append( ' return N,K,SyrComponent,min,max ' ) -forN,EndOfforN = SyrStruct.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN , 'NextN' , PyNextforN ) -EndOfforN.SetName( 'EndOfforN' ) -EndOfforN.SetAuthor( '' ) -EndOfforN.SetComment( '' ) -EndOfforN.Coords( 1535 , 332 ) -forN.SetName( 'forN' ) -forN.SetAuthor( '' ) -forN.SetComment( 'InitN , MoreN , NextN' ) -forN.Coords( 20 , 302 ) -forN.InPort( 'N' , 'long' ) -forN.InPort( 'K' , 'long' ) -forN.InPort( 'SyrComponent' , 'objref' ) -forN.InPort( 'min' , 'long' ) -forN.InPort( 'max' , 'long' ) -forN.OutPort( 'N' , 'long' ) -forN.OutPort( 'K' , 'long' ) -forN.OutPort( 'SyrComponent' , 'objref' ) -forN.OutPort( 'min' , 'long' ) -forN.OutPort( 'max' , 'long' ) - -PywhileNotOne = [] -PywhileNotOne.append( 'import threading' ) -PywhileNotOne.append( 'import SyrComponent_idl' ) -PywhileNotOne.append( 'def InitNotOne( SyrComponent , N , K ) :' ) -PywhileNotOne.append( ' return SyrComponent,N,K' ) -PyMorewhileNotOne = [] -PyMorewhileNotOne.append( 'import SyrComponent_idl' ) -PyMorewhileNotOne.append( 'def MoreNotOne( SyrComponent , N , K ) :' ) -PyMorewhileNotOne.append( ' OutLoop = 1 - SyrComponent.C_ISONE( N )' ) -PyMorewhileNotOne.append( ' return OutLoop,SyrComponent,N,K ' ) -PyNextwhileNotOne = [] -PyNextwhileNotOne.append( 'import SyrComponent_idl' ) -PyNextwhileNotOne.append( 'def NextNotOne( SyrComponent , N , K ) :' ) -PyNextwhileNotOne.append( ' return SyrComponent,N,K' ) -whileNotOne,EndOfwhileNotOne = SyrStruct.LNode( 'InitNotOne' , PywhileNotOne , 'MoreNotOne' , PyMorewhileNotOne , 'NextNotOne' , PyNextwhileNotOne ) -EndOfwhileNotOne.SetName( 'EndOfwhileNotOne' ) -EndOfwhileNotOne.SetAuthor( '' ) -EndOfwhileNotOne.SetComment( '' ) -EndOfwhileNotOne.Coords( 1366 , 303 ) -whileNotOne.SetName( 'whileNotOne' ) -whileNotOne.SetAuthor( '' ) -whileNotOne.SetComment( 'InitNotOne , MoreNotOne , NextNotOne' ) -whileNotOne.Coords( 212 , 274 ) -whileNotOne.InPort( 'SyrComponent' , 'objref' ) -whileNotOne.InPort( 'N' , 'long' ) -whileNotOne.InPort( 'K' , 'long' ) -whileNotOne.OutPort( 'SyrComponent' , 'objref' ) -whileNotOne.OutPort( 'N' , 'long' ) -whileNotOne.OutPort( 'K' , 'long' ) - -Pyfori = [] -Pyfori.append( 'def Initfori( ii , K ) :' ) -Pyfori.append( ' return 1,0,K' ) -PyMorefori = [] -PyMorefori.append( 'def Morefori( ii , K ) :' ) -PyMorefori.append( ' OutLoop = 0' ) -PyMorefori.append( ' if 2 > ii :' ) -PyMorefori.append( ' OutLoop = 1' ) -PyMorefori.append( ' return OutLoop,ii,K' ) -PyNextfori = [] -PyNextfori.append( 'def Nextfori( ii , K ) :' ) -PyNextfori.append( ' ii = ii + 1' ) -PyNextfori.append( ' return ii,K' ) -fori,EndOffori = SyrStruct.LNode( 'Initfori' , Pyfori , 'Morefori' , PyMorefori , 'Nextfori' , PyNextfori ) -EndOffori.SetName( 'EndOffori' ) -EndOffori.SetAuthor( '' ) -EndOffori.SetComment( '' ) -EndOffori.Coords( 976 , 212 ) -fori.SetName( 'fori' ) -fori.SetAuthor( '' ) -fori.SetComment( 'Initfori, Morefori, Nextfori' ) -fori.Coords( 635 , 212 ) -fori.InPort( 'i' , 'long' ) -fori.InPort( 'K' , 'long' ) -fori.OutPort( 'i' , 'long' ) -fori.OutPort( 'K' , 'long' ) - -PywhileEven = [] -PywhileEven.append( 'import SyrComponent_idl' ) -PywhileEven.append( 'def InitEven( SyrComponent , N , K ) :' ) -PywhileEven.append( ' return SyrComponent,N,K' ) -PyMorewhileEven = [] -PyMorewhileEven.append( 'import SyrComponent_idl' ) -PyMorewhileEven.append( 'def MoreEven( SyrComponent , N , K ) :' ) -PyMorewhileEven.append( ' OutLoop = SyrComponent.C_ISEVEN( N )' ) -PyMorewhileEven.append( ' return OutLoop,SyrComponent,N,K ' ) -PyNextwhileEven = [] -PyNextwhileEven.append( 'import SyrComponent_idl' ) -PyNextwhileEven.append( 'def NextEven( SyrComponent , N , K ) :' ) -PyNextwhileEven.append( ' return SyrComponent,N,K' ) -whileEven,EndOfwhileEven = SyrStruct.LNode( 'InitEven' , PywhileEven , 'MoreEven' , PyMorewhileEven , 'NextEven' , PyNextwhileEven ) -EndOfwhileEven.SetName( 'EndOfwhileEven' ) -EndOfwhileEven.SetAuthor( '' ) -EndOfwhileEven.SetComment( '' ) -EndOfwhileEven.Coords( 988 , 451 ) -whileEven.SetName( 'whileEven' ) -whileEven.SetAuthor( '' ) -whileEven.SetComment( 'InitEven, MoreEven, NextEven' ) -whileEven.Coords( 632 , 451 ) -whileEven.InPort( 'SyrComponent' , 'objref' ) -whileEven.InPort( 'N' , 'long' ) -whileEven.InPort( 'K' , 'long' ) -whileEven.OutPort( 'SyrComponent' , 'objref' ) -whileEven.OutPort( 'N' , 'long' ) -whileEven.OutPort( 'K' , 'long' ) - -# Creation of Switch Nodes -PyifNotEven = [] -PyifNotEven.append( 'import SyrComponent_idl' ) -PyifNotEven.append( 'def ifNotEven( SyrComponent , N , K ) :' ) -PyifNotEven.append( ' Even = SyrComponent.C_ISEVEN( N )' ) -PyifNotEven.append( ' Odd = 1 - Even' ) -PyifNotEven.append( ' return Odd,Even,SyrComponent,N,K' ) -ifNotEven,EndOfifNotEven = SyrStruct.SNode( 'ifNotEven' , PyifNotEven ) -EndOfifNotEven.SetName( 'EndOfifNotEven' ) -EndOfifNotEven.SetAuthor( '' ) -EndOfifNotEven.SetComment( '' ) -EndOfifNotEven.Coords( 1205 , 331 ) -PyEndOfifNotEven = [] -EndOfifNotEven.SetPyFunction( 'EndifNotEven' , PyEndOfifNotEven ) -EndOfifNotEven.InPort( 'N' , 'long' ) -EndOfifNotEven.InPort( 'K' , 'long' ) -EndOfifNotEven.OutPort( 'N' , 'long' ) -EndOfifNotEven.OutPort( 'K' , 'long' ) -ifNotEven.SetName( 'ifNotEven' ) -ifNotEven.SetAuthor( '' ) -ifNotEven.SetComment( 'ifNotEven' ) -ifNotEven.Coords( 418 , 274 ) -ifNotEven.InPort( 'SyrComponent' , 'objref' ) -ifNotEven.InPort( 'N' , 'long' ) -ifNotEven.InPort( 'K' , 'long' ) -ifNotEven.OutPort( 'Odd' , 'long' ) -ifNotEven.OutPort( 'Even' , 'long' ) -ifNotEven.OutPort( 'SyrComponent' , 'objref' ) -ifNotEven.OutPort( 'N' , 'long' ) -ifNotEven.OutPort( 'K' , 'long' ) - -# Creation of Links -m3anInteger = m3.Port( 'anInteger' ) -m3incraCount = SyrStruct.Link( m3anInteger , m3incr.Port( 'aCount' ) ) - -m3incraNewCount = m3incr.Port( 'aNewCount' ) -EndOfifNotEvenN = SyrStruct.Link( m3incraNewCount , EndOfifNotEven.Port( 'N' ) ) -EndOfifNotEvenN.AddCoord( 1 , 1190 , 366 ) -EndOfifNotEvenN.AddCoord( 2 , 1191 , 109 ) - -incraaNewCount = incra.Port( 'aNewCount' ) -EndOfforiK = SyrStruct.Link( incraaNewCount , EndOffori.Port( 'K' ) ) - -div2anInteger = div2.Port( 'anInteger' ) -EndOfwhileEvenN = SyrStruct.Link( div2anInteger , EndOfwhileEven.Port( 'N' ) ) - -incrbaNewCount = incrb.Port( 'aNewCount' ) -EndOfwhileEvenK = SyrStruct.Link( incrbaNewCount , EndOfwhileEven.Port( 'K' ) ) -EndOfwhileEvenK.AddCoord( 1 , 988 , 543 ) -EndOfwhileEvenK.AddCoord( 2 , 988 , 654 ) - -SyrComponentSyrComponentobjref = SyrComponent.Port( 'SyrComponentobjref' ) -forNSyrComponent = SyrStruct.Link( SyrComponentSyrComponentobjref , forN.Port( 'SyrComponent' ) ) -forNSyrComponent.AddCoord( 1 , 13 , 394 ) -forNSyrComponent.AddCoord( 2 , 12 , 181 ) -forNSyrComponent.AddCoord( 3 , 196 , 181 ) -forNSyrComponent.AddCoord( 4 , 197 , 81 ) - -forNN = forN.Port( 'N' ) -whileNotOneN = SyrStruct.Link( forNN , whileNotOne.Port( 'N' ) ) - -EndOfforNN = SyrStruct.Link( forNN , EndOfforN.Port( 'N' ) ) - -forNK = forN.Port( 'K' ) -whileNotOneK = SyrStruct.Link( forNK , whileNotOne.Port( 'K' ) ) - -forNSyrComponent = forN.Port( 'SyrComponent' ) -EndOfforNSyrComponent = SyrStruct.Link( forNSyrComponent , EndOfforN.Port( 'SyrComponent' ) ) - -whileNotOneSyrComponent = SyrStruct.Link( forNSyrComponent , whileNotOne.Port( 'SyrComponent' ) ) -whileNotOneSyrComponent.AddCoord( 1 , 192 , 309 ) -whileNotOneSyrComponent.AddCoord( 2 , 191 , 394 ) - -forNmin = forN.Port( 'min' ) -EndOfforNmin = SyrStruct.Link( forNmin , EndOfforN.Port( 'min' ) ) - -forNmax = forN.Port( 'max' ) -EndOfforNmax = SyrStruct.Link( forNmax , EndOfforN.Port( 'max' ) ) - -whileNotOneSyrComponent = whileNotOne.Port( 'SyrComponent' ) -EndOfwhileNotOneSyrComponent = SyrStruct.Link( whileNotOneSyrComponent , EndOfwhileNotOne.Port( 'SyrComponent' ) ) - -ifNotEvenSyrComponent = SyrStruct.Link( whileNotOneSyrComponent , ifNotEven.Port( 'SyrComponent' ) ) - -whileNotOneN = whileNotOne.Port( 'N' ) -ifNotEvenN = SyrStruct.Link( whileNotOneN , ifNotEven.Port( 'N' ) ) - -whileNotOneK = whileNotOne.Port( 'K' ) -ifNotEvenK = SyrStruct.Link( whileNotOneK , ifNotEven.Port( 'K' ) ) - -EndOfwhileNotOneK = EndOfwhileNotOne.Port( 'K' ) -EndOfforNK = SyrStruct.Link( EndOfwhileNotOneK , EndOfforN.Port( 'K' ) ) - -forii = fori.Port( 'i' ) -EndOfforii = SyrStruct.Link( forii , EndOffori.Port( 'i' ) ) - -foriK = fori.Port( 'K' ) -incraaCount = SyrStruct.Link( foriK , incra.Port( 'aCount' ) ) - -EndOfforiK = EndOffori.Port( 'K' ) -EndOfifNotEvenK = SyrStruct.Link( EndOfforiK , EndOfifNotEven.Port( 'K' ) ) -EndOfifNotEvenK.AddCoord( 1 , 1170 , 396 ) -EndOfifNotEvenK.AddCoord( 2 , 1169 , 275 ) - -whileEvenSyrComponent = whileEven.Port( 'SyrComponent' ) -EndOfwhileEvenSyrComponent = SyrStruct.Link( whileEvenSyrComponent , EndOfwhileEven.Port( 'SyrComponent' ) ) - -whileEvenN = whileEven.Port( 'N' ) -div2anEvenInteger = SyrStruct.Link( whileEvenN , div2.Port( 'anEvenInteger' ) ) - -whileEvenK = whileEven.Port( 'K' ) -incrbaCount = SyrStruct.Link( whileEvenK , incrb.Port( 'aCount' ) ) -incrbaCount.AddCoord( 1 , 796 , 655 ) -incrbaCount.AddCoord( 2 , 795 , 543 ) - -EndOfwhileEvenN = EndOfwhileEven.Port( 'N' ) -EndOfifNotEvenN = SyrStruct.Link( EndOfwhileEvenN , EndOfifNotEven.Port( 'N' ) ) -EndOfifNotEvenN.AddCoord( 1 , 1191 , 366 ) -EndOfifNotEvenN.AddCoord( 2 , 1191 , 513 ) - -EndOfwhileEvenK = EndOfwhileEven.Port( 'K' ) -EndOfifNotEvenK = SyrStruct.Link( EndOfwhileEvenK , EndOfifNotEven.Port( 'K' ) ) -EndOfifNotEvenK.AddCoord( 1 , 1169 , 395 ) -EndOfifNotEvenK.AddCoord( 2 , 1170 , 543 ) - -ifNotEvenOdd = ifNotEven.Port( 'Odd' ) -m3InGate = SyrStruct.Link( ifNotEvenOdd , m3.Port( 'InGate' ) ) -m3InGate.AddCoord( 1 , 593 , 141 ) -m3InGate.AddCoord( 2 , 593 , 307 ) - -foriInGate = SyrStruct.Link( ifNotEvenOdd , fori.Port( 'InGate' ) ) - -ifNotEvenEven = ifNotEven.Port( 'Even' ) -whileEvenInGate = SyrStruct.Link( ifNotEvenEven , whileEven.Port( 'InGate' ) ) -whileEvenInGate.AddCoord( 1 , 593 , 576 ) -whileEvenInGate.AddCoord( 2 , 592 , 339 ) - -ifNotEvenSyrComponent = ifNotEven.Port( 'SyrComponent' ) -whileEvenSyrComponent = SyrStruct.Link( ifNotEvenSyrComponent , whileEven.Port( 'SyrComponent' ) ) -whileEvenSyrComponent.AddCoord( 1 , 586 , 486 ) -whileEvenSyrComponent.AddCoord( 2 , 587 , 367 ) - -ifNotEvenN = ifNotEven.Port( 'N' ) -whileEvenN = SyrStruct.Link( ifNotEvenN , whileEven.Port( 'N' ) ) -whileEvenN.AddCoord( 1 , 604 , 513 ) -whileEvenN.AddCoord( 2 , 603 , 397 ) - -m3anOddInteger = SyrStruct.Link( ifNotEvenN , m3.Port( 'anOddInteger' ) ) -m3anOddInteger.AddCoord( 1 , 604 , 107 ) -m3anOddInteger.AddCoord( 2 , 604 , 395 ) - -ifNotEvenK = ifNotEven.Port( 'K' ) -whileEvenK = SyrStruct.Link( ifNotEvenK , whileEven.Port( 'K' ) ) -whileEvenK.AddCoord( 1 , 621 , 544 ) -whileEvenK.AddCoord( 2 , 622 , 426 ) - -foriK = SyrStruct.Link( ifNotEvenK , fori.Port( 'K' ) ) -foriK.AddCoord( 1 , 622 , 275 ) -foriK.AddCoord( 2 , 622 , 426 ) - -ifNotEvenDefault = ifNotEven.Port( 'Default' ) -EndOfifNotEvenDefault = SyrStruct.Link( ifNotEvenDefault , EndOfifNotEven.Port( 'Default' ) ) -EndOfifNotEvenDefault.AddCoord( 1 , 1204 , 429 ) -EndOfifNotEvenDefault.AddCoord( 2 , 1203 , 12 ) -EndOfifNotEvenDefault.AddCoord( 3 , 581 , 13 ) -EndOfifNotEvenDefault.AddCoord( 4 , 581 , 458 ) - -EndOfifNotEvenN = EndOfifNotEven.Port( 'N' ) -EndOfwhileNotOneN = SyrStruct.Link( EndOfifNotEvenN , EndOfwhileNotOne.Port( 'N' ) ) - -EndOfifNotEvenK = EndOfifNotEven.Port( 'K' ) -EndOfwhileNotOneK = SyrStruct.Link( EndOfifNotEvenK , EndOfwhileNotOne.Port( 'K' ) ) - -# Creation of Input datas -SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServer') -SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrComponent') -forNN = forN.Input( 'N' , 0) - -forNK = forN.Input( 'K' , 0) -forNmin = forN.Input( 'min' , 5) -forNmax = forN.Input( 'max' , 9) -forii = fori.Input( 'i' , 0) - -# Creation of Output variables -EndOfforNN = EndOfforN.Port( 'N' ) -EndOfforNK = EndOfforN.Port( 'K' ) -EndOfforNSyrComponent = EndOfforN.Port( 'SyrComponent' ) -EndOfforNmin = EndOfforN.Port( 'min' ) -EndOfforNmax = EndOfforN.Port( 'max' ) -EndOfwhileNotOneSyrComponent = EndOfwhileNotOne.Port( 'SyrComponent' ) -EndOfwhileNotOneN = EndOfwhileNotOne.Port( 'N' ) -EndOfforii = EndOffori.Port( 'i' ) -EndOfwhileEvenSyrComponent = EndOfwhileEven.Port( 'SyrComponent' ) - -SyrStruct.Run() - -SyrStruct.DoneW() - -print SyrStruct.State() - -SyrStruct.PrintPorts() - -SyrStruct.Export( '/tmp/SyrStruct.xml' ) - -SyrStruct = Graph( '/tmp/SyrStruct.xml' ) - -SyrStruct.Run() - -SyrStruct.DoneW() - -print SyrStruct.State() +# Graph creation of SyrStruct +def DefSyrStruct() : + SyrStruct = Graph( 'SyrStruct' ) + SyrStruct.SetName( 'SyrStruct' ) + SyrStruct.SetAuthor( 'JR' ) + SyrStruct.SetComment( 'Syracuse algorithm' ) + SyrStruct.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + m3 = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3' ) + m3.SetName( 'm3' ) + m3.SetAuthor( '' ) + m3.SetContainer( 'localhost/FactoryServer' ) + m3.SetComment( 'C_M3 from SyrComponent' ) + m3.Coords( 672 , 28 ) + Im3anOddInteger = m3.GetInPort( 'anOddInteger' ) + Im3Gate = m3.GetInPort( 'Gate' ) + Om3anInteger = m3.GetOutPort( 'anInteger' ) + Om3Gate = m3.GetOutPort( 'Gate' ) + + m3incr = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + m3incr.SetName( 'm3incr' ) + m3incr.SetAuthor( '' ) + m3incr.SetContainer( 'localhost/FactoryServer' ) + m3incr.SetComment( 'C_INCR from SyrComponent' ) + m3incr.Coords( 899 , 28 ) + Im3incraCount = m3incr.GetInPort( 'aCount' ) + Im3incrGate = m3incr.GetInPort( 'Gate' ) + Om3incraNewCount = m3incr.GetOutPort( 'aNewCount' ) + Om3incrGate = m3incr.GetOutPort( 'Gate' ) + + incra = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incra.SetName( 'incra' ) + incra.SetAuthor( '' ) + incra.SetContainer( 'localhost/FactoryServer' ) + incra.SetComment( 'C_INCR from SyrComponent' ) + incra.Coords( 824 , 218 ) + IincraaCount = incra.GetInPort( 'aCount' ) + IincraGate = incra.GetInPort( 'Gate' ) + OincraaNewCount = incra.GetOutPort( 'aNewCount' ) + OincraGate = incra.GetOutPort( 'Gate' ) + + div2 = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2.SetName( 'div2' ) + div2.SetAuthor( '' ) + div2.SetContainer( 'localhost/FactoryServer' ) + div2.SetComment( 'C_DIV2 from SyrComponent' ) + div2.Coords( 817 , 431 ) + Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' ) + Idiv2Gate = div2.GetInPort( 'Gate' ) + Odiv2anInteger = div2.GetOutPort( 'anInteger' ) + Odiv2Gate = div2.GetOutPort( 'Gate' ) + + incrb = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incrb.SetName( 'incrb' ) + incrb.SetAuthor( '' ) + incrb.SetContainer( 'localhost/FactoryServer' ) + incrb.SetComment( 'C_INCR from SyrComponent' ) + incrb.Coords( 821 , 574 ) + IincrbaCount = incrb.GetInPort( 'aCount' ) + IincrbGate = incrb.GetInPort( 'Gate' ) + OincrbaNewCount = incrb.GetOutPort( 'aNewCount' ) + OincrbGate = incrb.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PySyrComponent = [] + PySyrComponent.append( 'from LifeCycleCORBA import * ' ) + PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) + PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) + PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) + PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) + PySyrComponent.append( ' return ComponentRef ' ) + SyrComponent = SyrStruct.INode( 'SyrComponent' , PySyrComponent ) + SyrComponent.SetName( 'SyrComponent' ) + SyrComponent.SetAuthor( '' ) + SyrComponent.SetComment( 'SyrComponent( aContainer , aComponent )' ) + SyrComponent.Coords( 0 , 0 ) + ISyrComponentaContainer = SyrComponent.InPort( 'aContainer' , 'string' ) + ISyrComponentaComponent = SyrComponent.InPort( 'aComponent' , 'string' ) + ISyrComponentGate = SyrComponent.GetInPort( 'Gate' ) + OSyrComponentSyrComponentobjref = SyrComponent.OutPort( 'SyrComponentobjref' , 'objref' ) + OSyrComponentGate = SyrComponent.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyforN = [] + PyforN.append( 'def InitN( NN , K , SyrComponent , min , max ) : ' ) + PyforN.append( ' N = max ' ) + PyforN.append( ' if min > 0 : ' ) + PyforN.append( ' if max >= min : ' ) + PyforN.append( ' N = min ' ) + PyforN.append( ' return N,K,SyrComponent,min,max ' ) + PyMoreforN = [] + PyMoreforN.append( 'def MoreN( NN , KK , SyrComponent , min , max ) : ' ) + PyMoreforN.append( ' N = NN ' ) + PyMoreforN.append( ' OutLoop = 0 ' ) + PyMoreforN.append( ' if max > NN : ' ) + PyMoreforN.append( ' OutLoop = 1 ' ) + PyMoreforN.append( ' return OutLoop,N,0,SyrComponent,min,max ' ) + PyNextforN = [] + PyNextforN.append( 'def NextN( NN , KK , SyrComponent , min , max ) : ' ) + PyNextforN.append( ' N = NN + 1 ' ) + PyNextforN.append( ' K = KK ' ) + PyNextforN.append( ' return N,K,SyrComponent,min,max ' ) + forN,EndOfforN = SyrStruct.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN , 'NextN' , PyNextforN ) + EndOfforN.SetName( 'EndOfforN' ) + EndOfforN.SetAuthor( '' ) + EndOfforN.SetComment( 'Compute Node' ) + EndOfforN.Coords( 1590 , 331 ) + PyEndOfforN = [] + EndOfforN.SetPyFunction( '' , PyEndOfforN ) + IforNDoLoop = forN.GetInPort( 'DoLoop' ) + IforNN = forN.InPort( 'N' , 'long' ) + IforNK = forN.InPort( 'K' , 'long' ) + IforNSyrComponent = forN.InPort( 'SyrComponent' , 'objref' ) + IforNmin = forN.InPort( 'min' , 'long' ) + IforNmax = forN.InPort( 'max' , 'long' ) + IforNGate = forN.GetInPort( 'Gate' ) + OforNDoLoop = forN.GetOutPort( 'DoLoop' ) + OforNN = forN.GetOutPort( 'N' ) + OforNK = forN.GetOutPort( 'K' ) + OforNSyrComponent = forN.GetOutPort( 'SyrComponent' ) + OforNmin = forN.GetOutPort( 'min' ) + OforNmax = forN.GetOutPort( 'max' ) + IEndOfforNDoLoop = EndOfforN.GetInPort( 'DoLoop' ) + IEndOfforNN = EndOfforN.GetInPort( 'N' ) + IEndOfforNK = EndOfforN.GetInPort( 'K' ) + IEndOfforNSyrComponent = EndOfforN.GetInPort( 'SyrComponent' ) + IEndOfforNmin = EndOfforN.GetInPort( 'min' ) + IEndOfforNmax = EndOfforN.GetInPort( 'max' ) + IEndOfforNGate = EndOfforN.GetInPort( 'Gate' ) + OEndOfforNDoLoop = EndOfforN.GetOutPort( 'DoLoop' ) + OEndOfforNN = EndOfforN.GetOutPort( 'N' ) + OEndOfforNK = EndOfforN.GetOutPort( 'K' ) + OEndOfforNSyrComponent = EndOfforN.GetOutPort( 'SyrComponent' ) + OEndOfforNmin = EndOfforN.GetOutPort( 'min' ) + OEndOfforNmax = EndOfforN.GetOutPort( 'max' ) + OEndOfforNGate = EndOfforN.GetOutPort( 'Gate' ) + forN.SetName( 'forN' ) + forN.SetAuthor( '' ) + forN.SetComment( 'InitN , MoreN , NextN' ) + forN.Coords( 20 , 302 ) + + PywhileNotOne = [] + PywhileNotOne.append( 'import threading' ) + PywhileNotOne.append( 'import SyrComponent_idl' ) + PywhileNotOne.append( 'def InitNotOne( SyrComponent , N , K ) :' ) + PywhileNotOne.append( ' return SyrComponent,N,K' ) + PyMorewhileNotOne = [] + PyMorewhileNotOne.append( 'import SyrComponent_idl' ) + PyMorewhileNotOne.append( 'def MoreNotOne( SyrComponent , N , K ) :' ) + PyMorewhileNotOne.append( ' OutLoop = 1 - SyrComponent.C_ISONE( N )' ) + PyMorewhileNotOne.append( ' return OutLoop,SyrComponent,N,K ' ) + PyNextwhileNotOne = [] + PyNextwhileNotOne.append( 'import SyrComponent_idl' ) + PyNextwhileNotOne.append( 'def NextNotOne( SyrComponent , N , K ) :' ) + PyNextwhileNotOne.append( ' return SyrComponent,N,K' ) + whileNotOne,EndOfwhileNotOne = SyrStruct.LNode( 'InitNotOne' , PywhileNotOne , 'MoreNotOne' , PyMorewhileNotOne , 'NextNotOne' , PyNextwhileNotOne ) + EndOfwhileNotOne.SetName( 'EndOfwhileNotOne' ) + EndOfwhileNotOne.SetAuthor( '' ) + EndOfwhileNotOne.SetComment( 'Compute Node' ) + EndOfwhileNotOne.Coords( 1405 , 311 ) + PyEndOfwhileNotOne = [] + EndOfwhileNotOne.SetPyFunction( '' , PyEndOfwhileNotOne ) + IwhileNotOneDoLoop = whileNotOne.GetInPort( 'DoLoop' ) + IwhileNotOneSyrComponent = whileNotOne.InPort( 'SyrComponent' , 'objref' ) + IwhileNotOneN = whileNotOne.InPort( 'N' , 'long' ) + IwhileNotOneK = whileNotOne.InPort( 'K' , 'long' ) + IwhileNotOneGate = whileNotOne.GetInPort( 'Gate' ) + OwhileNotOneDoLoop = whileNotOne.GetOutPort( 'DoLoop' ) + OwhileNotOneSyrComponent = whileNotOne.GetOutPort( 'SyrComponent' ) + OwhileNotOneN = whileNotOne.GetOutPort( 'N' ) + OwhileNotOneK = whileNotOne.GetOutPort( 'K' ) + IEndOfwhileNotOneDoLoop = EndOfwhileNotOne.GetInPort( 'DoLoop' ) + IEndOfwhileNotOneSyrComponent = EndOfwhileNotOne.GetInPort( 'SyrComponent' ) + IEndOfwhileNotOneN = EndOfwhileNotOne.GetInPort( 'N' ) + IEndOfwhileNotOneK = EndOfwhileNotOne.GetInPort( 'K' ) + IEndOfwhileNotOneGate = EndOfwhileNotOne.GetInPort( 'Gate' ) + OEndOfwhileNotOneDoLoop = EndOfwhileNotOne.GetOutPort( 'DoLoop' ) + OEndOfwhileNotOneSyrComponent = EndOfwhileNotOne.GetOutPort( 'SyrComponent' ) + OEndOfwhileNotOneN = EndOfwhileNotOne.GetOutPort( 'N' ) + OEndOfwhileNotOneK = EndOfwhileNotOne.GetOutPort( 'K' ) + OEndOfwhileNotOneGate = EndOfwhileNotOne.GetOutPort( 'Gate' ) + whileNotOne.SetName( 'whileNotOne' ) + whileNotOne.SetAuthor( '' ) + whileNotOne.SetComment( 'InitNotOne , MoreNotOne , NextNotOne' ) + whileNotOne.Coords( 215 , 282 ) + + Pyfori = [] + Pyfori.append( 'def Initfori( ii , K ) : ' ) + Pyfori.append( ' ii = 0 ' ) + Pyfori.append( ' return ii,K ' ) + PyMorefori = [] + PyMorefori.append( 'from time import * ' ) + PyMorefori.append( 'def Morefori( ii , K ) : ' ) + PyMorefori.append( ' OutLoop = 0 ' ) + PyMorefori.append( ' if ii < 2 : ' ) + PyMorefori.append( ' OutLoop = 1 ' ) + PyMorefori.append( ' return OutLoop,ii,K ' ) + PyNextfori = [] + PyNextfori.append( 'def Nextfori( ii , K ) : ' ) + PyNextfori.append( ' ii = ii + 1 ' ) + PyNextfori.append( ' return ii,K ' ) + fori,EndOffori = SyrStruct.LNode( 'Initfori' , Pyfori , 'Morefori' , PyMorefori , 'Nextfori' , PyNextfori ) + EndOffori.SetName( 'EndOffori' ) + EndOffori.SetAuthor( '' ) + EndOffori.SetComment( 'Compute Node' ) + EndOffori.Coords( 1009 , 238 ) + PyEndOffori = [] + EndOffori.SetPyFunction( '' , PyEndOffori ) + IforiDoLoop = fori.GetInPort( 'DoLoop' ) + Iforii = fori.InPort( 'i' , 'long' ) + IforiK = fori.InPort( 'K' , 'long' ) + IforiGate = fori.GetInPort( 'Gate' ) + OforiDoLoop = fori.GetOutPort( 'DoLoop' ) + Oforii = fori.GetOutPort( 'i' ) + OforiK = fori.GetOutPort( 'K' ) + IEndOfforiDoLoop = EndOffori.GetInPort( 'DoLoop' ) + IEndOfforii = EndOffori.GetInPort( 'i' ) + IEndOfforiK = EndOffori.GetInPort( 'K' ) + IEndOfforiGate = EndOffori.GetInPort( 'Gate' ) + OEndOfforiDoLoop = EndOffori.GetOutPort( 'DoLoop' ) + OEndOfforii = EndOffori.GetOutPort( 'i' ) + OEndOfforiK = EndOffori.GetOutPort( 'K' ) + OEndOfforiGate = EndOffori.GetOutPort( 'Gate' ) + fori.SetName( 'fori' ) + fori.SetAuthor( '' ) + fori.SetComment( 'Initfori, Morefori, Nextfori' ) + fori.Coords( 641 , 238 ) + + PywhileEven = [] + PywhileEven.append( 'import SyrComponent_idl' ) + PywhileEven.append( 'def InitEven( SyrComponent , N , K ) :' ) + PywhileEven.append( ' return SyrComponent,N,K' ) + PyMorewhileEven = [] + PyMorewhileEven.append( 'import SyrComponent_idl' ) + PyMorewhileEven.append( 'def MoreEven( SyrComponent , N , K ) :' ) + PyMorewhileEven.append( ' OutLoop = SyrComponent.C_ISEVEN( N )' ) + PyMorewhileEven.append( ' return OutLoop,SyrComponent,N,K ' ) + PyNextwhileEven = [] + PyNextwhileEven.append( 'import SyrComponent_idl' ) + PyNextwhileEven.append( 'def NextEven( SyrComponent , N , K ) :' ) + PyNextwhileEven.append( ' return SyrComponent,N,K' ) + whileEven,EndOfwhileEven = SyrStruct.LNode( 'InitEven' , PywhileEven , 'MoreEven' , PyMorewhileEven , 'NextEven' , PyNextwhileEven ) + EndOfwhileEven.SetName( 'EndOfwhileEven' ) + EndOfwhileEven.SetAuthor( '' ) + EndOfwhileEven.SetComment( 'Compute Node' ) + EndOfwhileEven.Coords( 1006 , 451 ) + PyEndOfwhileEven = [] + EndOfwhileEven.SetPyFunction( '' , PyEndOfwhileEven ) + IwhileEvenDoLoop = whileEven.GetInPort( 'DoLoop' ) + IwhileEvenSyrComponent = whileEven.InPort( 'SyrComponent' , 'objref' ) + IwhileEvenN = whileEven.InPort( 'N' , 'long' ) + IwhileEvenK = whileEven.InPort( 'K' , 'long' ) + IwhileEvenGate = whileEven.GetInPort( 'Gate' ) + OwhileEvenDoLoop = whileEven.GetOutPort( 'DoLoop' ) + OwhileEvenSyrComponent = whileEven.GetOutPort( 'SyrComponent' ) + OwhileEvenN = whileEven.GetOutPort( 'N' ) + OwhileEvenK = whileEven.GetOutPort( 'K' ) + IEndOfwhileEvenDoLoop = EndOfwhileEven.GetInPort( 'DoLoop' ) + IEndOfwhileEvenSyrComponent = EndOfwhileEven.GetInPort( 'SyrComponent' ) + IEndOfwhileEvenN = EndOfwhileEven.GetInPort( 'N' ) + IEndOfwhileEvenK = EndOfwhileEven.GetInPort( 'K' ) + IEndOfwhileEvenGate = EndOfwhileEven.GetInPort( 'Gate' ) + OEndOfwhileEvenDoLoop = EndOfwhileEven.GetOutPort( 'DoLoop' ) + OEndOfwhileEvenSyrComponent = EndOfwhileEven.GetOutPort( 'SyrComponent' ) + OEndOfwhileEvenN = EndOfwhileEven.GetOutPort( 'N' ) + OEndOfwhileEvenK = EndOfwhileEven.GetOutPort( 'K' ) + OEndOfwhileEvenGate = EndOfwhileEven.GetOutPort( 'Gate' ) + whileEven.SetName( 'whileEven' ) + whileEven.SetAuthor( '' ) + whileEven.SetComment( 'InitEven, MoreEven, NextEven' ) + whileEven.Coords( 632 , 451 ) + + # Creation of Switch Nodes + PyifNotEven = [] + PyifNotEven.append( 'import SyrComponent_idl' ) + PyifNotEven.append( 'def ifNotEven( SyrComponent , N , K ) :' ) + PyifNotEven.append( ' Even = SyrComponent.C_ISEVEN( N )' ) + PyifNotEven.append( ' Odd = 1 - Even' ) + PyifNotEven.append( ' return Odd,Even,SyrComponent,N,K' ) + ifNotEven,EndOfifNotEven = SyrStruct.SNode( 'ifNotEven' , PyifNotEven ) + EndOfifNotEven.SetName( 'EndOfifNotEven' ) + EndOfifNotEven.SetAuthor( '' ) + EndOfifNotEven.SetComment( 'Compute Node' ) + EndOfifNotEven.Coords( 1220 , 331 ) + PyEndOfifNotEven = [] + EndOfifNotEven.SetPyFunction( '' , PyEndOfifNotEven ) + IEndOfifNotEvenN = EndOfifNotEven.InPort( 'N' , 'long' ) + IEndOfifNotEvenK = EndOfifNotEven.InPort( 'K' , 'long' ) + IEndOfifNotEvenDefault = EndOfifNotEven.GetInPort( 'Default' ) + OEndOfifNotEvenN = EndOfifNotEven.OutPort( 'N' , 'long' ) + OEndOfifNotEvenK = EndOfifNotEven.OutPort( 'K' , 'long' ) + OEndOfifNotEvenGate = EndOfifNotEven.GetOutPort( 'Gate' ) + ifNotEven.SetName( 'ifNotEven' ) + ifNotEven.SetAuthor( '' ) + ifNotEven.SetComment( 'ifNotEven' ) + ifNotEven.Coords( 407 , 282 ) + IifNotEvenSyrComponent = ifNotEven.InPort( 'SyrComponent' , 'objref' ) + IifNotEvenN = ifNotEven.InPort( 'N' , 'long' ) + IifNotEvenK = ifNotEven.InPort( 'K' , 'long' ) + IifNotEvenGate = ifNotEven.GetInPort( 'Gate' ) + OifNotEvenOdd = ifNotEven.OutPort( 'Odd' , 'long' ) + OifNotEvenEven = ifNotEven.OutPort( 'Even' , 'long' ) + OifNotEvenSyrComponent = ifNotEven.OutPort( 'SyrComponent' , 'objref' ) + OifNotEvenN = ifNotEven.OutPort( 'N' , 'long' ) + OifNotEvenK = ifNotEven.OutPort( 'K' , 'long' ) + OifNotEvenDefault = ifNotEven.GetOutPort( 'Default' ) + + # Creation of Links + Lm3anIntegerm3incraCount = SyrStruct.Link( Om3anInteger , Im3incraCount ) + + Lm3incraNewCountEndOfifNotEvenN = SyrStruct.Link( Om3incraNewCount , IEndOfifNotEvenN ) + Lm3incraNewCountEndOfifNotEvenN.AddCoord( 1 , 1193 , 362 ) + Lm3incraNewCountEndOfifNotEvenN.AddCoord( 2 , 1191 , 100 ) + + LincraaNewCountEndOfforiK = SyrStruct.Link( OincraaNewCount , IEndOfforiK ) + + Ldiv2anIntegerEndOfwhileEvenN = SyrStruct.Link( Odiv2anInteger , IEndOfwhileEvenN ) + + LincrbaNewCountEndOfwhileEvenK = SyrStruct.Link( OincrbaNewCount , IEndOfwhileEvenK ) + LincrbaNewCountEndOfwhileEvenK.AddCoord( 1 , 992 , 521 ) + LincrbaNewCountEndOfwhileEvenK.AddCoord( 2 , 992 , 645 ) + + LSyrComponentSyrComponentobjrefforNSyrComponent = SyrStruct.Link( OSyrComponentSyrComponentobjref , IforNSyrComponent ) + LSyrComponentSyrComponentobjrefforNSyrComponent.AddCoord( 1 , 8 , 373 ) + LSyrComponentSyrComponentobjrefforNSyrComponent.AddCoord( 2 , 8 , 181 ) + LSyrComponentSyrComponentobjrefforNSyrComponent.AddCoord( 3 , 196 , 181 ) + LSyrComponentSyrComponentobjrefforNSyrComponent.AddCoord( 4 , 196 , 71 ) + + LforNNwhileNotOneN = SyrStruct.Link( OforNN , IwhileNotOneN ) + + LforNNEndOfforNN = SyrStruct.Link( OforNN , IEndOfforNN ) + + LforNKwhileNotOneK = SyrStruct.Link( OforNK , IwhileNotOneK ) + + LforNSyrComponentEndOfforNSyrComponent = SyrStruct.Link( OforNSyrComponent , IEndOfforNSyrComponent ) + + LforNSyrComponentwhileNotOneSyrComponent = SyrStruct.Link( OforNSyrComponent , IwhileNotOneSyrComponent ) + LforNSyrComponentwhileNotOneSyrComponent.AddCoord( 1 , 197 , 313 ) + LforNSyrComponentwhileNotOneSyrComponent.AddCoord( 2 , 197 , 373 ) + + LforNminEndOfforNmin = SyrStruct.Link( OforNmin , IEndOfforNmin ) + + LforNmaxEndOfforNmax = SyrStruct.Link( OforNmax , IEndOfforNmax ) + + LwhileNotOneSyrComponentEndOfwhileNotOneSyrComponent = SyrStruct.Link( OwhileNotOneSyrComponent , IEndOfwhileNotOneSyrComponent ) + + LwhileNotOneSyrComponentifNotEvenSyrComponent = SyrStruct.Link( OwhileNotOneSyrComponent , IifNotEvenSyrComponent ) + + LwhileNotOneNifNotEvenN = SyrStruct.Link( OwhileNotOneN , IifNotEvenN ) + + LwhileNotOneKifNotEvenK = SyrStruct.Link( OwhileNotOneK , IifNotEvenK ) + + LEndOfwhileNotOneKEndOfforNK = SyrStruct.Link( OEndOfwhileNotOneK , IEndOfforNK ) + + LforiiEndOfforii = SyrStruct.Link( Oforii , IEndOfforii ) + + LforiKincraaCount = SyrStruct.Link( OforiK , IincraaCount ) + + LEndOfforiKEndOfifNotEvenK = SyrStruct.Link( OEndOfforiK , IEndOfifNotEvenK ) + LEndOfforiKEndOfifNotEvenK.AddCoord( 1 , 1180 , 382 ) + LEndOfforiKEndOfifNotEvenK.AddCoord( 2 , 1180 , 289 ) + + LwhileEvenSyrComponentEndOfwhileEvenSyrComponent = SyrStruct.Link( OwhileEvenSyrComponent , IEndOfwhileEvenSyrComponent ) + + LwhileEvenNdiv2anEvenInteger = SyrStruct.Link( OwhileEvenN , Idiv2anEvenInteger ) + + LwhileEvenKincrbaCount = SyrStruct.Link( OwhileEvenK , IincrbaCount ) + LwhileEvenKincrbaCount.AddCoord( 1 , 805 , 645 ) + LwhileEvenKincrbaCount.AddCoord( 2 , 805 , 522 ) + + LEndOfwhileEvenNEndOfifNotEvenN = SyrStruct.Link( OEndOfwhileEvenN , IEndOfifNotEvenN ) + LEndOfwhileEvenNEndOfifNotEvenN.AddCoord( 1 , 1192 , 362 ) + LEndOfwhileEvenNEndOfifNotEvenN.AddCoord( 2 , 1192 , 502 ) + + LEndOfwhileEvenKEndOfifNotEvenK = SyrStruct.Link( OEndOfwhileEvenK , IEndOfifNotEvenK ) + LEndOfwhileEvenKEndOfifNotEvenK.AddCoord( 1 , 1180 , 382 ) + LEndOfwhileEvenKEndOfifNotEvenK.AddCoord( 2 , 1180 , 522 ) + + LifNotEvenOddm3Gate = SyrStruct.Link( OifNotEvenOdd , Im3Gate ) + LifNotEvenOddm3Gate.AddCoord( 1 , 594 , 123 ) + LifNotEvenOddm3Gate.AddCoord( 2 , 594 , 313 ) + + LifNotEvenOddforiGate = SyrStruct.Link( OifNotEvenOdd , IforiGate ) + + LifNotEvenEvenwhileEvenGate = SyrStruct.Link( OifNotEvenEven , IwhileEvenGate ) + LifNotEvenEvenwhileEvenGate.AddCoord( 1 , 594 , 546 ) + LifNotEvenEvenwhileEvenGate.AddCoord( 2 , 594 , 334 ) + + LifNotEvenSyrComponentwhileEvenSyrComponent = SyrStruct.Link( OifNotEvenSyrComponent , IwhileEvenSyrComponent ) + LifNotEvenSyrComponentwhileEvenSyrComponent.AddCoord( 1 , 588 , 482 ) + LifNotEvenSyrComponentwhileEvenSyrComponent.AddCoord( 2 , 588 , 354 ) + + LifNotEvenNwhileEvenN = SyrStruct.Link( OifNotEvenN , IwhileEvenN ) + LifNotEvenNwhileEvenN.AddCoord( 1 , 603 , 502 ) + LifNotEvenNwhileEvenN.AddCoord( 2 , 603 , 373 ) + + LifNotEvenNm3anOddInteger = SyrStruct.Link( OifNotEvenN , Im3anOddInteger ) + LifNotEvenNm3anOddInteger.AddCoord( 1 , 605 , 99 ) + LifNotEvenNm3anOddInteger.AddCoord( 2 , 604 , 372 ) + + LifNotEvenKwhileEvenK = SyrStruct.Link( OifNotEvenK , IwhileEvenK ) + LifNotEvenKwhileEvenK.AddCoord( 1 , 620 , 523 ) + LifNotEvenKwhileEvenK.AddCoord( 2 , 620 , 396 ) + + LifNotEvenKforiK = SyrStruct.Link( OifNotEvenK , IforiK ) + LifNotEvenKforiK.AddCoord( 1 , 620 , 289 ) + LifNotEvenKforiK.AddCoord( 2 , 620 , 395 ) + + LifNotEvenDefaultEndOfifNotEvenDefault = SyrStruct.Link( OifNotEvenDefault , IEndOfifNotEvenDefault ) + LifNotEvenDefaultEndOfifNotEvenDefault.AddCoord( 1 , 1204 , 407 ) + LifNotEvenDefaultEndOfifNotEvenDefault.AddCoord( 2 , 1203 , 12 ) + LifNotEvenDefaultEndOfifNotEvenDefault.AddCoord( 3 , 581 , 13 ) + LifNotEvenDefaultEndOfifNotEvenDefault.AddCoord( 4 , 581 , 418 ) + + LEndOfifNotEvenNEndOfwhileNotOneN = SyrStruct.Link( OEndOfifNotEvenN , IEndOfwhileNotOneN ) + + LEndOfifNotEvenKEndOfwhileNotOneK = SyrStruct.Link( OEndOfifNotEvenK , IEndOfwhileNotOneK ) + + # Input datas + ISyrComponentaContainer.Input( 'FactoryServer' ) + ISyrComponentaComponent.Input( 'SyrComponent' ) + IforNN.Input( 0 ) + IforNK.Input( 0 ) + IforNmin.Input( 5 ) + IforNmax.Input( 9 ) + Iforii.Input( 0 ) + + # Output Ports of the graph + #OEndOfforNN = EndOfforN.GetOutPort( 'N' ) + #OEndOfforNK = EndOfforN.GetOutPort( 'K' ) + #OEndOfforNSyrComponent = EndOfforN.GetOutPort( 'SyrComponent' ) + #OEndOfforNmin = EndOfforN.GetOutPort( 'min' ) + #OEndOfforNmax = EndOfforN.GetOutPort( 'max' ) + #OEndOfwhileNotOneSyrComponent = EndOfwhileNotOne.GetOutPort( 'SyrComponent' ) + #OEndOfwhileNotOneN = EndOfwhileNotOne.GetOutPort( 'N' ) + #OEndOfforii = EndOffori.GetOutPort( 'i' ) + #OEndOfwhileEvenSyrComponent = EndOfwhileEven.GetOutPort( 'SyrComponent' ) + return SyrStruct + + +SyrStruct = DefSyrStruct() diff --git a/examples/SyrStruct.xml b/examples/SyrStruct.xml index 8038092..bce3fda 100644 --- a/examples/SyrStruct.xml +++ b/examples/SyrStruct.xml @@ -1,1157 +1,1170 @@ - + + ? - ? - SyrStruct - 1 - ? - + ? + SyrStruct + 1 + ? + SyrStruct - + string - SyrComponent\aContainer - + SyrComponent__aContainer + string - SyrComponent\aComponent - + SyrComponent__aComponent + long - forN\N - + forN__N + long - forN\K - + forN__K + long - forN\min - + forN__min + long - forN\max - + forN__max + long - fori\i - + fori__i + long - EndOfforN\N - + EndOfforN__N + long - EndOfforN\K - + EndOfforN__K + objref - EndOfforN\SyrComponent - + EndOfforN__SyrComponent + long - EndOfforN\min - + EndOfforN__min + long - EndOfforN\max - + EndOfforN__max + objref - EndOfwhileNotOne\SyrComponent - + EndOfwhileNotOne__SyrComponent + long - EndOfwhileNotOne\N - + EndOfwhileNotOne__N + long - EndOffori\i - + EndOffori__i + objref - EndOfwhileEven\SyrComponent - - - 4/8/2003 - 17:56:20 - 1/10/2003 - 17:39:29 - 1.04 - JR - ? - Syracuse algorithm - 0 - 0 - + EndOfwhileEven__SyrComponent + + + 4/8/2003 - 17:56:20 + 19/1/2005 - 13:1:13 + 1.04 + JR + ? + Syracuse algorithm + 0 + 0 + SyrComponent - SyrComponent - m3 - 0 - ? - + SyrComponent + m3 + 0 + ? + C_M3 - + long - anOddInteger - + anOddInteger + long - anInteger - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - localhost/FactoryServer - C_M3 from SyrComponent - 672 - 28 - + anInteger + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + localhost/FactoryServer + C_M3 from SyrComponent + 672 + 28 + SyrComponent - SyrComponent - m3incr - 0 - ? - + SyrComponent + m3incr + 0 + ? + C_INCR - + long - aCount - + aCount + long - aNewCount - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - localhost/FactoryServer - C_INCR from SyrComponent - 898 - 29 - + aNewCount + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 899 + 28 + SyrComponent - SyrComponent - incra - 0 - ? - + SyrComponent + incra + 0 + ? + C_INCR - + long - aCount - + aCount + long - aNewCount - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - localhost/FactoryServer - C_INCR from SyrComponent - 803 - 195 - + aNewCount + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 824 + 218 + SyrComponent - SyrComponent - div2 - 0 - ? - + SyrComponent + div2 + 0 + ? + C_DIV2 - + long - anEvenInteger - + anEvenInteger + long - anInteger - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - localhost/FactoryServer - C_DIV2 from SyrComponent - 810 - 435 - + anInteger + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 817 + 431 + SyrComponent - SyrComponent - incrb - 0 - ? - + SyrComponent + incrb + 0 + ? + C_INCR - + long - aCount - + aCount + long - aNewCount - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - localhost/FactoryServer - C_INCR from SyrComponent - 809 - 574 - + aNewCount + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 821 + 574 + ? - ? - SyrComponent - 3 - ? - + ? + SyrComponent + 3 + ? + SyrComponent - + string - aContainer - + aContainer + string - aComponent - + aComponent + objref - SyrComponentobjref - - + SyrComponentobjref + + SyrComponent - - - - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - SyrComponent( aContainer , aComponent ) - 0 - 0 - + + + + + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + SyrComponent( aContainer , aComponent ) + 0 + 0 + ? - ? - forN - 4 - EndOfforN - + ? + forN + 4 + EndOfforN + forN - + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - min - + min + long - max - + max + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - min - + min + long - max - - + max + + InitN - - - 0 : ]]> - = min : ]]> - - - + + + 0 : ]]> + = min : ]]> + + + MoreN - - - - NN : ]]> - - - + + + + NN : ]]> + + + NextN - - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - InitN , MoreN , NextN - 20 - 302 - + + + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + InitN , MoreN , NextN + 20 + 302 + ? - ? - EndOfforN - 5 - forN - + ? + EndOfforN + 5 + forN + EndOfforN - + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - min - + min + long - max - + max + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - min - + min + long - max - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - ? - 1535 - 332 - + max + + + +? + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + Compute Node + 1590 + 331 + ? - ? - whileNotOne - 4 - EndOfwhileNotOne - + ? + whileNotOne + 4 + EndOfwhileNotOne + whileNotOne - + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - - + K + + InitNotOne - - - - - + + + + + MoreNotOne - - - - - + + + + + NextNotOne - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - InitNotOne , MoreNotOne , NextNotOne - 212 - 274 - + + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + InitNotOne , MoreNotOne , NextNotOne + 215 + 282 + ? - ? - EndOfwhileNotOne - 5 - whileNotOne - + ? + EndOfwhileNotOne + 5 + whileNotOne + EndOfwhileNotOne - + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - ? - 1366 - 303 - + K + + + +? + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + Compute Node + 1405 + 311 + ? - ? - fori - 4 - EndOffori - + ? + fori + 4 + EndOffori + fori - + long - i - + i + long - K - + K + long - i - + i + long - K - - + K + + Initfori - - - + + + + Morefori - - - ii :]]> - - - + + + + + + + Nextfori - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - Initfori, Morefori, Nextfori - 635 - 212 - + + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + Initfori, Morefori, Nextfori + 641 + 238 + ? - ? - EndOffori - 5 - fori - + ? + EndOffori + 5 + fori + EndOffori - + long - i - + i + long - K - + K + long - i - + i + long - K - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - ? - 976 - 212 - + K + + + +? + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + Compute Node + 1009 + 238 + ? - ? - whileEven - 4 - EndOfwhileEven - + ? + whileEven + 4 + EndOfwhileEven + whileEven - + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - - + K + + InitEven - - - - + + + + MoreEven - - - - - + + + + + NextEven - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - InitEven, MoreEven, NextEven - 632 - 451 - + + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + InitEven, MoreEven, NextEven + 632 + 451 + ? - ? - EndOfwhileEven - 5 - whileEven - + ? + EndOfwhileEven + 5 + whileEven + EndOfwhileEven - + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - + K + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - ? - 988 - 451 - + K + + + +? + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + Compute Node + 1006 + 451 + ? - ? - ifNotEven - 6 - EndOfifNotEven - + ? + ifNotEven + 6 + EndOfifNotEven + ifNotEven - + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - + K + long - Odd - + Odd + long - Even - + Even + objref - SyrComponent - + SyrComponent + long - N - + N + long - K - - + K + + ifNotEven - - - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - ifNotEven - 418 - 274 - + + + + + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + ifNotEven + 407 + 282 + ? - ? - EndOfifNotEven - 7 - ifNotEven - + ? + EndOfifNotEven + 7 + ifNotEven + EndOfifNotEven - + long - N - + N + long - K - + K + long - N - + N + long - K - - - - 1/10/2003 - 17:39:29 - 1/10/2003 - 17:39:29 - 1.04 - ? - ? - ? - 1205 - 331 - + K + + + +? + + 19/1/2005 - 13:1:13 + 19/1/2005 - 13:1:13 + 1.04 + ? + ? + Compute Node + 1220 + 331 + m3 - anInteger - m3incr - aCount - - + anInteger + m3incr + aCount + + m3incr - aNewCount - EndOfifNotEven - N - + aNewCount + EndOfifNotEven + N + -1190 - 366 - +1193 + 362 + 1191 - 109 - + 100 + incra - aNewCount - EndOffori - K - - + aNewCount + EndOffori + K + + div2 - anInteger - EndOfwhileEven - N - - + anInteger + EndOfwhileEven + N + + incrb - aNewCount - EndOfwhileEven - K - + aNewCount + EndOfwhileEven + K + -988 - 543 - -988 - 654 - +992 + 521 + +992 + 645 + SyrComponent - SyrComponentobjref - forN - SyrComponent - + SyrComponentobjref + forN + SyrComponent + -13 - 394 - -12 - 181 - +8 + 373 + +8 + 181 + 196 - 181 - -197 - 81 - + 181 + +196 + 71 + forN - DoLoop - EndOfforN - DoLoop - - + DoLoop + EndOfforN + DoLoop + + forN - N - whileNotOne - N - - + N + whileNotOne + N + + forN - N - EndOfforN - N - - + N + EndOfforN + N + + forN - K - whileNotOne - K - - + K + whileNotOne + K + + forN - SyrComponent - EndOfforN - SyrComponent - - + SyrComponent + EndOfforN + SyrComponent + + forN - SyrComponent - whileNotOne - SyrComponent - + SyrComponent + whileNotOne + SyrComponent + -192 - 309 - -191 - 394 - +197 + 313 + +197 + 373 + forN - min - EndOfforN - min - - + min + EndOfforN + min + + forN - max - EndOfforN - max - - + max + EndOfforN + max + + EndOfforN - DoLoop - forN - DoLoop - - + DoLoop + forN + DoLoop + + whileNotOne - DoLoop - EndOfwhileNotOne - DoLoop - - + DoLoop + EndOfwhileNotOne + DoLoop + + whileNotOne - SyrComponent - EndOfwhileNotOne - SyrComponent - - + SyrComponent + EndOfwhileNotOne + SyrComponent + + whileNotOne - SyrComponent - ifNotEven - SyrComponent - - + SyrComponent + ifNotEven + SyrComponent + + whileNotOne - N - ifNotEven - N - - + N + ifNotEven + N + + whileNotOne - K - ifNotEven - K - - + K + ifNotEven + K + + EndOfwhileNotOne - DoLoop - whileNotOne - DoLoop - - + DoLoop + whileNotOne + DoLoop + + EndOfwhileNotOne - K - EndOfforN - K - - + K + EndOfforN + K + + fori - DoLoop - EndOffori - DoLoop - - + DoLoop + EndOffori + DoLoop + + fori - i - EndOffori - i - - + i + EndOffori + i + + fori - K - incra - aCount - - + K + incra + aCount + + EndOffori - DoLoop - fori - DoLoop - - + DoLoop + fori + DoLoop + + EndOffori - K - EndOfifNotEven - K - + K + EndOfifNotEven + K + -1170 - 396 - -1169 - 275 - +1180 + 382 + +1180 + 289 + whileEven - DoLoop - EndOfwhileEven - DoLoop - - + DoLoop + EndOfwhileEven + DoLoop + + whileEven - SyrComponent - EndOfwhileEven - SyrComponent - - + SyrComponent + EndOfwhileEven + SyrComponent + + whileEven - N - div2 - anEvenInteger - - + N + div2 + anEvenInteger + + whileEven - K - incrb - aCount - + K + incrb + aCount + -796 - 655 - -795 - 543 - +805 + 645 + +805 + 522 + EndOfwhileEven - DoLoop - whileEven - DoLoop - - + DoLoop + whileEven + DoLoop + + EndOfwhileEven - N - EndOfifNotEven - N - + N + EndOfifNotEven + N + -1191 - 366 - -1191 - 513 - +1192 + 362 + +1192 + 502 + EndOfwhileEven - K - EndOfifNotEven - K - + K + EndOfifNotEven + K + -1169 - 395 - -1170 - 543 - +1180 + 382 + +1180 + 522 + ifNotEven - Odd - m3 - InGate - + Odd + m3 + Gate + -593 - 141 - -593 - 307 - +594 + 123 + +594 + 313 + ifNotEven - Odd - fori - InGate - - + Odd + fori + Gate + + ifNotEven - Even - whileEven - InGate - + Even + whileEven + Gate + -593 - 576 - -592 - 339 - +594 + 546 + +594 + 334 + ifNotEven - SyrComponent - whileEven - SyrComponent - + SyrComponent + whileEven + SyrComponent + -586 - 486 - -587 - 367 - +588 + 482 + +588 + 354 + ifNotEven - N - whileEven - N - + N + whileEven + N + -604 - 513 - 603 - 397 - + 502 + +603 + 373 + ifNotEven - N - m3 - anOddInteger - + N + m3 + anOddInteger + +605 + 99 + 604 - 107 - -604 - 395 - + 372 + ifNotEven - K - whileEven - K - + K + whileEven + K + -621 - 544 - -622 - 426 - +620 + 523 + +620 + 396 + ifNotEven - K - fori - K - + K + fori + K + -622 - 275 - -622 - 426 - +620 + 289 + +620 + 395 + ifNotEven - Default - EndOfifNotEven - Default - + Default + EndOfifNotEven + Default + 1204 - 429 - + 407 + 1203 - 12 - + 12 + 581 - 13 - + 13 + 581 - 458 - + 418 + EndOfifNotEven - N - EndOfwhileNotOne - N - - + N + EndOfwhileNotOne + N + + EndOfifNotEven - K - EndOfwhileNotOne - K - - + K + EndOfwhileNotOne + K + + SyrStruct - SyrComponent\aContainer - SyrComponent - aContainer - + SyrComponent__aContainer + SyrComponent + aContainer + 18 - FactoryServer - - + FactoryServer + + SyrStruct - SyrComponent\aComponent - SyrComponent - aComponent - + SyrComponent__aComponent + SyrComponent + aComponent + 18 - SyrComponent - - + SyrComponent + + SyrStruct - forN\N - forN - N - + forN__N + forN + N + 3 - 0 - - + 0 + + SyrStruct - forN\K - forN - K - + forN__K + forN + K + 3 - 0 - - + 0 + + SyrStruct - forN\min - forN - min - + forN__min + forN + min + 3 - 5 - - + 5 + + SyrStruct - forN\max - forN - max - + forN__max + forN + max + 3 - 9 - - + 9 + + SyrStruct - fori\i - fori - i - + fori__i + fori + i + 3 - 0 - + 0 + -- 2.39.2