From: rahuel Date: Fri, 8 Jul 2005 12:56:52 +0000 (+0000) Subject: End of developpement/test of Switch Python Nodes : new tests X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=205e7f4d1c3adf1d141c68ae39685214d7fa2058;p=modules%2Fsuperv.git End of developpement/test of Switch Python Nodes : new tests --- diff --git a/examples/GraphBugEditor.py b/examples/GraphBugEditor.py new file mode 100644 index 0000000..14c339e --- /dev/null +++ b/examples/GraphBugEditor.py @@ -0,0 +1,97 @@ + +# Generated python file of Graph GraphBugEditor + +from SuperV import * + +# Graph creation of GraphBugEditor +def DefGraphBugEditor() : + GraphBugEditor = Graph( 'GraphBugEditor' ) + GraphBugEditor.SetName( 'GraphBugEditor' ) + GraphBugEditor.SetAuthor( 'Nicolas Crouzet & JR' ) + GraphBugEditor.SetComment( '' ) + GraphBugEditor.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + Pycompute_power_1 = [] + Pycompute_power_1.append( 'def compute_power(nitermax,eosflux,espeigenval) : ' ) + Pycompute_power_1.append( ' return 1 ' ) + compute_power_1 = GraphBugEditor.INode( 'compute_power' , Pycompute_power_1 ) + compute_power_1.SetName( 'compute_power_1' ) + compute_power_1.SetAuthor( '' ) + compute_power_1.SetComment( 'Compute Node' ) + compute_power_1.Coords( 226 , 103 ) + Icompute_power_1nitermax = compute_power_1.InPort( 'nitermax' , 'long' ) + Icompute_power_1epsflux = compute_power_1.InPort( 'epsflux' , 'long' ) + Icompute_power_1espeigenval = compute_power_1.InPort( 'espeigenval' , 'long' ) + Icompute_power_1Gate = compute_power_1.GetInPort( 'Gate' ) + Ocompute_power_1return = compute_power_1.OutPort( 'return' , 'long' ) + Ocompute_power_1Gate = compute_power_1.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyLoop = [] + PyLoop.append( 'def Loop(it,itMax): ' ) + PyLoop.append( ' return it,itMax ' ) + PyMoreLoop = [] + PyMoreLoop.append( 'def More(it,itMax): ' ) + PyMoreLoop.append( ' if it<=itMax : ' ) + PyMoreLoop.append( ' DoLoop=1 ' ) + PyMoreLoop.append( ' else: ' ) + PyMoreLoop.append( ' DoLoop=0 ' ) + PyMoreLoop.append( ' return DoLoop,it,itMax ' ) + PyNextLoop = [] + PyNextLoop.append( 'def Next(it,itMax): ' ) + PyNextLoop.append( ' it+=1 ' ) + PyNextLoop.append( ' return it,itMax ' ) + Loop,EndLoop = GraphBugEditor.LNode( 'Loop' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop ) + EndLoop.SetName( 'EndLoop' ) + EndLoop.SetAuthor( '' ) + EndLoop.SetComment( 'Compute Node' ) + EndLoop.Coords( 426 , 161 ) + PyEndLoop = [] + EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop ) + ILoopDoLoop = Loop.GetInPort( 'DoLoop' ) + ILoopit = Loop.InPort( 'it' , 'int' ) + ILoopitMax = Loop.InPort( 'itMax' , 'int' ) + ILoopGate = Loop.GetInPort( 'Gate' ) + OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) + OLoopit = Loop.GetOutPort( 'it' ) + OLoopitMax = Loop.GetOutPort( 'itMax' ) + IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' ) + IEndLoopit = EndLoop.GetInPort( 'it' ) + IEndLoopitMax = EndLoop.GetInPort( 'itMax' ) + IEndLoopGate = EndLoop.GetInPort( 'Gate' ) + OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' ) + OEndLoopit = EndLoop.GetOutPort( 'it' ) + OEndLoopitMax = EndLoop.GetOutPort( 'itMax' ) + OEndLoopGate = EndLoop.GetOutPort( 'Gate' ) + Loop.SetName( 'Loop' ) + Loop.SetAuthor( '' ) + Loop.SetComment( 'Compute Node' ) + Loop.Coords( 21 , 161 ) + + # Creation of Links + LLoopitEndLoopit = GraphBugEditor.Link( OLoopit , IEndLoopit ) + + LLoopitMaxEndLoopitMax = GraphBugEditor.Link( OLoopitMax , IEndLoopitMax ) + + LLoopGatecompute_power_1Gate = GraphBugEditor.Link( OLoopGate , Icompute_power_1Gate ) + + # Input datas + ILoopit.Input( 1 ) + ILoopitMax.Input( 5 ) + + # Input Ports of the graph + #Icompute_power_1nitermax = compute_power_1.GetInPort( 'nitermax' ) + #Icompute_power_1epsflux = compute_power_1.GetInPort( 'epsflux' ) + #Icompute_power_1espeigenval = compute_power_1.GetInPort( 'espeigenval' ) + + # Output Ports of the graph + #OEndLoopit = EndLoop.GetOutPort( 'it' ) + #OEndLoopitMax = EndLoop.GetOutPort( 'itMax' ) + #Ocompute_power_1return = compute_power_1.GetOutPort( 'return' ) + return GraphBugEditor + + +GraphBugEditor = DefGraphBugEditor() diff --git a/examples/GraphBugEditor.xml b/examples/GraphBugEditor.xml new file mode 100644 index 0000000..a2c82ca --- /dev/null +++ b/examples/GraphBugEditor.xml @@ -0,0 +1,207 @@ + + + + + +? + ? + GraphBugEditor + 1 + ? + +GraphBugEditor + + +int + Loop__it + +int + Loop__itMax + +long + compute_power_1__nitermax + +long + compute_power_1__epsflux + +long + compute_power_1__espeigenval + + +int + EndLoop__it + +int + EndLoop__itMax + +long + compute_power_1__return + + + 10/6/2005 - 11:33:49 + 7/7/2005 - 11:39:27 + 2.0 + Nicolas Crouzet & JR + ? + ? + 0 + 0 + + +? + ? + Loop + 4 + EndLoop + +Loop + + +int + it + +int + itMax + + +int + it + +int + itMax + + + +Loop + + + +More + + + + + + + +Next + + + + 7/7/2005 - 11:37:23 + 7/7/2005 - 11:37:23 + 2.0 + ? + ? + Compute Node + 21 + 161 + +? + ? + EndLoop + 5 + Loop + +EndLoop + + +int + it + +int + itMax + + +int + it + +int + itMax + + + +EndLoop + + 7/7/2005 - 11:37:23 + 7/7/2005 - 11:37:23 + 2.0 + ? + ? + Compute Node + 426 + 161 + +? + ? + compute_power_1 + 3 + ? + +compute_power_1 + + + + + +compute_power + + + 7/7/2005 - 11:38:24 + 7/7/2005 - 11:38:24 + 2.0 + ? + ? + Compute Node + 226 + 103 + + +Loop + DoLoop + EndLoop + DoLoop + + +Loop + it + EndLoop + it + + +Loop + itMax + EndLoop + itMax + + +Loop + Gate + compute_power_1 + Gate + + +EndLoop + DoLoop + Loop + DoLoop + + + +GraphBugEditor + Loop__it + Loop + it + +3 + 1 + + +GraphBugEditor + Loop__itMax + Loop + itMax + +3 + 5 + diff --git a/examples/GraphConvertObjRefCheckNotCompatible.py b/examples/GraphConvertObjRefCheckNotCompatible.py new file mode 100644 index 0000000..e81c268 --- /dev/null +++ b/examples/GraphConvertObjRefCheckNotCompatible.py @@ -0,0 +1,112 @@ + +# Generated python file of Graph GraphConvertObjRefCheckNotCompatible + +from SuperV import * + +# Graph creation of GraphConvertObjRefCheckNotCompatible +def DefGraphConvertObjRefCheckNotCompatible() : + GraphConvertObjRefCheckNotCompatible = Graph( 'GraphConvertObjRefCheckNotCompatible' ) + GraphConvertObjRefCheckNotCompatible.SetName( 'GraphConvertObjRefCheckNotCompatible' ) + GraphConvertObjRefCheckNotCompatible.SetAuthor( 'JR' ) + GraphConvertObjRefCheckNotCompatible.SetComment( 'Check conversions of ObjRef' ) + GraphConvertObjRefCheckNotCompatible.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + MiscTypes = GraphConvertObjRefCheckNotCompatible.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) + MiscTypes.SetName( 'MiscTypes' ) + MiscTypes.SetAuthor( '' ) + MiscTypes.SetContainer( 'localhost/FactoryServer' ) + MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) + MiscTypes.Coords( 284 , 28 ) + IMiscTypesInString = MiscTypes.GetInPort( 'InString' ) + IMiscTypesInBool = MiscTypes.GetInPort( 'InBool' ) + IMiscTypesInChar = MiscTypes.GetInPort( 'InChar' ) + IMiscTypesInShort = MiscTypes.GetInPort( 'InShort' ) + IMiscTypesInLong = MiscTypes.GetInPort( 'InLong' ) + IMiscTypesInFloat = MiscTypes.GetInPort( 'InFloat' ) + IMiscTypesInDouble = MiscTypes.GetInPort( 'InDouble' ) + IMiscTypesInObjRef = MiscTypes.GetInPort( 'InObjRef' ) + IMiscTypesGate = MiscTypes.GetInPort( 'Gate' ) + OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' ) + OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' ) + OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' ) + OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' ) + OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' ) + OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' ) + OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' ) + OMiscTypesOutObjRef = MiscTypes.GetOutPort( 'OutObjRef' ) + OMiscTypesGate = MiscTypes.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PySyrComponent = [] + PySyrComponent.append( 'from LifeCycleCORBA import * ' ) + PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) + PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) + PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) + PySyrComponent.append( ' print "SyrComponent orb",orb ' ) + PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) + PySyrComponent.append( ' print "SyrComponent lcc",lcc ' ) + PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) + PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) + PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef ' ) + PySyrComponent.append( ' return ComponentRef ' ) + PySyrComponent.append( '' ) + SyrComponent = GraphConvertObjRefCheckNotCompatible.INode( 'SyrComponent' , PySyrComponent ) + SyrComponent.SetName( 'SyrComponent' ) + SyrComponent.SetAuthor( 'JR' ) + SyrComponent.SetComment( 'InLine Node' ) + SyrComponent.Coords( 14 , 114 ) + ISyrComponentaContainer = SyrComponent.InPort( 'aContainer' , 'string' ) + ISyrComponentaComponent = SyrComponent.InPort( 'aComponent' , 'string' ) + ISyrComponentGate = SyrComponent.GetInPort( 'Gate' ) + OSyrComponentanObjRef = SyrComponent.OutPort( 'anObjRef' , 'objref' ) + OSyrComponentGate = SyrComponent.GetOutPort( 'Gate' ) + + PyObjRefToInline = [] + PyObjRefToInline.append( 'def ObjRefToInline(objRef): ' ) + PyObjRefToInline.append( ' return objRef ' ) + ObjRefToInline = GraphConvertObjRefCheckNotCompatible.INode( 'ObjRefToInline' , PyObjRefToInline ) + ObjRefToInline.SetName( 'ObjRefToInline' ) + ObjRefToInline.SetAuthor( '' ) + ObjRefToInline.SetComment( 'Compute Node' ) + ObjRefToInline.Coords( 496 , 168 ) + IObjRefToInlinetoInLine = ObjRefToInline.InPort( 'toInLine' , 'int' ) + IObjRefToInlineGate = ObjRefToInline.GetInPort( 'Gate' ) + OObjRefToInlineGate = ObjRefToInline.GetOutPort( 'Gate' ) + + # Creation of Links + LSyrComponentanObjRefMiscTypesInObjRef = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInObjRef ) + + LSyrComponentanObjRefMiscTypesInString = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInString ) + + LSyrComponentanObjRefMiscTypesInBool = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInBool ) + + LSyrComponentanObjRefMiscTypesInChar = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInChar ) + + LSyrComponentanObjRefMiscTypesInShort = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInShort ) + + LSyrComponentanObjRefMiscTypesInLong = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInLong ) + + LSyrComponentanObjRefMiscTypesInFloat = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInFloat ) + + LSyrComponentanObjRefMiscTypesInDouble = GraphConvertObjRefCheckNotCompatible.Link( OSyrComponentanObjRef , IMiscTypesInDouble ) + + LMiscTypesOutObjRefObjRefToInlinetoInLine = GraphConvertObjRefCheckNotCompatible.Link( OMiscTypesOutObjRef , IObjRefToInlinetoInLine ) + + # Input datas + ISyrComponentaContainer.Input( 'FactoryServerPy' ) + ISyrComponentaComponent.Input( 'SyrControlComponent' ) + + # Output Ports of the graph + #OMiscTypesOutString = MiscTypes.GetOutPort( 'OutString' ) + #OMiscTypesOutBool = MiscTypes.GetOutPort( 'OutBool' ) + #OMiscTypesOutChar = MiscTypes.GetOutPort( 'OutChar' ) + #OMiscTypesOutShort = MiscTypes.GetOutPort( 'OutShort' ) + #OMiscTypesOutLong = MiscTypes.GetOutPort( 'OutLong' ) + #OMiscTypesOutFloat = MiscTypes.GetOutPort( 'OutFloat' ) + #OMiscTypesOutDouble = MiscTypes.GetOutPort( 'OutDouble' ) + return GraphConvertObjRefCheckNotCompatible + + +GraphConvertObjRefCheckNotCompatible = DefGraphConvertObjRefCheckNotCompatible() diff --git a/examples/GraphConvertObjRefCheckNotCompatible.xml b/examples/GraphConvertObjRefCheckNotCompatible.xml new file mode 100644 index 0000000..4299d4e --- /dev/null +++ b/examples/GraphConvertObjRefCheckNotCompatible.xml @@ -0,0 +1,264 @@ + + + + + +? + ? + GraphConvertObjRefCheckNotCompatible + 1 + ? + +GraphConvertObjRefCheckNotCompatible + + +string + SyrComponent__aContainer + +string + SyrComponent__aComponent + + +string + MiscTypes__OutString + +boolean + MiscTypes__OutBool + +char + MiscTypes__OutChar + +short + MiscTypes__OutShort + +long + MiscTypes__OutLong + +float + MiscTypes__OutFloat + +double + MiscTypes__OutDouble + + + 30/7/2003 - 14:23:52 + 20/6/2005 - 11:34:50 + 1.04 + JR + ? + Check conversions of ObjRef + 0 + 0 + + +? + ? + SyrComponent + 3 + ? + +SyrComponent + + +string + aContainer + +string + aComponent + + +objref + anObjRef + + + +SyrComponent + + + + + + + + + + ",ComponentRef ]]> + + + 20/6/2005 - 11:31:43 + 20/6/2005 - 11:31:43 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 20/6/2005 - 11:31:43 + 20/6/2005 - 11:31:43 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + +? + ? + ObjRefToInline + 3 + ? + +ObjRefToInline + + +int + toInLine + + + + +ObjRefToInline + + + 20/6/2005 - 11:31:43 + 20/6/2005 - 11:31:43 + 2.0 + ? + ? + Compute Node + 496 + 168 + + +SyrComponent + anObjRef + MiscTypes + InObjRef + + +SyrComponent + anObjRef + MiscTypes + InString + + +SyrComponent + anObjRef + MiscTypes + InBool + + +SyrComponent + anObjRef + MiscTypes + InChar + + +SyrComponent + anObjRef + MiscTypes + InShort + + +SyrComponent + anObjRef + MiscTypes + InLong + + +SyrComponent + anObjRef + MiscTypes + InFloat + + +SyrComponent + anObjRef + MiscTypes + InDouble + + +MiscTypes + OutObjRef + ObjRefToInline + toInLine + + + +GraphConvertObjRefCheckNotCompatible + SyrComponent__aContainer + SyrComponent + aContainer + +18 + + + +GraphConvertObjRefCheckNotCompatible + SyrComponent__aComponent + SyrComponent + aComponent + +18 + + diff --git a/examples/GraphErrMsgs.py b/examples/GraphErrMsgs.py new file mode 100644 index 0000000..f1075b3 --- /dev/null +++ b/examples/GraphErrMsgs.py @@ -0,0 +1,1234 @@ +from SuperV import * + +GraphErrMsgs = Graph( "GraphErrMsgs" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/SyrStruct.xml' + +GraphErrMsgs.Import( anXmlFile ) + +exec GraphErrMsgs.ListNodes( 'GraphErrMsgs' ) +# ==> m3,m3incr,incra,div2,incrb,SyrComponent,forN,whileNotOne,fori,whileEven,EndOfforN,EndOfwhileNotOne,EndOffori,EndOfwhileEven,ifNotEven,EndOfifNotEven + +exec ifNotEven.ListPorts() +# ==> IifNotEvenSyrComponent,IifNotEvenN,IifNotEvenK,IifNotEvenGate,OifNotEvenOdd,OifNotEvenEven,OifNotEvenSyrComponent,OifNotEvenN,OifNotEvenK,OifNotEvenDefault + +exec EndOfifNotEven.ListPorts() +# ==> IEndOfifNotEvenN,IEndOfifNotEvenK,IEndOfifNotEvenDefault,OEndOfifNotEvenN,OEndOfifNotEvenK,OEndOfifNotEvenGate + +aLink = GraphErrMsgs.Link( OifNotEvenEven , IEndOfifNotEvenN ) +if aLink != None : + print "Error link from OifNotEvenEven to IEndOfifNotEvenN was created" + print "GraphErrMsgs test failed" + sys.exit(1) + +exec EndOfwhileEven.ListPorts() +# ==> IEndOfwhileEvenSyrComponent,IEndOfwhileEvenN,IEndOfwhileEvenK,IEndOfwhileEvenGate,OEndOfwhileEvenSyrComponent,OEndOfwhileEvenN,OEndOfwhileEvenK,OEndOfwhileEvenGate + +exec EndOffori.ListPorts() +# ==> IEndOfforii,IEndOfforiK,IEndOfforiGate,OEndOfforii,OEndOfforiK,OEndOfforiGate + +aLink = GraphErrMsgs.Link( OEndOfwhileEvenK , IEndOfifNotEvenK ) +aLink.destroy() + +aLink = GraphErrMsgs.Link( OEndOfforiK , IEndOfifNotEvenK ) +aLink.destroy() + +aLink = GraphErrMsgs.Link( OifNotEvenN , IEndOfifNotEvenK ) +if aLink == None : + print "Error link from OifNotEvenN to IEndOfifNotEvenK was not created" + print "GraphErrMsgs test failed" + sys.exit(1) + +exec whileEven.ListPorts() +# ==>IwhileEvenSyrComponent,IwhileEvenN,IwhileEvenK,IwhileEvenGate,OwhileEvenSyrComponent,OwhileEvenN,OwhileEvenK,OwhileEvenGate + +aLink = GraphErrMsgs.Link( OifNotEvenK , IwhileEvenK ) +aLink.destroy() + +aLink = GraphErrMsgs.Link( OifNotEvenOdd , IwhileEvenK ) +if aLink != None : + print "Error link from OifNotEvenOdd to IwhileEvenK was created" + print "GraphErrMsgs test failed" + sys.exit(1) + +aLink = GraphErrMsgs.Link( OifNotEvenDefault , IwhileEvenK ) +if aLink != None : + print "Error link from OifNotEvenDefault to IwhileEvenK was created" + print "GraphErrMsgs test failed" + sys.exit(1) + +exec div2.ListPorts() +# ==> Idiv2anEvenInteger,Idiv2Gate,Odiv2anInteger,Odiv2Gate + +aLink = GraphErrMsgs.Link( OwhileEvenN , Idiv2Gate ) +if aLink != None : + print "Error link from OwhileEvenN to Idiv2Gate was created" + print "GraphErrMsgs test failed" + sys.exit(1) + +print "GraphErrMsgs Errors Messages :" +print GraphErrMsgs.Messages() + +RunOk = GraphErrMsgs.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphErrMsgs test failed" + sys.exit(1) + +GraphErrMsgs.DoneW() + +print "GraphErrMsgs Errors Messages :" +print GraphErrMsgs.Messages() + + +from SuperV import * + +# GraphBadInputInLoop +GraphBadInputInLoop = Graph( "GraphBadInputInLoop" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop.xml' + +GraphBadInputInLoop.Import( anXmlFile ) + +RunOk = GraphBadInputInLoop.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadInputInLoop test failed" + sys.exit(1) + +GraphBadInputInLoop.DoneW() + +print "GraphBadInputInLoop Errors Messages :" +print GraphBadInputInLoop.Messages() + + + +from SuperV import * + +# GraphBadInputInLoop1 +GraphBadInputInLoop1 = Graph( "GraphBadInputInLoop1" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop1.xml' + +GraphBadInputInLoop1.Import( anXmlFile ) + +RunOk = GraphBadInputInLoop1.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadInputInLoop1 test failed" + sys.exit(1) + +GraphBadInputInLoop1.DoneW() + +print "GraphBadInputInLoop1 Errors Messages :" +print GraphBadInputInLoop1.Messages() + + + +from SuperV import * + +# GraphBadInputInLoop2 +GraphBadInputInLoop2 = Graph( "GraphBadInputInLoop2" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop2.xml' + +GraphBadInputInLoop2.Import( anXmlFile ) + +RunOk = GraphBadInputInLoop2.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadInputInLoop2 test failed" + sys.exit(1) + +GraphBadInputInLoop2.DoneW() + +print "GraphBadInputInLoop2 Errors Messages :" +print GraphBadInputInLoop2.Messages() + + + +from SuperV import * + +# GraphBadInputInLoop3 +GraphBadInputInLoop3 = Graph( "GraphBadInputInLoop3" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop3.xml' + +GraphBadInputInLoop3.Import( anXmlFile ) + +RunOk = GraphBadInputInLoop3.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadInputInLoop3 test failed" + sys.exit(1) + +GraphBadInputInLoop3.DoneW() + +print "GraphBadInputInLoop3 Errors Messages :" +print GraphBadInputInLoop3.Messages() + + + +from SuperV import * + +# GraphBadOutputOfLoop +GraphBadOutputOfLoop = Graph( "GraphBadOutputOfLoop" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadOutputOfLoop.xml' + +GraphBadOutputOfLoop.Import( anXmlFile ) + +RunOk = GraphBadOutputOfLoop.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadOutputOfLoop test failed" + sys.exit(1) + +GraphBadOutputOfLoop.DoneW() + +print "GraphBadOutputOfLoop Errors Messages :" +print GraphBadOutputOfLoop.Messages() + + + +from SuperV import * + +# GraphBadOutputOfLoop1 +GraphBadOutputOfLoop1 = Graph( "GraphBadOutputOfLoop1" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadOutputOfLoop1.xml' + +GraphBadOutputOfLoop1.Import( anXmlFile ) + +RunOk = GraphBadOutputOfLoop1.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadOutputOfLoop1 test failed" + sys.exit(1) + +GraphBadOutputOfLoop1.DoneW() + +print "GraphBadOutputOfLoop1 Errors Messages :" +print GraphBadOutputOfLoop1.Messages() + + + +from SuperV import * + +# GraphBadOutputOfLoop2 +GraphBadOutputOfLoop2 = Graph( "GraphBadOutputOfLoop2" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadOutputOfLoop2.xml' + +GraphBadOutputOfLoop2.Import( anXmlFile ) + +RunOk = GraphBadOutputOfLoop2.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphBadOutputOfLoop2 test failed" + sys.exit(1) + +GraphBadOutputOfLoop2.DoneW() + +print "GraphBadOutputOfLoop2 Errors Messages :" +print GraphBadOutputOfLoop2.Messages() + + + +from SuperV import * + +# GraphConvertObjRefCheckNotCompatible +GraphConvertObjRefCheckNotCompatible = Graph( "GraphConvertObjRefCheckNotCompatible" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphConvertObjRefCheckNotCompatible.xml' + +GraphConvertObjRefCheckNotCompatible.Import( anXmlFile ) + +RunOk = GraphConvertObjRefCheckNotCompatible.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphConvertObjRefCheckNotCompatible test failed" + sys.exit(1) + +GraphConvertObjRefCheckNotCompatible.DoneW() + +print "GraphConvertObjRefCheckNotCompatible Errors Messages :" +print GraphConvertObjRefCheckNotCompatible.Messages() + + + + +from SuperV import * + +# GraphWrongPythonFunctions +GraphWrongPythonFunctions = Graph( "GraphWrongPythonFunctions" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphWrongPythonFunctions.xml' + +GraphWrongPythonFunctions.Import( anXmlFile ) + +RunOk = GraphWrongPythonFunctions.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphWrongPythonFunctions test failed" + sys.exit(1) + +GraphWrongPythonFunctions.DoneW() + +print "GraphWrongPythonFunctions Errors Messages :" +print GraphWrongPythonFunctions.Messages() + + + +from SuperV import * + +# GraphWrongContainerOrComponent +GraphWrongContainerOrComponent = Graph( "GraphWrongContainerOrComponent" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphWrongContainerOrComponent.xml' + +GraphWrongContainerOrComponent.Import( anXmlFile ) + +RunOk = GraphWrongContainerOrComponent.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphWrongContainerOrComponent test failed" + sys.exit(1) + +GraphWrongContainerOrComponent.DoneW() + +print "GraphWrongContainerOrComponent Errors Messages :" +print GraphWrongContainerOrComponent.Messages() + + + +from SuperV import * + +# GraphLoopSwitchDefaultAborted +GraphLoopSwitchDefaultAborted = Graph( "GraphLoopSwitchDefaultAborted" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchDefaultAborted.xml' + +GraphLoopSwitchDefaultAborted.Import( anXmlFile ) + +RunOk = GraphLoopSwitchDefaultAborted.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopSwitchDefaultAborted test failed" + sys.exit(1) + +GraphLoopSwitchDefaultAborted.DoneW() + +print "GraphLoopSwitchDefaultAborted Errors Messages :" +print GraphLoopSwitchDefaultAborted.Messages() + + + +from SuperV import * + +# GraphLoopSwitchOfSwitchAborted +GraphLoopSwitchOfSwitchAborted = Graph( "GraphLoopSwitchOfSwitchAborted" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchOfSwitchAborted.xml' + +GraphLoopSwitchOfSwitchAborted.Import( anXmlFile ) + +RunOk = GraphLoopSwitchOfSwitchAborted.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopSwitchOfSwitchAborted test failed" + sys.exit(1) + +GraphLoopSwitchOfSwitchAborted.DoneW() + +print "GraphLoopSwitchOfSwitchAborted Errors Messages :" +print GraphLoopSwitchOfSwitchAborted.Messages() + + + +from SuperV import * + +# GraphLoopSwitchOfSwitchNOTValid +GraphLoopSwitchOfSwitchNOTValid = Graph( "GraphLoopSwitchOfSwitchNOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchOfSwitchNOTValid.xml' + +GraphLoopSwitchOfSwitchNOTValid.Import( anXmlFile ) + +RunOk = GraphLoopSwitchOfSwitchNOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphLoopSwitchOfSwitchNOTValid test failed" + sys.exit(1) + +GraphLoopSwitchOfSwitchNOTValid.DoneW() + +print "GraphLoopSwitchOfSwitchNOTValid Errors Messages :" +print GraphLoopSwitchOfSwitchNOTValid.Messages() + + +from SuperV import * + +# GraphLoopSwitchsAborted +GraphLoopSwitchsAborted = Graph( "GraphLoopSwitchsAborted" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchsAborted.xml' + +GraphLoopSwitchsAborted.Import( anXmlFile ) + +RunOk = GraphLoopSwitchsAborted.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopSwitchsAborted test failed" + sys.exit(1) + +GraphLoopSwitchsAborted.DoneW() + +print "GraphLoopSwitchsAborted Errors Messages :" +print GraphLoopSwitchsAborted.Messages() + + + +from SuperV import * + +# GraphLoopSwitchsBranchesDefaultAborted +GraphLoopSwitchsBranchesDefaultAborted = Graph( "GraphLoopSwitchsBranchesDefaultAborted" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchsBranchesDefaultAborted.xml' + +GraphLoopSwitchsBranchesDefaultAborted.Import( anXmlFile ) + +RunOk = GraphLoopSwitchsBranchesDefaultAborted.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopSwitchsBranchesDefaultAborted test failed" + sys.exit(1) + +GraphLoopSwitchsBranchesDefaultAborted.DoneW() + +print "GraphLoopSwitchsBranchesDefaultAborted Errors Messages :" +print GraphLoopSwitchsBranchesDefaultAborted.Messages() + + + +from SuperV import * + +# GraphLoopSwitchsNOTValid +GraphLoopSwitchsNOTValid = Graph( "GraphLoopSwitchsNOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchsNOTValid.xml' + +GraphLoopSwitchsNOTValid.Import( anXmlFile ) + +RunOk = GraphLoopSwitchsNOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphLoopSwitchsNOTValid test failed" + sys.exit(1) + +GraphLoopSwitchsNOTValid.DoneW() + +print "GraphLoopSwitchsNOTValid Errors Messages :" +print GraphLoopSwitchsNOTValid.Messages() + + +from SuperV import * + +# GraphSwitchCheckBranch2NOTValid +GraphSwitchCheckBranch2NOTValid = Graph( "GraphSwitchCheckBranch2NOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckBranch2NOTValid.xml' + +GraphSwitchCheckBranch2NOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchCheckBranch2NOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckBranch2NOTValid test failed" + sys.exit(1) + +GraphSwitchCheckBranch2NOTValid.DoneW() + +print "GraphSwitchCheckBranch2NOTValid Errors Messages :" +print GraphSwitchCheckBranch2NOTValid.Messages() + + +from SuperV import * + +# GraphSwitchCheckDefault1NOTValid +GraphSwitchCheckDefault1NOTValid = Graph( "GraphSwitchCheckDefault1NOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault1NOTValid.xml' + +GraphSwitchCheckDefault1NOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault1NOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault1NOTValid test failed" + sys.exit(1) + +GraphSwitchCheckDefault1NOTValid.DoneW() + +print "GraphSwitchCheckDefault1NOTValid Errors Messages :" +print GraphSwitchCheckDefault1NOTValid.Messages() + + +from SuperV import * + +# GraphSwitchCheckDefault2NOTValid +GraphSwitchCheckDefault2NOTValid = Graph( "GraphSwitchCheckDefault2NOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid.xml' + +GraphSwitchCheckDefault2NOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault2NOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault2NOTValid test failed" + sys.exit(1) + +GraphSwitchCheckDefault2NOTValid.DoneW() + +print "GraphSwitchCheckDefault2NOTValid Errors Messages :" +print GraphSwitchCheckDefault2NOTValid.Messages() + + +from SuperV import * + +# GraphSwitchCheckDefault2NOTValid1 +GraphSwitchCheckDefault2NOTValid1 = Graph( "GraphSwitchCheckDefault2NOTValid1" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid1.xml' + +GraphSwitchCheckDefault2NOTValid1.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault2NOTValid1.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault2NOTValid1 test failed" + sys.exit(1) + +GraphSwitchCheckDefault2NOTValid1.DoneW() + +print "GraphSwitchCheckDefault2NOTValid1 Errors Messages :" +print GraphSwitchCheckDefault2NOTValid1.Messages() + + +from SuperV import * + +# GraphSwitchCheckDefault2NOTValid2 +GraphSwitchCheckDefault2NOTValid2 = Graph( "GraphSwitchCheckDefault2NOTValid2" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid2.xml' + +GraphSwitchCheckDefault2NOTValid2.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault2NOTValid2.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault2NOTValid2 test failed" + sys.exit(1) + +GraphSwitchCheckDefault2NOTValid2.DoneW() + +print "GraphSwitchCheckDefault2NOTValid2 Errors Messages :" +print GraphSwitchCheckDefault2NOTValid2.Messages() + + +from SuperV import * + +# GraphSwitchCrash +GraphSwitchCrash = Graph( "GraphSwitchCrash" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCrash.xml' + +GraphSwitchCrash.Import( anXmlFile ) + +RunOk = GraphSwitchCrash.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSwitchCrash test failed" + sys.exit(1) + +GraphSwitchCrash.DoneW() + +print "GraphSwitchCrash Errors Messages :" +print GraphSwitchCrash.Messages() + + +from SuperV import * + +# GraphSwitchErrExec +GraphSwitchErrExec = Graph( "GraphSwitchErrExec" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchErrExec.xml' + +GraphSwitchErrExec.Import( anXmlFile ) + +RunOk = GraphSwitchErrExec.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSwitchErrExec test failed" + sys.exit(1) + +GraphSwitchErrExec.DoneW() + +print "GraphSwitchErrExec Errors Messages :" +print GraphSwitchErrExec.Messages() + + +from SuperV import * + +# GraphSwitchGatesNoDefaultAborted +GraphSwitchGatesNoDefaultAborted = Graph( "GraphSwitchGatesNoDefaultAborted" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchGatesNoDefaultAborted.xml' + +GraphSwitchGatesNoDefaultAborted.Import( anXmlFile ) + +RunOk = GraphSwitchGatesNoDefaultAborted.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSwitchGatesNoDefaultAborted test failed" + sys.exit(1) + +GraphSwitchGatesNoDefaultAborted.DoneW() + +print "GraphSwitchGatesNoDefaultAborted Errors Messages :" +print GraphSwitchGatesNoDefaultAborted.Messages() + + +from SuperV import * + +# GraphSwitchOutputNOTValid +GraphSwitchOutputNOTValid = Graph( "GraphSwitchOutputNOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchOutputNOTValid.xml' + +GraphSwitchOutputNOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchOutputNOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchOutputNOTValid test failed" + sys.exit(1) + +GraphSwitchOutputNOTValid.DoneW() + +print "GraphSwitchOutputNOTValid Errors Messages :" +print GraphSwitchOutputNOTValid.Messages() + + +from SuperV import * + +# GraphSyrControlAborted +GraphSyrControlAborted = Graph( "GraphSyrControlAborted" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAborted.xml' + +GraphSyrControlAborted.Import( anXmlFile ) + +RunOk = GraphSyrControlAborted.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSyrControlAborted test failed" + sys.exit(1) + +GraphSyrControlAborted.DoneW() + +print "GraphSyrControlAborted Errors Messages :" +print GraphSyrControlAborted.Messages() + + +from SuperV import * + +# GraphSyrControlAve +GraphSyrControlAve = Graph( "GraphSyrControlAve" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAve.xml' + +GraphSyrControlAve.Import( anXmlFile ) + +RunOk = GraphSyrControlAve.Run() +if RunOk == 0 : + print "Error : Success call to Run" + print "GraphSyrControlAve test failed" + sys.exit(1) + +GraphSyrControlAve.DoneW() + +Messages = GraphSyrControlAve.Messages() +if Messages != "" : + print "Error GraphSyrControlAve has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphSyrControlAveValid +GraphSyrControlAveValid = Graph( "GraphSyrControlAveValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveValid.xml' + +GraphSyrControlAveValid.Import( anXmlFile ) + +RunOk = GraphSyrControlAveValid.Run() +if RunOk == 0 : + print "Error : Success call to Run" + print "GraphSyrControlAveValid test failed" + sys.exit(1) + +GraphSyrControlAveValid.DoneW() + +Messages = GraphSyrControlAveValid.Messages() +if Messages != "" : + print "Error GraphSyrControlAveValid has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphSyrControlAveExecutable +GraphSyrControlAveExecutable = Graph( "GraphSyrControlAveExecutable" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveExecutable.xml' + +GraphSyrControlAveExecutable.Import( anXmlFile ) + +RunOk = GraphSyrControlAveExecutable.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSyrControlAveExecutable test failed" + sys.exit(1) + +GraphSyrControlAveExecutable.DoneW() + +Messages = GraphSyrControlAveExecutable.Messages() +if Messages != "" : + print "Error GraphSyrControlAveExecutable has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphSyrControlAveNOTValid +GraphSyrControlAveNOTValid = Graph( "GraphSyrControlAveNOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveNOTValid.xml' + +GraphSyrControlAveNOTValid.Import( anXmlFile ) + +RunOk = GraphSyrControlAveNOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSyrControlAveNOTValid test failed" + sys.exit(1) + +GraphSyrControlAveNOTValid.DoneW() + +print "GraphSyrControlAveNOTValid Errors Messages :" +print GraphSyrControlAveNOTValid.Messages() + + +from SuperV import * + +# GraphSyrControlAveNOTValid1 +GraphSyrControlAveNOTValid1 = Graph( "GraphSyrControlAveNOTValid1" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveNOTValid1.xml' + +GraphSyrControlAveNOTValid1.Import( anXmlFile ) + +RunOk = GraphSyrControlAveNOTValid1.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSyrControlAveNOTValid1 test failed" + sys.exit(1) + +GraphSyrControlAveNOTValid1.DoneW() + +print "GraphSyrControlAveNOTValid1 Errors Messages :" +print GraphSyrControlAveNOTValid1.Messages() + + +from SuperV import * + +# GraphSwitch +GraphSwitch = Graph( "GraphSwitch" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitch.xml' + +GraphSwitch.Import( anXmlFile ) + +RunOk = GraphSwitch.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSwitch test failed" + sys.exit(1) + +GraphSwitch.DoneW() + +Messages = GraphSwitch.Messages() +if Messages != "" : + print "Error GraphSwitch has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphSwitchExecutable +GraphSwitchExecutable = Graph( "GraphSwitchExecutable" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchExecutable.xml' + +GraphSwitchExecutable.Import( anXmlFile ) + +RunOk = GraphSwitchExecutable.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSwitchExecutable test failed" + sys.exit(1) + +GraphSwitchExecutable.DoneW() + +Messages = GraphSwitchExecutable.Messages() +if Messages != "" : + print "Error GraphSwitchExecutable has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphSwitchNOTExecutable +GraphSwitchNOTExecutable = Graph( "GraphSwitchNOTExecutable" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchNOTExecutable.xml' + +GraphSwitchNOTExecutable.Import( anXmlFile ) + +RunOk = GraphSwitchNOTExecutable.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchNOTExecutable test failed" + sys.exit(1) + +GraphSwitchNOTExecutable.DoneW() + +print "GraphSwitchNOTExecutable Errors Messages :" +print GraphSwitchNOTExecutable.Messages() + + +from SuperV import * + +# GraphSwitchNOTExecutable1 +GraphSwitchNOTExecutable1 = Graph( "GraphSwitchNOTExecutable1" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchNOTExecutable1.xml' + +GraphSwitchNOTExecutable1.Import( anXmlFile ) + +RunOk = GraphSwitchNOTExecutable1.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchNOTExecutable1 test failed" + sys.exit(1) + +GraphSwitchNOTExecutable1.DoneW() + +print "GraphSwitchNOTExecutable1 Errors Messages :" +print GraphSwitchNOTExecutable1.Messages() + + + +from SuperV import * + +# GraphSwitchNOTExecutable2 +GraphSwitchNOTExecutable2 = Graph( "GraphSwitchNOTExecutable2" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchNOTExecutable2.xml' + +GraphSwitchNOTExecutable2.Import( anXmlFile ) + +RunOk = GraphSwitchNOTExecutable2.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchNOTExecutable2 test failed" + sys.exit(1) + +GraphSwitchNOTExecutable2.DoneW() + +print "GraphSwitchNOTExecutable2 Errors Messages :" +print GraphSwitchNOTExecutable2.Messages() + + + +from SuperV import * + +# GraphSwitchBranchGates +GraphSwitchBranchGates = Graph( "GraphSwitchBranchGates" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchBranchGates.xml' + +GraphSwitchBranchGates.Import( anXmlFile ) + +RunOk = GraphSwitchBranchGates.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphSwitchBranchGates test failed" + sys.exit(1) + +GraphSwitchBranchGates.DoneW() + +Messages = GraphSwitchBranchGates.Messages() +if Messages != "" : + print "Error GraphSwitchBranchGates has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphInLinesUnValid +GraphInLinesUnValid = Graph( "GraphInLinesUnValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphInLinesUnValid.xml' + +GraphInLinesUnValid.Import( anXmlFile ) + +RunOk = GraphInLinesUnValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphInLinesUnValid test failed" + sys.exit(1) + +GraphInLinesUnValid.DoneW() + +print "GraphInLinesUnValid Errors Messages :" +print GraphInLinesUnValid.Messages() + + + +from SuperV import * + +# GraphSwitchCheckBranch2NOTValid +GraphSwitchCheckBranch2NOTValid = Graph( "GraphSwitchCheckBranch2NOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckBranch2NOTValid.xml' + +GraphSwitchCheckBranch2NOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchCheckBranch2NOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckBranch2NOTValid test failed" + sys.exit(1) + +GraphSwitchCheckBranch2NOTValid.DoneW() + +print "GraphSwitchCheckBranch2NOTValid Errors Messages :" +print GraphSwitchCheckBranch2NOTValid.Messages() + + + +from SuperV import * + +# GraphSwitchCheckDefault1NOTValid +GraphSwitchCheckDefault1NOTValid = Graph( "GraphSwitchCheckDefault1NOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault1NOTValid.xml' + +GraphSwitchCheckDefault1NOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault1NOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault1NOTValid test failed" + sys.exit(1) + +GraphSwitchCheckDefault1NOTValid.DoneW() + +print "GraphSwitchCheckDefault1NOTValid Errors Messages :" +print GraphSwitchCheckDefault1NOTValid.Messages() + + +from SuperV import * + +# GraphSwitchCheckDefault2NOTValid +GraphSwitchCheckDefault2NOTValid = Graph( "GraphSwitchCheckDefault2NOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid.xml' + +GraphSwitchCheckDefault2NOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault2NOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault2NOTValid test failed" + sys.exit(1) + +GraphSwitchCheckDefault2NOTValid.DoneW() + +print "GraphSwitchCheckDefault2NOTValid Errors Messages :" +print GraphSwitchCheckDefault2NOTValid.Messages() + + + + +from SuperV import * + +# GraphSwitchCheckDefault2NOTValid1 +GraphSwitchCheckDefault2NOTValid1 = Graph( "GraphSwitchCheckDefault2NOTValid1" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid1.xml' + +GraphSwitchCheckDefault2NOTValid1.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault2NOTValid1.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault2NOTValid1 test failed" + sys.exit(1) + +GraphSwitchCheckDefault2NOTValid1.DoneW() + +print "GraphSwitchCheckDefault2NOTValid1 Errors Messages :" +print GraphSwitchCheckDefault2NOTValid1.Messages() + + + +from SuperV import * + +# GraphSwitchCheckDefault2NOTValid2 +GraphSwitchCheckDefault2NOTValid2 = Graph( "GraphSwitchCheckDefault2NOTValid2" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid2.xml' + +GraphSwitchCheckDefault2NOTValid2.Import( anXmlFile ) + +RunOk = GraphSwitchCheckDefault2NOTValid2.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchCheckDefault2NOTValid2 test failed" + sys.exit(1) + +GraphSwitchCheckDefault2NOTValid2.DoneW() + +print "GraphSwitchCheckDefault2NOTValid2 Errors Messages :" +print GraphSwitchCheckDefault2NOTValid2.Messages() + + +from SuperV import * + +# GraphLoopsCoupled +GraphLoopsCoupled = Graph( "GraphLoopsCoupled" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopsCoupled.xml' + +GraphLoopsCoupled.Import( anXmlFile ) + +RunOk = GraphLoopsCoupled.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphLoopsCoupled test failed" + sys.exit(1) + +GraphLoopsCoupled.DoneW() + +print "GraphLoopsCoupled Errors Messages :" +print GraphLoopsCoupled.Messages() + + +from SuperV import * + +# GraphLoopGates +GraphLoopGates = Graph( "GraphLoopGates" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopGates.xml' + +GraphLoopGates.Import( anXmlFile ) + +RunOk = GraphLoopGates.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopGates test failed" + sys.exit(1) + +GraphLoopGates.DoneW() + +Messages = GraphSwitchBranchGates.Messages() +if Messages != "" : + print "Error GraphSwitchBranchGates has Messages :" + print Messages + sys.exit(1) + + + +from SuperV import * + +# GraphLoopGatesNOTValid +GraphLoopGatesNOTValid = Graph( "GraphLoopGatesNOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopGatesNOTValid.xml' + +GraphLoopGatesNOTValid.Import( anXmlFile ) + +RunOk = GraphLoopGatesNOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphLoopGatesNOTValid test failed" + sys.exit(1) + +GraphLoopGatesNOTValid.DoneW() + +print "GraphLoopGatesNOTValid Errors Messages :" +print GraphLoopGatesNOTValid.Messages() + + +from SuperV import * + +# GraphSwitchManyCases +GraphSwitchManyCases = Graph( "GraphSwitchManyCases" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchManyCases.xml' + +GraphSwitchManyCases.Import( anXmlFile ) + +RunOk = GraphSwitchManyCases.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchManyCases test failed" + sys.exit(1) + +GraphSwitchManyCases.DoneW() + +print "GraphSwitchManyCases Errors Messages :" +print GraphSwitchManyCases.Messages() + + + +from SuperV import * + +# GraphLoopTwoBranches +GraphLoopTwoBranches = Graph( "GraphLoopTwoBranches" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopTwoBranches.xml' + +GraphLoopTwoBranches.Import( anXmlFile ) + +RunOk = GraphLoopTwoBranches.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopTwoBranches test failed" + sys.exit(1) + +GraphLoopTwoBranches.DoneW() + +print "GraphLoopTwoBranches Errors Messages :" +print GraphLoopTwoBranches.Messages() + + + +from SuperV import * + +# GraphSwitchOutputNOTValid +GraphSwitchOutputNOTValid = Graph( "GraphSwitchOutputNOTValid" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchOutputNOTValid.xml' + +GraphSwitchOutputNOTValid.Import( anXmlFile ) + +RunOk = GraphSwitchOutputNOTValid.Run() +if RunOk != 0 : + print "Error : Success call to Run" + print "GraphSwitchOutputNOTValid test failed" + sys.exit(1) + +GraphSwitchOutputNOTValid.DoneW() + +print "GraphSwitchOutputNOTValid Errors Messages :" +print GraphSwitchOutputNOTValid.Messages() + + + +from SuperV import * + +# GraphLoopSwitch +GraphLoopSwitch = Graph( "GraphLoopSwitch" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitch.xml' + +GraphLoopSwitch.Import( anXmlFile ) + +RunOk = GraphLoopSwitch.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopSwitch test failed" + sys.exit(1) + +GraphLoopSwitch.DoneW() + +Messages = GraphLoopSwitch.Messages() +if Messages != "" : + print "Error GraphLoopSwitch has Messages :" + print Messages + sys.exit(1) + + + +from SuperV import * + +# GraphLoopSwitchGateDefault +GraphLoopSwitchGateDefault = Graph( "GraphLoopSwitchGateDefault" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchGateDefault.xml' + +GraphLoopSwitchGateDefault.Import( anXmlFile ) + +RunOk = GraphLoopSwitchGateDefault.Run() +if RunOk == 0 : + print "Error : UnSuccess call to Run" + print "GraphLoopSwitchGateDefault test failed" + sys.exit(1) + +GraphLoopSwitchGateDefault.DoneW() + +Messages = GraphLoopSwitchGateDefault.Messages() +if Messages != "" : + print "Error GraphLoopSwitchGateDefault has Messages :" + print Messages + sys.exit(1) + + +from SuperV import * + +# GraphLoopSwitchGatesDefault +GraphLoopSwitchGatesDefault = Graph( "GraphLoopSwitchGatesDefault" ) + +anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchGatesDefault.xml' + +GraphLoopSwitchGatesDefault.Import( anXmlFile ) + +RunOk = GraphLoopSwitchGatesDefault.Run() +if RunOk == 1 : + print "Error : Success call to Run" + print "GraphLoopSwitchGatesDefault test failed" + sys.exit(1) + +GraphLoopSwitchGatesDefault.DoneW() + +print "GraphLoopSwitchGatesDefault Errors Messages :" +print GraphLoopSwitchGatesDefault.Messages() + + + + + +sys.exit(0) + diff --git a/examples/GraphLoopGatesNOTValid.py b/examples/GraphLoopGatesNOTValid.py new file mode 100644 index 0000000..877331e --- /dev/null +++ b/examples/GraphLoopGatesNOTValid.py @@ -0,0 +1,179 @@ + +# Generated python file of Graph GraphLoopGatesNOTValid + +from SuperV import * + +# Graph creation of GraphLoopGatesNOTValid +def DefGraphLoopGatesNOTValid() : + GraphLoopGatesNOTValid = Graph( 'GraphLoopGatesNOTValid' ) + GraphLoopGatesNOTValid.SetName( 'GraphLoopGatesNOTValid' ) + GraphLoopGatesNOTValid.SetAuthor( 'JR' ) + GraphLoopGatesNOTValid.SetComment( '' ) + GraphLoopGatesNOTValid.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphLoopGatesNOTValid.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'localhost/FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 248 , 70 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + Add_1 = GraphLoopGatesNOTValid.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add_1.SetName( 'Add_1' ) + Add_1.SetAuthor( '' ) + Add_1.SetContainer( 'localhost/FactoryServer' ) + Add_1.SetComment( 'Add from AddComponent' ) + Add_1.Coords( 249 , 305 ) + IAdd_1x = Add_1.GetInPort( 'x' ) + IAdd_1y = Add_1.GetInPort( 'y' ) + IAdd_1Gate = Add_1.GetInPort( 'Gate' ) + OAdd_1FuncValue = Add_1.GetOutPort( 'FuncValue' ) + OAdd_1z = Add_1.GetOutPort( 'z' ) + OAdd_1Gate = Add_1.GetOutPort( 'Gate' ) + + Sub = GraphLoopGatesNOTValid.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'localhost/FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 453 , 72 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + Sub_1 = GraphLoopGatesNOTValid.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub_1.SetName( 'Sub_1' ) + Sub_1.SetAuthor( '' ) + Sub_1.SetContainer( 'localhost/FactoryServer' ) + Sub_1.SetComment( 'Sub from SubComponent' ) + Sub_1.Coords( 455 , 304 ) + ISub_1x = Sub_1.GetInPort( 'x' ) + ISub_1y = Sub_1.GetInPort( 'y' ) + ISub_1Gate = Sub_1.GetInPort( 'Gate' ) + OSub_1z = Sub_1.GetOutPort( 'z' ) + OSub_1Gate = Sub_1.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PyGate = [] + PyGate.append( 'from time import * ' ) + PyGate.append( 'def Gate(G1,G2) : ' ) + PyGate.append( ' sleep(1) ' ) + PyGate.append( ' return G1&G2 ' ) + Gate = GraphLoopGatesNOTValid.INode( 'Gate' , PyGate ) + Gate.SetName( 'Gate' ) + Gate.SetAuthor( '' ) + Gate.SetComment( 'Compute Node' ) + Gate.Coords( 650 , 227 ) + IGateG1 = Gate.InPort( 'G1' , 'long' ) + IGateG2 = Gate.InPort( 'G2' , 'long' ) + IGateGate = Gate.GetInPort( 'Gate' ) + OGateG = Gate.OutPort( 'G' , 'long' ) + OGateGate = Gate.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInit = [] + PyInit.append( 'from time import * ' ) + PyInit.append( 'def Init(Index,Min,Max) : ' ) + PyInit.append( ' Index = Min ' ) + PyInit.append( ' sleep(1) ' ) + PyInit.append( ' return Index,Min,Max ' ) + PyMoreInit = [] + PyMoreInit.append( 'def More(Index,Min,Max) : ' ) + PyMoreInit.append( ' if Index < Max : ' ) + PyMoreInit.append( ' DoLoop = 1 ' ) + PyMoreInit.append( ' else : ' ) + PyMoreInit.append( ' DoLoop = 0 ' ) + PyMoreInit.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInit = [] + PyNextInit.append( 'def Next(Index,Min,Max) : ' ) + PyNextInit.append( ' Index = Index + 1 ' ) + PyNextInit.append( ' return Index,Min,Max ' ) + Init,EndInit = GraphLoopGatesNOTValid.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + EndInit.SetName( 'EndInit' ) + EndInit.SetAuthor( '' ) + EndInit.SetComment( 'Compute Node' ) + EndInit.Coords( 840 , 204 ) + PyEndInit = [] + EndInit.SetPyFunction( 'EndInit' , PyEndInit ) + IInitDoLoop = Init.GetInPort( 'DoLoop' ) + IInitIndex = Init.InPort( 'Index' , 'long' ) + IInitMin = Init.InPort( 'Min' , 'long' ) + IInitMax = Init.InPort( 'Max' , 'long' ) + IInitGate = Init.GetInPort( 'Gate' ) + OInitDoLoop = Init.GetOutPort( 'DoLoop' ) + OInitIndex = Init.GetOutPort( 'Index' ) + OInitMin = Init.GetOutPort( 'Min' ) + OInitMax = Init.GetOutPort( 'Max' ) + IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' ) + IEndInitIndex = EndInit.GetInPort( 'Index' ) + IEndInitMin = EndInit.GetInPort( 'Min' ) + IEndInitMax = EndInit.GetInPort( 'Max' ) + IEndInitGate = EndInit.GetInPort( 'Gate' ) + OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' ) + OEndInitGate = EndInit.GetOutPort( 'Gate' ) + OEndInitIndex = EndInit.GetOutPort( 'Index' ) + OEndInitMin = EndInit.GetOutPort( 'Min' ) + OEndInitMax = EndInit.GetOutPort( 'Max' ) + Init.SetName( 'Init' ) + Init.SetAuthor( '' ) + Init.SetComment( 'Compute Node' ) + Init.Coords( 10 , 181 ) + + # Creation of Links + LInitGateAdd_1Gate = GraphLoopGatesNOTValid.Link( OInitGate , IAdd_1Gate ) + + LInitGateAddGate = GraphLoopGatesNOTValid.Link( OInitGate , IAddGate ) + + LInitIndexEndInitIndex = GraphLoopGatesNOTValid.Link( OInitIndex , IEndInitIndex ) + + LInitMinEndInitMin = GraphLoopGatesNOTValid.Link( OInitMin , IEndInitMin ) + + LInitMaxEndInitMax = GraphLoopGatesNOTValid.Link( OInitMax , IEndInitMax ) + + LAddGateSubGate = GraphLoopGatesNOTValid.Link( OAddGate , ISubGate ) + + LAdd_1GateSub_1Gate = GraphLoopGatesNOTValid.Link( OAdd_1Gate , ISub_1Gate ) + + LSubGateGateG1 = GraphLoopGatesNOTValid.Link( OSubGate , IGateG1 ) + + LSub_1GateGateG2 = GraphLoopGatesNOTValid.Link( OSub_1Gate , IGateG2 ) + + LGateGEndInitGate = GraphLoopGatesNOTValid.Link( OGateG , IEndInitGate ) + + # Input datas + IInitIndex.Input( 0 ) + IInitMin.Input( 5 ) + IInitMax.Input( 13 ) + IAddx.Input( 1 ) + IAddy.Input( 2 ) + IAdd_1x.Input( 3 ) + IAdd_1y.Input( 4 ) + ISubx.Input( 5 ) + ISuby.Input( 6 ) + ISub_1x.Input( 7 ) + ISub_1y.Input( 8 ) + + # Output Ports of the graph + #OEndInitIndex = EndInit.GetOutPort( 'Index' ) + #OEndInitMin = EndInit.GetOutPort( 'Min' ) + #OEndInitMax = EndInit.GetOutPort( 'Max' ) + #OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + #OAddz = Add.GetOutPort( 'z' ) + #OAdd_1FuncValue = Add_1.GetOutPort( 'FuncValue' ) + #OAdd_1z = Add_1.GetOutPort( 'z' ) + #OSubz = Sub.GetOutPort( 'z' ) + #OSub_1z = Sub_1.GetOutPort( 'z' ) + return GraphLoopGatesNOTValid + + +GraphLoopGatesNOTValid = DefGraphLoopGatesNOTValid() diff --git a/examples/GraphLoopGatesNOTValid.xml b/examples/GraphLoopGatesNOTValid.xml new file mode 100644 index 0000000..8fd11c6 --- /dev/null +++ b/examples/GraphLoopGatesNOTValid.xml @@ -0,0 +1,514 @@ + + + + + +? + ? + GraphLoopGatesNOTValid + 1 + ? + +GraphLoopsGates + + +long + Init__Index + +long + Init__Min + +long + Init__Max + +double + Add__x + +double + Add__y + +double + Add_1__x + +double + Add_1__y + +double + Sub__x + +double + Sub__y + +double + Sub_1__x + +double + Sub_1__y + + +long + EndInit__Index + +long + EndInit__Min + +long + EndInit__Max + +double + Add__FuncValue + +double + Add__z + +double + Add_1__FuncValue + +double + Add_1__z + +double + Sub__z + +double + Sub_1__z + + + 7/1/2005 - 16:57:1 + 7/1/2005 - 17:8:8 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + Init + 4 + EndInit + +Init + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +Init + + + + + + +More + + + + + + + +Next + + + + 7/1/2005 - 16:59:3 + 7/1/2005 - 16:59:3 + 2.0 + ? + ? + Compute Node + 10 + 181 + +? + ? + EndInit + 5 + Init + +EndInit + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndInit + + 7/1/2005 - 16:59:3 + 7/1/2005 - 16:59:3 + 2.0 + ? + ? + Compute Node + 840 + 204 + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 7/1/2005 - 17:3:59 + 7/1/2005 - 17:3:59 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 248 + 70 + +AddComponent + AddComponent + Add_1 + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 7/1/2005 - 17:4:5 + 7/1/2005 - 17:4:5 + 2.0 + ? + localhost/FactoryServer + Add from AddComponent + 249 + 305 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 7/1/2005 - 17:4:31 + 7/1/2005 - 17:4:31 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 453 + 72 + +SubComponent + SubComponent + Sub_1 + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 7/1/2005 - 17:4:32 + 7/1/2005 - 17:4:32 + 2.0 + ? + localhost/FactoryServer + Sub from SubComponent + 455 + 304 + +? + ? + Gate + 3 + ? + +Gate + + +long + G1 + +long + G2 + + +long + G + + + +Gate + + + + + 7/1/2005 - 17:7:9 + 7/1/2005 - 17:7:9 + 2.0 + ? + ? + Compute Node + 650 + 227 + + +Init + DoLoop + EndInit + DoLoop + + +Init + Gate + Add_1 + Gate + + +Init + Gate + Add + Gate + + +Init + Index + EndInit + Index + + +Init + Min + EndInit + Min + + +Init + Max + EndInit + Max + + +EndInit + DoLoop + Init + DoLoop + + +Add + Gate + Sub + Gate + + +Add_1 + Gate + Sub_1 + Gate + + +Sub + Gate + Gate + G1 + + +Sub_1 + Gate + Gate + G2 + + +Gate + G + EndInit + Gate + + + +GraphLoopGatesNOTValid + Init__Index + Init + Index + +3 + 0 + + +GraphLoopGatesNOTValid + Init__Min + Init + Min + +3 + 5 + + +GraphLoopGatesNOTValid + Init__Max + Init + Max + +3 + 13 + + +GraphLoopGatesNOTValid + Add__x + Add + x + +7 + 1 + + +GraphLoopGatesNOTValid + Add__y + Add + y + +7 + 2 + + +GraphLoopGatesNOTValid + Add_1__x + Add_1 + x + +7 + 3 + + +GraphLoopGatesNOTValid + Add_1__y + Add_1 + y + +7 + 4 + + +GraphLoopGatesNOTValid + Sub__x + Sub + x + +7 + 5 + + +GraphLoopGatesNOTValid + Sub__y + Sub + y + +7 + 6 + + +GraphLoopGatesNOTValid + Sub_1__x + Sub_1 + x + +7 + 7 + + +GraphLoopGatesNOTValid + Sub_1__y + Sub_1 + y + +7 + 8 + diff --git a/examples/GraphLoopSwitchGateDefault.py b/examples/GraphLoopSwitchGateDefault.py new file mode 100644 index 0000000..c2be5ff --- /dev/null +++ b/examples/GraphLoopSwitchGateDefault.py @@ -0,0 +1,165 @@ + +# Generated python file of Graph GraphLoopSwitchGateDefault + +from SuperV import * + +# Graph creation of GraphLoopSwitchGateDefault +def DefGraphLoopSwitchGateDefault() : + GraphLoopSwitchGateDefault = Graph( 'GraphLoopSwitchGateDefault' ) + GraphLoopSwitchGateDefault.SetName( 'GraphLoopSwitchGateDefault' ) + GraphLoopSwitchGateDefault.SetAuthor( 'JR' ) + GraphLoopSwitchGateDefault.SetComment( '' ) + GraphLoopSwitchGateDefault.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 (GraphLoopSwitch1)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphLoopSwitchGateDefault.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 397 , 1 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + PyValEven = [] + PyValEven.append( 'from time import * ' ) + PyValEven.append( 'def ValEven(Even) : ' ) + PyValEven.append( ' sleep(1) ' ) + PyValEven.append( ' return Even ' ) + PyValEven.append( '' ) + ValEven = GraphLoopSwitchGateDefault.INode( 'ValEven' , PyValEven ) + ValEven.SetName( 'ValEven' ) + ValEven.SetAuthor( '' ) + ValEven.SetComment( 'Compute Node' ) + ValEven.Coords( 396 , 222 ) + IValEvenEven = ValEven.InPort( 'Even' , 'long' ) + IValEvenGate = ValEven.GetInPort( 'Gate' ) + OValEvenEven = ValEven.OutPort( 'Even' , 'long' ) + OValEvenGate = ValEven.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoop = [] + PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoop.append( ' Index = Min ' ) + PyInitLoop.append( ' return Index,Min,Max ' ) + PyInitLoop.append( '' ) + PyMoreInitLoop = [] + PyMoreInitLoop.append( '' ) + PyNextInitLoop = [] + PyNextInitLoop.append( '' ) + InitLoop,EndOfInitLoop = GraphLoopSwitchGateDefault.LNode( 'InitLoop' , PyInitLoop , '' , PyMoreInitLoop , '' , PyNextInitLoop ) + EndOfInitLoop.SetName( 'EndOfInitLoop' ) + EndOfInitLoop.SetAuthor( '' ) + EndOfInitLoop.SetComment( 'Compute Node' ) + EndOfInitLoop.Coords( 767 , 102 ) + PyEndOfInitLoop = [] + PyEndOfInitLoop.append( 'def EndOfInitLoop( DoLoop , Index , Min , Max ) :' ) + PyEndOfInitLoop.append( ' Index = Index + 1 ' ) + PyEndOfInitLoop.append( ' if Index <= Max : ' ) + PyEndOfInitLoop.append( ' DoLoop = 1 ' ) + PyEndOfInitLoop.append( ' else : ' ) + PyEndOfInitLoop.append( ' DoLoop = 0 ' ) + PyEndOfInitLoop.append( ' return DoLoop,Index,Min,Max ' ) + EndOfInitLoop.SetPyFunction( 'EndOfInitLoop' , 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 , 108 ) + + # 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,EndSwitch = GraphLoopSwitchGateDefault.SNode( 'Switch' , PySwitch ) + EndSwitch.SetName( 'EndSwitch' ) + EndSwitch.SetAuthor( '' ) + EndSwitch.SetComment( 'Compute Node' ) + EndSwitch.Coords( 587 , 103 ) + PyEndSwitch = [] + PyEndSwitch.append( 'def EndSwitch(a,Even) : ' ) + PyEndSwitch.append( ' sleep(1) ' ) + PyEndSwitch.append( ' return a ' ) + EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) + IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) + IEndSwitchEven = EndSwitch.InPort( 'Even' , 'long' ) + IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) + OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' ) + OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 194 , 109 ) + 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 + LIsOddaEndSwitcha = GraphLoopSwitchGateDefault.Link( OIsOdda , IEndSwitcha ) + + LIsOddGateEndSwitchDefault = GraphLoopSwitchGateDefault.Link( OIsOddGate , IEndSwitchDefault ) + + LInitLoopIndexSwitcha = GraphLoopSwitchGateDefault.Link( OInitLoopIndex , ISwitcha ) + + LInitLoopMinEndOfInitLoopMin = GraphLoopSwitchGateDefault.Link( OInitLoopMin , IEndOfInitLoopMin ) + + LInitLoopMaxEndOfInitLoopMax = GraphLoopSwitchGateDefault.Link( OInitLoopMax , IEndOfInitLoopMax ) + + LSwitchOddIsOddGate = GraphLoopSwitchGateDefault.Link( OSwitchOdd , IIsOddGate ) + + LSwitchEvenValEvenEven = GraphLoopSwitchGateDefault.Link( OSwitchEven , IValEvenEven ) + + LSwitchaIsOdda = GraphLoopSwitchGateDefault.Link( OSwitcha , IIsOdda ) + + LSwitchDefaultEndSwitchDefault = GraphLoopSwitchGateDefault.Link( OSwitchDefault , IEndSwitchDefault ) + + LEndSwitchaEndOfInitLoopIndex = GraphLoopSwitchGateDefault.Link( OEndSwitcha , IEndOfInitLoopIndex ) + + LValEvenEvenEndSwitchEven = GraphLoopSwitchGateDefault.Link( OValEvenEven , IEndSwitchEven ) + + # Input datas + IInitLoopIndex.Input( 0 ) + IInitLoopMin.Input( 5 ) + IInitLoopMax.Input( 23 ) + + # Output Ports of the graph + #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + return GraphLoopSwitchGateDefault + + +GraphLoopSwitchGateDefault = DefGraphLoopSwitchGateDefault() diff --git a/examples/GraphLoopSwitchGateDefault.xml b/examples/GraphLoopSwitchGateDefault.xml new file mode 100644 index 0000000..814b2c9 --- /dev/null +++ b/examples/GraphLoopSwitchGateDefault.xml @@ -0,0 +1,386 @@ + + + + + +? + ? + GraphLoopSwitchGateDefault + 1 + ? + +GraphLoopSwitchGateDefault + + +long + InitLoop__Index + +long + InitLoop__Min + +long + InitLoop__Max + + +long + EndOfInitLoop__Index + +long + EndOfInitLoop__Min + +long + EndOfInitLoop__Max + + + 22/10/2003 - 10:36:39 + 6/7/2005 - 16:30:40 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 6/7/2005 - 16:27:18 + 6/7/2005 - 16:27:18 + 1.05 + ? + ? + Python function + 397 + 1 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + + +? + + +? + + 6/7/2005 - 16:27:18 + 6/7/2005 - 16:27:18 + 1.05 + ? + ? + Compute Node + 10 + 108 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoop + + + + + + + + 6/7/2005 - 16:27:18 + 6/7/2005 - 16:27:18 + 1.05 + ? + ? + Compute Node + 767 + 102 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 6/7/2005 - 16:27:18 + 6/7/2005 - 16:27:18 + 1.05 + ? + ? + Compute Node + 194 + 109 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + +long + Even + + +long + a + + + +EndSwitch + + + + 6/7/2005 - 16:27:18 + 6/7/2005 - 16:27:18 + 1.05 + ? + ? + Compute Node + 587 + 103 + +? + ? + ValEven + 3 + ? + +ValEven + + +long + Even + + +long + Even + + + +ValEven + + + + + + 6/7/2005 - 16:27:18 + 6/7/2005 - 16:27:18 + 2.0 + ? + ? + Compute Node + 396 + 222 + + +IsOdd + a + EndSwitch + a + + +IsOdd + Gate + EndSwitch + Default + + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + Even + ValEven + Even + + +Switch + a + IsOdd + a + + +Switch + Default + EndSwitch + Default + + +EndSwitch + a + EndOfInitLoop + Index + + +ValEven + Even + EndSwitch + Even + + + +GraphLoopSwitchGateDefault + InitLoop__Index + InitLoop + Index + +3 + 0 + + +GraphLoopSwitchGateDefault + InitLoop__Min + InitLoop + Min + +3 + 5 + + +GraphLoopSwitchGateDefault + InitLoop__Max + InitLoop + Max + +3 + 23 + diff --git a/examples/GraphLoopSwitchGatesDefaultNOTValid.py b/examples/GraphLoopSwitchGatesDefaultNOTValid.py new file mode 100644 index 0000000..1a3914e --- /dev/null +++ b/examples/GraphLoopSwitchGatesDefaultNOTValid.py @@ -0,0 +1,167 @@ + +# Generated python file of Graph GraphLoopSwitchGatesDefaultNOTValid + +from SuperV import * + +# Graph creation of GraphLoopSwitchGatesDefaultNOTValid +def DefGraphLoopSwitchGatesDefaultNOTValid() : + GraphLoopSwitchGatesDefaultNOTValid = Graph( 'GraphLoopSwitchGatesDefaultNOTValid' ) + GraphLoopSwitchGatesDefaultNOTValid.SetName( 'GraphLoopSwitchGatesDefaultNOTValid' ) + GraphLoopSwitchGatesDefaultNOTValid.SetAuthor( 'JR' ) + GraphLoopSwitchGatesDefaultNOTValid.SetComment( '' ) + GraphLoopSwitchGatesDefaultNOTValid.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 (GraphLoopSwitch1)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphLoopSwitchGatesDefaultNOTValid.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 397 , 1 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + PyValEven = [] + PyValEven.append( 'from time import * ' ) + PyValEven.append( 'def ValEven(Even) : ' ) + PyValEven.append( ' sleep(1) ' ) + PyValEven.append( ' return Even ' ) + PyValEven.append( '' ) + ValEven = GraphLoopSwitchGatesDefaultNOTValid.INode( 'ValEven' , PyValEven ) + ValEven.SetName( 'ValEven' ) + ValEven.SetAuthor( '' ) + ValEven.SetComment( 'Compute Node' ) + ValEven.Coords( 396 , 222 ) + IValEvenEven = ValEven.InPort( 'Even' , 'long' ) + IValEvenGate = ValEven.GetInPort( 'Gate' ) + OValEvenEven = ValEven.OutPort( 'Even' , 'long' ) + OValEvenGate = ValEven.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoop = [] + PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoop.append( ' Index = Min ' ) + PyInitLoop.append( ' return Index,Min,Max ' ) + PyInitLoop.append( '' ) + PyMoreInitLoop = [] + PyMoreInitLoop.append( '' ) + PyNextInitLoop = [] + PyNextInitLoop.append( '' ) + InitLoop,EndOfInitLoop = GraphLoopSwitchGatesDefaultNOTValid.LNode( 'InitLoop' , PyInitLoop , '' , PyMoreInitLoop , '' , PyNextInitLoop ) + EndOfInitLoop.SetName( 'EndOfInitLoop' ) + EndOfInitLoop.SetAuthor( '' ) + EndOfInitLoop.SetComment( 'Compute Node' ) + EndOfInitLoop.Coords( 767 , 102 ) + PyEndOfInitLoop = [] + PyEndOfInitLoop.append( 'def EndOfInitLoop( DoLoop , Index , Min , Max ) :' ) + PyEndOfInitLoop.append( ' Index = Index + 1 ' ) + PyEndOfInitLoop.append( ' if Index <= Max : ' ) + PyEndOfInitLoop.append( ' DoLoop = 1 ' ) + PyEndOfInitLoop.append( ' else : ' ) + PyEndOfInitLoop.append( ' DoLoop = 0 ' ) + PyEndOfInitLoop.append( ' return DoLoop,Index,Min,Max ' ) + EndOfInitLoop.SetPyFunction( 'EndOfInitLoop' , 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 , 108 ) + + # 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,EndSwitch = GraphLoopSwitchGatesDefaultNOTValid.SNode( 'Switch' , PySwitch ) + EndSwitch.SetName( 'EndSwitch' ) + EndSwitch.SetAuthor( '' ) + EndSwitch.SetComment( 'Compute Node' ) + EndSwitch.Coords( 587 , 103 ) + PyEndSwitch = [] + PyEndSwitch.append( 'def EndSwitch(a,Even) : ' ) + PyEndSwitch.append( ' sleep(1) ' ) + PyEndSwitch.append( ' return a ' ) + EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) + IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) + IEndSwitchEven = EndSwitch.InPort( 'Even' , 'long' ) + IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) + OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' ) + OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 194 , 109 ) + 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 + LIsOddaEndSwitcha = GraphLoopSwitchGatesDefaultNOTValid.Link( OIsOdda , IEndSwitcha ) + + LIsOddGateEndSwitchDefault = GraphLoopSwitchGatesDefaultNOTValid.Link( OIsOddGate , IEndSwitchDefault ) + + LInitLoopIndexSwitcha = GraphLoopSwitchGatesDefaultNOTValid.Link( OInitLoopIndex , ISwitcha ) + + LInitLoopMinEndOfInitLoopMin = GraphLoopSwitchGatesDefaultNOTValid.Link( OInitLoopMin , IEndOfInitLoopMin ) + + LInitLoopMaxEndOfInitLoopMax = GraphLoopSwitchGatesDefaultNOTValid.Link( OInitLoopMax , IEndOfInitLoopMax ) + + LSwitchOddIsOddGate = GraphLoopSwitchGatesDefaultNOTValid.Link( OSwitchOdd , IIsOddGate ) + + LSwitchEvenValEvenEven = GraphLoopSwitchGatesDefaultNOTValid.Link( OSwitchEven , IValEvenEven ) + + LSwitchaIsOdda = GraphLoopSwitchGatesDefaultNOTValid.Link( OSwitcha , IIsOdda ) + + LSwitchDefaultEndSwitchDefault = GraphLoopSwitchGatesDefaultNOTValid.Link( OSwitchDefault , IEndSwitchDefault ) + + LEndSwitchaEndOfInitLoopIndex = GraphLoopSwitchGatesDefaultNOTValid.Link( OEndSwitcha , IEndOfInitLoopIndex ) + + LValEvenEvenEndSwitchEven = GraphLoopSwitchGatesDefaultNOTValid.Link( OValEvenEven , IEndSwitchEven ) + + LValEvenGateEndSwitchDefault = GraphLoopSwitchGatesDefaultNOTValid.Link( OValEvenGate , IEndSwitchDefault ) + + # Input datas + IInitLoopIndex.Input( 0 ) + IInitLoopMin.Input( 5 ) + IInitLoopMax.Input( 23 ) + + # Output Ports of the graph + #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + return GraphLoopSwitchGatesDefaultNOTValid + + +GraphLoopSwitchGatesDefaultNOTValid = DefGraphLoopSwitchGatesDefaultNOTValid() diff --git a/examples/GraphLoopSwitchGatesDefaultNOTValid.xml b/examples/GraphLoopSwitchGatesDefaultNOTValid.xml new file mode 100644 index 0000000..40c9d70 --- /dev/null +++ b/examples/GraphLoopSwitchGatesDefaultNOTValid.xml @@ -0,0 +1,392 @@ + + + + + +? + ? + GraphLoopSwitchGatesDefaultNOTValid + 1 + ? + +GraphLoopSwitchGatesDefault_1 + + +long + InitLoop__Index + +long + InitLoop__Min + +long + InitLoop__Max + + +long + EndOfInitLoop__Index + +long + EndOfInitLoop__Min + +long + EndOfInitLoop__Max + + + 22/10/2003 - 10:36:39 + 8/7/2005 - 10:51:30 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 8/7/2005 - 10:51:30 + 8/7/2005 - 10:51:30 + 1.05 + ? + ? + Python function + 397 + 1 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + + +? + + +? + + 8/7/2005 - 10:51:30 + 8/7/2005 - 10:51:30 + 1.05 + ? + ? + Compute Node + 10 + 108 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoop + + + + + + + + 8/7/2005 - 10:51:30 + 8/7/2005 - 10:51:30 + 1.05 + ? + ? + Compute Node + 767 + 102 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 8/7/2005 - 10:51:30 + 8/7/2005 - 10:51:30 + 1.05 + ? + ? + Compute Node + 194 + 109 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + +long + Even + + +long + a + + + +EndSwitch + + + + 8/7/2005 - 10:51:30 + 8/7/2005 - 10:51:30 + 1.05 + ? + ? + Compute Node + 587 + 103 + +? + ? + ValEven + 3 + ? + +ValEven + + +long + Even + + +long + Even + + + +ValEven + + + + + + 8/7/2005 - 10:51:30 + 8/7/2005 - 10:51:30 + 2.0 + ? + ? + Compute Node + 396 + 222 + + +IsOdd + a + EndSwitch + a + + +IsOdd + Gate + EndSwitch + Default + + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + Even + ValEven + Even + + +Switch + a + IsOdd + a + + +Switch + Default + EndSwitch + Default + + +EndSwitch + a + EndOfInitLoop + Index + + +ValEven + Even + EndSwitch + Even + + +ValEven + Gate + EndSwitch + Default + + + +GraphLoopSwitchGatesDefaultNOTValid + InitLoop__Index + InitLoop + Index + +3 + 0 + + +GraphLoopSwitchGatesDefaultNOTValid + InitLoop__Min + InitLoop + Min + +3 + 5 + + +GraphLoopSwitchGatesDefaultNOTValid + InitLoop__Max + InitLoop + Max + +3 + 23 + diff --git a/examples/GraphLoopTwoBranches.py b/examples/GraphLoopTwoBranches.py new file mode 100644 index 0000000..2aa4b70 --- /dev/null +++ b/examples/GraphLoopTwoBranches.py @@ -0,0 +1,326 @@ + +# Generated python file of Graph GraphLoopTwoBranches_1 + +from SuperV import * + +# Graph creation of GraphLoopTwoBranches_1 +def DefGraphLoopTwoBranches_1() : + GraphLoopTwoBranches_1 = Graph( 'GraphLoopTwoBranches_1' ) + GraphLoopTwoBranches_1.SetName( 'GraphLoopTwoBranches_1' ) + GraphLoopTwoBranches_1.SetAuthor( '' ) + GraphLoopTwoBranches_1.SetComment( '' ) + GraphLoopTwoBranches_1.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" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a,1 ' ) + IsOdd = GraphLoopTwoBranches_1.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 476 , 2 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddOdd = IsOdd.OutPort( 'Odd' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + PyIsEven = [] + PyIsEven.append( 'from time import * ' ) + PyIsEven.append( 'def IsEven(a) : ' ) + PyIsEven.append( ' print a,"IsEven" ' ) + PyIsEven.append( ' sleep( 1 ) ' ) + PyIsEven.append( ' return a,1 ' ) + IsEven = GraphLoopTwoBranches_1.INode( 'IsEven' , PyIsEven ) + IsEven.SetName( 'IsEven' ) + IsEven.SetAuthor( '' ) + IsEven.SetComment( 'Python function' ) + IsEven.Coords( 472 , 724 ) + IIsEvena = IsEven.InPort( 'a' , 'long' ) + IIsEvenGate = IsEven.GetInPort( 'Gate' ) + OIsEvena = IsEven.OutPort( 'a' , 'long' ) + OIsEvenEven = IsEven.OutPort( 'Even' , 'long' ) + OIsEvenGate = IsEven.GetOutPort( 'Gate' ) + + PyIsNotOdd = [] + PyIsNotOdd.append( 'from time import * ' ) + PyIsNotOdd.append( 'def IsNotOdd(Even) : ' ) + PyIsNotOdd.append( ' sleep(1) ' ) + PyIsNotOdd.append( ' return Even ' ) + IsNotOdd = GraphLoopTwoBranches_1.INode( 'IsNotOdd' , PyIsNotOdd ) + IsNotOdd.SetName( 'IsNotOdd' ) + IsNotOdd.SetAuthor( '' ) + IsNotOdd.SetComment( 'Compute Node' ) + IsNotOdd.Coords( 477 , 137 ) + IIsNotOddEven = IsNotOdd.InPort( 'Even' , 'long' ) + IIsNotOddGate = IsNotOdd.GetInPort( 'Gate' ) + OIsNotOddEven = IsNotOdd.OutPort( 'Even' , 'long' ) + OIsNotOddGate = IsNotOdd.GetOutPort( 'Gate' ) + + PyIsNotEven = [] + PyIsNotEven.append( 'from time import * ' ) + PyIsNotEven.append( 'def IsNotEven(Odd) : ' ) + PyIsNotEven.append( ' sleep(1) ' ) + PyIsNotEven.append( ' return Odd ' ) + IsNotEven = GraphLoopTwoBranches_1.INode( 'IsNotEven' , PyIsNotEven ) + IsNotEven.SetName( 'IsNotEven' ) + IsNotEven.SetAuthor( '' ) + IsNotEven.SetComment( 'Compute Node' ) + IsNotEven.Coords( 475 , 601 ) + IIsNotEvenOdd = IsNotEven.InPort( 'Odd' , 'long' ) + IIsNotEvenGate = IsNotEven.GetInPort( 'Gate' ) + OIsNotEvenOdd = IsNotEven.OutPort( 'Odd' , 'long' ) + OIsNotEvenGate = IsNotEven.GetOutPort( 'Gate' ) + + PyIsOdddefault = [] + PyIsOdddefault.append( 'from time import * ' ) + PyIsOdddefault.append( 'def IsOdddefault(a) : ' ) + PyIsOdddefault.append( ' sleep(1) ' ) + PyIsOdddefault.append( ' return a,0 ' ) + PyIsOdddefault.append( '' ) + IsOdddefault = GraphLoopTwoBranches_1.INode( 'IsOdddefault' , PyIsOdddefault ) + IsOdddefault.SetName( 'IsOdddefault' ) + IsOdddefault.SetAuthor( '' ) + IsOdddefault.SetComment( 'Compute Node' ) + IsOdddefault.Coords( 477 , 285 ) + IIsOdddefaulta = IsOdddefault.InPort( 'a' , 'long' ) + IIsOdddefaultGate = IsOdddefault.GetInPort( 'Gate' ) + OIsOdddefaulta = IsOdddefault.OutPort( 'a' , 'long' ) + OIsOdddefaultOdd = IsOdddefault.OutPort( 'Odd' , 'long' ) + OIsOdddefaultGate = IsOdddefault.GetOutPort( 'Gate' ) + + PyIsEvendefault = [] + PyIsEvendefault.append( 'from time import * ' ) + PyIsEvendefault.append( 'def IsEvendefault(a) : ' ) + PyIsEvendefault.append( ' sleep(1) ' ) + PyIsEvendefault.append( ' return a,0 ' ) + PyIsEvendefault.append( '' ) + IsEvendefault = GraphLoopTwoBranches_1.INode( 'IsEvendefault' , PyIsEvendefault ) + IsEvendefault.SetName( 'IsEvendefault' ) + IsEvendefault.SetAuthor( '' ) + IsEvendefault.SetComment( 'Compute Node' ) + IsEvendefault.Coords( 478 , 434 ) + IIsEvendefaulta = IsEvendefault.InPort( 'a' , 'long' ) + IIsEvendefaultGate = IsEvendefault.GetInPort( 'Gate' ) + OIsEvendefaulta = IsEvendefault.OutPort( 'a' , 'long' ) + OIsEvendefaultEven = IsEvendefault.OutPort( 'Even' , 'long' ) + OIsEvendefaultGate = IsEvendefault.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyLoop = [] + PyLoop.append( 'def InitLoop(Index,Min,Max) : ' ) + PyLoop.append( ' Index = Max ' ) + PyLoop.append( ' return Index,Min,Max ' ) + PyMoreLoop = [] + PyMoreLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreLoop.append( ' if Index >= Min : ' ) + PyMoreLoop.append( ' DoLoop = 1 ' ) + PyMoreLoop.append( ' else : ' ) + PyMoreLoop.append( ' DoLoop = 0 ' ) + PyMoreLoop.append( ' return DoLoop,Index,Min,Max ' ) + PyNextLoop = [] + PyNextLoop.append( 'def NextLoop(Index,Min,Max) : ' ) + PyNextLoop.append( ' Index = Index - 1 ' ) + PyNextLoop.append( ' return Index,Min,Max ' ) + Loop,EndOfLoop = GraphLoopTwoBranches_1.LNode( 'InitLoop' , PyLoop , 'MoreLoop' , PyMoreLoop , 'NextLoop' , PyNextLoop ) + EndOfLoop.SetName( 'EndOfLoop' ) + EndOfLoop.SetAuthor( '' ) + EndOfLoop.SetComment( 'Compute Node' ) + EndOfLoop.Coords( 1097 , 309 ) + PyEndOfLoop = [] + EndOfLoop.SetPyFunction( '' , PyEndOfLoop ) + ILoopDoLoop = Loop.GetInPort( 'DoLoop' ) + ILoopIndex = Loop.InPort( 'Index' , 'long' ) + ILoopMin = Loop.InPort( 'Min' , 'long' ) + ILoopMax = Loop.InPort( 'Max' , 'long' ) + ILoopGate = Loop.GetInPort( 'Gate' ) + OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) + OLoopIndex = Loop.GetOutPort( 'Index' ) + OLoopMin = Loop.GetOutPort( 'Min' ) + OLoopMax = Loop.GetOutPort( 'Max' ) + IEndOfLoopDoLoop = EndOfLoop.GetInPort( 'DoLoop' ) + IEndOfLoopIndex = EndOfLoop.GetInPort( 'Index' ) + IEndOfLoopMin = EndOfLoop.GetInPort( 'Min' ) + IEndOfLoopMax = EndOfLoop.GetInPort( 'Max' ) + IEndOfLoopGate = EndOfLoop.GetInPort( 'Gate' ) + OEndOfLoopDoLoop = EndOfLoop.GetOutPort( 'DoLoop' ) + OEndOfLoopIndex = EndOfLoop.GetOutPort( 'Index' ) + OEndOfLoopMin = EndOfLoop.GetOutPort( 'Min' ) + OEndOfLoopMax = EndOfLoop.GetOutPort( 'Max' ) + OEndOfLoopGate = EndOfLoop.GetOutPort( 'Gate' ) + Loop.SetName( 'Loop' ) + Loop.SetAuthor( '' ) + Loop.SetComment( 'Compute Node' ) + Loop.Coords( 18 , 389 ) + + # Creation of Switch Nodes + PySwitchOdd = [] + PySwitchOdd.append( 'from time import * ' ) + PySwitchOdd.append( 'def SwitchOdd(a) : ' ) + PySwitchOdd.append( ' sleep(1) ' ) + PySwitchOdd.append( ' if a <= 0 : ' ) + PySwitchOdd.append( ' OddEven = '<=0' ' ) + PySwitchOdd.append( ' return 0,0,0,a,OddEven ' ) + PySwitchOdd.append( ' OddEven = 'Odd' ' ) + PySwitchOdd.append( ' if (a&1) == 0 : ' ) + PySwitchOdd.append( ' OddEven = 'Even' ' ) + PySwitchOdd.append( ' return a & 1,1-(a&1),1-(a&1),a,OddEven ' ) + SwitchOdd,EndOfSwitchOdd = GraphLoopTwoBranches_1.SNode( 'SwitchOdd' , PySwitchOdd ) + EndOfSwitchOdd.SetName( 'EndOfSwitchOdd' ) + EndOfSwitchOdd.SetAuthor( '' ) + EndOfSwitchOdd.SetComment( 'Compute Node' ) + EndOfSwitchOdd.Coords( 718 , 162 ) + PyEndOfSwitchOdd = [] + PyEndOfSwitchOdd.append( 'from time import * ' ) + PyEndOfSwitchOdd.append( 'def EndOfSwitchOdd(a,Odd,Even,OddEven) : ' ) + PyEndOfSwitchOdd.append( ' sleep(1) ' ) + PyEndOfSwitchOdd.append( ' return a,Odd ' ) + EndOfSwitchOdd.SetPyFunction( 'EndOfSwitchOdd' , PyEndOfSwitchOdd ) + IEndOfSwitchOdda = EndOfSwitchOdd.InPort( 'a' , 'long' ) + IEndOfSwitchOddOdd = EndOfSwitchOdd.InPort( 'Odd' , 'boolean' ) + IEndOfSwitchOddEven = EndOfSwitchOdd.InPort( 'Even' , 'long' ) + IEndOfSwitchOddOddEven = EndOfSwitchOdd.InPort( 'OddEven' , 'boolean' ) + IEndOfSwitchOddDefault = EndOfSwitchOdd.GetInPort( 'Default' ) + OEndOfSwitchOdda = EndOfSwitchOdd.OutPort( 'a' , 'long' ) + OEndOfSwitchOddOdd = EndOfSwitchOdd.OutPort( 'Odd' , 'boolean' ) + OEndOfSwitchOddGate = EndOfSwitchOdd.GetOutPort( 'Gate' ) + SwitchOdd.SetName( 'SwitchOdd' ) + SwitchOdd.SetAuthor( '' ) + SwitchOdd.SetComment( 'Compute Node' ) + SwitchOdd.Coords( 240 , 142 ) + ISwitchOdda = SwitchOdd.InPort( 'a' , 'long' ) + ISwitchOddGate = SwitchOdd.GetInPort( 'Gate' ) + OSwitchOddOdd = SwitchOdd.OutPort( 'Odd' , 'long' ) + OSwitchOddEven = SwitchOdd.OutPort( 'Even' , 'int' ) + OSwitchOdddefault = SwitchOdd.OutPort( 'default' , 'long' ) + OSwitchOdda = SwitchOdd.OutPort( 'a' , 'long' ) + OSwitchOddOddEven = SwitchOdd.OutPort( 'OddEven' , 'string' ) + OSwitchOddDefault = SwitchOdd.GetOutPort( 'Default' ) + + PySwitchEven = [] + PySwitchEven.append( 'from time import * ' ) + PySwitchEven.append( 'def SwitchEven(a) : ' ) + PySwitchEven.append( ' sleep(1) ' ) + PySwitchEven.append( ' if a <= 0 : ' ) + PySwitchEven.append( ' OddEven = '<=0' ' ) + PySwitchEven.append( ' return 0,0,0,a,OddEven ' ) + PySwitchEven.append( ' OddEven = 'Even' ' ) + PySwitchEven.append( ' if (a&1) != 0 : ' ) + PySwitchEven.append( ' OddEven = 'Odd' ' ) + PySwitchEven.append( ' print (a&1),1-(a&1),(a&1),a,OddEven ' ) + PySwitchEven.append( ' return (a&1),1-(a&1),(a&1),a,OddEven ' ) + SwitchEven,EndOfSwitchEven = GraphLoopTwoBranches_1.SNode( 'SwitchEven' , PySwitchEven ) + EndOfSwitchEven.SetName( 'EndOfSwitchEven' ) + EndOfSwitchEven.SetAuthor( '' ) + EndOfSwitchEven.SetComment( 'Compute Node' ) + EndOfSwitchEven.Coords( 721 , 477 ) + PyEndOfSwitchEven = [] + PyEndOfSwitchEven.append( 'from time import * ' ) + PyEndOfSwitchEven.append( 'def EndOfSwitchEven(a,Even,Odd,OddEven) : ' ) + PyEndOfSwitchEven.append( ' sleep(1) ' ) + PyEndOfSwitchEven.append( ' return a,Even ' ) + EndOfSwitchEven.SetPyFunction( 'EndOfSwitchEven' , PyEndOfSwitchEven ) + IEndOfSwitchEvena = EndOfSwitchEven.InPort( 'a' , 'long' ) + IEndOfSwitchEvenEven = EndOfSwitchEven.InPort( 'Even' , 'boolean' ) + IEndOfSwitchEvenOdd = EndOfSwitchEven.InPort( 'Odd' , 'long' ) + IEndOfSwitchEvenOddEven = EndOfSwitchEven.InPort( 'OddEven' , 'string' ) + IEndOfSwitchEvenDefault = EndOfSwitchEven.GetInPort( 'Default' ) + OEndOfSwitchEvena = EndOfSwitchEven.OutPort( 'a' , 'long' ) + OEndOfSwitchEvenEven = EndOfSwitchEven.OutPort( 'Even' , 'boolean' ) + OEndOfSwitchEvenGate = EndOfSwitchEven.GetOutPort( 'Gate' ) + SwitchEven.SetName( 'SwitchEven' ) + SwitchEven.SetAuthor( '' ) + SwitchEven.SetComment( 'Compute Node' ) + SwitchEven.Coords( 230 , 457 ) + ISwitchEvena = SwitchEven.InPort( 'a' , 'long' ) + ISwitchEvenGate = SwitchEven.GetInPort( 'Gate' ) + OSwitchEvenOdd = SwitchEven.OutPort( 'Odd' , 'long' ) + OSwitchEvenEven = SwitchEven.OutPort( 'Even' , 'int' ) + OSwitchEvendefault = SwitchEven.OutPort( 'default' , 'long' ) + OSwitchEvena = SwitchEven.OutPort( 'a' , 'int' ) + OSwitchEvenOddEven = SwitchEven.OutPort( 'OddEven' , 'string' ) + OSwitchEvenDefault = SwitchEven.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitchOdda = GraphLoopTwoBranches_1.Link( OIsOdda , IEndOfSwitchOdda ) + + LIsOddOddEndOfSwitchOddOdd = GraphLoopTwoBranches_1.Link( OIsOddOdd , IEndOfSwitchOddOdd ) + + LSwitchOddOddIsOddGate = GraphLoopTwoBranches_1.Link( OSwitchOddOdd , IIsOddGate ) + + LSwitchOddEvenIsNotOddEven = GraphLoopTwoBranches_1.Link( OSwitchOddEven , IIsNotOddEven ) + + LSwitchOdddefaultIsOdddefaultGate = GraphLoopTwoBranches_1.Link( OSwitchOdddefault , IIsOdddefaultGate ) + + LSwitchOddaIsOdddefaulta = GraphLoopTwoBranches_1.Link( OSwitchOdda , IIsOdddefaulta ) + + LSwitchOddaIsOdda = GraphLoopTwoBranches_1.Link( OSwitchOdda , IIsOdda ) + + LSwitchOddOddEvenEndOfSwitchOddOddEven = GraphLoopTwoBranches_1.Link( OSwitchOddOddEven , IEndOfSwitchOddOddEven ) + + LSwitchOddDefaultEndOfSwitchOddDefault = GraphLoopTwoBranches_1.Link( OSwitchOddDefault , IEndOfSwitchOddDefault ) + + LEndOfSwitchOddaEndOfLoopIndex = GraphLoopTwoBranches_1.Link( OEndOfSwitchOdda , IEndOfLoopIndex ) + + LIsEvenaEndOfSwitchEvena = GraphLoopTwoBranches_1.Link( OIsEvena , IEndOfSwitchEvena ) + + LIsEvenEvenEndOfSwitchEvenEven = GraphLoopTwoBranches_1.Link( OIsEvenEven , IEndOfSwitchEvenEven ) + + LLoopIndexSwitchOdda = GraphLoopTwoBranches_1.Link( OLoopIndex , ISwitchOdda ) + + LLoopIndexSwitchEvena = GraphLoopTwoBranches_1.Link( OLoopIndex , ISwitchEvena ) + + LLoopMinEndOfLoopMin = GraphLoopTwoBranches_1.Link( OLoopMin , IEndOfLoopMin ) + + LLoopMaxEndOfLoopMax = GraphLoopTwoBranches_1.Link( OLoopMax , IEndOfLoopMax ) + + LSwitchEvenOddIsNotEvenOdd = GraphLoopTwoBranches_1.Link( OSwitchEvenOdd , IIsNotEvenOdd ) + + LSwitchEvenEvenIsEvenGate = GraphLoopTwoBranches_1.Link( OSwitchEvenEven , IIsEvenGate ) + + LSwitchEvendefaultIsEvendefaultGate = GraphLoopTwoBranches_1.Link( OSwitchEvendefault , IIsEvendefaultGate ) + + LSwitchEvenaIsEvena = GraphLoopTwoBranches_1.Link( OSwitchEvena , IIsEvena ) + + LSwitchEvenaIsEvendefaulta = GraphLoopTwoBranches_1.Link( OSwitchEvena , IIsEvendefaulta ) + + LSwitchEvenOddEvenEndOfSwitchEvenOddEven = GraphLoopTwoBranches_1.Link( OSwitchEvenOddEven , IEndOfSwitchEvenOddEven ) + + LSwitchEvenDefaultEndOfSwitchEvenDefault = GraphLoopTwoBranches_1.Link( OSwitchEvenDefault , IEndOfSwitchEvenDefault ) + + LEndOfSwitchEvenGateEndOfLoopGate = GraphLoopTwoBranches_1.Link( OEndOfSwitchEvenGate , IEndOfLoopGate ) + + LIsNotOddEvenEndOfSwitchOddEven = GraphLoopTwoBranches_1.Link( OIsNotOddEven , IEndOfSwitchOddEven ) + + LIsNotEvenOddEndOfSwitchEvenOdd = GraphLoopTwoBranches_1.Link( OIsNotEvenOdd , IEndOfSwitchEvenOdd ) + + LIsOdddefaultaEndOfSwitchOdda = GraphLoopTwoBranches_1.Link( OIsOdddefaulta , IEndOfSwitchOdda ) + + LIsOdddefaultOddEndOfSwitchOddOdd = GraphLoopTwoBranches_1.Link( OIsOdddefaultOdd , IEndOfSwitchOddOdd ) + + LIsEvendefaultaEndOfSwitchEvena = GraphLoopTwoBranches_1.Link( OIsEvendefaulta , IEndOfSwitchEvena ) + + LIsEvendefaultEvenEndOfSwitchEvenEven = GraphLoopTwoBranches_1.Link( OIsEvendefaultEven , IEndOfSwitchEvenEven ) + + # Input datas + ILoopIndex.Input( 0 ) + ILoopMin.Input( -5 ) + ILoopMax.Input( 11 ) + + # Output Ports of the graph + #OEndOfSwitchOddOdd = EndOfSwitchOdd.GetOutPort( 'Odd' ) + #OEndOfLoopIndex = EndOfLoop.GetOutPort( 'Index' ) + #OEndOfLoopMin = EndOfLoop.GetOutPort( 'Min' ) + #OEndOfLoopMax = EndOfLoop.GetOutPort( 'Max' ) + #OEndOfSwitchEvena = EndOfSwitchEven.GetOutPort( 'a' ) + #OEndOfSwitchEvenEven = EndOfSwitchEven.GetOutPort( 'Even' ) + return GraphLoopTwoBranches_1 + + +GraphLoopTwoBranches_1 = DefGraphLoopTwoBranches_1() diff --git a/examples/GraphLoopTwoBranches.xml b/examples/GraphLoopTwoBranches.xml new file mode 100644 index 0000000..4d484bf --- /dev/null +++ b/examples/GraphLoopTwoBranches.xml @@ -0,0 +1,767 @@ + + + + + +? + ? + GraphLoopTwoBranches_1 + 1 + ? + +GraphLoopTwoBranches_1 + + +long + Loop__Index + +long + Loop__Min + +long + Loop__Max + + +boolean + EndOfSwitchOdd__Odd + +long + EndOfLoop__Index + +long + EndOfLoop__Min + +long + EndOfLoop__Max + +long + EndOfSwitchEven__a + +boolean + EndOfSwitchEven__Even + + + 4/7/2005 - 15:59:20 + 4/7/2005 - 17:43:34 + 2.0 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + +long + Odd + + + +IsOdd + + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Python function + 476 + 2 + +? + ? + SwitchOdd + 6 + EndOfSwitchOdd + +SwitchOdd + + +long + a + + +long + Odd + +int + Even + +long + default + +long + a + +string + OddEven + + + +SwitchOdd + + + + + + + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Compute Node + 240 + 142 + +? + ? + EndOfSwitchOdd + 7 + SwitchOdd + +EndOfSwitchOdd + + +long + a + +boolean + Odd + +long + Even + +boolean + OddEven + + +long + a + +boolean + Odd + + + +EndOfSwitchOdd + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Compute Node + 718 + 162 + +? + ? + IsEven + 3 + ? + +IsEven + + +long + a + + +long + a + +long + Even + + + +IsEven + + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Python function + 472 + 724 + +? + ? + Loop + 4 + EndOfLoop + +Loop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + +MoreLoop + + = Min : ]]> + + + + + +NextLoop + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Compute Node + 18 + 389 + +? + ? + EndOfLoop + 5 + Loop + +EndOfLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Compute Node + 1097 + 309 + +? + ? + SwitchEven + 6 + EndOfSwitchEven + +SwitchEven + + +long + a + + +long + Odd + +int + Even + +long + default + +int + a + +string + OddEven + + + +SwitchEven + + + + + + + + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Compute Node + 230 + 457 + +? + ? + EndOfSwitchEven + 7 + SwitchEven + +EndOfSwitchEven + + +long + a + +boolean + Even + +long + Odd + +string + OddEven + + +long + a + +boolean + Even + + + +EndOfSwitchEven + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 1.05 + ? + ? + Compute Node + 721 + 477 + +? + ? + IsNotOdd + 3 + ? + +IsNotOdd + + +long + Even + + +long + Even + + + +IsNotOdd + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 2.0 + ? + ? + Compute Node + 477 + 137 + +? + ? + IsNotEven + 3 + ? + +IsNotEven + + +long + Odd + + +long + Odd + + + +IsNotEven + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 2.0 + ? + ? + Compute Node + 475 + 601 + +? + ? + IsOdddefault + 3 + ? + +IsOdddefault + + +long + a + + +long + a + +long + Odd + + + +IsOdddefault + + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 2.0 + ? + ? + Compute Node + 477 + 285 + +? + ? + IsEvendefault + 3 + ? + +IsEvendefault + + +long + a + + +long + a + +long + Even + + + +IsEvendefault + + + + + + 4/7/2005 - 17:38:58 + 4/7/2005 - 17:38:58 + 2.0 + ? + ? + Compute Node + 478 + 434 + + +IsOdd + a + EndOfSwitchOdd + a + + +IsOdd + Odd + EndOfSwitchOdd + Odd + + +SwitchOdd + Odd + IsOdd + Gate + + +SwitchOdd + Even + IsNotOdd + Even + + +SwitchOdd + default + IsOdddefault + Gate + + +SwitchOdd + a + IsOdddefault + a + + +SwitchOdd + a + IsOdd + a + + +SwitchOdd + OddEven + EndOfSwitchOdd + OddEven + + +SwitchOdd + Default + EndOfSwitchOdd + Default + + +EndOfSwitchOdd + a + EndOfLoop + Index + + +IsEven + a + EndOfSwitchEven + a + + +IsEven + Even + EndOfSwitchEven + Even + + +Loop + DoLoop + EndOfLoop + DoLoop + + +Loop + Index + SwitchOdd + a + + +Loop + Index + SwitchEven + a + + +Loop + Min + EndOfLoop + Min + + +Loop + Max + EndOfLoop + Max + + +EndOfLoop + DoLoop + Loop + DoLoop + + +SwitchEven + Odd + IsNotEven + Odd + + +SwitchEven + Even + IsEven + Gate + + +SwitchEven + default + IsEvendefault + Gate + + +SwitchEven + a + IsEven + a + + +SwitchEven + a + IsEvendefault + a + + +SwitchEven + OddEven + EndOfSwitchEven + OddEven + + +SwitchEven + Default + EndOfSwitchEven + Default + + +EndOfSwitchEven + Gate + EndOfLoop + Gate + + +IsNotOdd + Even + EndOfSwitchOdd + Even + + +IsNotEven + Odd + EndOfSwitchEven + Odd + + +IsOdddefault + a + EndOfSwitchOdd + a + + +IsOdddefault + Odd + EndOfSwitchOdd + Odd + + +IsEvendefault + a + EndOfSwitchEven + a + + +IsEvendefault + Even + EndOfSwitchEven + Even + + + +GraphLoopTwoBranches_1 + Loop__Index + Loop + Index + +3 + 0 + + +GraphLoopTwoBranches_1 + Loop__Min + Loop + Min + +3 + -5 + + +GraphLoopTwoBranches_1 + Loop__Max + Loop + Max + +3 + 11 + diff --git a/examples/GraphSwitchBugAborted.py b/examples/GraphSwitchBugAborted.py new file mode 100644 index 0000000..2d3498f --- /dev/null +++ b/examples/GraphSwitchBugAborted.py @@ -0,0 +1,146 @@ + +# Generated python file of Graph GraphSwitchBugAborted + +from SuperV import * + +# Graph creation of GraphSwitchBugAborted +def DefGraphSwitchBugAborted() : + GraphSwitchBugAborted = Graph( 'GraphSwitchBugAborted' ) + GraphSwitchBugAborted.SetName( 'GraphSwitchBugAborted' ) + GraphSwitchBugAborted.SetAuthor( 'JR' ) + GraphSwitchBugAborted.SetComment( '' ) + GraphSwitchBugAborted.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 = GraphSwitchBugAborted.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 = GraphSwitchBugAborted.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 772 , 132 ) + 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,a ' ) + Switch,EndOfSwitch = GraphSwitchBugAborted.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 581 , 132 ) + PyEndOfSwitch = [] + PyEndOfSwitch.append( 'def EndOfSwitch(a,Even,k) : ' ) + PyEndOfSwitch.append( ' return a ' ) + EndOfSwitch.SetPyFunction( 'EndOfSwitch' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchEven = EndOfSwitch.InPort( 'Even' , 'long' ) + IEndOfSwitchk = EndOfSwitch.InPort( 'k' , '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' ) + OSwitchn = Switch.OutPort( 'n' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchBugAborted.Link( OIsOdda , IEndOfSwitcha ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchBugAborted.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchBugAborted.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchBugAborted.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchBugAborted.Link( OSwitchOdd , IIsOddGate ) + + LSwitchaIsOdda = GraphSwitchBugAborted.Link( OSwitcha , IIsOdda ) + + LSwitchnEndOfSwitchk = GraphSwitchBugAborted.Link( OSwitchn , IEndOfSwitchk ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchBugAborted.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( 0 ) + IInitLoopSwitchMax.Input( 20 ) + + # Input Ports of the graph + #IEndOfSwitchEven = EndOfSwitch.GetInPort( 'Even' ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + return GraphSwitchBugAborted + + +GraphSwitchBugAborted = DefGraphSwitchBugAborted() diff --git a/examples/GraphSwitchBugAborted.xml b/examples/GraphSwitchBugAborted.xml new file mode 100644 index 0000000..0e2267f --- /dev/null +++ b/examples/GraphSwitchBugAborted.xml @@ -0,0 +1,345 @@ + + + + + +? + ? + GraphSwitchBugAborted + 1 + ? + +GraphSwitchBugNODefault_1 + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + +long + EndOfSwitch__Even + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + +int + Switch__Even + + + 1/10/2003 - 17:23:54 + 28/6/2005 - 10:56:46 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 28/6/2005 - 10:56:46 + 28/6/2005 - 10:56:46 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 28/6/2005 - 10:56:46 + 28/6/2005 - 10:56:46 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 28/6/2005 - 10:56:46 + 28/6/2005 - 10:56:46 + 1.05 + ? + ? + Compute Node + 772 + 132 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +int + n + + + +Switch + + + + + + 28/6/2005 - 10:56:46 + 28/6/2005 - 10:56:46 + 1.05 + ? + ? + Compute Node + 194 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +long + Even + +long + k + + +long + a + + + +EndOfSwitch + + + 28/6/2005 - 10:56:46 + 28/6/2005 - 10:56:46 + 1.05 + ? + ? + Compute Node + 581 + 132 + + +IsOdd + a + EndOfSwitch + a + + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + a + IsOdd + a + + +Switch + n + EndOfSwitch + k + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + + +GraphSwitchBugAborted + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchBugAborted + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchBugAborted + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 20 + diff --git a/examples/GraphSwitchBugDefault.py b/examples/GraphSwitchBugDefault.py new file mode 100644 index 0000000..6773671 --- /dev/null +++ b/examples/GraphSwitchBugDefault.py @@ -0,0 +1,149 @@ + +# Generated python file of Graph GraphSwitchBugDefault + +from SuperV import * + +# Graph creation of GraphSwitchBugDefault +def DefGraphSwitchBugDefault() : + GraphSwitchBugDefault = Graph( 'GraphSwitchBugDefault' ) + GraphSwitchBugDefault.SetName( 'GraphSwitchBugDefault' ) + GraphSwitchBugDefault.SetAuthor( 'JR' ) + GraphSwitchBugDefault.SetComment( '' ) + GraphSwitchBugDefault.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 = GraphSwitchBugDefault.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( ' Index = Min ' ) + 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 = GraphSwitchBugDefault.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 772 , 132 ) + 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,a ' ) + Switch,EndOfSwitch = GraphSwitchBugDefault.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 581 , 132 ) + PyEndOfSwitch = [] + PyEndOfSwitch.append( 'def EndOfSwitch(a,Even,k) : ' ) + PyEndOfSwitch.append( ' return a ' ) + EndOfSwitch.SetPyFunction( 'EndOfSwitch' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchEven = EndOfSwitch.InPort( 'Even' , 'long' ) + IEndOfSwitchk = EndOfSwitch.InPort( 'k' , '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' ) + OSwitchn = Switch.OutPort( 'n' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchBugDefault.Link( OIsOdda , IEndOfSwitcha ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchBugDefault.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchBugDefault.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchBugDefault.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchBugDefault.Link( OSwitchOdd , IIsOddGate ) + + LSwitchaIsOdda = GraphSwitchBugDefault.Link( OSwitcha , IIsOdda ) + + LSwitchnEndOfSwitchk = GraphSwitchBugDefault.Link( OSwitchn , IEndOfSwitchk ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchBugDefault.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchBugDefault.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( 1 ) + IInitLoopSwitchMax.Input( 20 ) + + # Input Ports of the graph + #IEndOfSwitchEven = EndOfSwitch.GetInPort( 'Even' ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + return GraphSwitchBugDefault + + +GraphSwitchBugDefault = DefGraphSwitchBugDefault() diff --git a/examples/GraphSwitchBugDefault.xml b/examples/GraphSwitchBugDefault.xml new file mode 100644 index 0000000..6be3e3e --- /dev/null +++ b/examples/GraphSwitchBugDefault.xml @@ -0,0 +1,352 @@ + + + + + +? + ? + GraphSwitchBugDefault + 1 + ? + +GraphSwitchBugDefault + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + +long + EndOfSwitch__Even + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + +int + Switch__Even + + + 1/10/2003 - 17:23:54 + 30/6/2005 - 10:41:27 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 30/6/2005 - 10:41:27 + 30/6/2005 - 10:41:27 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + +MoreLoop + + + + + + + +NextLoop + + + + 30/6/2005 - 10:41:27 + 30/6/2005 - 10:41:27 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 30/6/2005 - 10:41:27 + 30/6/2005 - 10:41:27 + 1.05 + ? + ? + Compute Node + 772 + 132 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +int + n + + + +Switch + + + + + + 30/6/2005 - 10:41:27 + 30/6/2005 - 10:41:27 + 1.05 + ? + ? + Compute Node + 194 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +long + Even + +long + k + + +long + a + + + +EndOfSwitch + + + 30/6/2005 - 10:41:27 + 30/6/2005 - 10:41:27 + 1.05 + ? + ? + Compute Node + 581 + 132 + + +IsOdd + a + EndOfSwitch + a + + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + a + IsOdd + a + + +Switch + n + EndOfSwitch + k + + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + + +GraphSwitchBugDefault + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchBugDefault + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + 1 + + +GraphSwitchBugDefault + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 20 + diff --git a/examples/GraphSwitchCheckBranch1Default.py b/examples/GraphSwitchCheckBranch1Default.py new file mode 100644 index 0000000..c6b7aac --- /dev/null +++ b/examples/GraphSwitchCheckBranch1Default.py @@ -0,0 +1,236 @@ + +# Generated python file of Graph GraphSwitchCheckBranch1Default + +from SuperV import * + +# Graph creation of GraphSwitchCheckBranch1Default +def DefGraphSwitchCheckBranch1Default() : + GraphSwitchCheckBranch1Default = Graph( 'GraphSwitchCheckBranch1Default' ) + GraphSwitchCheckBranch1Default.SetName( 'GraphSwitchCheckBranch1Default' ) + GraphSwitchCheckBranch1Default.SetAuthor( 'JR' ) + GraphSwitchCheckBranch1Default.SetComment( 'Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch' ) + GraphSwitchCheckBranch1Default.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 = GraphSwitchCheckBranch1Default.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 415 , 7 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + 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 = GraphSwitchCheckBranch1Default.INode( 'IsEven' , PyIsEven ) + IsEven.SetName( 'IsEven' ) + IsEven.SetAuthor( '' ) + IsEven.SetComment( 'Compute Node' ) + IsEven.Coords( 421 , 438 ) + IIsEvena = IsEven.InPort( 'a' , 'long' ) + IIsEvenGate = IsEven.GetInPort( 'Gate' ) + OIsEvena = IsEven.OutPort( 'a' , 'long' ) + OIsEvenGate = IsEven.GetOutPort( 'Gate' ) + + PyBranchNode = [] + PyBranchNode.append( 'from time import * ' ) + PyBranchNode.append( 'def Print_1(Branch) : ' ) + PyBranchNode.append( ' print "Print ",Branch ' ) + PyBranchNode.append( ' sleep(1) ' ) + PyBranchNode.append( ' return Branch ' ) + BranchNode = GraphSwitchCheckBranch1Default.INode( 'Print_1' , PyBranchNode ) + BranchNode.SetName( 'BranchNode' ) + BranchNode.SetAuthor( '' ) + BranchNode.SetComment( 'Compute Node' ) + BranchNode.Coords( 529 , 177 ) + IBranchNodeBranch = BranchNode.InPort( 'Branch' , 'string' ) + IBranchNodeGate = BranchNode.GetInPort( 'Gate' ) + OBranchNodeBranch = BranchNode.OutPort( 'Branch' , 'string' ) + OBranchNodeGate = BranchNode.GetOutPort( 'Gate' ) + + Pydefault = [] + Pydefault.append( 'from time import * ' ) + Pydefault.append( 'def default(a) : ' ) + Pydefault.append( ' sleep(1) ' ) + Pydefault.append( ' return a ' ) + default = GraphSwitchCheckBranch1Default.INode( 'default' , Pydefault ) + default.SetName( 'default' ) + default.SetAuthor( '' ) + default.SetComment( 'Compute Node' ) + default.Coords( 428 , 308 ) + Idefaulta = default.InPort( 'a' , 'long' ) + IdefaultGate = default.GetInPort( 'Gate' ) + Odefaulta = default.OutPort( 'a' , 'long' ) + OdefaultGate = default.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoopSwitch = [] + PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoopSwitch.append( ' Index = Max ' ) + PyInitLoopSwitch.append( ' return Index,Min,Max ' ) + PyMoreInitLoopSwitch = [] + PyMoreInitLoopSwitch.append( 'from time import * ' ) + PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreInitLoopSwitch.append( ' sleep(1) ' ) + PyMoreInitLoopSwitch.append( ' if Index >= Min : ' ) + 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 = GraphSwitchCheckBranch1Default.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 1073 , 216 ) + PyEndOfInitLoopSwitch = [] + PyEndOfInitLoopSwitch.append( 'from time import * ' ) + PyEndOfInitLoopSwitch.append( 'def EndOfInitLoopSwitch(DoLoop,Index,Min,Max) : ' ) + PyEndOfInitLoopSwitch.append( ' sleep(1) ' ) + PyEndOfInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) + EndOfInitLoopSwitch.SetPyFunction( 'EndOfInitLoopSwitch' , 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 , 157 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(a) : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' Branch = "Negative or null" ' ) + PySwitch.append( ' if a <= 0 : ' ) + PySwitch.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch.append( ' return 0,0,a,Branch,1 ' ) + PySwitch.append( ' else : ' ) + PySwitch.append( ' return 0,0,a,Branch,0 ' ) + PySwitch.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch.append( ' Branch = "Even" ' ) + PySwitch.append( ' else : ' ) + PySwitch.append( ' Branch = "Odd" ' ) + PySwitch.append( ' return a & 1,1-(a&1),a,Branch,0 ' ) + Switch,EndOfSwitch = GraphSwitchCheckBranch1Default.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 880 , 216 ) + PyEndOfSwitch = [] + PyEndOfSwitch.append( 'from time import * ' ) + PyEndOfSwitch.append( 'def EndOfSwitch(a,Branch) : ' ) + PyEndOfSwitch.append( ' sleep(1) ' ) + PyEndOfSwitch.append( ' return a ' ) + EndOfSwitch.SetPyFunction( 'EndOfSwitch' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchBranch = EndOfSwitch.InPort( 'Branch' , 'string' ) + 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 , 157 ) + ISwitcha = Switch.InPort( 'a' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchOdd = Switch.OutPort( 'Odd' , 'long' ) + OSwitchEven = Switch.OutPort( 'Even' , 'int' ) + OSwitcha = Switch.OutPort( 'a' , 'int' ) + OSwitchBranch = Switch.OutPort( 'Branch' , 'string' ) + OSwitchdefault = Switch.OutPort( 'default' , 'boolean' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchCheckBranch1Default.Link( OIsOdda , IEndOfSwitcha ) + + LIsEvenaEndOfSwitcha = GraphSwitchCheckBranch1Default.Link( OIsEvena , IEndOfSwitcha ) + + LBranchNodeBranchEndOfSwitchBranch = GraphSwitchCheckBranch1Default.Link( OBranchNodeBranch , IEndOfSwitchBranch ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchCheckBranch1Default.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchCheckBranch1Default.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchCheckBranch1Default.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchCheckBranch1Default.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate.AddCoord( 1 , 401 , 101 ) + LSwitchOddIsOddGate.AddCoord( 2 , 401 , 188 ) + + LSwitchEvenIsEvenGate = GraphSwitchCheckBranch1Default.Link( OSwitchEven , IIsEvenGate ) + LSwitchEvenIsEvenGate.AddCoord( 1 , 392 , 533 ) + LSwitchEvenIsEvenGate.AddCoord( 2 , 392 , 208 ) + + LSwitchaIsOdda = GraphSwitchCheckBranch1Default.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 382 , 78 ) + LSwitchaIsOdda.AddCoord( 2 , 382 , 229 ) + + LSwitchaIsEvena = GraphSwitchCheckBranch1Default.Link( OSwitcha , IIsEvena ) + LSwitchaIsEvena.AddCoord( 1 , 381 , 509 ) + LSwitchaIsEvena.AddCoord( 2 , 381 , 229 ) + + LSwitchadefaulta = GraphSwitchCheckBranch1Default.Link( OSwitcha , Idefaulta ) + LSwitchadefaulta.AddCoord( 1 , 382 , 377 ) + LSwitchadefaulta.AddCoord( 2 , 382 , 228 ) + + LSwitchBranchBranchNodeBranch = GraphSwitchCheckBranch1Default.Link( OSwitchBranch , IBranchNodeBranch ) + + LSwitchdefaultdefaultGate = GraphSwitchCheckBranch1Default.Link( OSwitchdefault , IdefaultGate ) + LSwitchdefaultdefaultGate.AddCoord( 1 , 410 , 403 ) + LSwitchdefaultdefaultGate.AddCoord( 2 , 410 , 269 ) + LSwitchdefaultdefaultGate.AddCoord( 3 , 410 , 268 ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchCheckBranch1Default.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckBranch1Default.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + LdefaultaEndOfSwitcha = GraphSwitchCheckBranch1Default.Link( Odefaulta , IEndOfSwitcha ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( -5 ) + IInitLoopSwitchMax.Input( 10 ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + return GraphSwitchCheckBranch1Default + + +GraphSwitchCheckBranch1Default = DefGraphSwitchCheckBranch1Default() diff --git a/examples/GraphSwitchCheckBranch1Default.xml b/examples/GraphSwitchCheckBranch1Default.xml new file mode 100644 index 0000000..106bb26 --- /dev/null +++ b/examples/GraphSwitchCheckBranch1Default.xml @@ -0,0 +1,541 @@ + + + + + +? + ? + GraphSwitchCheckBranch1Default + 1 + ? + +GraphSwitchCheckBranch1Default + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + + + 13/1/2005 - 11:48:50 + 8/7/2005 - 14:42:28 + 2.0 + JR + ? + Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Python function + 415 + 7 + +? + ? + IsEven + 3 + ? + +IsEven + + +long + a + + +long + a + + + +IsEven + + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 421 + 438 + +? + ? + BranchNode + 3 + ? + +BranchNode + + +string + Branch + + +string + Branch + + + +Print_1 + + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 529 + 177 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + +MoreLoop + + + + = Min : ]]> + + + + + +NextLoop + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 10 + 157 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoopSwitch + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 1073 + 216 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +string + Branch + +boolean + default + + + +Switch + + + + + + + + + + + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 194 + 157 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +string + Branch + + +long + a + + + +EndOfSwitch + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 880 + 216 + +? + ? + default + 3 + ? + +default + + +long + a + + +long + a + + + +default + + + + + 8/7/2005 - 14:41:7 + 8/7/2005 - 14:41:7 + 2.0 + ? + ? + Compute Node + 428 + 308 + + +IsOdd + a + EndOfSwitch + a + + +IsEven + a + EndOfSwitch + a + + +BranchNode + Branch + EndOfSwitch + Branch + + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +401 + 101 + +401 + 188 + +Switch + Even + IsEven + Gate + + +392 + 533 + +392 + 208 + +Switch + a + IsOdd + a + + +382 + 78 + +382 + 229 + +Switch + a + IsEven + a + + +381 + 509 + +381 + 229 + +Switch + a + default + a + + +382 + 377 + +382 + 228 + +Switch + Branch + BranchNode + Branch + + +Switch + default + default + Gate + + +410 + 403 + +410 + 269 + +410 + 268 + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + +default + a + EndOfSwitch + a + + + +GraphSwitchCheckBranch1Default + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchCheckBranch1Default + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + -5 + + +GraphSwitchCheckBranch1Default + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 10 + diff --git a/examples/GraphSwitchExecutable.py b/examples/GraphSwitchExecutable.py new file mode 100644 index 0000000..464f832 --- /dev/null +++ b/examples/GraphSwitchExecutable.py @@ -0,0 +1,148 @@ + +# Generated python file of Graph GraphSwitchExecutable + +from SuperV import * + +# Graph creation of GraphSwitchExecutable +def DefGraphSwitchExecutable() : + GraphSwitchExecutable = Graph( 'GraphSwitchExecutable' ) + GraphSwitchExecutable.SetName( 'GraphSwitchExecutable' ) + GraphSwitchExecutable.SetAuthor( '' ) + GraphSwitchExecutable.SetComment( '' ) + GraphSwitchExecutable.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 = GraphSwitchExecutable.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 = GraphSwitchExecutable.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 772 , 132 ) + 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,a ' ) + Switch,EndOfSwitch = GraphSwitchExecutable.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 581 , 132 ) + PyEndOfSwitch = [] + PyEndOfSwitch.append( 'def EndOfSwitch( a , Even , k ) : ' ) + PyEndOfSwitch.append( ' return a ' ) + EndOfSwitch.SetPyFunction( 'EndOfSwitch' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchEven = EndOfSwitch.InPort( 'Even' , 'long' ) + IEndOfSwitchk = EndOfSwitch.InPort( 'k' , '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' ) + OSwitchi = Switch.OutPort( 'i' , 'long' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchExecutable.Link( OIsOdda , IEndOfSwitcha ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchExecutable.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchExecutable.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchExecutable.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchExecutable.Link( OSwitchOdd , IIsOddGate ) + + LSwitchaIsOdda = GraphSwitchExecutable.Link( OSwitcha , IIsOdda ) + + LSwitchiEndOfSwitchk = GraphSwitchExecutable.Link( OSwitchi , IEndOfSwitchk ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchExecutable.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchExecutable.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( 0 ) + IInitLoopSwitchMax.Input( 35 ) + + # Input Ports of the graph + #IEndOfSwitchEven = EndOfSwitch.GetInPort( 'Even' ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + return GraphSwitchExecutable + + +GraphSwitchExecutable = DefGraphSwitchExecutable() diff --git a/examples/GraphSwitchExecutable.xml b/examples/GraphSwitchExecutable.xml new file mode 100644 index 0000000..f65d704 --- /dev/null +++ b/examples/GraphSwitchExecutable.xml @@ -0,0 +1,351 @@ + + + + + +? + ? + GraphSwitchExecutable + 1 + ? + +GraphSwitchExecutable + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + +long + EndOfSwitch__Even + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + +int + Switch__Even + + + 1/10/2003 - 17:23:54 + 8/7/2005 - 14:55:5 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 8/7/2005 - 14:55:5 + 8/7/2005 - 14:55:5 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 8/7/2005 - 14:55:5 + 8/7/2005 - 14:55:5 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 8/7/2005 - 14:55:5 + 8/7/2005 - 14:55:5 + 1.05 + ? + ? + Compute Node + 772 + 132 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +long + i + + + +Switch + + + + + + 8/7/2005 - 14:55:5 + 8/7/2005 - 14:55:5 + 1.05 + ? + ? + Compute Node + 194 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +long + Even + +long + k + + +long + a + + + +EndOfSwitch + + + 8/7/2005 - 14:55:5 + 8/7/2005 - 14:55:5 + 1.05 + ? + ? + Compute Node + 581 + 132 + + +IsOdd + a + EndOfSwitch + a + + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + a + IsOdd + a + + +Switch + i + EndOfSwitch + k + + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + + +GraphSwitchExecutable + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchExecutable + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchExecutable + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 35 + diff --git a/examples/GraphSwitchManyCases.py b/examples/GraphSwitchManyCases.py new file mode 100644 index 0000000..60f8901 --- /dev/null +++ b/examples/GraphSwitchManyCases.py @@ -0,0 +1,233 @@ + +# Generated python file of Graph GraphSwitchManyCases_1 + +from SuperV import * + +# Graph creation of GraphSwitchManyCases_1 +def DefGraphSwitchManyCases_1() : + GraphSwitchManyCases_1 = Graph( 'GraphSwitchManyCases_1' ) + GraphSwitchManyCases_1.SetName( 'GraphSwitchManyCases_1' ) + GraphSwitchManyCases_1.SetAuthor( 'JR' ) + GraphSwitchManyCases_1.SetComment( '' ) + GraphSwitchManyCases_1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyCase1 = [] + PyCase1.append( 'from time import * ' ) + PyCase1.append( 'def Case1(a) : ' ) + PyCase1.append( ' sleep(1) ' ) + PyCase1.append( ' return a ' ) + Case1 = GraphSwitchManyCases_1.INode( 'Case1' , PyCase1 ) + Case1.SetName( 'Case1' ) + Case1.SetAuthor( '' ) + Case1.SetComment( 'Compute Node' ) + Case1.Coords( 448 , 13 ) + ICase1a = Case1.InPort( 'a' , 'long' ) + ICase1Gate = Case1.GetInPort( 'Gate' ) + OCase1a = Case1.OutPort( 'a' , 'long' ) + OCase1Gate = Case1.GetOutPort( 'Gate' ) + + PyCase3 = [] + PyCase3.append( 'from time import * ' ) + PyCase3.append( 'def Case3(b) : ' ) + PyCase3.append( ' sleep(1) ' ) + PyCase3.append( ' return b ' ) + Case3 = GraphSwitchManyCases_1.INode( 'Case3' , PyCase3 ) + Case3.SetName( 'Case3' ) + Case3.SetAuthor( '' ) + Case3.SetComment( 'Compute Node' ) + Case3.Coords( 461 , 500 ) + ICase3b = Case3.InPort( 'b' , 'long' ) + ICase3Gate = Case3.GetInPort( 'Gate' ) + OCase3b = Case3.OutPort( 'b' , 'long' ) + OCase3Gate = Case3.GetOutPort( 'Gate' ) + + PyCase4 = [] + PyCase4.append( 'from time import * ' ) + PyCase4.append( 'def Case4(c) : ' ) + PyCase4.append( ' sleep(1) ' ) + PyCase4.append( ' return ' ) + Case4 = GraphSwitchManyCases_1.INode( 'Case4' , PyCase4 ) + Case4.SetName( 'Case4' ) + Case4.SetAuthor( '' ) + Case4.SetComment( 'Compute Node' ) + Case4.Coords( 455 , 647 ) + ICase4c = Case4.InPort( 'c' , 'long' ) + ICase4Gate = Case4.GetInPort( 'Gate' ) + OCase4Gate = Case4.GetOutPort( 'Gate' ) + + PyCase2a = [] + PyCase2a.append( 'from time import * ' ) + PyCase2a.append( 'def Case2a(a) : ' ) + PyCase2a.append( ' sleep(1) ' ) + PyCase2a.append( ' return a ' ) + Case2a = GraphSwitchManyCases_1.INode( 'Case2a' , PyCase2a ) + Case2a.SetName( 'Case2a' ) + Case2a.SetAuthor( '' ) + Case2a.SetComment( 'Compute Node' ) + Case2a.Coords( 456 , 304 ) + ICase2aa = Case2a.InPort( 'a' , 'long' ) + ICase2aGate = Case2a.GetInPort( 'Gate' ) + OCase2aa = Case2a.OutPort( 'a' , 'long' ) + OCase2aGate = Case2a.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyLoop = [] + PyLoop.append( 'def Init(Index,Max,Min) : ' ) + PyLoop.append( ' Index = Max ' ) + PyLoop.append( ' return Index,Max,Min ' ) + PyMoreLoop = [] + PyMoreLoop.append( 'def More(Index,Max,Min) : ' ) + PyMoreLoop.append( ' if Index >= Min : ' ) + PyMoreLoop.append( ' DoLoop = 1 ' ) + PyMoreLoop.append( ' else : ' ) + PyMoreLoop.append( ' DoLoop = 0 ' ) + PyMoreLoop.append( ' return DoLoop,Index,Max,Min ' ) + PyNextLoop = [] + PyNextLoop.append( 'def Next(Index,Max,Min) : ' ) + PyNextLoop.append( ' Index = Index - 1 ' ) + PyNextLoop.append( ' return Index,Max,Min ' ) + Loop,EndLoop = GraphSwitchManyCases_1.LNode( 'Init' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop ) + EndLoop.SetName( 'EndLoop' ) + EndLoop.SetAuthor( '' ) + EndLoop.SetComment( 'Compute Node' ) + EndLoop.Coords( 972 , 344 ) + PyEndLoop = [] + EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop ) + ILoopDoLoop = Loop.GetInPort( 'DoLoop' ) + ILoopIndex = Loop.InPort( 'Index' , 'long' ) + ILoopMax = Loop.InPort( 'Max' , 'long' ) + ILoopMin = Loop.InPort( 'Min' , 'long' ) + ILoopGate = Loop.GetInPort( 'Gate' ) + OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) + OLoopIndex = Loop.GetOutPort( 'Index' ) + OLoopMax = Loop.GetOutPort( 'Max' ) + OLoopMin = Loop.GetOutPort( 'Min' ) + IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' ) + IEndLoopIndex = EndLoop.GetInPort( 'Index' ) + IEndLoopMax = EndLoop.GetInPort( 'Max' ) + IEndLoopMin = EndLoop.GetInPort( 'Min' ) + IEndLoopGate = EndLoop.GetInPort( 'Gate' ) + OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' ) + OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) + OEndLoopMax = EndLoop.GetOutPort( 'Max' ) + OEndLoopMin = EndLoop.GetOutPort( 'Min' ) + OEndLoopGate = EndLoop.GetOutPort( 'Gate' ) + Loop.SetName( 'Loop' ) + Loop.SetAuthor( '' ) + Loop.SetComment( 'Compute Node' ) + Loop.Coords( 15 , 336 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(Index) : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' SB1 = 0 ' ) + PySwitch.append( ' SB2 = 0 ' ) + PySwitch.append( ' if (Index & 3) == 3 : ' ) + PySwitch.append( ' SB1 = 1 ' ) + PySwitch.append( ' elif (Index & 3) == 0 : ' ) + PySwitch.append( ' SB2 = 1 ' ) + PySwitch.append( ' return SB1,SB2,Index,Index+1,Index+2,Index+3,Index+4,Index+5 ' ) + Switch,EndSwitch = GraphSwitchManyCases_1.SNode( 'Switch' , PySwitch ) + EndSwitch.SetName( 'EndSwitch' ) + EndSwitch.SetAuthor( '' ) + EndSwitch.SetComment( 'Compute Node' ) + EndSwitch.Coords( 732 , 344 ) + PyEndSwitch = [] + PyEndSwitch.append( 'from time import * ' ) + PyEndSwitch.append( 'def EndSwitch(a,b,dd,e,f) : ' ) + PyEndSwitch.append( ' sleep(1) ' ) + PyEndSwitch.append( ' if b != (a+1) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' if dd != (a+3) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' if e != (a+4) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' if f != (a+5) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' return a ' ) + EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) + IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) + IEndSwitchb = EndSwitch.InPort( 'b' , 'long' ) + IEndSwitchdd = EndSwitch.InPort( 'dd' , 'long' ) + IEndSwitche = EndSwitch.InPort( 'e' , 'long' ) + IEndSwitchf = EndSwitch.InPort( 'f' , 'long' ) + IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) + OEndSwitchIndex = EndSwitch.OutPort( 'Index' , 'long' ) + OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 232 , 285 ) + ISwitchIndex = Switch.InPort( 'Index' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchSB1 = Switch.OutPort( 'SB1' , 'long' ) + OSwitchSB2 = Switch.OutPort( 'SB2' , 'long' ) + OSwitcha = Switch.OutPort( 'a' , 'long' ) + OSwitchb = Switch.OutPort( 'b' , 'long' ) + OSwitchc = Switch.OutPort( 'c' , 'long' ) + OSwitchd = Switch.OutPort( 'd' , 'long' ) + OSwitche = Switch.OutPort( 'e' , 'long' ) + OSwitchf = Switch.OutPort( 'f' , 'long' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LLoopIndexSwitchIndex = GraphSwitchManyCases_1.Link( OLoopIndex , ISwitchIndex ) + + LLoopMaxEndLoopMax = GraphSwitchManyCases_1.Link( OLoopMax , IEndLoopMax ) + + LLoopMinEndLoopMin = GraphSwitchManyCases_1.Link( OLoopMin , IEndLoopMin ) + + LSwitchSB1Case1Gate = GraphSwitchManyCases_1.Link( OSwitchSB1 , ICase1Gate ) + + LSwitchSB2Case2aGate = GraphSwitchManyCases_1.Link( OSwitchSB2 , ICase2aGate ) + + LSwitchaCase1a = GraphSwitchManyCases_1.Link( OSwitcha , ICase1a ) + + LSwitchaCase2aa = GraphSwitchManyCases_1.Link( OSwitcha , ICase2aa ) + + LSwitchbCase3b = GraphSwitchManyCases_1.Link( OSwitchb , ICase3b ) + + LSwitchcCase4c = GraphSwitchManyCases_1.Link( OSwitchc , ICase4c ) + + LSwitchdEndSwitchdd = GraphSwitchManyCases_1.Link( OSwitchd , IEndSwitchdd ) + + LSwitcheEndSwitche = GraphSwitchManyCases_1.Link( OSwitche , IEndSwitche ) + + LSwitchDefaultEndSwitchDefault = GraphSwitchManyCases_1.Link( OSwitchDefault , IEndSwitchDefault ) + + LEndSwitchIndexEndLoopIndex = GraphSwitchManyCases_1.Link( OEndSwitchIndex , IEndLoopIndex ) + + LCase1aEndSwitcha = GraphSwitchManyCases_1.Link( OCase1a , IEndSwitcha ) + + LCase3bEndSwitchb = GraphSwitchManyCases_1.Link( OCase3b , IEndSwitchb ) + + LCase4GateEndSwitchDefault = GraphSwitchManyCases_1.Link( OCase4Gate , IEndSwitchDefault ) + + LCase2aaEndSwitcha = GraphSwitchManyCases_1.Link( OCase2aa , IEndSwitcha ) + + # Input datas + ILoopIndex.Input( 0 ) + ILoopMax.Input( 23 ) + ILoopMin.Input( -7 ) + + # Input Ports of the graph + #IEndSwitchf = EndSwitch.GetInPort( 'f' ) + + # Output Ports of the graph + #OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) + #OEndLoopMax = EndLoop.GetOutPort( 'Max' ) + #OEndLoopMin = EndLoop.GetOutPort( 'Min' ) + #OSwitchf = Switch.GetOutPort( 'f' ) + return GraphSwitchManyCases_1 + + +GraphSwitchManyCases_1 = DefGraphSwitchManyCases_1() diff --git a/examples/GraphSwitchManyCases.xml b/examples/GraphSwitchManyCases.xml new file mode 100644 index 0000000..92cabdd --- /dev/null +++ b/examples/GraphSwitchManyCases.xml @@ -0,0 +1,529 @@ + + + + + +? + ? + GraphSwitchManyCases_1 + 1 + ? + +GraphSwitchManyCases_1 + + +long + Loop__Index + +long + Loop__Max + +long + Loop__Min + +long + EndSwitch__f + + +long + EndLoop__Index + +long + EndLoop__Max + +long + EndLoop__Min + +long + Switch__f + + + 29/6/2005 - 16:32:43 + 8/7/2005 - 15:11:40 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + Loop + 4 + EndLoop + +Loop + + +long + Index + +long + Max + +long + Min + + +long + Index + +long + Max + +long + Min + + + +Init + + + + +More + + = Min : ]]> + + + + + +Next + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 15 + 336 + +? + ? + EndLoop + 5 + Loop + +EndLoop + + +long + Index + +long + Max + +long + Min + + +long + Index + +long + Max + +long + Min + + + +EndLoop + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 972 + 344 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + Index + + +long + SB1 + +long + SB2 + +long + a + +long + b + +long + c + +long + d + +long + e + +long + f + + + +Switch + + + + + + + + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 232 + 285 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + +long + b + +long + dd + +long + e + +long + f + + +long + Index + + + +EndSwitch + + + + + + + + + + + + + + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 732 + 344 + +? + ? + Case1 + 3 + ? + +Case1 + + +long + a + + +long + a + + + +Case1 + + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 448 + 13 + +? + ? + Case3 + 3 + ? + +Case3 + + +long + b + + +long + b + + + +Case3 + + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 461 + 500 + +? + ? + Case4 + 3 + ? + +Case4 + + +long + c + + + + +Case4 + + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 455 + 647 + +? + ? + Case2a + 3 + ? + +Case2a + + +long + a + + +long + a + + + +Case2a + + + + + 8/7/2005 - 15:10:54 + 8/7/2005 - 15:10:54 + 2.0 + ? + ? + Compute Node + 456 + 304 + + +Loop + DoLoop + EndLoop + DoLoop + + +Loop + Index + Switch + Index + + +Loop + Max + EndLoop + Max + + +Loop + Min + EndLoop + Min + + +EndLoop + DoLoop + Loop + DoLoop + + +Switch + SB1 + Case1 + Gate + + +Switch + SB2 + Case2a + Gate + + +Switch + a + Case1 + a + + +Switch + a + Case2a + a + + +Switch + b + Case3 + b + + +Switch + c + Case4 + c + + +Switch + d + EndSwitch + dd + + +Switch + e + EndSwitch + e + + +Switch + Default + EndSwitch + Default + + +EndSwitch + Index + EndLoop + Index + + +Case1 + a + EndSwitch + a + + +Case3 + b + EndSwitch + b + + +Case4 + Gate + EndSwitch + Default + + +Case2a + a + EndSwitch + a + + + +GraphSwitchManyCases_1 + Loop__Index + Loop + Index + +3 + 0 + + +GraphSwitchManyCases_1 + Loop__Max + Loop + Max + +3 + 23 + + +GraphSwitchManyCases_1 + Loop__Min + Loop + Min + +3 + -7 + diff --git a/examples/GraphSwitchManyCasesNOTValid.py b/examples/GraphSwitchManyCasesNOTValid.py new file mode 100644 index 0000000..ff312e3 --- /dev/null +++ b/examples/GraphSwitchManyCasesNOTValid.py @@ -0,0 +1,250 @@ + +# Generated python file of Graph GraphSwitchManyCasesNOTValid + +from SuperV import * + +# Graph creation of GraphSwitchManyCasesNOTValid +def DefGraphSwitchManyCasesNOTValid() : + GraphSwitchManyCasesNOTValid = Graph( 'GraphSwitchManyCasesNOTValid' ) + GraphSwitchManyCasesNOTValid.SetName( 'GraphSwitchManyCasesNOTValid' ) + GraphSwitchManyCasesNOTValid.SetAuthor( 'JR' ) + GraphSwitchManyCasesNOTValid.SetComment( '' ) + GraphSwitchManyCasesNOTValid.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyCase1 = [] + PyCase1.append( 'from time import * ' ) + PyCase1.append( 'def Case1(a) : ' ) + PyCase1.append( ' sleep(1) ' ) + PyCase1.append( ' return a ' ) + Case1 = GraphSwitchManyCasesNOTValid.INode( 'Case1' , PyCase1 ) + Case1.SetName( 'Case1' ) + Case1.SetAuthor( '' ) + Case1.SetComment( 'Compute Node' ) + Case1.Coords( 448 , 13 ) + ICase1a = Case1.InPort( 'a' , 'long' ) + ICase1Gate = Case1.GetInPort( 'Gate' ) + OCase1a = Case1.OutPort( 'a' , 'long' ) + OCase1Gate = Case1.GetOutPort( 'Gate' ) + + PyCase3 = [] + PyCase3.append( 'from time import * ' ) + PyCase3.append( 'def Case3(b) : ' ) + PyCase3.append( ' sleep(1) ' ) + PyCase3.append( ' return b ' ) + Case3 = GraphSwitchManyCasesNOTValid.INode( 'Case3' , PyCase3 ) + Case3.SetName( 'Case3' ) + Case3.SetAuthor( '' ) + Case3.SetComment( 'Compute Node' ) + Case3.Coords( 461 , 500 ) + ICase3b = Case3.InPort( 'b' , 'long' ) + ICase3Gate = Case3.GetInPort( 'Gate' ) + OCase3b = Case3.OutPort( 'b' , 'long' ) + OCase3Gate = Case3.GetOutPort( 'Gate' ) + + PyCase4 = [] + PyCase4.append( 'from time import * ' ) + PyCase4.append( 'def Case4(c) : ' ) + PyCase4.append( ' sleep(1) ' ) + PyCase4.append( ' return ' ) + Case4 = GraphSwitchManyCasesNOTValid.INode( 'Case4' , PyCase4 ) + Case4.SetName( 'Case4' ) + Case4.SetAuthor( '' ) + Case4.SetComment( 'Compute Node' ) + Case4.Coords( 455 , 647 ) + ICase4c = Case4.InPort( 'c' , 'long' ) + ICase4Gate = Case4.GetInPort( 'Gate' ) + OCase4Gate = Case4.GetOutPort( 'Gate' ) + + PyCase2 = [] + PyCase2.append( 'from time import * ' ) + PyCase2.append( 'def Case2() : ' ) + PyCase2.append( ' sleep(1) ' ) + PyCase2.append( ' return ' ) + Case2 = GraphSwitchManyCasesNOTValid.INode( 'Case2' , PyCase2 ) + Case2.SetName( 'Case2' ) + Case2.SetAuthor( '' ) + Case2.SetComment( 'Compute Node' ) + Case2.Coords( 455 , 179 ) + ICase2Gate = Case2.GetInPort( 'Gate' ) + OCase2Gate = Case2.GetOutPort( 'Gate' ) + + PyCase2a = [] + PyCase2a.append( 'from time import * ' ) + PyCase2a.append( 'def Case2a(a) : ' ) + PyCase2a.append( ' sleep(1) ' ) + PyCase2a.append( ' return a ' ) + Case2a = GraphSwitchManyCasesNOTValid.INode( 'Case2a' , PyCase2a ) + Case2a.SetName( 'Case2a' ) + Case2a.SetAuthor( '' ) + Case2a.SetComment( 'Compute Node' ) + Case2a.Coords( 456 , 304 ) + ICase2aa = Case2a.InPort( 'a' , 'long' ) + ICase2aGate = Case2a.GetInPort( 'Gate' ) + OCase2aa = Case2a.OutPort( 'a' , 'long' ) + OCase2aGate = Case2a.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyLoop = [] + PyLoop.append( 'def Init(Index,Max,Min) : ' ) + PyLoop.append( ' Index = Max ' ) + PyLoop.append( ' return Index,Max,Min ' ) + PyMoreLoop = [] + PyMoreLoop.append( 'def More(Index,Max,Min) : ' ) + PyMoreLoop.append( ' if Index >= Min : ' ) + PyMoreLoop.append( ' DoLoop = 1 ' ) + PyMoreLoop.append( ' else : ' ) + PyMoreLoop.append( ' DoLoop = 0 ' ) + PyMoreLoop.append( ' return DoLoop,Index,Max,Min ' ) + PyNextLoop = [] + PyNextLoop.append( 'def Next(Index,Max,Min) : ' ) + PyNextLoop.append( ' Index = Index - 1 ' ) + PyNextLoop.append( ' return Index,Max,Min ' ) + Loop,EndLoop = GraphSwitchManyCasesNOTValid.LNode( 'Init' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop ) + EndLoop.SetName( 'EndLoop' ) + EndLoop.SetAuthor( '' ) + EndLoop.SetComment( 'Compute Node' ) + EndLoop.Coords( 972 , 344 ) + PyEndLoop = [] + EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop ) + ILoopDoLoop = Loop.GetInPort( 'DoLoop' ) + ILoopIndex = Loop.InPort( 'Index' , 'long' ) + ILoopMax = Loop.InPort( 'Max' , 'long' ) + ILoopMin = Loop.InPort( 'Min' , 'long' ) + ILoopGate = Loop.GetInPort( 'Gate' ) + OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) + OLoopIndex = Loop.GetOutPort( 'Index' ) + OLoopMax = Loop.GetOutPort( 'Max' ) + OLoopMin = Loop.GetOutPort( 'Min' ) + IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' ) + IEndLoopIndex = EndLoop.GetInPort( 'Index' ) + IEndLoopMax = EndLoop.GetInPort( 'Max' ) + IEndLoopMin = EndLoop.GetInPort( 'Min' ) + IEndLoopGate = EndLoop.GetInPort( 'Gate' ) + OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' ) + OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) + OEndLoopMax = EndLoop.GetOutPort( 'Max' ) + OEndLoopMin = EndLoop.GetOutPort( 'Min' ) + OEndLoopGate = EndLoop.GetOutPort( 'Gate' ) + Loop.SetName( 'Loop' ) + Loop.SetAuthor( '' ) + Loop.SetComment( 'Compute Node' ) + Loop.Coords( 15 , 336 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(Index) : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' SB1 = 0 ' ) + PySwitch.append( ' SB2 = 0 ' ) + PySwitch.append( ' if (Index & 3) == 3 : ' ) + PySwitch.append( ' SB1 = 1 ' ) + PySwitch.append( ' elif (Index & 3) == 0 : ' ) + PySwitch.append( ' SB2 = 1 ' ) + PySwitch.append( ' return SB1,SB2,Index,Index+1,Index+2,Index+3,Index+4,Index+5 ' ) + Switch,EndSwitch = GraphSwitchManyCasesNOTValid.SNode( 'Switch' , PySwitch ) + EndSwitch.SetName( 'EndSwitch' ) + EndSwitch.SetAuthor( '' ) + EndSwitch.SetComment( 'Compute Node' ) + EndSwitch.Coords( 732 , 344 ) + PyEndSwitch = [] + PyEndSwitch.append( 'from time import * ' ) + PyEndSwitch.append( 'def EndSwitch(a,b,dd,e,f) : ' ) + PyEndSwitch.append( ' sleep(1) ' ) + PyEndSwitch.append( ' if b != (a+1) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' if dd != (a+3) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' if e != (a+4) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' if f != (a+5) : ' ) + PyEndSwitch.append( ' print 'EndSwitch ERROR' ' ) + PyEndSwitch.append( ' pass ' ) + PyEndSwitch.append( ' return a ' ) + EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) + IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) + IEndSwitchb = EndSwitch.InPort( 'b' , 'long' ) + IEndSwitchdd = EndSwitch.InPort( 'dd' , 'long' ) + IEndSwitche = EndSwitch.InPort( 'e' , 'long' ) + IEndSwitchf = EndSwitch.InPort( 'f' , 'long' ) + IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) + OEndSwitchIndex = EndSwitch.OutPort( 'Index' , 'long' ) + OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 232 , 285 ) + ISwitchIndex = Switch.InPort( 'Index' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchSB1 = Switch.OutPort( 'SB1' , 'long' ) + OSwitchSB2 = Switch.OutPort( 'SB2' , 'long' ) + OSwitcha = Switch.OutPort( 'a' , 'long' ) + OSwitchb = Switch.OutPort( 'b' , 'long' ) + OSwitchc = Switch.OutPort( 'c' , 'long' ) + OSwitchd = Switch.OutPort( 'd' , 'long' ) + OSwitche = Switch.OutPort( 'e' , 'long' ) + OSwitchf = Switch.OutPort( 'f' , 'long' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LLoopIndexSwitchIndex = GraphSwitchManyCasesNOTValid.Link( OLoopIndex , ISwitchIndex ) + + LLoopMaxEndLoopMax = GraphSwitchManyCasesNOTValid.Link( OLoopMax , IEndLoopMax ) + + LLoopMinEndLoopMin = GraphSwitchManyCasesNOTValid.Link( OLoopMin , IEndLoopMin ) + + LSwitchSB1Case1Gate = GraphSwitchManyCasesNOTValid.Link( OSwitchSB1 , ICase1Gate ) + + LSwitchSB2Case2Gate = GraphSwitchManyCasesNOTValid.Link( OSwitchSB2 , ICase2Gate ) + + LSwitchSB2Case2aGate = GraphSwitchManyCasesNOTValid.Link( OSwitchSB2 , ICase2aGate ) + + LSwitchaCase1a = GraphSwitchManyCasesNOTValid.Link( OSwitcha , ICase1a ) + + LSwitchaCase2aa = GraphSwitchManyCasesNOTValid.Link( OSwitcha , ICase2aa ) + + LSwitchbCase3b = GraphSwitchManyCasesNOTValid.Link( OSwitchb , ICase3b ) + + LSwitchcCase4c = GraphSwitchManyCasesNOTValid.Link( OSwitchc , ICase4c ) + + LSwitchdEndSwitchdd = GraphSwitchManyCasesNOTValid.Link( OSwitchd , IEndSwitchdd ) + + LSwitcheEndSwitche = GraphSwitchManyCasesNOTValid.Link( OSwitche , IEndSwitche ) + + LSwitchDefaultEndSwitchDefault = GraphSwitchManyCasesNOTValid.Link( OSwitchDefault , IEndSwitchDefault ) + + LEndSwitchIndexEndLoopIndex = GraphSwitchManyCasesNOTValid.Link( OEndSwitchIndex , IEndLoopIndex ) + + LCase1aEndSwitcha = GraphSwitchManyCasesNOTValid.Link( OCase1a , IEndSwitcha ) + + LCase3bEndSwitchb = GraphSwitchManyCasesNOTValid.Link( OCase3b , IEndSwitchb ) + + LCase4GateEndSwitchDefault = GraphSwitchManyCasesNOTValid.Link( OCase4Gate , IEndSwitchDefault ) + + LCase2GateEndSwitchDefault = GraphSwitchManyCasesNOTValid.Link( OCase2Gate , IEndSwitchDefault ) + + LCase2aaEndSwitcha = GraphSwitchManyCasesNOTValid.Link( OCase2aa , IEndSwitcha ) + + # Input datas + ILoopIndex.Input( 0 ) + ILoopMax.Input( 23 ) + ILoopMin.Input( -7 ) + + # Input Ports of the graph + #IEndSwitchf = EndSwitch.GetInPort( 'f' ) + + # Output Ports of the graph + #OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) + #OEndLoopMax = EndLoop.GetOutPort( 'Max' ) + #OEndLoopMin = EndLoop.GetOutPort( 'Min' ) + #OSwitchf = Switch.GetOutPort( 'f' ) + return GraphSwitchManyCasesNOTValid + + +GraphSwitchManyCasesNOTValid = DefGraphSwitchManyCasesNOTValid() diff --git a/examples/GraphSwitchManyCasesNOTValid.xml b/examples/GraphSwitchManyCasesNOTValid.xml new file mode 100644 index 0000000..4883fb3 --- /dev/null +++ b/examples/GraphSwitchManyCasesNOTValid.xml @@ -0,0 +1,567 @@ + + + + + +? + ? + GraphSwitchManyCasesNOTValid + 1 + ? + +GraphSwitchManyCases_1_1_1 + + +long + Loop__Index + +long + Loop__Max + +long + Loop__Min + +long + EndSwitch__f + + +long + EndLoop__Index + +long + EndLoop__Max + +long + EndLoop__Min + +long + Switch__f + + + 29/6/2005 - 16:32:43 + 8/7/2005 - 15:6:33 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + Loop + 4 + EndLoop + +Loop + + +long + Index + +long + Max + +long + Min + + +long + Index + +long + Max + +long + Min + + + +Init + + + + +More + + = Min : ]]> + + + + + +Next + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 15 + 336 + +? + ? + EndLoop + 5 + Loop + +EndLoop + + +long + Index + +long + Max + +long + Min + + +long + Index + +long + Max + +long + Min + + + +EndLoop + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 972 + 344 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + Index + + +long + SB1 + +long + SB2 + +long + a + +long + b + +long + c + +long + d + +long + e + +long + f + + + +Switch + + + + + + + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 232 + 285 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + +long + b + +long + dd + +long + e + +long + f + + +long + Index + + + +EndSwitch + + + + + + + + + + + + + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 732 + 344 + +? + ? + Case1 + 3 + ? + +Case1 + + +long + a + + +long + a + + + +Case1 + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 448 + 13 + +? + ? + Case3 + 3 + ? + +Case3 + + +long + b + + +long + b + + + +Case3 + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 461 + 500 + +? + ? + Case4 + 3 + ? + +Case4 + + +long + c + + + + +Case4 + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 455 + 647 + +? + ? + Case2 + 3 + ? + +Case2 + + + + + +Case2 + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 455 + 179 + +? + ? + Case2a + 3 + ? + +Case2a + + +long + a + + +long + a + + + +Case2a + + + + + 8/7/2005 - 15:6:33 + 8/7/2005 - 15:6:33 + 2.0 + ? + ? + Compute Node + 456 + 304 + + +Loop + DoLoop + EndLoop + DoLoop + + +Loop + Index + Switch + Index + + +Loop + Max + EndLoop + Max + + +Loop + Min + EndLoop + Min + + +EndLoop + DoLoop + Loop + DoLoop + + +Switch + SB1 + Case1 + Gate + + +Switch + SB2 + Case2 + Gate + + +Switch + SB2 + Case2a + Gate + + +Switch + a + Case1 + a + + +Switch + a + Case2a + a + + +Switch + b + Case3 + b + + +Switch + c + Case4 + c + + +Switch + d + EndSwitch + dd + + +Switch + e + EndSwitch + e + + +Switch + Default + EndSwitch + Default + + +EndSwitch + Index + EndLoop + Index + + +Case1 + a + EndSwitch + a + + +Case3 + b + EndSwitch + b + + +Case4 + Gate + EndSwitch + Default + + +Case2 + Gate + EndSwitch + Default + + +Case2a + a + EndSwitch + a + + + +GraphSwitchManyCasesNOTValid + Loop__Index + Loop + Index + +3 + 0 + + +GraphSwitchManyCasesNOTValid + Loop__Max + Loop + Max + +3 + 23 + + +GraphSwitchManyCasesNOTValid + Loop__Min + Loop + Min + +3 + -7 + diff --git a/examples/GraphSwitchNOTExecutable.py b/examples/GraphSwitchNOTExecutable.py new file mode 100644 index 0000000..028cb26 --- /dev/null +++ b/examples/GraphSwitchNOTExecutable.py @@ -0,0 +1,142 @@ + +# Generated python file of Graph GraphSwitchNOTExecutable + +from SuperV import * + +# Graph creation of GraphSwitchNOTExecutable +def DefGraphSwitchNOTExecutable() : + GraphSwitchNOTExecutable = Graph( 'GraphSwitchNOTExecutable' ) + GraphSwitchNOTExecutable.SetName( 'GraphSwitchNOTExecutable' ) + GraphSwitchNOTExecutable.SetAuthor( '' ) + GraphSwitchNOTExecutable.SetComment( '' ) + GraphSwitchNOTExecutable.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 = GraphSwitchNOTExecutable.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 = GraphSwitchNOTExecutable.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 = GraphSwitchNOTExecutable.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' ) + OSwitchn = Switch.OutPort( 'n' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchNOTExecutable.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha.AddCoord( 1 , 564 , 201 ) + LIsOddaEndOfSwitcha.AddCoord( 2 , 564 , 137 ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchNOTExecutable.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchNOTExecutable.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchNOTExecutable.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchNOTExecutable.Link( OSwitchOdd , IIsOddGate ) + + LSwitchnIsOdda = GraphSwitchNOTExecutable.Link( OSwitchn , IIsOdda ) + LSwitchnIsOdda.AddCoord( 1 , 371 , 136 ) + LSwitchnIsOdda.AddCoord( 2 , 371 , 200 ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchNOTExecutable.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchNOTExecutable.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 GraphSwitchNOTExecutable + + +GraphSwitchNOTExecutable = DefGraphSwitchNOTExecutable() diff --git a/examples/GraphSwitchNOTExecutable.xml b/examples/GraphSwitchNOTExecutable.xml new file mode 100644 index 0000000..9efc0a7 --- /dev/null +++ b/examples/GraphSwitchNOTExecutable.xml @@ -0,0 +1,344 @@ + + + + + +? + ? + GraphSwitchNOTExecutable + 1 + ? + +GraphSwitch_3 + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + +int + Switch__Even + + + 1/10/2003 - 17:23:54 + 22/6/2005 - 16:49:45 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 22/6/2005 - 16:49:45 + 22/6/2005 - 16:49:45 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 22/6/2005 - 16:49:45 + 22/6/2005 - 16:49:45 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 22/6/2005 - 16:49:45 + 22/6/2005 - 16:49:45 + 1.05 + ? + ? + Compute Node + 776 + 170 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + n + + + +Switch + + + + + + 22/6/2005 - 16:49:45 + 22/6/2005 - 16:49:45 + 1.05 + ? + ? + Compute Node + 194 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + + +long + a + + + +? + + 22/6/2005 - 16:49:45 + 22/6/2005 - 16:49:45 + 1.05 + ? + ? + Compute Node + 582 + 170 + + +IsOdd + a + EndOfSwitch + a + + +564 + 201 + +564 + 137 + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + n + IsOdd + a + + +371 + 136 + +371 + 200 + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + + +GraphSwitchNOTExecutable + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchNOTExecutable + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchNOTExecutable + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 100 + diff --git a/examples/GraphSwitchNOTExecutable1.py b/examples/GraphSwitchNOTExecutable1.py new file mode 100644 index 0000000..7849487 --- /dev/null +++ b/examples/GraphSwitchNOTExecutable1.py @@ -0,0 +1,144 @@ + +# Generated python file of Graph GraphSwitchNOTExecutable1 + +from SuperV import * + +# Graph creation of GraphSwitchNOTExecutable1 +def DefGraphSwitchNOTExecutable1() : + GraphSwitchNOTExecutable1 = Graph( 'GraphSwitchNOTExecutable1' ) + GraphSwitchNOTExecutable1.SetName( 'GraphSwitchNOTExecutable1' ) + GraphSwitchNOTExecutable1.SetAuthor( '' ) + GraphSwitchNOTExecutable1.SetComment( '' ) + GraphSwitchNOTExecutable1.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 = GraphSwitchNOTExecutable1.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 = GraphSwitchNOTExecutable1.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 = GraphSwitchNOTExecutable1.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' ) + OSwitchn = Switch.OutPort( 'n' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchNOTExecutable1.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha.AddCoord( 1 , 564 , 201 ) + LIsOddaEndOfSwitcha.AddCoord( 2 , 564 , 137 ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchNOTExecutable1.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchNOTExecutable1.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchNOTExecutable1.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchNOTExecutable1.Link( OSwitchOdd , IIsOddGate ) + + LSwitchnIsOdda = GraphSwitchNOTExecutable1.Link( OSwitchn , IIsOdda ) + LSwitchnIsOdda.AddCoord( 1 , 371 , 136 ) + LSwitchnIsOdda.AddCoord( 2 , 371 , 200 ) + + LSwitchnEndOfSwitcha = GraphSwitchNOTExecutable1.Link( OSwitchn , IEndOfSwitcha ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchNOTExecutable1.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchNOTExecutable1.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 GraphSwitchNOTExecutable1 + + +GraphSwitchNOTExecutable1 = DefGraphSwitchNOTExecutable1() diff --git a/examples/GraphSwitchNOTExecutable1.xml b/examples/GraphSwitchNOTExecutable1.xml new file mode 100644 index 0000000..186c069 --- /dev/null +++ b/examples/GraphSwitchNOTExecutable1.xml @@ -0,0 +1,350 @@ + + + + + +? + ? + GraphSwitchNOTExecutable1 + 1 + ? + +GraphSwitchExecutable_1 + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + +int + Switch__Even + + + 1/10/2003 - 17:23:54 + 22/6/2005 - 16:57:22 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 22/6/2005 - 16:57:22 + 22/6/2005 - 16:57:22 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 22/6/2005 - 16:57:22 + 22/6/2005 - 16:57:22 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 22/6/2005 - 16:57:22 + 22/6/2005 - 16:57:22 + 1.05 + ? + ? + Compute Node + 776 + 170 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + n + + + +Switch + + + + + + 22/6/2005 - 16:57:22 + 22/6/2005 - 16:57:22 + 1.05 + ? + ? + Compute Node + 194 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + + +long + a + + + +? + + 22/6/2005 - 16:57:22 + 22/6/2005 - 16:57:22 + 1.05 + ? + ? + Compute Node + 582 + 170 + + +IsOdd + a + EndOfSwitch + a + + +564 + 201 + +564 + 137 + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + n + IsOdd + a + + +371 + 136 + +371 + 200 + +Switch + n + EndOfSwitch + a + + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + + +GraphSwitchNOTExecutable1 + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchNOTExecutable1 + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchNOTExecutable1 + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 100 + diff --git a/examples/GraphSwitchNOTExecutable2.py b/examples/GraphSwitchNOTExecutable2.py new file mode 100644 index 0000000..ae08f73 --- /dev/null +++ b/examples/GraphSwitchNOTExecutable2.py @@ -0,0 +1,147 @@ + +# Generated python file of Graph GraphSwitchNOTExecutable2 + +from SuperV import * + +# Graph creation of GraphSwitchNOTExecutable2 +def DefGraphSwitchNOTExecutable2() : + GraphSwitchNOTExecutable2 = Graph( 'GraphSwitchNOTExecutable2' ) + GraphSwitchNOTExecutable2.SetName( 'GraphSwitchNOTExecutable2' ) + GraphSwitchNOTExecutable2.SetAuthor( 'JR' ) + GraphSwitchNOTExecutable2.SetComment( '' ) + GraphSwitchNOTExecutable2.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 = GraphSwitchNOTExecutable2.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 = GraphSwitchNOTExecutable2.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 772 , 132 ) + 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 = GraphSwitchNOTExecutable2.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 581 , 132 ) + PyEndOfSwitch = [] + EndOfSwitch.SetPyFunction( '' , PyEndOfSwitch ) + IEndOfSwitcha = EndOfSwitch.InPort( 'a' , 'long' ) + IEndOfSwitchEven = EndOfSwitch.InPort( 'Even' , 'long' ) + IEndOfSwitchk = EndOfSwitch.InPort( 'k' , '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' ) + OSwitchn = Switch.OutPort( 'n' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchNOTExecutable2.Link( OIsOdda , IEndOfSwitcha ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchNOTExecutable2.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchNOTExecutable2.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchNOTExecutable2.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchNOTExecutable2.Link( OSwitchOdd , IIsOddGate ) + + LSwitchnIsOdda = GraphSwitchNOTExecutable2.Link( OSwitchn , IIsOdda ) + LSwitchnIsOdda.AddCoord( 1 , 371 , 136 ) + LSwitchnIsOdda.AddCoord( 2 , 371 , 200 ) + + LSwitchnEndOfSwitchk = GraphSwitchNOTExecutable2.Link( OSwitchn , IEndOfSwitchk ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchNOTExecutable2.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchNOTExecutable2.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + # Input datas + IInitLoopSwitchIndex.Input( 0 ) + IInitLoopSwitchMin.Input( 0 ) + IInitLoopSwitchMax.Input( 100 ) + + # Input Ports of the graph + #IEndOfSwitchEven = EndOfSwitch.GetInPort( 'Even' ) + + # Output Ports of the graph + #OEndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.GetOutPort( 'Index' ) + #OEndOfInitLoopSwitchMin = EndOfInitLoopSwitch.GetOutPort( 'Min' ) + #OEndOfInitLoopSwitchMax = EndOfInitLoopSwitch.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + return GraphSwitchNOTExecutable2 + + +GraphSwitchNOTExecutable2 = DefGraphSwitchNOTExecutable2() diff --git a/examples/GraphSwitchNOTExecutable2.xml b/examples/GraphSwitchNOTExecutable2.xml new file mode 100644 index 0000000..71efb27 --- /dev/null +++ b/examples/GraphSwitchNOTExecutable2.xml @@ -0,0 +1,353 @@ + + + + + +? + ? + GraphSwitchNOTExecutable2 + 1 + ? + +GraphSwitchExecutable + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + +long + EndOfSwitch__Even + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + +int + Switch__Even + + + 1/10/2003 - 17:23:54 + 23/6/2005 - 10:53:15 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 23/6/2005 - 10:53:15 + 23/6/2005 - 10:53:15 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 23/6/2005 - 10:53:15 + 23/6/2005 - 10:53:15 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 23/6/2005 - 10:53:15 + 23/6/2005 - 10:53:15 + 1.05 + ? + ? + Compute Node + 772 + 132 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + n + + + +Switch + + + + + + 23/6/2005 - 10:53:15 + 23/6/2005 - 10:53:15 + 1.05 + ? + ? + Compute Node + 194 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +long + Even + +long + k + + +long + a + + + +? + + 23/6/2005 - 10:53:15 + 23/6/2005 - 10:53:15 + 1.05 + ? + ? + Compute Node + 581 + 132 + + +IsOdd + a + EndOfSwitch + a + + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + n + IsOdd + a + + +371 + 136 + +371 + 200 + +Switch + n + EndOfSwitch + k + + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + + +GraphSwitchNOTExecutable2 + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchNOTExecutable2 + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchNOTExecutable2 + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 100 + diff --git a/examples/GraphSyrControlAveAborted.py b/examples/GraphSyrControlAveAborted.py new file mode 100644 index 0000000..30101b6 --- /dev/null +++ b/examples/GraphSyrControlAveAborted.py @@ -0,0 +1,413 @@ + +# Generated python file of Graph GraphSyrControlAveAborted + +from SuperV import * + +# Graph creation of GraphSyrControlAveAborted +def DefGraphSyrControlAveAborted() : + GraphSyrControlAveAborted = Graph( 'GraphSyrControlAveAborted' ) + GraphSyrControlAveAborted.SetName( 'GraphSyrControlAveAborted' ) + GraphSyrControlAveAborted.SetAuthor( 'JR' ) + GraphSyrControlAveAborted.SetComment( 'Syracuse algorithm' ) + GraphSyrControlAveAborted.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + test_ISEVEN = GraphSyrControlAveAborted.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( 370 , 455 ) + 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 = GraphSyrControlAveAborted.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( 370 , 127 ) + 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 = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) + m3p1.SetName( 'm3p1' ) + m3p1.SetAuthor( '' ) + m3p1.SetContainer( 'localhost/FactoryServer' ) + m3p1.SetComment( 'C_M3P1 from SyrComponent' ) + m3p1.Coords( 789 , 0 ) + Im3p1anOddInteger = m3p1.GetInPort( 'anOddInteger' ) + Im3p1Gate = m3p1.GetInPort( 'Gate' ) + Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' ) + Om3p1Gate = m3p1.GetOutPort( 'Gate' ) + + div2 = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2.SetName( 'div2' ) + div2.SetAuthor( '' ) + div2.SetContainer( 'localhost/FactoryServer' ) + div2.SetComment( 'C_DIV2 from SyrComponent' ) + div2.Coords( 789 , 255 ) + Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' ) + Idiv2Gate = div2.GetInPort( 'Gate' ) + Odiv2anInteger = div2.GetOutPort( 'anInteger' ) + Odiv2Gate = div2.GetOutPort( 'Gate' ) + + incr = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr.SetName( 'incr' ) + incr.SetAuthor( '' ) + incr.SetContainer( 'localhost/FactoryServer' ) + incr.SetComment( 'C_INCR from SyrComponent' ) + incr.Coords( 790 , 136 ) + IincraCount = incr.GetInPort( 'aCount' ) + IincrGate = incr.GetInPort( 'Gate' ) + OincraNewCount = incr.GetOutPort( 'aNewCount' ) + OincrGate = incr.GetOutPort( 'Gate' ) + + C_MIN = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MIN' ) + C_MIN.SetName( 'C_MIN' ) + C_MIN.SetAuthor( '' ) + C_MIN.SetContainer( 'localhost/FactoryServer' ) + C_MIN.SetComment( 'C_MIN from SyrComponent' ) + C_MIN.Coords( 798 , 833 ) + IC_MINaMinVal = C_MIN.GetInPort( 'aMinVal' ) + IC_MINanInteger = C_MIN.GetInPort( 'anInteger' ) + IC_MINGate = C_MIN.GetInPort( 'Gate' ) + OC_MINaNewMinVal = C_MIN.GetOutPort( 'aNewMinVal' ) + OC_MINGate = C_MIN.GetOutPort( 'Gate' ) + + C_MAX = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MAX' ) + C_MAX.SetName( 'C_MAX' ) + C_MAX.SetAuthor( '' ) + C_MAX.SetContainer( 'localhost/FactoryServer' ) + C_MAX.SetComment( 'C_MAX from SyrComponent' ) + C_MAX.Coords( 798 , 668 ) + IC_MAXaMaxVal = C_MAX.GetInPort( 'aMaxVal' ) + IC_MAXanInteger = C_MAX.GetInPort( 'anInteger' ) + IC_MAXGate = C_MAX.GetInPort( 'Gate' ) + OC_MAXaNewMaxVal = C_MAX.GetOutPort( 'aNewMaxVal' ) + OC_MAXGate = C_MAX.GetOutPort( 'Gate' ) + + C_AVERAGE = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_AVERAGE' ) + C_AVERAGE.SetName( 'C_AVERAGE' ) + C_AVERAGE.SetAuthor( '' ) + C_AVERAGE.SetContainer( 'localhost/FactoryServer' ) + C_AVERAGE.SetComment( 'C_AVERAGE from SyrComponent' ) + C_AVERAGE.Coords( 784 , 476 ) + IC_AVERAGEaListOfSyr = C_AVERAGE.GetInPort( 'aListOfSyr' ) + IC_AVERAGEanInteger = C_AVERAGE.GetInPort( 'anInteger' ) + IC_AVERAGEaCount = C_AVERAGE.GetInPort( 'aCount' ) + IC_AVERAGEGate = C_AVERAGE.GetInPort( 'Gate' ) + OC_AVERAGEaNewListOfSyr = C_AVERAGE.GetOutPort( 'aNewListOfSyr' ) + OC_AVERAGEanAverage = C_AVERAGE.GetOutPort( 'anAverage' ) + OC_AVERAGEGate = C_AVERAGE.GetOutPort( 'Gate' ) + + C_LISTOFSYR = GraphSyrControlAveAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_LISTOFSYR' ) + C_LISTOFSYR.SetName( 'C_LISTOFSYR' ) + C_LISTOFSYR.SetAuthor( '' ) + C_LISTOFSYR.SetContainer( 'localhost/FactoryServer' ) + C_LISTOFSYR.SetComment( 'C_LISTOFSYR from SyrComponent' ) + C_LISTOFSYR.Coords( 5 , 321 ) + IC_LISTOFSYRGate = C_LISTOFSYR.GetInPort( 'Gate' ) + OC_LISTOFSYRaListOfSyr = C_LISTOFSYR.GetOutPort( 'aListOfSyr' ) + OC_LISTOFSYRGate = C_LISTOFSYR.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + Pylabel_begin = [] + Pylabel_begin.append( 'def label_begin( NB , KB , MINB , MAXB , AVERAGEB , SYRLISTB ) :' ) + Pylabel_begin.append( ' return NB,KB,MINB,MAXB,AVERAGEB,SYRLISTB' ) + label_begin = GraphSyrControlAveAborted.INode( 'label_begin' , Pylabel_begin ) + label_begin.SetName( 'label_begin' ) + label_begin.SetAuthor( '' ) + label_begin.SetComment( 'Python function' ) + label_begin.Coords( 183 , 220 ) + Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' ) + Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' ) + Ilabel_beginMINB = label_begin.InPort( 'MINB' , 'long' ) + Ilabel_beginMAXB = label_begin.InPort( 'MAXB' , 'long' ) + Ilabel_beginAVERAGEB = label_begin.InPort( 'AVERAGEB' , 'double' ) + Ilabel_beginSYRLISTB = label_begin.InPort( 'SYRLISTB' , 'ListOfSyr' ) + Ilabel_beginGate = label_begin.GetInPort( 'Gate' ) + Olabel_beginNT = label_begin.OutPort( 'NT' , 'long' ) + Olabel_beginKT = label_begin.OutPort( 'KT' , 'long' ) + Olabel_beginMIN = label_begin.OutPort( 'MIN' , 'long' ) + Olabel_beginMAX = label_begin.OutPort( 'MAX' , 'long' ) + Olabel_beginAVERAGE = label_begin.OutPort( 'AVERAGE' , 'double' ) + Olabel_beginSYRLIST = label_begin.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_beginGate = label_begin.GetOutPort( 'Gate' ) + + # Creation of Switch Nodes + Pylabel_test = [] + Pylabel_test.append( 'def L_OneEven( ValOne , ValEven , NT , KT , MIN , MAX , AVERAGE , SYRLIST ):' ) + Pylabel_test.append( ' Finished = ValOne' ) + Pylabel_test.append( ' if Finished == 0 :' ) + Pylabel_test.append( ' Incr = 1' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' if Even == 0 :' ) + Pylabel_test.append( ' Odd = 1' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Incr = 0' ) + Pylabel_test.append( ' Even = 0' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' return Finished,Incr,Even,Odd,NT,KT,MIN,MAX,AVERAGE,SYRLIST' ) + label_test,EndL_OneEven = GraphSyrControlAveAborted.SNode( 'L_OneEven' , Pylabel_test ) + EndL_OneEven.SetName( 'EndL_OneEven' ) + EndL_OneEven.SetAuthor( '' ) + EndL_OneEven.SetComment( 'Compute Node' ) + EndL_OneEven.Coords( 1064 , 339 ) + PyEndL_OneEven = [] + EndL_OneEven.SetPyFunction( '' , PyEndL_OneEven ) + IEndL_OneEvenMINT = EndL_OneEven.InPort( 'MINT' , 'long' ) + IEndL_OneEvenMAXT = EndL_OneEven.InPort( 'MAXT' , 'long' ) + IEndL_OneEvenAVERAGET = EndL_OneEven.InPort( 'AVERAGET' , 'double' ) + IEndL_OneEvenDefault = EndL_OneEven.GetInPort( 'Default' ) + OEndL_OneEvenMIN = EndL_OneEven.OutPort( 'MIN' , 'long' ) + OEndL_OneEvenMAX = EndL_OneEven.OutPort( 'MAX' , 'long' ) + OEndL_OneEvenAVERAGE = EndL_OneEven.OutPort( 'AVERAGE' , 'double' ) + OEndL_OneEvenGate = EndL_OneEven.GetOutPort( 'Gate' ) + label_test.SetName( 'label_test' ) + label_test.SetAuthor( '' ) + label_test.SetComment( 'Compute Node' ) + label_test.Coords( 564 , 219 ) + Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' ) + Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' ) + Ilabel_testNT = label_test.InPort( 'NT' , 'long' ) + Ilabel_testKT = label_test.InPort( 'KT' , 'long' ) + Ilabel_testMIN = label_test.InPort( 'MIN' , 'long' ) + Ilabel_testMAX = label_test.InPort( 'MAX' , 'long' ) + Ilabel_testAVERAGE = label_test.InPort( 'AVERAGE' , 'double' ) + Ilabel_testSYRLIST = label_test.InPort( 'SYRLIST' , 'ListOfSyr' ) + Ilabel_testGate = label_test.GetInPort( 'Gate' ) + Olabel_testFinished = label_test.OutPort( 'Finished' , 'long' ) + Olabel_testIncr = label_test.OutPort( 'Incr' , 'long' ) + Olabel_testEven = label_test.OutPort( 'Even' , 'long' ) + Olabel_testOdd = label_test.OutPort( 'Odd' , 'long' ) + Olabel_testN = label_test.OutPort( 'N' , 'long' ) + Olabel_testK = label_test.OutPort( 'K' , 'long' ) + Olabel_testMIN = label_test.OutPort( 'MIN' , 'long' ) + Olabel_testMAX = label_test.OutPort( 'MAX' , 'long' ) + Olabel_testAVERAGE = label_test.OutPort( 'AVERAGE' , 'double' ) + Olabel_testSYRLIST = label_test.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_testDefault = label_test.GetOutPort( 'Default' ) + + # Creation of GOTO Nodes + Pycontrol_m3p1 = [] + Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K , MINT , MAXT , AVERAGET , SYRLISTT ):' ) + Pycontrol_m3p1.append( ' return 0,1,N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_m3p1 = GraphSyrControlAveAborted.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) + control_m3p1.SetName( 'control_m3p1' ) + control_m3p1.SetAuthor( '' ) + control_m3p1.SetComment( 'Compute Node' ) + control_m3p1.Coords( 1058 , 8 ) + Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' ) + Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' ) + Icontrol_m3p1MINT = control_m3p1.InPort( 'MINT' , 'long' ) + Icontrol_m3p1MAXT = control_m3p1.InPort( 'MAXT' , 'long' ) + Icontrol_m3p1AVERAGET = control_m3p1.InPort( 'AVERAGET' , 'double' ) + Icontrol_m3p1SYRLISTT = control_m3p1.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_m3p1Gate = control_m3p1.GetInPort( 'Gate' ) + Ocontrol_m3p1ValOne = control_m3p1.OutPort( 'ValOne' , 'long' ) + Ocontrol_m3p1ValEven = control_m3p1.OutPort( 'ValEven' , 'long' ) + Ocontrol_m3p1NT = control_m3p1.OutPort( 'NT' , 'long' ) + Ocontrol_m3p1KT = control_m3p1.OutPort( 'KT' , 'long' ) + Ocontrol_m3p1MIN = control_m3p1.OutPort( 'MIN' , 'long' ) + Ocontrol_m3p1MAX = control_m3p1.OutPort( 'MAX' , 'long' ) + Ocontrol_m3p1AVERAGE = control_m3p1.OutPort( 'AVERAGE' , 'double' ) + Ocontrol_m3p1SYRLIST = control_m3p1.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Ocontrol_m3p1Gate = control_m3p1.GetOutPort( 'Gate' ) + + Pycontrol_div2 = [] + Pycontrol_div2.append( 'def control_div2( N , K , MINT , MAXT , AVERAGET , SYRLISTT ) :' ) + Pycontrol_div2.append( ' return N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_div2 = GraphSyrControlAveAborted.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) + control_div2.SetName( 'control_div2' ) + control_div2.SetAuthor( '' ) + control_div2.SetComment( 'Compute Node' ) + control_div2.Coords( 1048 , 555 ) + Icontrol_div2N = control_div2.InPort( 'N' , 'long' ) + Icontrol_div2K = control_div2.InPort( 'K' , 'long' ) + Icontrol_div2MINT = control_div2.InPort( 'MINT' , 'long' ) + Icontrol_div2MAXT = control_div2.InPort( 'MAXT' , 'long' ) + Icontrol_div2AVERAGET = control_div2.InPort( 'AVERAGET' , 'double' ) + Icontrol_div2SYRLISTT = control_div2.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_div2Gate = control_div2.GetInPort( 'Gate' ) + Ocontrol_div2NB = control_div2.OutPort( 'NB' , 'long' ) + Ocontrol_div2KB = control_div2.OutPort( 'KB' , 'long' ) + Ocontrol_div2MINB = control_div2.OutPort( 'MINB' , 'long' ) + Ocontrol_div2MAXB = control_div2.OutPort( 'MAXB' , 'long' ) + Ocontrol_div2AVERAGEB = control_div2.OutPort( 'AVERAGEB' , 'double' ) + Ocontrol_div2SYRLISTB = control_div2.OutPort( 'SYRLISTB' , 'ListOfSyr' ) + Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' ) + + # Creation of Links + Ltest_ISEVENBoolEvenlabel_testValEven = GraphSyrControlAveAborted.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 544 , 256 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 544 , 524 ) + + Ltest_ISONEBoolOnelabel_testValOne = GraphSyrControlAveAborted.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 546 , 237 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 546 , 198 ) + + Lm3p1anEvenIntegercontrol_m3p1N = GraphSyrControlAveAborted.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 1 , 975 , 38 ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 2 , 976 , 81 ) + + Ldiv2anIntegercontrol_div2N = GraphSyrControlAveAborted.Link( Odiv2anInteger , Icontrol_div2N ) + Ldiv2anIntegercontrol_div2N.AddCoord( 1 , 1012 , 585 ) + Ldiv2anIntegercontrol_div2N.AddCoord( 2 , 1011 , 346 ) + + LincraNewCountcontrol_div2K = GraphSyrControlAveAborted.Link( OincraNewCount , Icontrol_div2K ) + LincraNewCountcontrol_div2K.AddCoord( 1 , 966 , 606 ) + LincraNewCountcontrol_div2K.AddCoord( 2 , 968 , 207 ) + + LincraNewCountcontrol_m3p1K = GraphSyrControlAveAborted.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 965 , 59 ) + LincraNewCountcontrol_m3p1K.AddCoord( 2 , 966 , 208 ) + + LincraNewCountC_AVERAGEaCount = GraphSyrControlAveAborted.Link( OincraNewCount , IC_AVERAGEaCount ) + LincraNewCountC_AVERAGEaCount.AddCoord( 1 , 751 , 588 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 2 , 751 , 460 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 3 , 965 , 462 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 4 , 968 , 205 ) + + LC_MINaNewMinValcontrol_m3p1MINT = GraphSyrControlAveAborted.Link( OC_MINaNewMinVal , Icontrol_m3p1MINT ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 1 , 991 , 78 ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 2 , 991 , 905 ) + + LC_MINaNewMinValcontrol_div2MINT = GraphSyrControlAveAborted.Link( OC_MINaNewMinVal , Icontrol_div2MINT ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 1 , 991 , 626 ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 2 , 991 , 905 ) + + LC_MAXaNewMaxValcontrol_m3p1MAXT = GraphSyrControlAveAborted.Link( OC_MAXaNewMaxVal , Icontrol_m3p1MAXT ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 1 , 976 , 98 ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 2 , 974 , 738 ) + + LC_MAXaNewMaxValcontrol_div2MAXT = GraphSyrControlAveAborted.Link( OC_MAXaNewMaxVal , Icontrol_div2MAXT ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 1 , 972 , 648 ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 2 , 974 , 738 ) + + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT = GraphSyrControlAveAborted.Link( OC_AVERAGEaNewListOfSyr , Icontrol_m3p1SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 1 , 1037 , 137 ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 2 , 1038 , 556 ) + + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT = GraphSyrControlAveAborted.Link( OC_AVERAGEaNewListOfSyr , Icontrol_div2SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 1 , 1038 , 686 ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 2 , 1038 , 555 ) + + LC_AVERAGEanAveragecontrol_m3p1AVERAGET = GraphSyrControlAveAborted.Link( OC_AVERAGEanAverage , Icontrol_m3p1AVERAGET ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 1 , 1026 , 118 ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 2 , 1027 , 567 ) + + LC_AVERAGEanAveragecontrol_div2AVERAGET = GraphSyrControlAveAborted.Link( OC_AVERAGEanAverage , Icontrol_div2AVERAGET ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 1 , 1027 , 668 ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 2 , 1026 , 568 ) + + LC_LISTOFSYRaListOfSyrlabel_beginSYRLISTB = GraphSyrControlAveAborted.Link( OC_LISTOFSYRaListOfSyr , Ilabel_beginSYRLISTB ) + + Llabel_beginNTtest_ISONEanInteger = GraphSyrControlAveAborted.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 361 , 197 ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 360 , 290 ) + + Llabel_beginNTlabel_testNT = GraphSyrControlAveAborted.Link( Olabel_beginNT , Ilabel_testNT ) + + Llabel_beginNTtest_ISEVENanInteger = GraphSyrControlAveAborted.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 359 , 525 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 361 , 291 ) + + Llabel_beginKTlabel_testKT = GraphSyrControlAveAborted.Link( Olabel_beginKT , Ilabel_testKT ) + + Llabel_beginMINlabel_testMIN = GraphSyrControlAveAborted.Link( Olabel_beginMIN , Ilabel_testMIN ) + + Llabel_beginMAXlabel_testMAX = GraphSyrControlAveAborted.Link( Olabel_beginMAX , Ilabel_testMAX ) + + Llabel_beginAVERAGElabel_testAVERAGE = GraphSyrControlAveAborted.Link( Olabel_beginAVERAGE , Ilabel_testAVERAGE ) + + Llabel_beginSYRLISTlabel_testSYRLIST = GraphSyrControlAveAborted.Link( Olabel_beginSYRLIST , Ilabel_testSYRLIST ) + + Llabel_testEvendiv2Gate = GraphSyrControlAveAborted.Link( Olabel_testEven , Idiv2Gate ) + Llabel_testEvendiv2Gate.AddCoord( 1 , 777 , 351 ) + Llabel_testEvendiv2Gate.AddCoord( 2 , 777 , 286 ) + + Llabel_testOddm3p1Gate = GraphSyrControlAveAborted.Link( Olabel_testOdd , Im3p1Gate ) + Llabel_testOddm3p1Gate.AddCoord( 1 , 757 , 95 ) + Llabel_testOddm3p1Gate.AddCoord( 2 , 757 , 310 ) + + Llabel_testNm3p1anOddInteger = GraphSyrControlAveAborted.Link( Olabel_testN , Im3p1anOddInteger ) + Llabel_testNm3p1anOddInteger.AddCoord( 1 , 741 , 72 ) + Llabel_testNm3p1anOddInteger.AddCoord( 2 , 741 , 331 ) + + Llabel_testNdiv2anEvenInteger = GraphSyrControlAveAborted.Link( Olabel_testN , Idiv2anEvenInteger ) + + Llabel_testNC_MINanInteger = GraphSyrControlAveAborted.Link( Olabel_testN , IC_MINanInteger ) + Llabel_testNC_MINanInteger.AddCoord( 1 , 744 , 923 ) + Llabel_testNC_MINanInteger.AddCoord( 2 , 742 , 331 ) + + Llabel_testNC_MAXanInteger = GraphSyrControlAveAborted.Link( Olabel_testN , IC_MAXanInteger ) + Llabel_testNC_MAXanInteger.AddCoord( 1 , 742 , 759 ) + Llabel_testNC_MAXanInteger.AddCoord( 2 , 743 , 332 ) + + Llabel_testNC_AVERAGEanInteger = GraphSyrControlAveAborted.Link( Olabel_testN , IC_AVERAGEanInteger ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 1 , 741 , 568 ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 2 , 742 , 330 ) + + Llabel_testKincraCount = GraphSyrControlAveAborted.Link( Olabel_testK , IincraCount ) + Llabel_testKincraCount.AddCoord( 1 , 766 , 207 ) + Llabel_testKincraCount.AddCoord( 2 , 766 , 343 ) + + Llabel_testMINC_MINaMinVal = GraphSyrControlAveAborted.Link( Olabel_testMIN , IC_MINaMinVal ) + Llabel_testMINC_MINaMinVal.AddCoord( 1 , 771 , 902 ) + Llabel_testMINC_MINaMinVal.AddCoord( 2 , 777 , 371 ) + Llabel_testMINC_MINaMinVal.AddCoord( 3 , 777 , 370 ) + + Llabel_testMINEndL_OneEvenMINT = GraphSyrControlAveAborted.Link( Olabel_testMIN , IEndL_OneEvenMINT ) + + Llabel_testMAXC_MAXaMaxVal = GraphSyrControlAveAborted.Link( Olabel_testMAX , IC_MAXaMaxVal ) + Llabel_testMAXC_MAXaMaxVal.AddCoord( 1 , 764 , 739 ) + Llabel_testMAXC_MAXaMaxVal.AddCoord( 2 , 762 , 390 ) + + Llabel_testMAXEndL_OneEvenMAXT = GraphSyrControlAveAborted.Link( Olabel_testMAX , IEndL_OneEvenMAXT ) + + Llabel_testAVERAGEEndL_OneEvenAVERAGET = GraphSyrControlAveAborted.Link( Olabel_testAVERAGE , IEndL_OneEvenAVERAGET ) + + Llabel_testSYRLISTC_AVERAGEaListOfSyr = GraphSyrControlAveAborted.Link( Olabel_testSYRLIST , IC_AVERAGEaListOfSyr ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 1 , 769 , 546 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 2 , 769 , 431 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 3 , 768 , 431 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 4 , 768 , 430 ) + + Lcontrol_m3p1Gatelabel_testGate = GraphSyrControlAveAborted.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 553 , 453 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 554 , 1025 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1242 , 1026 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1234 , 204 ) + + Lcontrol_div2Gatelabel_beginGate = GraphSyrControlAveAborted.Link( Ocontrol_div2Gate , Ilabel_beginGate ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 176 , 419 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 176 , 997 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1217 , 996 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 4 , 1223 , 711 ) + + # Input datas + Ilabel_beginNB.Input( 31 ) + Ilabel_beginKB.Input( 0 ) + Ilabel_beginMINB.Input( 0 ) + Ilabel_beginMAXB.Input( 0 ) + Ilabel_beginAVERAGEB.Input( 0 ) + + # Output Ports of the graph + #Olabel_testFinished = label_test.GetOutPort( 'Finished' ) + #Olabel_testIncr = label_test.GetOutPort( 'Incr' ) + #OEndL_OneEvenMIN = EndL_OneEven.GetOutPort( 'MIN' ) + #OEndL_OneEvenMAX = EndL_OneEven.GetOutPort( 'MAX' ) + #OEndL_OneEvenAVERAGE = EndL_OneEven.GetOutPort( 'AVERAGE' ) + return GraphSyrControlAveAborted + + +GraphSyrControlAveAborted = DefGraphSyrControlAveAborted() diff --git a/examples/GraphSyrControlAveAborted.xml b/examples/GraphSyrControlAveAborted.xml new file mode 100644 index 0000000..6d11dbe --- /dev/null +++ b/examples/GraphSyrControlAveAborted.xml @@ -0,0 +1,1107 @@ + + + + + +? + ? + GraphSyrControlAveAborted + 1 + ? + +GraphSyrControlAveNOTValid1 + + +long + label_begin__NB + +long + label_begin__KB + +long + label_begin__MINB + +long + label_begin__MAXB + +double + label_begin__AVERAGEB + + +long + label_test__Finished + +long + label_test__Incr + +long + EndL_OneEven__MIN + +long + EndL_OneEven__MAX + +double + EndL_OneEven__AVERAGE + + + 2/10/2003 - 11:17:14 + 6/7/2005 - 10:32:56 + 1.05 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 370 + 455 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 370 + 127 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 789 + 0 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 789 + 255 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 790 + 136 + +SyrComponent + SyrComponent + C_MIN + 0 + ? + +C_MIN + + +long + aMinVal + +long + anInteger + + +long + aNewMinVal + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_MIN from SyrComponent + 798 + 833 + +SyrComponent + SyrComponent + C_MAX + 0 + ? + +C_MAX + + +long + aMaxVal + +long + anInteger + + +long + aNewMaxVal + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_MAX from SyrComponent + 798 + 668 + +SyrComponent + SyrComponent + C_AVERAGE + 0 + ? + +C_AVERAGE + + +ListOfSyr + aListOfSyr + +long + anInteger + +long + aCount + + +ListOfSyr + aNewListOfSyr + +double + anAverage + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_AVERAGE from SyrComponent + 784 + 476 + +SyrComponent + SyrComponent + C_LISTOFSYR + 0 + ? + +C_LISTOFSYR + + + +ListOfSyr + aListOfSyr + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + localhost/FactoryServer + C_LISTOFSYR from SyrComponent + 5 + 321 + +? + ? + label_begin + 3 + ? + +label_begin + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +label_begin + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + ? + Python function + 183 + 220 + +? + ? + label_test + 6 + EndL_OneEven + +label_test + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + +long + Finished + +long + Incr + +long + Even + +long + Odd + +long + N + +long + K + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +L_OneEven + + + + + + + + + + + + + + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + ? + Compute Node + 564 + 219 + +? + ? + EndL_OneEven + 7 + label_test + +EndL_OneEven + + +long + MINT + +long + MAXT + +double + AVERAGET + + +long + MIN + +long + MAX + +double + AVERAGE + + + +? + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + ? + Compute Node + 1064 + 339 + +? + ? + control_m3p1 + 8 + label_test + +control_m3p1 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +C_NotOneIsEven + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + ? + Compute Node + 1058 + 8 + +? + ? + control_div2 + 8 + label_begin + +control_div2 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + + +control_div2 + + + 6/7/2005 - 10:32:56 + 6/7/2005 - 10:32:56 + 1.05 + ? + ? + Compute Node + 1048 + 555 + + +test_ISEVEN + BoolEven + label_test + ValEven + + +544 + 256 + +544 + 524 + +test_ISONE + BoolOne + label_test + ValOne + + +546 + 237 + +546 + 198 + +m3p1 + anEvenInteger + control_m3p1 + N + + +975 + 38 + +976 + 81 + +div2 + anInteger + control_div2 + N + + +1012 + 585 + +1011 + 346 + +incr + aNewCount + control_div2 + K + + +966 + 606 + +968 + 207 + +incr + aNewCount + control_m3p1 + K + + +965 + 59 + +966 + 208 + +incr + aNewCount + C_AVERAGE + aCount + + +751 + 588 + +751 + 460 + +965 + 462 + +968 + 205 + +C_MIN + aNewMinVal + control_m3p1 + MINT + + +991 + 78 + +991 + 905 + +C_MIN + aNewMinVal + control_div2 + MINT + + +991 + 626 + +991 + 905 + +C_MAX + aNewMaxVal + control_m3p1 + MAXT + + +976 + 98 + +974 + 738 + +C_MAX + aNewMaxVal + control_div2 + MAXT + + +972 + 648 + +974 + 738 + +C_AVERAGE + aNewListOfSyr + control_m3p1 + SYRLISTT + + +1037 + 137 + +1038 + 556 + +C_AVERAGE + aNewListOfSyr + control_div2 + SYRLISTT + + +1038 + 686 + +1038 + 555 + +C_AVERAGE + anAverage + control_m3p1 + AVERAGET + + +1026 + 118 + +1027 + 567 + +C_AVERAGE + anAverage + control_div2 + AVERAGET + + +1027 + 668 + +1026 + 568 + +C_LISTOFSYR + aListOfSyr + label_begin + SYRLISTB + + +label_begin + NT + test_ISONE + anInteger + + +361 + 197 + +360 + 290 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISEVEN + anInteger + + +359 + 525 + +361 + 291 + +label_begin + KT + label_test + KT + + +label_begin + MIN + label_test + MIN + + +label_begin + MAX + label_test + MAX + + +label_begin + AVERAGE + label_test + AVERAGE + + +label_begin + SYRLIST + label_test + SYRLIST + + +label_test + Even + div2 + Gate + + +777 + 351 + +777 + 286 + +label_test + Odd + m3p1 + Gate + + +757 + 95 + +757 + 310 + +label_test + N + m3p1 + anOddInteger + + +741 + 72 + +741 + 331 + +label_test + N + div2 + anEvenInteger + + +label_test + N + C_MIN + anInteger + + +744 + 923 + +742 + 331 + +label_test + N + C_MAX + anInteger + + +742 + 759 + +743 + 332 + +label_test + N + C_AVERAGE + anInteger + + +741 + 568 + +742 + 330 + +label_test + K + incr + aCount + + +766 + 207 + +766 + 343 + +label_test + MIN + C_MIN + aMinVal + + +771 + 902 + +777 + 371 + +777 + 370 + +label_test + MIN + EndL_OneEven + MINT + + +label_test + MAX + C_MAX + aMaxVal + + +764 + 739 + +762 + 390 + +label_test + MAX + EndL_OneEven + MAXT + + +label_test + AVERAGE + EndL_OneEven + AVERAGET + + +label_test + SYRLIST + C_AVERAGE + aListOfSyr + + +769 + 546 + +769 + 431 + +768 + 431 + +768 + 430 + +control_m3p1 + Gate + label_test + Gate + + +553 + 453 + +554 + 1025 + +1242 + 1026 + +1234 + 204 + +control_div2 + Gate + label_begin + Gate + + +176 + 419 + +176 + 997 + +1217 + 996 + +1223 + 711 + + +GraphSyrControlAveAborted + label_begin__NB + label_begin + NB + +3 + 31 + + +GraphSyrControlAveAborted + label_begin__KB + label_begin + KB + +3 + 0 + + +GraphSyrControlAveAborted + label_begin__MINB + label_begin + MINB + +3 + 0 + + +GraphSyrControlAveAborted + label_begin__MAXB + label_begin + MAXB + +3 + 0 + + +GraphSyrControlAveAborted + label_begin__AVERAGEB + label_begin + AVERAGEB + +7 + 0 + diff --git a/examples/GraphSyrControlAveExecutable.py b/examples/GraphSyrControlAveExecutable.py new file mode 100644 index 0000000..338adea --- /dev/null +++ b/examples/GraphSyrControlAveExecutable.py @@ -0,0 +1,415 @@ + +# Generated python file of Graph GraphSyrControlAveExecutable + +from SuperV import * + +# Graph creation of GraphSyrControlAveExecutable +def DefGraphSyrControlAveExecutable() : + GraphSyrControlAveExecutable = Graph( 'GraphSyrControlAveExecutable' ) + GraphSyrControlAveExecutable.SetName( 'GraphSyrControlAveExecutable' ) + GraphSyrControlAveExecutable.SetAuthor( 'JR' ) + GraphSyrControlAveExecutable.SetComment( 'Syracuse algorithm' ) + GraphSyrControlAveExecutable.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + test_ISEVEN = GraphSyrControlAveExecutable.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( 370 , 455 ) + 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 = GraphSyrControlAveExecutable.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( 370 , 127 ) + 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 = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) + m3p1.SetName( 'm3p1' ) + m3p1.SetAuthor( '' ) + m3p1.SetContainer( 'localhost/FactoryServer' ) + m3p1.SetComment( 'C_M3P1 from SyrComponent' ) + m3p1.Coords( 789 , 0 ) + Im3p1anOddInteger = m3p1.GetInPort( 'anOddInteger' ) + Im3p1Gate = m3p1.GetInPort( 'Gate' ) + Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' ) + Om3p1Gate = m3p1.GetOutPort( 'Gate' ) + + div2 = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2.SetName( 'div2' ) + div2.SetAuthor( '' ) + div2.SetContainer( 'localhost/FactoryServer' ) + div2.SetComment( 'C_DIV2 from SyrComponent' ) + div2.Coords( 789 , 255 ) + Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' ) + Idiv2Gate = div2.GetInPort( 'Gate' ) + Odiv2anInteger = div2.GetOutPort( 'anInteger' ) + Odiv2Gate = div2.GetOutPort( 'Gate' ) + + incr = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr.SetName( 'incr' ) + incr.SetAuthor( '' ) + incr.SetContainer( 'localhost/FactoryServer' ) + incr.SetComment( 'C_INCR from SyrComponent' ) + incr.Coords( 790 , 136 ) + IincraCount = incr.GetInPort( 'aCount' ) + IincrGate = incr.GetInPort( 'Gate' ) + OincraNewCount = incr.GetOutPort( 'aNewCount' ) + OincrGate = incr.GetOutPort( 'Gate' ) + + C_MIN = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MIN' ) + C_MIN.SetName( 'C_MIN' ) + C_MIN.SetAuthor( '' ) + C_MIN.SetContainer( 'localhost/FactoryServer' ) + C_MIN.SetComment( 'C_MIN from SyrComponent' ) + C_MIN.Coords( 798 , 833 ) + IC_MINaMinVal = C_MIN.GetInPort( 'aMinVal' ) + IC_MINanInteger = C_MIN.GetInPort( 'anInteger' ) + IC_MINGate = C_MIN.GetInPort( 'Gate' ) + OC_MINaNewMinVal = C_MIN.GetOutPort( 'aNewMinVal' ) + OC_MINGate = C_MIN.GetOutPort( 'Gate' ) + + C_MAX = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MAX' ) + C_MAX.SetName( 'C_MAX' ) + C_MAX.SetAuthor( '' ) + C_MAX.SetContainer( 'localhost/FactoryServer' ) + C_MAX.SetComment( 'C_MAX from SyrComponent' ) + C_MAX.Coords( 798 , 668 ) + IC_MAXaMaxVal = C_MAX.GetInPort( 'aMaxVal' ) + IC_MAXanInteger = C_MAX.GetInPort( 'anInteger' ) + IC_MAXGate = C_MAX.GetInPort( 'Gate' ) + OC_MAXaNewMaxVal = C_MAX.GetOutPort( 'aNewMaxVal' ) + OC_MAXGate = C_MAX.GetOutPort( 'Gate' ) + + C_AVERAGE = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_AVERAGE' ) + C_AVERAGE.SetName( 'C_AVERAGE' ) + C_AVERAGE.SetAuthor( '' ) + C_AVERAGE.SetContainer( 'localhost/FactoryServer' ) + C_AVERAGE.SetComment( 'C_AVERAGE from SyrComponent' ) + C_AVERAGE.Coords( 784 , 476 ) + IC_AVERAGEaListOfSyr = C_AVERAGE.GetInPort( 'aListOfSyr' ) + IC_AVERAGEanInteger = C_AVERAGE.GetInPort( 'anInteger' ) + IC_AVERAGEaCount = C_AVERAGE.GetInPort( 'aCount' ) + IC_AVERAGEGate = C_AVERAGE.GetInPort( 'Gate' ) + OC_AVERAGEaNewListOfSyr = C_AVERAGE.GetOutPort( 'aNewListOfSyr' ) + OC_AVERAGEanAverage = C_AVERAGE.GetOutPort( 'anAverage' ) + OC_AVERAGEGate = C_AVERAGE.GetOutPort( 'Gate' ) + + C_LISTOFSYR = GraphSyrControlAveExecutable.FNode( 'SyrComponent' , 'SyrComponent' , 'C_LISTOFSYR' ) + C_LISTOFSYR.SetName( 'C_LISTOFSYR' ) + C_LISTOFSYR.SetAuthor( '' ) + C_LISTOFSYR.SetContainer( 'localhost/FactoryServer' ) + C_LISTOFSYR.SetComment( 'C_LISTOFSYR from SyrComponent' ) + C_LISTOFSYR.Coords( 5 , 321 ) + IC_LISTOFSYRGate = C_LISTOFSYR.GetInPort( 'Gate' ) + OC_LISTOFSYRaListOfSyr = C_LISTOFSYR.GetOutPort( 'aListOfSyr' ) + OC_LISTOFSYRGate = C_LISTOFSYR.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + Pylabel_begin = [] + Pylabel_begin.append( 'def label_begin( NB , KB , MINB , MAXB , AVERAGEB , SYRLISTB ) :' ) + Pylabel_begin.append( ' return NB,KB,MINB,MAXB,AVERAGEB,SYRLISTB' ) + label_begin = GraphSyrControlAveExecutable.INode( 'label_begin' , Pylabel_begin ) + label_begin.SetName( 'label_begin' ) + label_begin.SetAuthor( '' ) + label_begin.SetComment( 'Python function' ) + label_begin.Coords( 183 , 220 ) + Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' ) + Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' ) + Ilabel_beginMINB = label_begin.InPort( 'MINB' , 'long' ) + Ilabel_beginMAXB = label_begin.InPort( 'MAXB' , 'long' ) + Ilabel_beginAVERAGEB = label_begin.InPort( 'AVERAGEB' , 'double' ) + Ilabel_beginSYRLISTB = label_begin.InPort( 'SYRLISTB' , 'ListOfSyr' ) + Ilabel_beginGate = label_begin.GetInPort( 'Gate' ) + Olabel_beginNT = label_begin.OutPort( 'NT' , 'long' ) + Olabel_beginKT = label_begin.OutPort( 'KT' , 'long' ) + Olabel_beginMIN = label_begin.OutPort( 'MIN' , 'long' ) + Olabel_beginMAX = label_begin.OutPort( 'MAX' , 'long' ) + Olabel_beginAVERAGE = label_begin.OutPort( 'AVERAGE' , 'double' ) + Olabel_beginSYRLIST = label_begin.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_beginGate = label_begin.GetOutPort( 'Gate' ) + + # Creation of Switch Nodes + Pylabel_test = [] + Pylabel_test.append( 'def L_OneEven( ValOne , ValEven , NT , KT , MIN , MAX , AVERAGE , SYRLIST ):' ) + Pylabel_test.append( ' Finished = ValOne' ) + Pylabel_test.append( ' if Finished == 0 :' ) + Pylabel_test.append( ' Incr = 1' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' if Even == 0 :' ) + Pylabel_test.append( ' Odd = 1' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Incr = 0' ) + Pylabel_test.append( ' Even = 0' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' return Finished,Incr,Even,Odd,NT,KT,MIN,MAX,AVERAGE,SYRLIST' ) + label_test,EndL_OneEven = GraphSyrControlAveExecutable.SNode( 'L_OneEven' , Pylabel_test ) + EndL_OneEven.SetName( 'EndL_OneEven' ) + EndL_OneEven.SetAuthor( '' ) + EndL_OneEven.SetComment( 'Compute Node' ) + EndL_OneEven.Coords( 1064 , 339 ) + PyEndL_OneEven = [] + EndL_OneEven.SetPyFunction( '' , PyEndL_OneEven ) + IEndL_OneEvenMINT = EndL_OneEven.InPort( 'MINT' , 'long' ) + IEndL_OneEvenMAXT = EndL_OneEven.InPort( 'MAXT' , 'long' ) + IEndL_OneEvenAVERAGET = EndL_OneEven.InPort( 'AVERAGET' , 'double' ) + IEndL_OneEvenDefault = EndL_OneEven.GetInPort( 'Default' ) + OEndL_OneEvenMIN = EndL_OneEven.OutPort( 'MIN' , 'long' ) + OEndL_OneEvenMAX = EndL_OneEven.OutPort( 'MAX' , 'long' ) + OEndL_OneEvenAVERAGE = EndL_OneEven.OutPort( 'AVERAGE' , 'double' ) + OEndL_OneEvenGate = EndL_OneEven.GetOutPort( 'Gate' ) + label_test.SetName( 'label_test' ) + label_test.SetAuthor( '' ) + label_test.SetComment( 'Compute Node' ) + label_test.Coords( 564 , 219 ) + Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' ) + Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' ) + Ilabel_testNT = label_test.InPort( 'NT' , 'long' ) + Ilabel_testKT = label_test.InPort( 'KT' , 'long' ) + Ilabel_testMIN = label_test.InPort( 'MIN' , 'long' ) + Ilabel_testMAX = label_test.InPort( 'MAX' , 'long' ) + Ilabel_testAVERAGE = label_test.InPort( 'AVERAGE' , 'double' ) + Ilabel_testSYRLIST = label_test.InPort( 'SYRLIST' , 'ListOfSyr' ) + Ilabel_testGate = label_test.GetInPort( 'Gate' ) + Olabel_testFinished = label_test.OutPort( 'Finished' , 'long' ) + Olabel_testIncr = label_test.OutPort( 'Incr' , 'long' ) + Olabel_testEven = label_test.OutPort( 'Even' , 'long' ) + Olabel_testOdd = label_test.OutPort( 'Odd' , 'long' ) + Olabel_testN = label_test.OutPort( 'N' , 'long' ) + Olabel_testK = label_test.OutPort( 'K' , 'long' ) + Olabel_testMIN = label_test.OutPort( 'MIN' , 'long' ) + Olabel_testMAX = label_test.OutPort( 'MAX' , 'long' ) + Olabel_testAVERAGE = label_test.OutPort( 'AVERAGE' , 'double' ) + Olabel_testSYRLIST = label_test.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_testDefault = label_test.GetOutPort( 'Default' ) + + # Creation of GOTO Nodes + Pycontrol_m3p1 = [] + Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K , MINT , MAXT , AVERAGET , SYRLISTT ):' ) + Pycontrol_m3p1.append( ' return 0,1,N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_m3p1 = GraphSyrControlAveExecutable.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) + control_m3p1.SetName( 'control_m3p1' ) + control_m3p1.SetAuthor( '' ) + control_m3p1.SetComment( 'Compute Node' ) + control_m3p1.Coords( 1058 , 8 ) + Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' ) + Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' ) + Icontrol_m3p1MINT = control_m3p1.InPort( 'MINT' , 'long' ) + Icontrol_m3p1MAXT = control_m3p1.InPort( 'MAXT' , 'long' ) + Icontrol_m3p1AVERAGET = control_m3p1.InPort( 'AVERAGET' , 'double' ) + Icontrol_m3p1SYRLISTT = control_m3p1.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_m3p1Gate = control_m3p1.GetInPort( 'Gate' ) + Ocontrol_m3p1ValOne = control_m3p1.OutPort( 'ValOne' , 'long' ) + Ocontrol_m3p1ValEven = control_m3p1.OutPort( 'ValEven' , 'long' ) + Ocontrol_m3p1NT = control_m3p1.OutPort( 'NT' , 'long' ) + Ocontrol_m3p1KT = control_m3p1.OutPort( 'KT' , 'long' ) + Ocontrol_m3p1MIN = control_m3p1.OutPort( 'MIN' , 'long' ) + Ocontrol_m3p1MAX = control_m3p1.OutPort( 'MAX' , 'long' ) + Ocontrol_m3p1AVERAGE = control_m3p1.OutPort( 'AVERAGE' , 'double' ) + Ocontrol_m3p1SYRLIST = control_m3p1.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Ocontrol_m3p1Gate = control_m3p1.GetOutPort( 'Gate' ) + + Pycontrol_div2 = [] + Pycontrol_div2.append( 'def control_div2( N , K , MINT , MAXT , AVERAGET , SYRLISTT ) :' ) + Pycontrol_div2.append( ' return N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_div2 = GraphSyrControlAveExecutable.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) + control_div2.SetName( 'control_div2' ) + control_div2.SetAuthor( '' ) + control_div2.SetComment( 'Compute Node' ) + control_div2.Coords( 1048 , 555 ) + Icontrol_div2N = control_div2.InPort( 'N' , 'long' ) + Icontrol_div2K = control_div2.InPort( 'K' , 'long' ) + Icontrol_div2MINT = control_div2.InPort( 'MINT' , 'long' ) + Icontrol_div2MAXT = control_div2.InPort( 'MAXT' , 'long' ) + Icontrol_div2AVERAGET = control_div2.InPort( 'AVERAGET' , 'double' ) + Icontrol_div2SYRLISTT = control_div2.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_div2Gate = control_div2.GetInPort( 'Gate' ) + Ocontrol_div2NB = control_div2.OutPort( 'NB' , 'long' ) + Ocontrol_div2KB = control_div2.OutPort( 'KB' , 'long' ) + Ocontrol_div2MINB = control_div2.OutPort( 'MINB' , 'long' ) + Ocontrol_div2MAXB = control_div2.OutPort( 'MAXB' , 'long' ) + Ocontrol_div2AVERAGEB = control_div2.OutPort( 'AVERAGEB' , 'double' ) + Ocontrol_div2SYRLISTB = control_div2.OutPort( 'SYRLISTB' , 'ListOfSyr' ) + Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' ) + + # Creation of Links + Ltest_ISEVENBoolEvenlabel_testValEven = GraphSyrControlAveExecutable.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 544 , 256 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 544 , 524 ) + + Ltest_ISONEBoolOnelabel_testValOne = GraphSyrControlAveExecutable.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 546 , 237 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 546 , 198 ) + + Lm3p1anEvenIntegercontrol_m3p1N = GraphSyrControlAveExecutable.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 1 , 975 , 38 ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 2 , 976 , 81 ) + + Ldiv2anIntegercontrol_div2N = GraphSyrControlAveExecutable.Link( Odiv2anInteger , Icontrol_div2N ) + Ldiv2anIntegercontrol_div2N.AddCoord( 1 , 1012 , 585 ) + Ldiv2anIntegercontrol_div2N.AddCoord( 2 , 1011 , 346 ) + + LincraNewCountcontrol_div2K = GraphSyrControlAveExecutable.Link( OincraNewCount , Icontrol_div2K ) + LincraNewCountcontrol_div2K.AddCoord( 1 , 966 , 606 ) + LincraNewCountcontrol_div2K.AddCoord( 2 , 968 , 207 ) + + LincraNewCountcontrol_m3p1K = GraphSyrControlAveExecutable.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 965 , 59 ) + LincraNewCountcontrol_m3p1K.AddCoord( 2 , 966 , 208 ) + + LincraNewCountC_AVERAGEaCount = GraphSyrControlAveExecutable.Link( OincraNewCount , IC_AVERAGEaCount ) + LincraNewCountC_AVERAGEaCount.AddCoord( 1 , 751 , 588 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 2 , 751 , 460 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 3 , 965 , 462 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 4 , 968 , 205 ) + + LC_MINaNewMinValcontrol_m3p1MINT = GraphSyrControlAveExecutable.Link( OC_MINaNewMinVal , Icontrol_m3p1MINT ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 1 , 991 , 78 ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 2 , 991 , 905 ) + + LC_MINaNewMinValcontrol_div2MINT = GraphSyrControlAveExecutable.Link( OC_MINaNewMinVal , Icontrol_div2MINT ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 1 , 991 , 626 ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 2 , 991 , 905 ) + + LC_MAXaNewMaxValcontrol_m3p1MAXT = GraphSyrControlAveExecutable.Link( OC_MAXaNewMaxVal , Icontrol_m3p1MAXT ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 1 , 976 , 98 ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 2 , 974 , 738 ) + + LC_MAXaNewMaxValcontrol_div2MAXT = GraphSyrControlAveExecutable.Link( OC_MAXaNewMaxVal , Icontrol_div2MAXT ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 1 , 972 , 648 ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 2 , 974 , 738 ) + + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT = GraphSyrControlAveExecutable.Link( OC_AVERAGEaNewListOfSyr , Icontrol_m3p1SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 1 , 1037 , 137 ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 2 , 1038 , 556 ) + + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT = GraphSyrControlAveExecutable.Link( OC_AVERAGEaNewListOfSyr , Icontrol_div2SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 1 , 1038 , 686 ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 2 , 1038 , 555 ) + + LC_AVERAGEanAveragecontrol_m3p1AVERAGET = GraphSyrControlAveExecutable.Link( OC_AVERAGEanAverage , Icontrol_m3p1AVERAGET ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 1 , 1026 , 118 ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 2 , 1027 , 567 ) + + LC_AVERAGEanAveragecontrol_div2AVERAGET = GraphSyrControlAveExecutable.Link( OC_AVERAGEanAverage , Icontrol_div2AVERAGET ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 1 , 1027 , 668 ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 2 , 1026 , 568 ) + + LC_LISTOFSYRaListOfSyrlabel_beginSYRLISTB = GraphSyrControlAveExecutable.Link( OC_LISTOFSYRaListOfSyr , Ilabel_beginSYRLISTB ) + + Llabel_beginNTtest_ISONEanInteger = GraphSyrControlAveExecutable.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 361 , 197 ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 360 , 290 ) + + Llabel_beginNTlabel_testNT = GraphSyrControlAveExecutable.Link( Olabel_beginNT , Ilabel_testNT ) + + Llabel_beginNTtest_ISEVENanInteger = GraphSyrControlAveExecutable.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 359 , 525 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 361 , 291 ) + + Llabel_beginKTlabel_testKT = GraphSyrControlAveExecutable.Link( Olabel_beginKT , Ilabel_testKT ) + + Llabel_beginMINlabel_testMIN = GraphSyrControlAveExecutable.Link( Olabel_beginMIN , Ilabel_testMIN ) + + Llabel_beginMAXlabel_testMAX = GraphSyrControlAveExecutable.Link( Olabel_beginMAX , Ilabel_testMAX ) + + Llabel_beginAVERAGElabel_testAVERAGE = GraphSyrControlAveExecutable.Link( Olabel_beginAVERAGE , Ilabel_testAVERAGE ) + + Llabel_beginSYRLISTlabel_testSYRLIST = GraphSyrControlAveExecutable.Link( Olabel_beginSYRLIST , Ilabel_testSYRLIST ) + + Llabel_testEvendiv2Gate = GraphSyrControlAveExecutable.Link( Olabel_testEven , Idiv2Gate ) + Llabel_testEvendiv2Gate.AddCoord( 1 , 777 , 351 ) + Llabel_testEvendiv2Gate.AddCoord( 2 , 777 , 286 ) + + Llabel_testOddm3p1Gate = GraphSyrControlAveExecutable.Link( Olabel_testOdd , Im3p1Gate ) + Llabel_testOddm3p1Gate.AddCoord( 1 , 757 , 95 ) + Llabel_testOddm3p1Gate.AddCoord( 2 , 757 , 310 ) + + Llabel_testNm3p1anOddInteger = GraphSyrControlAveExecutable.Link( Olabel_testN , Im3p1anOddInteger ) + Llabel_testNm3p1anOddInteger.AddCoord( 1 , 741 , 72 ) + Llabel_testNm3p1anOddInteger.AddCoord( 2 , 741 , 331 ) + + Llabel_testNdiv2anEvenInteger = GraphSyrControlAveExecutable.Link( Olabel_testN , Idiv2anEvenInteger ) + + Llabel_testNC_MINanInteger = GraphSyrControlAveExecutable.Link( Olabel_testN , IC_MINanInteger ) + Llabel_testNC_MINanInteger.AddCoord( 1 , 744 , 923 ) + Llabel_testNC_MINanInteger.AddCoord( 2 , 742 , 331 ) + + Llabel_testNC_MAXanInteger = GraphSyrControlAveExecutable.Link( Olabel_testN , IC_MAXanInteger ) + Llabel_testNC_MAXanInteger.AddCoord( 1 , 742 , 759 ) + Llabel_testNC_MAXanInteger.AddCoord( 2 , 743 , 332 ) + + Llabel_testNC_AVERAGEanInteger = GraphSyrControlAveExecutable.Link( Olabel_testN , IC_AVERAGEanInteger ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 1 , 741 , 568 ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 2 , 742 , 330 ) + + Llabel_testKincraCount = GraphSyrControlAveExecutable.Link( Olabel_testK , IincraCount ) + Llabel_testKincraCount.AddCoord( 1 , 766 , 207 ) + Llabel_testKincraCount.AddCoord( 2 , 766 , 343 ) + + Llabel_testMINC_MINaMinVal = GraphSyrControlAveExecutable.Link( Olabel_testMIN , IC_MINaMinVal ) + Llabel_testMINC_MINaMinVal.AddCoord( 1 , 771 , 902 ) + Llabel_testMINC_MINaMinVal.AddCoord( 2 , 777 , 371 ) + Llabel_testMINC_MINaMinVal.AddCoord( 3 , 777 , 370 ) + + Llabel_testMINEndL_OneEvenMINT = GraphSyrControlAveExecutable.Link( Olabel_testMIN , IEndL_OneEvenMINT ) + + Llabel_testMAXC_MAXaMaxVal = GraphSyrControlAveExecutable.Link( Olabel_testMAX , IC_MAXaMaxVal ) + Llabel_testMAXC_MAXaMaxVal.AddCoord( 1 , 764 , 739 ) + Llabel_testMAXC_MAXaMaxVal.AddCoord( 2 , 762 , 390 ) + + Llabel_testMAXEndL_OneEvenMAXT = GraphSyrControlAveExecutable.Link( Olabel_testMAX , IEndL_OneEvenMAXT ) + + Llabel_testAVERAGEEndL_OneEvenAVERAGET = GraphSyrControlAveExecutable.Link( Olabel_testAVERAGE , IEndL_OneEvenAVERAGET ) + + Llabel_testSYRLISTC_AVERAGEaListOfSyr = GraphSyrControlAveExecutable.Link( Olabel_testSYRLIST , IC_AVERAGEaListOfSyr ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 1 , 769 , 546 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 2 , 769 , 431 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 3 , 768 , 431 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 4 , 768 , 430 ) + + Llabel_testDefaultEndL_OneEvenDefault = GraphSyrControlAveExecutable.Link( Olabel_testDefault , IEndL_OneEvenDefault ) + + Lcontrol_m3p1Gatelabel_testGate = GraphSyrControlAveExecutable.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 553 , 453 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 554 , 1025 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1242 , 1026 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1234 , 204 ) + + Lcontrol_div2Gatelabel_beginGate = GraphSyrControlAveExecutable.Link( Ocontrol_div2Gate , Ilabel_beginGate ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 176 , 419 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 176 , 997 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1217 , 996 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 4 , 1223 , 711 ) + + # Input datas + Ilabel_beginNB.Input( 31 ) + Ilabel_beginKB.Input( 0 ) + Ilabel_beginMINB.Input( 0 ) + Ilabel_beginMAXB.Input( 0 ) + Ilabel_beginAVERAGEB.Input( 0 ) + + # Output Ports of the graph + #Olabel_testFinished = label_test.GetOutPort( 'Finished' ) + #Olabel_testIncr = label_test.GetOutPort( 'Incr' ) + #OEndL_OneEvenMIN = EndL_OneEven.GetOutPort( 'MIN' ) + #OEndL_OneEvenMAX = EndL_OneEven.GetOutPort( 'MAX' ) + #OEndL_OneEvenAVERAGE = EndL_OneEven.GetOutPort( 'AVERAGE' ) + return GraphSyrControlAveExecutable + + +GraphSyrControlAveExecutable = DefGraphSyrControlAveExecutable() diff --git a/examples/GraphSyrControlAveExecutable.xml b/examples/GraphSyrControlAveExecutable.xml new file mode 100644 index 0000000..630c7ad --- /dev/null +++ b/examples/GraphSyrControlAveExecutable.xml @@ -0,0 +1,1113 @@ + + + + + +? + ? + GraphSyrControlAveExecutable + 1 + ? + +GraphSyrControlAveNOTExecutable + + +long + label_begin__NB + +long + label_begin__KB + +long + label_begin__MINB + +long + label_begin__MAXB + +double + label_begin__AVERAGEB + + +long + label_test__Finished + +long + label_test__Incr + +long + EndL_OneEven__MIN + +long + EndL_OneEven__MAX + +double + EndL_OneEven__AVERAGE + + + 2/10/2003 - 11:17:14 + 22/6/2005 - 15:5:27 + 1.05 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 370 + 455 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 370 + 127 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 789 + 0 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 789 + 255 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 790 + 136 + +SyrComponent + SyrComponent + C_MIN + 0 + ? + +C_MIN + + +long + aMinVal + +long + anInteger + + +long + aNewMinVal + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_MIN from SyrComponent + 798 + 833 + +SyrComponent + SyrComponent + C_MAX + 0 + ? + +C_MAX + + +long + aMaxVal + +long + anInteger + + +long + aNewMaxVal + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_MAX from SyrComponent + 798 + 668 + +SyrComponent + SyrComponent + C_AVERAGE + 0 + ? + +C_AVERAGE + + +ListOfSyr + aListOfSyr + +long + anInteger + +long + aCount + + +ListOfSyr + aNewListOfSyr + +double + anAverage + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_AVERAGE from SyrComponent + 784 + 476 + +SyrComponent + SyrComponent + C_LISTOFSYR + 0 + ? + +C_LISTOFSYR + + + +ListOfSyr + aListOfSyr + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + localhost/FactoryServer + C_LISTOFSYR from SyrComponent + 5 + 321 + +? + ? + label_begin + 3 + ? + +label_begin + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +label_begin + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + ? + Python function + 183 + 220 + +? + ? + label_test + 6 + EndL_OneEven + +label_test + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + +long + Finished + +long + Incr + +long + Even + +long + Odd + +long + N + +long + K + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +L_OneEven + + + + + + + + + + + + + + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + ? + Compute Node + 564 + 219 + +? + ? + EndL_OneEven + 7 + label_test + +EndL_OneEven + + +long + MINT + +long + MAXT + +double + AVERAGET + + +long + MIN + +long + MAX + +double + AVERAGE + + + +? + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + ? + Compute Node + 1064 + 339 + +? + ? + control_m3p1 + 8 + label_test + +control_m3p1 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +C_NotOneIsEven + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + ? + Compute Node + 1058 + 8 + +? + ? + control_div2 + 8 + label_begin + +control_div2 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + + +control_div2 + + + 22/6/2005 - 15:4:37 + 22/6/2005 - 15:4:37 + 1.05 + ? + ? + Compute Node + 1048 + 555 + + +test_ISEVEN + BoolEven + label_test + ValEven + + +544 + 256 + +544 + 524 + +test_ISONE + BoolOne + label_test + ValOne + + +546 + 237 + +546 + 198 + +m3p1 + anEvenInteger + control_m3p1 + N + + +975 + 38 + +976 + 81 + +div2 + anInteger + control_div2 + N + + +1012 + 585 + +1011 + 346 + +incr + aNewCount + control_div2 + K + + +966 + 606 + +968 + 207 + +incr + aNewCount + control_m3p1 + K + + +965 + 59 + +966 + 208 + +incr + aNewCount + C_AVERAGE + aCount + + +751 + 588 + +751 + 460 + +965 + 462 + +968 + 205 + +C_MIN + aNewMinVal + control_m3p1 + MINT + + +991 + 78 + +991 + 905 + +C_MIN + aNewMinVal + control_div2 + MINT + + +991 + 626 + +991 + 905 + +C_MAX + aNewMaxVal + control_m3p1 + MAXT + + +976 + 98 + +974 + 738 + +C_MAX + aNewMaxVal + control_div2 + MAXT + + +972 + 648 + +974 + 738 + +C_AVERAGE + aNewListOfSyr + control_m3p1 + SYRLISTT + + +1037 + 137 + +1038 + 556 + +C_AVERAGE + aNewListOfSyr + control_div2 + SYRLISTT + + +1038 + 686 + +1038 + 555 + +C_AVERAGE + anAverage + control_m3p1 + AVERAGET + + +1026 + 118 + +1027 + 567 + +C_AVERAGE + anAverage + control_div2 + AVERAGET + + +1027 + 668 + +1026 + 568 + +C_LISTOFSYR + aListOfSyr + label_begin + SYRLISTB + + +label_begin + NT + test_ISONE + anInteger + + +361 + 197 + +360 + 290 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISEVEN + anInteger + + +359 + 525 + +361 + 291 + +label_begin + KT + label_test + KT + + +label_begin + MIN + label_test + MIN + + +label_begin + MAX + label_test + MAX + + +label_begin + AVERAGE + label_test + AVERAGE + + +label_begin + SYRLIST + label_test + SYRLIST + + +label_test + Even + div2 + Gate + + +777 + 351 + +777 + 286 + +label_test + Odd + m3p1 + Gate + + +757 + 95 + +757 + 310 + +label_test + N + m3p1 + anOddInteger + + +741 + 72 + +741 + 331 + +label_test + N + div2 + anEvenInteger + + +label_test + N + C_MIN + anInteger + + +744 + 923 + +742 + 331 + +label_test + N + C_MAX + anInteger + + +742 + 759 + +743 + 332 + +label_test + N + C_AVERAGE + anInteger + + +741 + 568 + +742 + 330 + +label_test + K + incr + aCount + + +766 + 207 + +766 + 343 + +label_test + MIN + C_MIN + aMinVal + + +771 + 902 + +777 + 371 + +777 + 370 + +label_test + MIN + EndL_OneEven + MINT + + +label_test + MAX + C_MAX + aMaxVal + + +764 + 739 + +762 + 390 + +label_test + MAX + EndL_OneEven + MAXT + + +label_test + AVERAGE + EndL_OneEven + AVERAGET + + +label_test + SYRLIST + C_AVERAGE + aListOfSyr + + +769 + 546 + +769 + 431 + +768 + 431 + +768 + 430 + +label_test + Default + EndL_OneEven + Default + + +control_m3p1 + Gate + label_test + Gate + + +553 + 453 + +554 + 1025 + +1242 + 1026 + +1234 + 204 + +control_div2 + Gate + label_begin + Gate + + +176 + 419 + +176 + 997 + +1217 + 996 + +1223 + 711 + + +GraphSyrControlAveExecutable + label_begin__NB + label_begin + NB + +3 + 31 + + +GraphSyrControlAveExecutable + label_begin__KB + label_begin + KB + +3 + 0 + + +GraphSyrControlAveExecutable + label_begin__MINB + label_begin + MINB + +3 + 0 + + +GraphSyrControlAveExecutable + label_begin__MAXB + label_begin + MAXB + +3 + 0 + + +GraphSyrControlAveExecutable + label_begin__AVERAGEB + label_begin + AVERAGEB + +7 + 0 + diff --git a/examples/GraphSyrControlAveNOTValid.py b/examples/GraphSyrControlAveNOTValid.py new file mode 100644 index 0000000..f2062f0 --- /dev/null +++ b/examples/GraphSyrControlAveNOTValid.py @@ -0,0 +1,415 @@ + +# Generated python file of Graph GraphSyrControlAveNOTValid + +from SuperV import * + +# Graph creation of GraphSyrControlAveNOTValid +def DefGraphSyrControlAveNOTValid() : + GraphSyrControlAveNOTValid = Graph( 'GraphSyrControlAveNOTValid' ) + GraphSyrControlAveNOTValid.SetName( 'GraphSyrControlAveNOTValid' ) + GraphSyrControlAveNOTValid.SetAuthor( 'JR' ) + GraphSyrControlAveNOTValid.SetComment( 'Syracuse algorithm' ) + GraphSyrControlAveNOTValid.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + test_ISEVEN = GraphSyrControlAveNOTValid.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( 370 , 455 ) + 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 = GraphSyrControlAveNOTValid.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( 370 , 127 ) + 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 = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) + m3p1.SetName( 'm3p1' ) + m3p1.SetAuthor( '' ) + m3p1.SetContainer( 'localhost/FactoryServer' ) + m3p1.SetComment( 'C_M3P1 from SyrComponent' ) + m3p1.Coords( 789 , 0 ) + Im3p1anOddInteger = m3p1.GetInPort( 'anOddInteger' ) + Im3p1Gate = m3p1.GetInPort( 'Gate' ) + Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' ) + Om3p1Gate = m3p1.GetOutPort( 'Gate' ) + + div2 = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2.SetName( 'div2' ) + div2.SetAuthor( '' ) + div2.SetContainer( 'localhost/FactoryServer' ) + div2.SetComment( 'C_DIV2 from SyrComponent' ) + div2.Coords( 789 , 255 ) + Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' ) + Idiv2Gate = div2.GetInPort( 'Gate' ) + Odiv2anInteger = div2.GetOutPort( 'anInteger' ) + Odiv2Gate = div2.GetOutPort( 'Gate' ) + + incr = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr.SetName( 'incr' ) + incr.SetAuthor( '' ) + incr.SetContainer( 'localhost/FactoryServer' ) + incr.SetComment( 'C_INCR from SyrComponent' ) + incr.Coords( 790 , 136 ) + IincraCount = incr.GetInPort( 'aCount' ) + IincrGate = incr.GetInPort( 'Gate' ) + OincraNewCount = incr.GetOutPort( 'aNewCount' ) + OincrGate = incr.GetOutPort( 'Gate' ) + + C_MIN = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MIN' ) + C_MIN.SetName( 'C_MIN' ) + C_MIN.SetAuthor( '' ) + C_MIN.SetContainer( 'localhost/FactoryServer' ) + C_MIN.SetComment( 'C_MIN from SyrComponent' ) + C_MIN.Coords( 798 , 833 ) + IC_MINaMinVal = C_MIN.GetInPort( 'aMinVal' ) + IC_MINanInteger = C_MIN.GetInPort( 'anInteger' ) + IC_MINGate = C_MIN.GetInPort( 'Gate' ) + OC_MINaNewMinVal = C_MIN.GetOutPort( 'aNewMinVal' ) + OC_MINGate = C_MIN.GetOutPort( 'Gate' ) + + C_MAX = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MAX' ) + C_MAX.SetName( 'C_MAX' ) + C_MAX.SetAuthor( '' ) + C_MAX.SetContainer( 'localhost/FactoryServer' ) + C_MAX.SetComment( 'C_MAX from SyrComponent' ) + C_MAX.Coords( 798 , 668 ) + IC_MAXaMaxVal = C_MAX.GetInPort( 'aMaxVal' ) + IC_MAXanInteger = C_MAX.GetInPort( 'anInteger' ) + IC_MAXGate = C_MAX.GetInPort( 'Gate' ) + OC_MAXaNewMaxVal = C_MAX.GetOutPort( 'aNewMaxVal' ) + OC_MAXGate = C_MAX.GetOutPort( 'Gate' ) + + C_AVERAGE = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_AVERAGE' ) + C_AVERAGE.SetName( 'C_AVERAGE' ) + C_AVERAGE.SetAuthor( '' ) + C_AVERAGE.SetContainer( 'localhost/FactoryServer' ) + C_AVERAGE.SetComment( 'C_AVERAGE from SyrComponent' ) + C_AVERAGE.Coords( 784 , 476 ) + IC_AVERAGEaListOfSyr = C_AVERAGE.GetInPort( 'aListOfSyr' ) + IC_AVERAGEanInteger = C_AVERAGE.GetInPort( 'anInteger' ) + IC_AVERAGEaCount = C_AVERAGE.GetInPort( 'aCount' ) + IC_AVERAGEGate = C_AVERAGE.GetInPort( 'Gate' ) + OC_AVERAGEaNewListOfSyr = C_AVERAGE.GetOutPort( 'aNewListOfSyr' ) + OC_AVERAGEanAverage = C_AVERAGE.GetOutPort( 'anAverage' ) + OC_AVERAGEGate = C_AVERAGE.GetOutPort( 'Gate' ) + + C_LISTOFSYR = GraphSyrControlAveNOTValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_LISTOFSYR' ) + C_LISTOFSYR.SetName( 'C_LISTOFSYR' ) + C_LISTOFSYR.SetAuthor( '' ) + C_LISTOFSYR.SetContainer( 'localhost/FactoryServer' ) + C_LISTOFSYR.SetComment( 'C_LISTOFSYR from SyrComponent' ) + C_LISTOFSYR.Coords( 5 , 321 ) + IC_LISTOFSYRGate = C_LISTOFSYR.GetInPort( 'Gate' ) + OC_LISTOFSYRaListOfSyr = C_LISTOFSYR.GetOutPort( 'aListOfSyr' ) + OC_LISTOFSYRGate = C_LISTOFSYR.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + Pylabel_begin = [] + Pylabel_begin.append( 'def label_begin( NB , KB , MINB , MAXB , AVERAGEB , SYRLISTB ) :' ) + Pylabel_begin.append( ' return NB,KB,MINB,MAXB,AVERAGEB,SYRLISTB' ) + label_begin = GraphSyrControlAveNOTValid.INode( 'label_begin' , Pylabel_begin ) + label_begin.SetName( 'label_begin' ) + label_begin.SetAuthor( '' ) + label_begin.SetComment( 'Python function' ) + label_begin.Coords( 183 , 220 ) + Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' ) + Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' ) + Ilabel_beginMINB = label_begin.InPort( 'MINB' , 'long' ) + Ilabel_beginMAXB = label_begin.InPort( 'MAXB' , 'long' ) + Ilabel_beginAVERAGEB = label_begin.InPort( 'AVERAGEB' , 'double' ) + Ilabel_beginSYRLISTB = label_begin.InPort( 'SYRLISTB' , 'ListOfSyr' ) + Ilabel_beginGate = label_begin.GetInPort( 'Gate' ) + Olabel_beginNT = label_begin.OutPort( 'NT' , 'long' ) + Olabel_beginKT = label_begin.OutPort( 'KT' , 'long' ) + Olabel_beginMIN = label_begin.OutPort( 'MIN' , 'long' ) + Olabel_beginMAX = label_begin.OutPort( 'MAX' , 'long' ) + Olabel_beginAVERAGE = label_begin.OutPort( 'AVERAGE' , 'double' ) + Olabel_beginSYRLIST = label_begin.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_beginGate = label_begin.GetOutPort( 'Gate' ) + + # Creation of Switch Nodes + Pylabel_test = [] + Pylabel_test.append( 'def L_OneEven( ValOne , ValEven , NT , KT , MIN , MAX , AVERAGE , SYRLIST ):' ) + Pylabel_test.append( ' Finished = ValOne' ) + Pylabel_test.append( ' if Finished == 0 :' ) + Pylabel_test.append( ' Incr = 1' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' if Even == 0 :' ) + Pylabel_test.append( ' Odd = 1' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Incr = 0' ) + Pylabel_test.append( ' Even = 0' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' return Finished,Incr,Even,Odd,NT,KT,MIN,MAX,AVERAGE,SYRLIST' ) + label_test,EndL_OneEven = GraphSyrControlAveNOTValid.SNode( 'L_OneEven' , Pylabel_test ) + EndL_OneEven.SetName( 'EndL_OneEven' ) + EndL_OneEven.SetAuthor( '' ) + EndL_OneEven.SetComment( 'Compute Node' ) + EndL_OneEven.Coords( 1064 , 339 ) + PyEndL_OneEven = [] + EndL_OneEven.SetPyFunction( '' , PyEndL_OneEven ) + IEndL_OneEvenMINT = EndL_OneEven.InPort( 'MINT' , 'long' ) + IEndL_OneEvenMAXT = EndL_OneEven.InPort( 'MAXT' , 'long' ) + IEndL_OneEvenAVERAGET = EndL_OneEven.InPort( 'AVERAGET' , 'double' ) + IEndL_OneEvenDefault = EndL_OneEven.GetInPort( 'Default' ) + OEndL_OneEvenMIN = EndL_OneEven.OutPort( 'MIN' , 'long' ) + OEndL_OneEvenMAX = EndL_OneEven.OutPort( 'MAX' , 'long' ) + OEndL_OneEvenAVERAGE = EndL_OneEven.OutPort( 'AVERAGE' , 'double' ) + OEndL_OneEvenGate = EndL_OneEven.GetOutPort( 'Gate' ) + label_test.SetName( 'label_test' ) + label_test.SetAuthor( '' ) + label_test.SetComment( 'Compute Node' ) + label_test.Coords( 564 , 219 ) + Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' ) + Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' ) + Ilabel_testNT = label_test.InPort( 'NT' , 'long' ) + Ilabel_testKT = label_test.InPort( 'KT' , 'long' ) + Ilabel_testMIN = label_test.InPort( 'MIN' , 'long' ) + Ilabel_testMAX = label_test.InPort( 'MAX' , 'long' ) + Ilabel_testAVERAGE = label_test.InPort( 'AVERAGE' , 'double' ) + Ilabel_testSYRLIST = label_test.InPort( 'SYRLIST' , 'ListOfSyr' ) + Ilabel_testGate = label_test.GetInPort( 'Gate' ) + Olabel_testFinished = label_test.OutPort( 'Finished' , 'long' ) + Olabel_testIncr = label_test.OutPort( 'Incr' , 'long' ) + Olabel_testEven = label_test.OutPort( 'Even' , 'long' ) + Olabel_testOdd = label_test.OutPort( 'Odd' , 'long' ) + Olabel_testN = label_test.OutPort( 'N' , 'long' ) + Olabel_testK = label_test.OutPort( 'K' , 'long' ) + Olabel_testMIN = label_test.OutPort( 'MIN' , 'long' ) + Olabel_testMAX = label_test.OutPort( 'MAX' , 'long' ) + Olabel_testAVERAGE = label_test.OutPort( 'AVERAGE' , 'double' ) + Olabel_testSYRLIST = label_test.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_testDefault = label_test.GetOutPort( 'Default' ) + + # Creation of GOTO Nodes + Pycontrol_m3p1 = [] + Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K , MINT , MAXT , AVERAGET , SYRLISTT ):' ) + Pycontrol_m3p1.append( ' return 0,1,N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_m3p1 = GraphSyrControlAveNOTValid.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) + control_m3p1.SetName( 'control_m3p1' ) + control_m3p1.SetAuthor( '' ) + control_m3p1.SetComment( 'Compute Node' ) + control_m3p1.Coords( 1058 , 8 ) + Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' ) + Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' ) + Icontrol_m3p1MINT = control_m3p1.InPort( 'MINT' , 'long' ) + Icontrol_m3p1MAXT = control_m3p1.InPort( 'MAXT' , 'long' ) + Icontrol_m3p1AVERAGET = control_m3p1.InPort( 'AVERAGET' , 'double' ) + Icontrol_m3p1SYRLISTT = control_m3p1.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_m3p1Gate = control_m3p1.GetInPort( 'Gate' ) + Ocontrol_m3p1ValOne = control_m3p1.OutPort( 'ValOne' , 'long' ) + Ocontrol_m3p1ValEven = control_m3p1.OutPort( 'ValEven' , 'long' ) + Ocontrol_m3p1NT = control_m3p1.OutPort( 'NT' , 'long' ) + Ocontrol_m3p1KT = control_m3p1.OutPort( 'KT' , 'long' ) + Ocontrol_m3p1MIN = control_m3p1.OutPort( 'MIN' , 'long' ) + Ocontrol_m3p1MAX = control_m3p1.OutPort( 'MAX' , 'long' ) + Ocontrol_m3p1AVERAGE = control_m3p1.OutPort( 'AVERAGE' , 'double' ) + Ocontrol_m3p1SYRLIST = control_m3p1.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Ocontrol_m3p1Gate = control_m3p1.GetOutPort( 'Gate' ) + + Pycontrol_div2 = [] + Pycontrol_div2.append( 'def control_div2( N , K , MINT , MAXT , AVERAGET , SYRLISTT ) :' ) + Pycontrol_div2.append( ' return N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_div2 = GraphSyrControlAveNOTValid.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) + control_div2.SetName( 'control_div2' ) + control_div2.SetAuthor( '' ) + control_div2.SetComment( 'Compute Node' ) + control_div2.Coords( 1048 , 555 ) + Icontrol_div2N = control_div2.InPort( 'N' , 'long' ) + Icontrol_div2K = control_div2.InPort( 'K' , 'long' ) + Icontrol_div2MINT = control_div2.InPort( 'MINT' , 'long' ) + Icontrol_div2MAXT = control_div2.InPort( 'MAXT' , 'long' ) + Icontrol_div2AVERAGET = control_div2.InPort( 'AVERAGET' , 'double' ) + Icontrol_div2SYRLISTT = control_div2.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_div2Gate = control_div2.GetInPort( 'Gate' ) + Ocontrol_div2NB = control_div2.OutPort( 'NB' , 'long' ) + Ocontrol_div2KB = control_div2.OutPort( 'KB' , 'long' ) + Ocontrol_div2MINB = control_div2.OutPort( 'MINB' , 'long' ) + Ocontrol_div2MAXB = control_div2.OutPort( 'MAXB' , 'long' ) + Ocontrol_div2AVERAGEB = control_div2.OutPort( 'AVERAGEB' , 'double' ) + Ocontrol_div2SYRLISTB = control_div2.OutPort( 'SYRLISTB' , 'ListOfSyr' ) + Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' ) + + # Creation of Links + Ltest_ISEVENBoolEvenlabel_testValEven = GraphSyrControlAveNOTValid.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 544 , 256 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 544 , 524 ) + + Ltest_ISONEBoolOnelabel_testValOne = GraphSyrControlAveNOTValid.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 546 , 237 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 546 , 198 ) + + Lm3p1anEvenIntegercontrol_m3p1N = GraphSyrControlAveNOTValid.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 1 , 975 , 38 ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 2 , 976 , 81 ) + + Ldiv2anIntegercontrol_div2N = GraphSyrControlAveNOTValid.Link( Odiv2anInteger , Icontrol_div2N ) + Ldiv2anIntegercontrol_div2N.AddCoord( 1 , 1012 , 585 ) + Ldiv2anIntegercontrol_div2N.AddCoord( 2 , 1011 , 346 ) + + LincraNewCountcontrol_div2K = GraphSyrControlAveNOTValid.Link( OincraNewCount , Icontrol_div2K ) + LincraNewCountcontrol_div2K.AddCoord( 1 , 966 , 606 ) + LincraNewCountcontrol_div2K.AddCoord( 2 , 968 , 207 ) + + LincraNewCountcontrol_m3p1K = GraphSyrControlAveNOTValid.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 965 , 59 ) + LincraNewCountcontrol_m3p1K.AddCoord( 2 , 966 , 208 ) + + LincraNewCountC_AVERAGEaCount = GraphSyrControlAveNOTValid.Link( OincraNewCount , IC_AVERAGEaCount ) + LincraNewCountC_AVERAGEaCount.AddCoord( 1 , 751 , 588 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 2 , 751 , 460 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 3 , 965 , 462 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 4 , 968 , 205 ) + + LC_MINaNewMinValcontrol_m3p1MINT = GraphSyrControlAveNOTValid.Link( OC_MINaNewMinVal , Icontrol_m3p1MINT ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 1 , 991 , 78 ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 2 , 991 , 905 ) + + LC_MINaNewMinValcontrol_div2MINT = GraphSyrControlAveNOTValid.Link( OC_MINaNewMinVal , Icontrol_div2MINT ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 1 , 991 , 626 ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 2 , 991 , 905 ) + + LC_MAXaNewMaxValcontrol_m3p1MAXT = GraphSyrControlAveNOTValid.Link( OC_MAXaNewMaxVal , Icontrol_m3p1MAXT ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 1 , 976 , 98 ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 2 , 974 , 738 ) + + LC_MAXaNewMaxValcontrol_div2MAXT = GraphSyrControlAveNOTValid.Link( OC_MAXaNewMaxVal , Icontrol_div2MAXT ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 1 , 972 , 648 ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 2 , 974 , 738 ) + + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT = GraphSyrControlAveNOTValid.Link( OC_AVERAGEaNewListOfSyr , Icontrol_m3p1SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 1 , 1037 , 137 ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 2 , 1038 , 556 ) + + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT = GraphSyrControlAveNOTValid.Link( OC_AVERAGEaNewListOfSyr , Icontrol_div2SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 1 , 1038 , 686 ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 2 , 1038 , 555 ) + + LC_AVERAGEanAveragecontrol_m3p1AVERAGET = GraphSyrControlAveNOTValid.Link( OC_AVERAGEanAverage , Icontrol_m3p1AVERAGET ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 1 , 1026 , 118 ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 2 , 1027 , 567 ) + + LC_AVERAGEanAveragecontrol_div2AVERAGET = GraphSyrControlAveNOTValid.Link( OC_AVERAGEanAverage , Icontrol_div2AVERAGET ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 1 , 1027 , 668 ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 2 , 1026 , 568 ) + + LC_LISTOFSYRaListOfSyrlabel_beginSYRLISTB = GraphSyrControlAveNOTValid.Link( OC_LISTOFSYRaListOfSyr , Ilabel_beginSYRLISTB ) + + Llabel_beginNTtest_ISONEanInteger = GraphSyrControlAveNOTValid.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 361 , 197 ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 360 , 290 ) + + Llabel_beginNTlabel_testNT = GraphSyrControlAveNOTValid.Link( Olabel_beginNT , Ilabel_testNT ) + + Llabel_beginNTtest_ISEVENanInteger = GraphSyrControlAveNOTValid.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 359 , 525 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 361 , 291 ) + + Llabel_beginKTlabel_testKT = GraphSyrControlAveNOTValid.Link( Olabel_beginKT , Ilabel_testKT ) + + Llabel_beginMINlabel_testMIN = GraphSyrControlAveNOTValid.Link( Olabel_beginMIN , Ilabel_testMIN ) + + Llabel_beginMAXlabel_testMAX = GraphSyrControlAveNOTValid.Link( Olabel_beginMAX , Ilabel_testMAX ) + + Llabel_beginAVERAGElabel_testAVERAGE = GraphSyrControlAveNOTValid.Link( Olabel_beginAVERAGE , Ilabel_testAVERAGE ) + + Llabel_beginSYRLISTlabel_testSYRLIST = GraphSyrControlAveNOTValid.Link( Olabel_beginSYRLIST , Ilabel_testSYRLIST ) + + Llabel_testEvendiv2Gate = GraphSyrControlAveNOTValid.Link( Olabel_testEven , Idiv2Gate ) + Llabel_testEvendiv2Gate.AddCoord( 1 , 777 , 351 ) + Llabel_testEvendiv2Gate.AddCoord( 2 , 777 , 286 ) + + Llabel_testOddm3p1Gate = GraphSyrControlAveNOTValid.Link( Olabel_testOdd , Im3p1Gate ) + Llabel_testOddm3p1Gate.AddCoord( 1 , 757 , 95 ) + Llabel_testOddm3p1Gate.AddCoord( 2 , 757 , 310 ) + + Llabel_testNm3p1anOddInteger = GraphSyrControlAveNOTValid.Link( Olabel_testN , Im3p1anOddInteger ) + Llabel_testNm3p1anOddInteger.AddCoord( 1 , 741 , 72 ) + Llabel_testNm3p1anOddInteger.AddCoord( 2 , 741 , 331 ) + + Llabel_testNdiv2anEvenInteger = GraphSyrControlAveNOTValid.Link( Olabel_testN , Idiv2anEvenInteger ) + + Llabel_testNC_MINanInteger = GraphSyrControlAveNOTValid.Link( Olabel_testN , IC_MINanInteger ) + Llabel_testNC_MINanInteger.AddCoord( 1 , 744 , 923 ) + Llabel_testNC_MINanInteger.AddCoord( 2 , 742 , 331 ) + + Llabel_testNC_MAXanInteger = GraphSyrControlAveNOTValid.Link( Olabel_testN , IC_MAXanInteger ) + Llabel_testNC_MAXanInteger.AddCoord( 1 , 742 , 759 ) + Llabel_testNC_MAXanInteger.AddCoord( 2 , 743 , 332 ) + + Llabel_testNC_AVERAGEanInteger = GraphSyrControlAveNOTValid.Link( Olabel_testN , IC_AVERAGEanInteger ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 1 , 741 , 568 ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 2 , 742 , 330 ) + + Llabel_testKincraCount = GraphSyrControlAveNOTValid.Link( Olabel_testK , IincraCount ) + Llabel_testKincraCount.AddCoord( 1 , 766 , 207 ) + Llabel_testKincraCount.AddCoord( 2 , 766 , 343 ) + + Llabel_testMINC_MINaMinVal = GraphSyrControlAveNOTValid.Link( Olabel_testMIN , IC_MINaMinVal ) + Llabel_testMINC_MINaMinVal.AddCoord( 1 , 771 , 902 ) + Llabel_testMINC_MINaMinVal.AddCoord( 2 , 777 , 371 ) + Llabel_testMINC_MINaMinVal.AddCoord( 3 , 777 , 370 ) + + Llabel_testMAXC_MAXaMaxVal = GraphSyrControlAveNOTValid.Link( Olabel_testMAX , IC_MAXaMaxVal ) + Llabel_testMAXC_MAXaMaxVal.AddCoord( 1 , 764 , 739 ) + Llabel_testMAXC_MAXaMaxVal.AddCoord( 2 , 762 , 390 ) + + Llabel_testSYRLISTC_AVERAGEaListOfSyr = GraphSyrControlAveNOTValid.Link( Olabel_testSYRLIST , IC_AVERAGEaListOfSyr ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 1 , 769 , 546 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 2 , 769 , 431 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 3 , 768 , 431 ) + Llabel_testSYRLISTC_AVERAGEaListOfSyr.AddCoord( 4 , 768 , 430 ) + + Llabel_testDefaultEndL_OneEvenDefault = GraphSyrControlAveNOTValid.Link( Olabel_testDefault , IEndL_OneEvenDefault ) + + Lcontrol_m3p1Gatelabel_testGate = GraphSyrControlAveNOTValid.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 553 , 453 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 554 , 1025 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1242 , 1026 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1234 , 204 ) + + Lcontrol_div2Gatelabel_beginGate = GraphSyrControlAveNOTValid.Link( Ocontrol_div2Gate , Ilabel_beginGate ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 176 , 419 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 176 , 997 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1217 , 996 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 4 , 1223 , 711 ) + + # Input datas + Ilabel_beginNB.Input( 31 ) + Ilabel_beginKB.Input( 0 ) + Ilabel_beginMINB.Input( 0 ) + Ilabel_beginMAXB.Input( 0 ) + Ilabel_beginAVERAGEB.Input( 0 ) + + # Input Ports of the graph + #IEndL_OneEvenMINT = EndL_OneEven.GetInPort( 'MINT' ) + #IEndL_OneEvenMAXT = EndL_OneEven.GetInPort( 'MAXT' ) + #IEndL_OneEvenAVERAGET = EndL_OneEven.GetInPort( 'AVERAGET' ) + + # Output Ports of the graph + #Olabel_testFinished = label_test.GetOutPort( 'Finished' ) + #Olabel_testIncr = label_test.GetOutPort( 'Incr' ) + #Olabel_testAVERAGE = label_test.GetOutPort( 'AVERAGE' ) + #OEndL_OneEvenMIN = EndL_OneEven.GetOutPort( 'MIN' ) + #OEndL_OneEvenMAX = EndL_OneEven.GetOutPort( 'MAX' ) + #OEndL_OneEvenAVERAGE = EndL_OneEven.GetOutPort( 'AVERAGE' ) + return GraphSyrControlAveNOTValid + + +GraphSyrControlAveNOTValid = DefGraphSyrControlAveNOTValid() diff --git a/examples/GraphSyrControlAveNOTValid.xml b/examples/GraphSyrControlAveNOTValid.xml new file mode 100644 index 0000000..48cb311 --- /dev/null +++ b/examples/GraphSyrControlAveNOTValid.xml @@ -0,0 +1,1107 @@ + + + + + +? + ? + GraphSyrControlAveNOTValid + 1 + ? + +GraphSyrControlAveNOTValid + + +long + label_begin__NB + +long + label_begin__KB + +long + label_begin__MINB + +long + label_begin__MAXB + +double + label_begin__AVERAGEB + +long + EndL_OneEven__MINT + +long + EndL_OneEven__MAXT + +double + EndL_OneEven__AVERAGET + + +long + label_test__Finished + +long + label_test__Incr + +double + label_test__AVERAGE + +long + EndL_OneEven__MIN + +long + EndL_OneEven__MAX + +double + EndL_OneEven__AVERAGE + + + 2/10/2003 - 11:17:14 + 28/6/2005 - 12:6:44 + 1.05 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 370 + 455 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 370 + 127 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 789 + 0 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 789 + 255 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 790 + 136 + +SyrComponent + SyrComponent + C_MIN + 0 + ? + +C_MIN + + +long + aMinVal + +long + anInteger + + +long + aNewMinVal + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_MIN from SyrComponent + 798 + 833 + +SyrComponent + SyrComponent + C_MAX + 0 + ? + +C_MAX + + +long + aMaxVal + +long + anInteger + + +long + aNewMaxVal + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_MAX from SyrComponent + 798 + 668 + +SyrComponent + SyrComponent + C_AVERAGE + 0 + ? + +C_AVERAGE + + +ListOfSyr + aListOfSyr + +long + anInteger + +long + aCount + + +ListOfSyr + aNewListOfSyr + +double + anAverage + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_AVERAGE from SyrComponent + 784 + 476 + +SyrComponent + SyrComponent + C_LISTOFSYR + 0 + ? + +C_LISTOFSYR + + + +ListOfSyr + aListOfSyr + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + localhost/FactoryServer + C_LISTOFSYR from SyrComponent + 5 + 321 + +? + ? + label_begin + 3 + ? + +label_begin + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +label_begin + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + ? + Python function + 183 + 220 + +? + ? + label_test + 6 + EndL_OneEven + +label_test + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + +long + Finished + +long + Incr + +long + Even + +long + Odd + +long + N + +long + K + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +L_OneEven + + + + + + + + + + + + + + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + ? + Compute Node + 564 + 219 + +? + ? + EndL_OneEven + 7 + label_test + +EndL_OneEven + + +long + MINT + +long + MAXT + +double + AVERAGET + + +long + MIN + +long + MAX + +double + AVERAGE + + + +? + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + ? + Compute Node + 1064 + 339 + +? + ? + control_m3p1 + 8 + label_test + +control_m3p1 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +C_NotOneIsEven + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + ? + Compute Node + 1058 + 8 + +? + ? + control_div2 + 8 + label_begin + +control_div2 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + + +control_div2 + + + 28/6/2005 - 12:6:44 + 28/6/2005 - 12:6:44 + 1.05 + ? + ? + Compute Node + 1048 + 555 + + +test_ISEVEN + BoolEven + label_test + ValEven + + +544 + 256 + +544 + 524 + +test_ISONE + BoolOne + label_test + ValOne + + +546 + 237 + +546 + 198 + +m3p1 + anEvenInteger + control_m3p1 + N + + +975 + 38 + +976 + 81 + +div2 + anInteger + control_div2 + N + + +1012 + 585 + +1011 + 346 + +incr + aNewCount + control_div2 + K + + +966 + 606 + +968 + 207 + +incr + aNewCount + control_m3p1 + K + + +965 + 59 + +966 + 208 + +incr + aNewCount + C_AVERAGE + aCount + + +751 + 588 + +751 + 460 + +965 + 462 + +968 + 205 + +C_MIN + aNewMinVal + control_m3p1 + MINT + + +991 + 78 + +991 + 905 + +C_MIN + aNewMinVal + control_div2 + MINT + + +991 + 626 + +991 + 905 + +C_MAX + aNewMaxVal + control_m3p1 + MAXT + + +976 + 98 + +974 + 738 + +C_MAX + aNewMaxVal + control_div2 + MAXT + + +972 + 648 + +974 + 738 + +C_AVERAGE + aNewListOfSyr + control_m3p1 + SYRLISTT + + +1037 + 137 + +1038 + 556 + +C_AVERAGE + aNewListOfSyr + control_div2 + SYRLISTT + + +1038 + 686 + +1038 + 555 + +C_AVERAGE + anAverage + control_m3p1 + AVERAGET + + +1026 + 118 + +1027 + 567 + +C_AVERAGE + anAverage + control_div2 + AVERAGET + + +1027 + 668 + +1026 + 568 + +C_LISTOFSYR + aListOfSyr + label_begin + SYRLISTB + + +label_begin + NT + test_ISONE + anInteger + + +361 + 197 + +360 + 290 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISEVEN + anInteger + + +359 + 525 + +361 + 291 + +label_begin + KT + label_test + KT + + +label_begin + MIN + label_test + MIN + + +label_begin + MAX + label_test + MAX + + +label_begin + AVERAGE + label_test + AVERAGE + + +label_begin + SYRLIST + label_test + SYRLIST + + +label_test + Even + div2 + Gate + + +777 + 351 + +777 + 286 + +label_test + Odd + m3p1 + Gate + + +757 + 95 + +757 + 310 + +label_test + N + m3p1 + anOddInteger + + +741 + 72 + +741 + 331 + +label_test + N + div2 + anEvenInteger + + +label_test + N + C_MIN + anInteger + + +744 + 923 + +742 + 331 + +label_test + N + C_MAX + anInteger + + +742 + 759 + +743 + 332 + +label_test + N + C_AVERAGE + anInteger + + +741 + 568 + +742 + 330 + +label_test + K + incr + aCount + + +766 + 207 + +766 + 343 + +label_test + MIN + C_MIN + aMinVal + + +771 + 902 + +777 + 371 + +777 + 370 + +label_test + MAX + C_MAX + aMaxVal + + +764 + 739 + +762 + 390 + +label_test + SYRLIST + C_AVERAGE + aListOfSyr + + +769 + 546 + +769 + 431 + +768 + 431 + +768 + 430 + +label_test + Default + EndL_OneEven + Default + + +control_m3p1 + Gate + label_test + Gate + + +553 + 453 + +554 + 1025 + +1242 + 1026 + +1234 + 204 + +control_div2 + Gate + label_begin + Gate + + +176 + 419 + +176 + 997 + +1217 + 996 + +1223 + 711 + + +GraphSyrControlAveNOTValid + label_begin__NB + label_begin + NB + +3 + 31 + + +GraphSyrControlAveNOTValid + label_begin__KB + label_begin + KB + +3 + 0 + + +GraphSyrControlAveNOTValid + label_begin__MINB + label_begin + MINB + +3 + 0 + + +GraphSyrControlAveNOTValid + label_begin__MAXB + label_begin + MAXB + +3 + 0 + + +GraphSyrControlAveNOTValid + label_begin__AVERAGEB + label_begin + AVERAGEB + +7 + 0 + diff --git a/examples/GraphSyrControlAveValid.py b/examples/GraphSyrControlAveValid.py new file mode 100644 index 0000000..d388eb0 --- /dev/null +++ b/examples/GraphSyrControlAveValid.py @@ -0,0 +1,412 @@ + +# Generated python file of Graph GraphSyrControlAveValid + +from SuperV import * + +# Graph creation of GraphSyrControlAveValid +def DefGraphSyrControlAveValid() : + GraphSyrControlAveValid = Graph( 'GraphSyrControlAveValid' ) + GraphSyrControlAveValid.SetName( 'GraphSyrControlAveValid' ) + GraphSyrControlAveValid.SetAuthor( 'JR' ) + GraphSyrControlAveValid.SetComment( 'Syracuse algorithm' ) + GraphSyrControlAveValid.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + test_ISEVEN = GraphSyrControlAveValid.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( 370 , 455 ) + 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 = GraphSyrControlAveValid.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( 370 , 127 ) + 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 = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) + m3p1.SetName( 'm3p1' ) + m3p1.SetAuthor( '' ) + m3p1.SetContainer( 'localhost/FactoryServer' ) + m3p1.SetComment( 'C_M3P1 from SyrComponent' ) + m3p1.Coords( 789 , 0 ) + Im3p1anOddInteger = m3p1.GetInPort( 'anOddInteger' ) + Im3p1Gate = m3p1.GetInPort( 'Gate' ) + Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' ) + Om3p1Gate = m3p1.GetOutPort( 'Gate' ) + + div2 = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2.SetName( 'div2' ) + div2.SetAuthor( '' ) + div2.SetContainer( 'localhost/FactoryServer' ) + div2.SetComment( 'C_DIV2 from SyrComponent' ) + div2.Coords( 789 , 255 ) + Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' ) + Idiv2Gate = div2.GetInPort( 'Gate' ) + Odiv2anInteger = div2.GetOutPort( 'anInteger' ) + Odiv2Gate = div2.GetOutPort( 'Gate' ) + + incr = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr.SetName( 'incr' ) + incr.SetAuthor( '' ) + incr.SetContainer( 'localhost/FactoryServer' ) + incr.SetComment( 'C_INCR from SyrComponent' ) + incr.Coords( 790 , 136 ) + IincraCount = incr.GetInPort( 'aCount' ) + IincrGate = incr.GetInPort( 'Gate' ) + OincraNewCount = incr.GetOutPort( 'aNewCount' ) + OincrGate = incr.GetOutPort( 'Gate' ) + + C_MIN = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MIN' ) + C_MIN.SetName( 'C_MIN' ) + C_MIN.SetAuthor( '' ) + C_MIN.SetContainer( 'localhost/FactoryServer' ) + C_MIN.SetComment( 'C_MIN from SyrComponent' ) + C_MIN.Coords( 798 , 833 ) + IC_MINaMinVal = C_MIN.GetInPort( 'aMinVal' ) + IC_MINanInteger = C_MIN.GetInPort( 'anInteger' ) + IC_MINGate = C_MIN.GetInPort( 'Gate' ) + OC_MINaNewMinVal = C_MIN.GetOutPort( 'aNewMinVal' ) + OC_MINGate = C_MIN.GetOutPort( 'Gate' ) + + C_MAX = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MAX' ) + C_MAX.SetName( 'C_MAX' ) + C_MAX.SetAuthor( '' ) + C_MAX.SetContainer( 'localhost/FactoryServer' ) + C_MAX.SetComment( 'C_MAX from SyrComponent' ) + C_MAX.Coords( 798 , 668 ) + IC_MAXaMaxVal = C_MAX.GetInPort( 'aMaxVal' ) + IC_MAXanInteger = C_MAX.GetInPort( 'anInteger' ) + IC_MAXGate = C_MAX.GetInPort( 'Gate' ) + OC_MAXaNewMaxVal = C_MAX.GetOutPort( 'aNewMaxVal' ) + OC_MAXGate = C_MAX.GetOutPort( 'Gate' ) + + C_AVERAGE = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_AVERAGE' ) + C_AVERAGE.SetName( 'C_AVERAGE' ) + C_AVERAGE.SetAuthor( '' ) + C_AVERAGE.SetContainer( 'localhost/FactoryServer' ) + C_AVERAGE.SetComment( 'C_AVERAGE from SyrComponent' ) + C_AVERAGE.Coords( 784 , 476 ) + IC_AVERAGEaListOfSyr = C_AVERAGE.GetInPort( 'aListOfSyr' ) + IC_AVERAGEanInteger = C_AVERAGE.GetInPort( 'anInteger' ) + IC_AVERAGEaCount = C_AVERAGE.GetInPort( 'aCount' ) + IC_AVERAGEGate = C_AVERAGE.GetInPort( 'Gate' ) + OC_AVERAGEaNewListOfSyr = C_AVERAGE.GetOutPort( 'aNewListOfSyr' ) + OC_AVERAGEanAverage = C_AVERAGE.GetOutPort( 'anAverage' ) + OC_AVERAGEGate = C_AVERAGE.GetOutPort( 'Gate' ) + + C_LISTOFSYR = GraphSyrControlAveValid.FNode( 'SyrComponent' , 'SyrComponent' , 'C_LISTOFSYR' ) + C_LISTOFSYR.SetName( 'C_LISTOFSYR' ) + C_LISTOFSYR.SetAuthor( '' ) + C_LISTOFSYR.SetContainer( 'localhost/FactoryServer' ) + C_LISTOFSYR.SetComment( 'C_LISTOFSYR from SyrComponent' ) + C_LISTOFSYR.Coords( 5 , 321 ) + IC_LISTOFSYRGate = C_LISTOFSYR.GetInPort( 'Gate' ) + OC_LISTOFSYRaListOfSyr = C_LISTOFSYR.GetOutPort( 'aListOfSyr' ) + OC_LISTOFSYRGate = C_LISTOFSYR.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + Pylabel_begin = [] + Pylabel_begin.append( 'def label_begin( NB , KB , MINB , MAXB , AVERAGEB , SYRLISTB ) :' ) + Pylabel_begin.append( ' return NB,KB,MINB,MAXB,AVERAGEB,SYRLISTB' ) + label_begin = GraphSyrControlAveValid.INode( 'label_begin' , Pylabel_begin ) + label_begin.SetName( 'label_begin' ) + label_begin.SetAuthor( '' ) + label_begin.SetComment( 'Python function' ) + label_begin.Coords( 183 , 220 ) + Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' ) + Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' ) + Ilabel_beginMINB = label_begin.InPort( 'MINB' , 'long' ) + Ilabel_beginMAXB = label_begin.InPort( 'MAXB' , 'long' ) + Ilabel_beginAVERAGEB = label_begin.InPort( 'AVERAGEB' , 'double' ) + Ilabel_beginSYRLISTB = label_begin.InPort( 'SYRLISTB' , 'ListOfSyr' ) + Ilabel_beginGate = label_begin.GetInPort( 'Gate' ) + Olabel_beginNT = label_begin.OutPort( 'NT' , 'long' ) + Olabel_beginKT = label_begin.OutPort( 'KT' , 'long' ) + Olabel_beginMIN = label_begin.OutPort( 'MIN' , 'long' ) + Olabel_beginMAX = label_begin.OutPort( 'MAX' , 'long' ) + Olabel_beginAVERAGE = label_begin.OutPort( 'AVERAGE' , 'double' ) + Olabel_beginSYRLIST = label_begin.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Olabel_beginGate = label_begin.GetOutPort( 'Gate' ) + + # Creation of Switch Nodes + Pylabel_test = [] + Pylabel_test.append( 'def L_OneEven( ValOne , ValEven , NT , KT , MIN , MAX , AVERAGE , SYRLIST ):' ) + Pylabel_test.append( ' Finished = ValOne' ) + Pylabel_test.append( ' if Finished == 0 :' ) + Pylabel_test.append( ' Incr = 1' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' if Even == 0 :' ) + Pylabel_test.append( ' Odd = 1' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' else :' ) + Pylabel_test.append( ' Incr = 0' ) + Pylabel_test.append( ' Even = 0' ) + Pylabel_test.append( ' Odd = 0' ) + Pylabel_test.append( ' Even = ValEven' ) + Pylabel_test.append( ' return Finished,Incr,Even,Odd,NT,KT,MIN,MAX,AVERAGE,SYRLIST' ) + label_test,EndL_OneEven = GraphSyrControlAveValid.SNode( 'L_OneEven' , Pylabel_test ) + EndL_OneEven.SetName( 'EndL_OneEven' ) + EndL_OneEven.SetAuthor( '' ) + EndL_OneEven.SetComment( 'Compute Node' ) + EndL_OneEven.Coords( 1064 , 339 ) + PyEndL_OneEven = [] + EndL_OneEven.SetPyFunction( '' , PyEndL_OneEven ) + IEndL_OneEvenMINT = EndL_OneEven.InPort( 'MINT' , 'long' ) + IEndL_OneEvenMAXT = EndL_OneEven.InPort( 'MAXT' , 'long' ) + IEndL_OneEvenAVERAGET = EndL_OneEven.InPort( 'AVERAGET' , 'double' ) + IEndL_OneEvenDefault = EndL_OneEven.GetInPort( 'Default' ) + OEndL_OneEvenMIN = EndL_OneEven.OutPort( 'MIN' , 'long' ) + OEndL_OneEvenMAX = EndL_OneEven.OutPort( 'MAX' , 'long' ) + OEndL_OneEvenAVERAGE = EndL_OneEven.OutPort( 'AVERAGE' , 'double' ) + OEndL_OneEvenGate = EndL_OneEven.GetOutPort( 'Gate' ) + label_test.SetName( 'label_test' ) + label_test.SetAuthor( '' ) + label_test.SetComment( 'Compute Node' ) + label_test.Coords( 564 , 219 ) + Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' ) + Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' ) + Ilabel_testNT = label_test.InPort( 'NT' , 'long' ) + Ilabel_testKT = label_test.InPort( 'KT' , 'long' ) + Ilabel_testMIN = label_test.InPort( 'MIN' , 'long' ) + Ilabel_testMAX = label_test.InPort( 'MAX' , 'long' ) + Ilabel_testAVERAGE = label_test.InPort( 'AVERAGE' , 'double' ) + Ilabel_testSYRLIST = label_test.InPort( 'SYRLIST' , 'ListOfSyr' ) + Ilabel_testGate = label_test.GetInPort( 'Gate' ) + Olabel_testFinished = label_test.OutPort( 'Finished' , 'long' ) + Olabel_testIncr = label_test.OutPort( 'Incr' , 'long' ) + Olabel_testEven = label_test.OutPort( 'Even' , 'long' ) + Olabel_testOdd = label_test.OutPort( 'Odd' , 'long' ) + Olabel_testN = label_test.OutPort( 'N' , 'long' ) + Olabel_testK = label_test.OutPort( 'K' , 'long' ) + Olabel_testMINT = label_test.OutPort( 'MINT' , 'long' ) + Olabel_testMAXT = label_test.OutPort( 'MAXT' , 'long' ) + Olabel_testAVERAGET = label_test.OutPort( 'AVERAGET' , 'double' ) + Olabel_testSYRLISTT = label_test.OutPort( 'SYRLISTT' , 'ListOfSyr' ) + Olabel_testDefault = label_test.GetOutPort( 'Default' ) + + # Creation of GOTO Nodes + Pycontrol_m3p1 = [] + Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K , MINT , MAXT , AVERAGET , SYRLISTT ):' ) + Pycontrol_m3p1.append( ' return 0,1,N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_m3p1 = GraphSyrControlAveValid.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) + control_m3p1.SetName( 'control_m3p1' ) + control_m3p1.SetAuthor( '' ) + control_m3p1.SetComment( 'Compute Node' ) + control_m3p1.Coords( 1058 , 8 ) + Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' ) + Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' ) + Icontrol_m3p1MINT = control_m3p1.InPort( 'MINT' , 'long' ) + Icontrol_m3p1MAXT = control_m3p1.InPort( 'MAXT' , 'long' ) + Icontrol_m3p1AVERAGET = control_m3p1.InPort( 'AVERAGET' , 'double' ) + Icontrol_m3p1SYRLISTT = control_m3p1.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_m3p1Gate = control_m3p1.GetInPort( 'Gate' ) + Ocontrol_m3p1ValOne = control_m3p1.OutPort( 'ValOne' , 'long' ) + Ocontrol_m3p1ValEven = control_m3p1.OutPort( 'ValEven' , 'long' ) + Ocontrol_m3p1NT = control_m3p1.OutPort( 'NT' , 'long' ) + Ocontrol_m3p1KT = control_m3p1.OutPort( 'KT' , 'long' ) + Ocontrol_m3p1MIN = control_m3p1.OutPort( 'MIN' , 'long' ) + Ocontrol_m3p1MAX = control_m3p1.OutPort( 'MAX' , 'long' ) + Ocontrol_m3p1AVERAGE = control_m3p1.OutPort( 'AVERAGE' , 'double' ) + Ocontrol_m3p1SYRLIST = control_m3p1.OutPort( 'SYRLIST' , 'ListOfSyr' ) + Ocontrol_m3p1Gate = control_m3p1.GetOutPort( 'Gate' ) + + Pycontrol_div2 = [] + Pycontrol_div2.append( 'def control_div2( N , K , MINT , MAXT , AVERAGET , SYRLISTT ) :' ) + Pycontrol_div2.append( ' return N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) + control_div2 = GraphSyrControlAveValid.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) + control_div2.SetName( 'control_div2' ) + control_div2.SetAuthor( '' ) + control_div2.SetComment( 'Compute Node' ) + control_div2.Coords( 1048 , 555 ) + Icontrol_div2N = control_div2.InPort( 'N' , 'long' ) + Icontrol_div2K = control_div2.InPort( 'K' , 'long' ) + Icontrol_div2MINT = control_div2.InPort( 'MINT' , 'long' ) + Icontrol_div2MAXT = control_div2.InPort( 'MAXT' , 'long' ) + Icontrol_div2AVERAGET = control_div2.InPort( 'AVERAGET' , 'double' ) + Icontrol_div2SYRLISTT = control_div2.InPort( 'SYRLISTT' , 'ListOfSyr' ) + Icontrol_div2Gate = control_div2.GetInPort( 'Gate' ) + Ocontrol_div2NB = control_div2.OutPort( 'NB' , 'long' ) + Ocontrol_div2KB = control_div2.OutPort( 'KB' , 'long' ) + Ocontrol_div2MINB = control_div2.OutPort( 'MINB' , 'long' ) + Ocontrol_div2MAXB = control_div2.OutPort( 'MAXB' , 'long' ) + Ocontrol_div2AVERAGEB = control_div2.OutPort( 'AVERAGEB' , 'double' ) + Ocontrol_div2SYRLISTB = control_div2.OutPort( 'SYRLISTB' , 'ListOfSyr' ) + Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' ) + + # Creation of Links + Ltest_ISEVENBoolEvenlabel_testValEven = GraphSyrControlAveValid.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 544 , 256 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 544 , 524 ) + + Ltest_ISONEBoolOnelabel_testValOne = GraphSyrControlAveValid.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 546 , 237 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 546 , 198 ) + + Lm3p1anEvenIntegercontrol_m3p1N = GraphSyrControlAveValid.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 1 , 975 , 38 ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 2 , 976 , 81 ) + + Ldiv2anIntegercontrol_div2N = GraphSyrControlAveValid.Link( Odiv2anInteger , Icontrol_div2N ) + Ldiv2anIntegercontrol_div2N.AddCoord( 1 , 1012 , 585 ) + Ldiv2anIntegercontrol_div2N.AddCoord( 2 , 1011 , 346 ) + + LincraNewCountcontrol_div2K = GraphSyrControlAveValid.Link( OincraNewCount , Icontrol_div2K ) + LincraNewCountcontrol_div2K.AddCoord( 1 , 966 , 606 ) + LincraNewCountcontrol_div2K.AddCoord( 2 , 968 , 207 ) + + LincraNewCountcontrol_m3p1K = GraphSyrControlAveValid.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 965 , 59 ) + LincraNewCountcontrol_m3p1K.AddCoord( 2 , 966 , 208 ) + + LincraNewCountC_AVERAGEaCount = GraphSyrControlAveValid.Link( OincraNewCount , IC_AVERAGEaCount ) + LincraNewCountC_AVERAGEaCount.AddCoord( 1 , 751 , 588 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 2 , 751 , 460 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 3 , 965 , 462 ) + LincraNewCountC_AVERAGEaCount.AddCoord( 4 , 968 , 205 ) + + LC_MINaNewMinValcontrol_m3p1MINT = GraphSyrControlAveValid.Link( OC_MINaNewMinVal , Icontrol_m3p1MINT ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 1 , 991 , 78 ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 2 , 991 , 905 ) + + LC_MINaNewMinValcontrol_div2MINT = GraphSyrControlAveValid.Link( OC_MINaNewMinVal , Icontrol_div2MINT ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 1 , 991 , 626 ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 2 , 991 , 905 ) + + LC_MAXaNewMaxValcontrol_m3p1MAXT = GraphSyrControlAveValid.Link( OC_MAXaNewMaxVal , Icontrol_m3p1MAXT ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 1 , 976 , 98 ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 2 , 974 , 738 ) + + LC_MAXaNewMaxValcontrol_div2MAXT = GraphSyrControlAveValid.Link( OC_MAXaNewMaxVal , Icontrol_div2MAXT ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 1 , 972 , 648 ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 2 , 974 , 738 ) + + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT = GraphSyrControlAveValid.Link( OC_AVERAGEaNewListOfSyr , Icontrol_m3p1SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 1 , 1037 , 137 ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 2 , 1038 , 556 ) + + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT = GraphSyrControlAveValid.Link( OC_AVERAGEaNewListOfSyr , Icontrol_div2SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 1 , 1038 , 686 ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 2 , 1038 , 555 ) + + LC_AVERAGEanAveragecontrol_m3p1AVERAGET = GraphSyrControlAveValid.Link( OC_AVERAGEanAverage , Icontrol_m3p1AVERAGET ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 1 , 1026 , 118 ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 2 , 1027 , 567 ) + + LC_AVERAGEanAveragecontrol_div2AVERAGET = GraphSyrControlAveValid.Link( OC_AVERAGEanAverage , Icontrol_div2AVERAGET ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 1 , 1027 , 668 ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 2 , 1026 , 568 ) + + LC_LISTOFSYRaListOfSyrlabel_beginSYRLISTB = GraphSyrControlAveValid.Link( OC_LISTOFSYRaListOfSyr , Ilabel_beginSYRLISTB ) + + Llabel_beginNTtest_ISONEanInteger = GraphSyrControlAveValid.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 361 , 197 ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 360 , 290 ) + + Llabel_beginNTlabel_testNT = GraphSyrControlAveValid.Link( Olabel_beginNT , Ilabel_testNT ) + + Llabel_beginNTtest_ISEVENanInteger = GraphSyrControlAveValid.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 359 , 525 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 361 , 291 ) + + Llabel_beginKTlabel_testKT = GraphSyrControlAveValid.Link( Olabel_beginKT , Ilabel_testKT ) + + Llabel_beginMINlabel_testMIN = GraphSyrControlAveValid.Link( Olabel_beginMIN , Ilabel_testMIN ) + + Llabel_beginMAXlabel_testMAX = GraphSyrControlAveValid.Link( Olabel_beginMAX , Ilabel_testMAX ) + + Llabel_beginAVERAGElabel_testAVERAGE = GraphSyrControlAveValid.Link( Olabel_beginAVERAGE , Ilabel_testAVERAGE ) + + Llabel_beginSYRLISTlabel_testSYRLIST = GraphSyrControlAveValid.Link( Olabel_beginSYRLIST , Ilabel_testSYRLIST ) + + Llabel_testEvendiv2Gate = GraphSyrControlAveValid.Link( Olabel_testEven , Idiv2Gate ) + Llabel_testEvendiv2Gate.AddCoord( 1 , 777 , 351 ) + Llabel_testEvendiv2Gate.AddCoord( 2 , 777 , 286 ) + + Llabel_testOddm3p1Gate = GraphSyrControlAveValid.Link( Olabel_testOdd , Im3p1Gate ) + Llabel_testOddm3p1Gate.AddCoord( 1 , 757 , 95 ) + Llabel_testOddm3p1Gate.AddCoord( 2 , 757 , 310 ) + + Llabel_testNm3p1anOddInteger = GraphSyrControlAveValid.Link( Olabel_testN , Im3p1anOddInteger ) + Llabel_testNm3p1anOddInteger.AddCoord( 1 , 741 , 72 ) + Llabel_testNm3p1anOddInteger.AddCoord( 2 , 741 , 331 ) + + Llabel_testNdiv2anEvenInteger = GraphSyrControlAveValid.Link( Olabel_testN , Idiv2anEvenInteger ) + + Llabel_testNC_MINanInteger = GraphSyrControlAveValid.Link( Olabel_testN , IC_MINanInteger ) + Llabel_testNC_MINanInteger.AddCoord( 1 , 744 , 923 ) + Llabel_testNC_MINanInteger.AddCoord( 2 , 742 , 331 ) + + Llabel_testNC_MAXanInteger = GraphSyrControlAveValid.Link( Olabel_testN , IC_MAXanInteger ) + Llabel_testNC_MAXanInteger.AddCoord( 1 , 742 , 759 ) + Llabel_testNC_MAXanInteger.AddCoord( 2 , 743 , 332 ) + + Llabel_testNC_AVERAGEanInteger = GraphSyrControlAveValid.Link( Olabel_testN , IC_AVERAGEanInteger ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 1 , 741 , 568 ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 2 , 742 , 330 ) + + Llabel_testKincraCount = GraphSyrControlAveValid.Link( Olabel_testK , IincraCount ) + Llabel_testKincraCount.AddCoord( 1 , 766 , 207 ) + Llabel_testKincraCount.AddCoord( 2 , 766 , 343 ) + + Llabel_testMINTC_MINaMinVal = GraphSyrControlAveValid.Link( Olabel_testMINT , IC_MINaMinVal ) + Llabel_testMINTC_MINaMinVal.AddCoord( 1 , 760 , 904 ) + Llabel_testMINTC_MINaMinVal.AddCoord( 2 , 756 , 372 ) + + Llabel_testMINTEndL_OneEvenMINT = GraphSyrControlAveValid.Link( Olabel_testMINT , IEndL_OneEvenMINT ) + + Llabel_testMAXTC_MAXaMaxVal = GraphSyrControlAveValid.Link( Olabel_testMAXT , IC_MAXaMaxVal ) + Llabel_testMAXTC_MAXaMaxVal.AddCoord( 1 , 765 , 742 ) + Llabel_testMAXTC_MAXaMaxVal.AddCoord( 2 , 766 , 384 ) + + Llabel_testMAXTEndL_OneEvenMAXT = GraphSyrControlAveValid.Link( Olabel_testMAXT , IEndL_OneEvenMAXT ) + + Llabel_testAVERAGETEndL_OneEvenAVERAGET = GraphSyrControlAveValid.Link( Olabel_testAVERAGET , IEndL_OneEvenAVERAGET ) + + Llabel_testSYRLISTTC_AVERAGEaListOfSyr = GraphSyrControlAveValid.Link( Olabel_testSYRLISTT , IC_AVERAGEaListOfSyr ) + Llabel_testSYRLISTTC_AVERAGEaListOfSyr.AddCoord( 1 , 773 , 546 ) + Llabel_testSYRLISTTC_AVERAGEaListOfSyr.AddCoord( 2 , 772 , 424 ) + + Llabel_testDefaultEndL_OneEvenDefault = GraphSyrControlAveValid.Link( Olabel_testDefault , IEndL_OneEvenDefault ) + + Lcontrol_m3p1Gatelabel_testGate = GraphSyrControlAveValid.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 553 , 453 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 554 , 1025 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1242 , 1026 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1234 , 204 ) + + Lcontrol_div2Gatelabel_beginGate = GraphSyrControlAveValid.Link( Ocontrol_div2Gate , Ilabel_beginGate ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 176 , 419 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 176 , 997 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1217 , 996 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 4 , 1223 , 711 ) + + # Input datas + Ilabel_beginNB.Input( 31 ) + Ilabel_beginKB.Input( 0 ) + Ilabel_beginMINB.Input( 0 ) + Ilabel_beginMAXB.Input( 0 ) + Ilabel_beginAVERAGEB.Input( 0 ) + + # Output Ports of the graph + #Olabel_testFinished = label_test.GetOutPort( 'Finished' ) + #Olabel_testIncr = label_test.GetOutPort( 'Incr' ) + #OEndL_OneEvenMIN = EndL_OneEven.GetOutPort( 'MIN' ) + #OEndL_OneEvenMAX = EndL_OneEven.GetOutPort( 'MAX' ) + #OEndL_OneEvenAVERAGE = EndL_OneEven.GetOutPort( 'AVERAGE' ) + return GraphSyrControlAveValid + + +GraphSyrControlAveValid = DefGraphSyrControlAveValid() diff --git a/examples/GraphSyrControlAveValid.xml b/examples/GraphSyrControlAveValid.xml new file mode 100644 index 0000000..80536df --- /dev/null +++ b/examples/GraphSyrControlAveValid.xml @@ -0,0 +1,1104 @@ + + + + + +? + ? + GraphSyrControlAveValid + 1 + ? + +GraphSyrControlAveValid + + +long + label_begin__NB + +long + label_begin__KB + +long + label_begin__MINB + +long + label_begin__MAXB + +double + label_begin__AVERAGEB + + +long + label_test__Finished + +long + label_test__Incr + +long + EndL_OneEven__MIN + +long + EndL_OneEven__MAX + +double + EndL_OneEven__AVERAGE + + + 2/10/2003 - 11:17:14 + 28/6/2005 - 14:10:50 + 1.05 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 370 + 455 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 370 + 127 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 789 + 0 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 789 + 255 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 790 + 136 + +SyrComponent + SyrComponent + C_MIN + 0 + ? + +C_MIN + + +long + aMinVal + +long + anInteger + + +long + aNewMinVal + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_MIN from SyrComponent + 798 + 833 + +SyrComponent + SyrComponent + C_MAX + 0 + ? + +C_MAX + + +long + aMaxVal + +long + anInteger + + +long + aNewMaxVal + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_MAX from SyrComponent + 798 + 668 + +SyrComponent + SyrComponent + C_AVERAGE + 0 + ? + +C_AVERAGE + + +ListOfSyr + aListOfSyr + +long + anInteger + +long + aCount + + +ListOfSyr + aNewListOfSyr + +double + anAverage + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_AVERAGE from SyrComponent + 784 + 476 + +SyrComponent + SyrComponent + C_LISTOFSYR + 0 + ? + +C_LISTOFSYR + + + +ListOfSyr + aListOfSyr + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + localhost/FactoryServer + C_LISTOFSYR from SyrComponent + 5 + 321 + +? + ? + label_begin + 3 + ? + +label_begin + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +label_begin + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + ? + Python function + 183 + 220 + +? + ? + label_test + 6 + EndL_OneEven + +label_test + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + +long + Finished + +long + Incr + +long + Even + +long + Odd + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + + +L_OneEven + + + + + + + + + + + + + + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + ? + Compute Node + 564 + 219 + +? + ? + EndL_OneEven + 7 + label_test + +EndL_OneEven + + +long + MINT + +long + MAXT + +double + AVERAGET + + +long + MIN + +long + MAX + +double + AVERAGE + + + +? + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + ? + Compute Node + 1064 + 339 + +? + ? + control_m3p1 + 8 + label_test + +control_m3p1 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + +long + MIN + +long + MAX + +double + AVERAGE + +ListOfSyr + SYRLIST + + + +C_NotOneIsEven + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + ? + Compute Node + 1058 + 8 + +? + ? + control_div2 + 8 + label_begin + +control_div2 + + +long + N + +long + K + +long + MINT + +long + MAXT + +double + AVERAGET + +ListOfSyr + SYRLISTT + + +long + NB + +long + KB + +long + MINB + +long + MAXB + +double + AVERAGEB + +ListOfSyr + SYRLISTB + + + +control_div2 + + + 28/6/2005 - 14:8:24 + 28/6/2005 - 14:8:24 + 1.05 + ? + ? + Compute Node + 1048 + 555 + + +test_ISEVEN + BoolEven + label_test + ValEven + + +544 + 256 + +544 + 524 + +test_ISONE + BoolOne + label_test + ValOne + + +546 + 237 + +546 + 198 + +m3p1 + anEvenInteger + control_m3p1 + N + + +975 + 38 + +976 + 81 + +div2 + anInteger + control_div2 + N + + +1012 + 585 + +1011 + 346 + +incr + aNewCount + control_div2 + K + + +966 + 606 + +968 + 207 + +incr + aNewCount + control_m3p1 + K + + +965 + 59 + +966 + 208 + +incr + aNewCount + C_AVERAGE + aCount + + +751 + 588 + +751 + 460 + +965 + 462 + +968 + 205 + +C_MIN + aNewMinVal + control_m3p1 + MINT + + +991 + 78 + +991 + 905 + +C_MIN + aNewMinVal + control_div2 + MINT + + +991 + 626 + +991 + 905 + +C_MAX + aNewMaxVal + control_m3p1 + MAXT + + +976 + 98 + +974 + 738 + +C_MAX + aNewMaxVal + control_div2 + MAXT + + +972 + 648 + +974 + 738 + +C_AVERAGE + aNewListOfSyr + control_m3p1 + SYRLISTT + + +1037 + 137 + +1038 + 556 + +C_AVERAGE + aNewListOfSyr + control_div2 + SYRLISTT + + +1038 + 686 + +1038 + 555 + +C_AVERAGE + anAverage + control_m3p1 + AVERAGET + + +1026 + 118 + +1027 + 567 + +C_AVERAGE + anAverage + control_div2 + AVERAGET + + +1027 + 668 + +1026 + 568 + +C_LISTOFSYR + aListOfSyr + label_begin + SYRLISTB + + +label_begin + NT + test_ISONE + anInteger + + +361 + 197 + +360 + 290 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISEVEN + anInteger + + +359 + 525 + +361 + 291 + +label_begin + KT + label_test + KT + + +label_begin + MIN + label_test + MIN + + +label_begin + MAX + label_test + MAX + + +label_begin + AVERAGE + label_test + AVERAGE + + +label_begin + SYRLIST + label_test + SYRLIST + + +label_test + Even + div2 + Gate + + +777 + 351 + +777 + 286 + +label_test + Odd + m3p1 + Gate + + +757 + 95 + +757 + 310 + +label_test + N + m3p1 + anOddInteger + + +741 + 72 + +741 + 331 + +label_test + N + div2 + anEvenInteger + + +label_test + N + C_MIN + anInteger + + +744 + 923 + +742 + 331 + +label_test + N + C_MAX + anInteger + + +742 + 759 + +743 + 332 + +label_test + N + C_AVERAGE + anInteger + + +741 + 568 + +742 + 330 + +label_test + K + incr + aCount + + +766 + 207 + +766 + 343 + +label_test + MINT + C_MIN + aMinVal + + +760 + 904 + +756 + 372 + +label_test + MINT + EndL_OneEven + MINT + + +label_test + MAXT + C_MAX + aMaxVal + + +765 + 742 + +766 + 384 + +label_test + MAXT + EndL_OneEven + MAXT + + +label_test + AVERAGET + EndL_OneEven + AVERAGET + + +label_test + SYRLISTT + C_AVERAGE + aListOfSyr + + +773 + 546 + +772 + 424 + +label_test + Default + EndL_OneEven + Default + + +control_m3p1 + Gate + label_test + Gate + + +553 + 453 + +554 + 1025 + +1242 + 1026 + +1234 + 204 + +control_div2 + Gate + label_begin + Gate + + +176 + 419 + +176 + 997 + +1217 + 996 + +1223 + 711 + + +GraphSyrControlAveValid + label_begin__NB + label_begin + NB + +3 + 31 + + +GraphSyrControlAveValid + label_begin__KB + label_begin + KB + +3 + 0 + + +GraphSyrControlAveValid + label_begin__MINB + label_begin + MINB + +3 + 0 + + +GraphSyrControlAveValid + label_begin__MAXB + label_begin + MAXB + +3 + 0 + + +GraphSyrControlAveValid + label_begin__AVERAGEB + label_begin + AVERAGEB + +7 + 0 + diff --git a/examples/GraphTwoLoops1.py b/examples/GraphTwoLoops1.py new file mode 100644 index 0000000..dc71c5f --- /dev/null +++ b/examples/GraphTwoLoops1.py @@ -0,0 +1,133 @@ + +# Generated python file of Graph GraphTwoLoops1 + +from SuperV import * + +# Graph creation of GraphTwoLoops1 +def DefGraphTwoLoops1() : + GraphTwoLoops1 = Graph( 'GraphTwoLoops1' ) + GraphTwoLoops1.SetName( 'GraphTwoLoops1' ) + GraphTwoLoops1.SetAuthor( 'JR' ) + GraphTwoLoops1.SetComment( '' ) + GraphTwoLoops1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of Loop Nodes + PyLoop1 = [] + PyLoop1.append( 'def Loop1(Index,Max) : ' ) + PyLoop1.append( ' return Index,Max ' ) + PyLoop1.append( '' ) + PyMoreLoop1 = [] + PyMoreLoop1.append( 'import time ' ) + PyMoreLoop1.append( 'def More(Index,Max) : ' ) + PyMoreLoop1.append( ' time.sleep(2) ' ) + PyMoreLoop1.append( ' DoLoop = 0 ' ) + PyMoreLoop1.append( ' if Index < Max : ' ) + PyMoreLoop1.append( ' DoLoop = 1 ' ) + PyMoreLoop1.append( ' return DoLoop,Index,Max ' ) + PyMoreLoop1.append( '' ) + PyNextLoop1 = [] + PyNextLoop1.append( 'def Next(Index,Max) : ' ) + PyNextLoop1.append( ' Index = Index + 1 ' ) + PyNextLoop1.append( ' return Index,Max ' ) + PyNextLoop1.append( '' ) + Loop1,EndLoop1 = GraphTwoLoops1.LNode( 'Loop1' , PyLoop1 , 'More' , PyMoreLoop1 , 'Next' , PyNextLoop1 ) + EndLoop1.SetName( 'EndLoop1' ) + EndLoop1.SetAuthor( '' ) + EndLoop1.SetComment( 'Compute Node' ) + EndLoop1.Coords( 634 , 177 ) + PyEndLoop1 = [] + EndLoop1.SetPyFunction( 'EndLoop1' , PyEndLoop1 ) + ILoop1DoLoop = Loop1.GetInPort( 'DoLoop' ) + ILoop1Index = Loop1.InPort( 'Index' , 'long' ) + ILoop1Max = Loop1.InPort( 'Max' , 'long' ) + ILoop1Gate = Loop1.GetInPort( 'Gate' ) + OLoop1DoLoop = Loop1.GetOutPort( 'DoLoop' ) + OLoop1Index = Loop1.GetOutPort( 'Index' ) + OLoop1Max = Loop1.GetOutPort( 'Max' ) + IEndLoop1DoLoop = EndLoop1.GetInPort( 'DoLoop' ) + IEndLoop1Index = EndLoop1.GetInPort( 'Index' ) + IEndLoop1Max = EndLoop1.GetInPort( 'Max' ) + IEndLoop1Gate = EndLoop1.GetInPort( 'Gate' ) + OEndLoop1DoLoop = EndLoop1.GetOutPort( 'DoLoop' ) + OEndLoop1Index = EndLoop1.GetOutPort( 'Index' ) + OEndLoop1Max = EndLoop1.GetOutPort( 'Max' ) + OEndLoop1Gate = EndLoop1.GetOutPort( 'Gate' ) + Loop1.SetName( 'Loop1' ) + Loop1.SetAuthor( '' ) + Loop1.SetComment( 'Compute Node' ) + Loop1.Coords( 7 , 175 ) + + PyLoop = [] + PyMoreLoop = [] + PyMoreLoop.append( '' ) + PyNextLoop = [] + PyNextLoop.append( 'def Next(Index,Max) : ' ) + PyNextLoop.append( ' Index = Index + 1 ' ) + PyNextLoop.append( ' return Index,Max ' ) + PyNextLoop.append( '' ) + Loop,EndLoop = GraphTwoLoops1.LNode( '' , PyLoop , '' , PyMoreLoop , 'Next' , PyNextLoop ) + EndLoop.SetName( 'EndLoop' ) + EndLoop.SetAuthor( '' ) + EndLoop.SetComment( 'Compute Node' ) + EndLoop.Coords( 426 , 180 ) + PyEndLoop = [] + PyEndLoop.append( 'import time ' ) + PyEndLoop.append( 'def EndLoop(DoLoop,Index,Max) : ' ) + PyEndLoop.append( ' time.sleep(1) ' ) + PyEndLoop.append( ' DoLoop = 0 ' ) + PyEndLoop.append( ' if Index < Max : ' ) + PyEndLoop.append( ' DoLoop = 1 ' ) + PyEndLoop.append( ' return DoLoop,Index,Max ' ) + PyEndLoop.append( '' ) + EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop ) + ILoopDoLoop = Loop.GetInPort( 'DoLoop' ) + ILoopIndex = Loop.InPort( 'Index' , 'long' ) + ILoopMax = Loop.InPort( 'Max' , 'long' ) + ILoopGate = Loop.GetInPort( 'Gate' ) + OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) + OLoopIndex = Loop.GetOutPort( 'Index' ) + OLoopMax = Loop.GetOutPort( 'Max' ) + IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' ) + IEndLoopIndex = EndLoop.GetInPort( 'Index' ) + IEndLoopMax = EndLoop.GetInPort( 'Max' ) + IEndLoopGate = EndLoop.GetInPort( 'Gate' ) + OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' ) + OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) + OEndLoopMax = EndLoop.GetOutPort( 'Max' ) + OEndLoopGate = EndLoop.GetOutPort( 'Gate' ) + Loop.SetName( 'Loop' ) + Loop.SetAuthor( '' ) + Loop.SetComment( 'Compute Node' ) + Loop.Coords( 208 , 179 ) + + # Creation of Links + LLoop1IndexEndLoop1Index = GraphTwoLoops1.Link( OLoop1Index , IEndLoop1Index ) + + LLoop1IndexLoopIndex = GraphTwoLoops1.Link( OLoop1Index , ILoopIndex ) + + LLoop1MaxEndLoop1Max = GraphTwoLoops1.Link( OLoop1Max , IEndLoop1Max ) + + LLoop1GateLoopGate = GraphTwoLoops1.Link( OLoop1Gate , ILoopGate ) + + LLoopIndexEndLoopIndex = GraphTwoLoops1.Link( OLoopIndex , IEndLoopIndex ) + + LLoopMaxEndLoopMax = GraphTwoLoops1.Link( OLoopMax , IEndLoopMax ) + + LEndLoopGateEndLoop1Gate = GraphTwoLoops1.Link( OEndLoopGate , IEndLoop1Gate ) + + # Input datas + ILoop1Index.Input( 5 ) + ILoop1Max.Input( 15 ) + ILoopMax.Input( 20 ) + + # Output Ports of the graph + #OEndLoop1Index = EndLoop1.GetOutPort( 'Index' ) + #OEndLoop1Max = EndLoop1.GetOutPort( 'Max' ) + #OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) + #OEndLoopMax = EndLoop.GetOutPort( 'Max' ) + return GraphTwoLoops1 + + +GraphTwoLoops1 = DefGraphTwoLoops1() diff --git a/examples/GraphTwoLoops1.xml b/examples/GraphTwoLoops1.xml new file mode 100644 index 0000000..80212e5 --- /dev/null +++ b/examples/GraphTwoLoops1.xml @@ -0,0 +1,315 @@ + + + + + +? + ? + GraphTwoLoops1 + 1 + ? + +GraphTwoLoops1 + + +long + Loop1__Index + +long + Loop1__Max + +long + Loop__Max + + +long + EndLoop1__Index + +long + EndLoop1__Max + +long + EndLoop__Index + +long + EndLoop__Max + + + 17/12/2004 - 11:3:21 + 8/7/2005 - 15:57:18 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + Loop1 + 4 + EndLoop1 + +Loop1 + + +long + Index + +long + Max + + +long + Index + +long + Max + + + +Loop1 + + + + +More + + + + + + + + + +Next + + + + + 8/7/2005 - 15:51:35 + 8/7/2005 - 15:51:35 + 2.0 + ? + ? + Compute Node + 7 + 175 + +? + ? + EndLoop1 + 5 + Loop1 + +EndLoop1 + + +long + Index + +long + Max + + +long + Index + +long + Max + + + +EndLoop1 + + 8/7/2005 - 15:51:35 + 8/7/2005 - 15:51:35 + 2.0 + ? + ? + Compute Node + 634 + 177 + +? + ? + Loop + 4 + EndLoop + +Loop + + +long + Index + +long + Max + + +long + Index + +long + Max + + + +? + + +? + + +Next + + + + + 8/7/2005 - 15:51:35 + 8/7/2005 - 15:51:35 + 2.0 + ? + ? + Compute Node + 208 + 179 + +? + ? + EndLoop + 5 + Loop + +EndLoop + + +long + Index + +long + Max + + +long + Index + +long + Max + + + +EndLoop + + + + + + + + + 8/7/2005 - 15:51:35 + 8/7/2005 - 15:51:35 + 2.0 + ? + ? + Compute Node + 426 + 180 + + +Loop1 + DoLoop + EndLoop1 + DoLoop + + +Loop1 + Index + EndLoop1 + Index + + +Loop1 + Index + Loop + Index + + +Loop1 + Max + EndLoop1 + Max + + +Loop1 + Gate + Loop + Gate + + +EndLoop1 + DoLoop + Loop1 + DoLoop + + +Loop + DoLoop + EndLoop + DoLoop + + +Loop + Index + EndLoop + Index + + +Loop + Max + EndLoop + Max + + +EndLoop + DoLoop + Loop + DoLoop + + +EndLoop + Gate + EndLoop1 + Gate + + + +GraphTwoLoops1 + Loop1__Index + Loop1 + Index + +3 + 5 + + +GraphTwoLoops1 + Loop1__Max + Loop1 + Max + +3 + 15 + + +GraphTwoLoops1 + Loop__Max + Loop + Max + +3 + 20 + diff --git a/examples/GraphWrongContainerOrComponent.py b/examples/GraphWrongContainerOrComponent.py new file mode 100644 index 0000000..c2fdf3a --- /dev/null +++ b/examples/GraphWrongContainerOrComponent.py @@ -0,0 +1,54 @@ + +# Generated python file of Graph GraphWrongContainerOrComponent + +from SuperV import * + +# Graph creation of GraphWrongContainerOrComponent +def DefGraphWrongContainerOrComponent() : + GraphWrongContainerOrComponent = Graph( 'GraphWrongContainerOrComponent' ) + GraphWrongContainerOrComponent.SetName( 'GraphWrongContainerOrComponent' ) + GraphWrongContainerOrComponent.SetAuthor( 'JR' ) + GraphWrongContainerOrComponent.SetComment( '' ) + GraphWrongContainerOrComponent.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Add = GraphWrongContainerOrComponent.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + Add.SetName( 'Add' ) + Add.SetAuthor( '' ) + Add.SetContainer( 'FactoryServer' ) + Add.SetComment( 'Add from AddComponent' ) + Add.Coords( 99 , 304 ) + IAddx = Add.GetInPort( 'x' ) + IAddy = Add.GetInPort( 'y' ) + IAddGate = Add.GetInPort( 'Gate' ) + OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + OAddz = Add.GetOutPort( 'z' ) + OAddGate = Add.GetOutPort( 'Gate' ) + + Sub = GraphWrongContainerOrComponent.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) + Sub.SetName( 'Sub' ) + Sub.SetAuthor( '' ) + Sub.SetContainer( 'FactoryServer' ) + Sub.SetComment( 'Sub from SubComponent' ) + Sub.Coords( 98 , 59 ) + ISubx = Sub.GetInPort( 'x' ) + ISuby = Sub.GetInPort( 'y' ) + ISubGate = Sub.GetInPort( 'Gate' ) + OSubz = Sub.GetOutPort( 'z' ) + OSubGate = Sub.GetOutPort( 'Gate' ) + + # Input datas + IAddx.Input( 3 ) + IAddy.Input( 4.5 ) + ISubx.Input( 1.5 ) + ISuby.Input( 0 ) + + # Output Ports of the graph + #OAddFuncValue = Add.GetOutPort( 'FuncValue' ) + #OAddz = Add.GetOutPort( 'z' ) + #OSubz = Sub.GetOutPort( 'z' ) + return GraphWrongContainerOrComponent + + +GraphWrongContainerOrComponent = DefGraphWrongContainerOrComponent() diff --git a/examples/GraphWrongContainerOrComponent.xml b/examples/GraphWrongContainerOrComponent.xml new file mode 100644 index 0000000..e5fec43 --- /dev/null +++ b/examples/GraphWrongContainerOrComponent.xml @@ -0,0 +1,145 @@ + + + + + +? + ? + GraphWrongContainerOrComponent + 1 + ? + +GraphEssai + + +double + Add__x + +double + Add__y + +double + Sub__x + +double + Sub__y + + +double + Add__FuncValue + +double + Add__z + +double + Sub__z + + + 11/3/2003 - 9:58:58 + 21/6/2005 - 11:29:39 + 1.04 + JR + ? + ? + 0 + 0 + + +NOAddComponent + NOAddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 21/6/2005 - 11:29:24 + 21/6/2005 - 11:29:24 + 1.04 + ? + FactoryServer + Add from AddComponent + 99 + 304 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 21/6/2005 - 11:29:24 + 21/6/2005 - 11:29:24 + 1.04 + ? + NOComputer/FactoryServer + Sub from SubComponent + 98 + 59 + + + +GraphWrongContainerOrComponent + Add__x + Add + x + +7 + 3 + + +GraphWrongContainerOrComponent + Add__y + Add + y + +7 + 4.5 + + +GraphWrongContainerOrComponent + Sub__x + Sub + x + +7 + 1.5 + + +GraphWrongContainerOrComponent + Sub__y + Sub + y + +7 + 0 + diff --git a/examples/GraphWrongPythonFunctions.py b/examples/GraphWrongPythonFunctions.py new file mode 100644 index 0000000..f8495d1 --- /dev/null +++ b/examples/GraphWrongPythonFunctions.py @@ -0,0 +1,165 @@ + +# Generated python file of Graph GraphWrongPythonFunctions_1 + +from SuperV import * + +# Graph creation of GraphWrongPythonFunctions_1 +def DefGraphWrongPythonFunctions_1() : + GraphWrongPythonFunctions_1 = Graph( 'GraphWrongPythonFunctions_1' ) + GraphWrongPythonFunctions_1.SetName( 'GraphWrongPythonFunctions_1' ) + GraphWrongPythonFunctions_1.SetAuthor( 'JR' ) + GraphWrongPythonFunctions_1.SetComment( '' ) + GraphWrongPythonFunctions_1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyIsOdd = [] + PyIsOdd.append( 'from timed import * ' ) + PyIsOdd.append( 'def IsOdd(a) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphLoopSwitch1)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphWrongPythonFunctions_1.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 397 , 1 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + PyValEven = [] + PyValEven.append( 'from timed import * ' ) + PyValEven.append( 'def ValEven(Even) : ' ) + PyValEven.append( ' sleep(1) ' ) + PyValEven.append( ' return Even ' ) + PyValEven.append( '' ) + ValEven = GraphWrongPythonFunctions_1.INode( 'ValEven' , PyValEven ) + ValEven.SetName( 'ValEven' ) + ValEven.SetAuthor( '' ) + ValEven.SetComment( 'Compute Node' ) + ValEven.Coords( 396 , 222 ) + IValEvenEven = ValEven.InPort( 'Even' , 'long' ) + IValEvenGate = ValEven.GetInPort( 'Gate' ) + OValEvenEven = ValEven.OutPort( 'Even' , 'long' ) + OValEvenGate = ValEven.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoop = [] + PyInitLoop.append( 'def InitLoop(Index,Min,Max) ' ) + PyInitLoop.append( ' Index = Min ' ) + PyInitLoop.append( ' return Index,Min,Max ' ) + PyInitLoop.append( ' ' ) + PyMoreInitLoop = [] + PyMoreInitLoop.append( 'def More() ' ) + PyMoreInitLoop.append( ' return toto ' ) + PyNextInitLoop = [] + PyNextInitLoop.append( 'def Next(...) ' ) + PyNextInitLoop.append( ' return Ok ' ) + InitLoop,EndOfInitLoop = GraphWrongPythonFunctions_1.LNode( 'InitLoop' , PyInitLoop , 'More' , PyMoreInitLoop , 'Next' , PyNextInitLoop ) + EndOfInitLoop.SetName( 'EndOfInitLoop' ) + EndOfInitLoop.SetAuthor( '' ) + EndOfInitLoop.SetComment( 'Compute Node' ) + EndOfInitLoop.Coords( 767 , 102 ) + PyEndOfInitLoop = [] + PyEndOfInitLoop.append( 'def EndOfInitLoop( DoLoop , Index , Min , Max ) : ' ) + PyEndOfInitLoop.append( ' Index = Index + 1 ' ) + PyEndOfInitLoop.append( ' if Index <= Max : ' ) + PyEndOfInitLoop.append( ' DoLoop = 1 ' ) + PyEndOfInitLoop.append( ' else : ' ) + PyEndOfInitLoop.append( ' DoLoop = 0 ' ) + PyEndOfInitLoop.append( ' return DoLoop,Index,Min,Max : ' ) + EndOfInitLoop.SetPyFunction( 'EndOfInitLoop' , 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 , 108 ) + + # 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,EndSwitch = GraphWrongPythonFunctions_1.SNode( 'Switch' , PySwitch ) + EndSwitch.SetName( 'EndSwitch' ) + EndSwitch.SetAuthor( '' ) + EndSwitch.SetComment( 'Compute Node' ) + EndSwitch.Coords( 587 , 103 ) + PyEndSwitch = [] + PyEndSwitch.append( 'def EndSwitch(a,Even) ' ) + PyEndSwitch.append( ' sleep(1) ' ) + PyEndSwitch.append( ' return a, ' ) + EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) + IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) + IEndSwitchEven = EndSwitch.InPort( 'Even' , 'long' ) + IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) + OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' ) + OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) + Switch.SetName( 'Switch' ) + Switch.SetAuthor( '' ) + Switch.SetComment( 'Compute Node' ) + Switch.Coords( 194 , 109 ) + 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 + LIsOddaEndSwitcha = GraphWrongPythonFunctions_1.Link( OIsOdda , IEndSwitcha ) + + LInitLoopIndexSwitcha = GraphWrongPythonFunctions_1.Link( OInitLoopIndex , ISwitcha ) + + LInitLoopMinEndOfInitLoopMin = GraphWrongPythonFunctions_1.Link( OInitLoopMin , IEndOfInitLoopMin ) + + LInitLoopMaxEndOfInitLoopMax = GraphWrongPythonFunctions_1.Link( OInitLoopMax , IEndOfInitLoopMax ) + + LSwitchOddIsOddGate = GraphWrongPythonFunctions_1.Link( OSwitchOdd , IIsOddGate ) + + LSwitchEvenValEvenEven = GraphWrongPythonFunctions_1.Link( OSwitchEven , IValEvenEven ) + + LSwitchaIsOdda = GraphWrongPythonFunctions_1.Link( OSwitcha , IIsOdda ) + + LSwitchDefaultEndSwitchDefault = GraphWrongPythonFunctions_1.Link( OSwitchDefault , IEndSwitchDefault ) + + LEndSwitchaEndOfInitLoopIndex = GraphWrongPythonFunctions_1.Link( OEndSwitcha , IEndOfInitLoopIndex ) + + LValEvenEvenEndSwitchEven = GraphWrongPythonFunctions_1.Link( OValEvenEven , IEndSwitchEven ) + + # Input datas + IInitLoopIndex.Input( 0 ) + IInitLoopMin.Input( 5 ) + IInitLoopMax.Input( 23 ) + + # Output Ports of the graph + #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + return GraphWrongPythonFunctions_1 + + +GraphWrongPythonFunctions_1 = DefGraphWrongPythonFunctions_1() diff --git a/examples/GraphWrongPythonFunctions.xml b/examples/GraphWrongPythonFunctions.xml new file mode 100644 index 0000000..2b131fb --- /dev/null +++ b/examples/GraphWrongPythonFunctions.xml @@ -0,0 +1,382 @@ + + + + + +? + ? + GraphWrongPythonFunctions_1 + 1 + ? + +GraphWrongPythonFunctions_1 + + +long + InitLoop__Index + +long + InitLoop__Min + +long + InitLoop__Max + + +long + EndOfInitLoop__Index + +long + EndOfInitLoop__Min + +long + EndOfInitLoop__Max + + + 22/10/2003 - 10:36:39 + 21/6/2005 - 10:54:1 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 21/6/2005 - 10:54:1 + 21/6/2005 - 10:54:1 + 1.05 + ? + ? + Python function + 397 + 1 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + + +More + + + +Next + + + 21/6/2005 - 10:54:1 + 21/6/2005 - 10:54:1 + 1.05 + ? + ? + Compute Node + 10 + 108 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoop + + + + + + + + 21/6/2005 - 10:54:1 + 21/6/2005 - 10:54:1 + 1.05 + ? + ? + Compute Node + 767 + 102 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 21/6/2005 - 10:54:1 + 21/6/2005 - 10:54:1 + 1.05 + ? + ? + Compute Node + 194 + 109 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + +long + Even + + +long + a + + + +EndSwitch + + + + 21/6/2005 - 10:54:1 + 21/6/2005 - 10:54:1 + 1.05 + ? + ? + Compute Node + 587 + 103 + +? + ? + ValEven + 3 + ? + +ValEven + + +long + Even + + +long + Even + + + +ValEven + + + + + + 21/6/2005 - 10:54:1 + 21/6/2005 - 10:54:1 + 2.0 + ? + ? + Compute Node + 396 + 222 + + +IsOdd + a + EndSwitch + a + + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + DoLoop + + +Switch + Odd + IsOdd + Gate + + +Switch + Even + ValEven + Even + + +Switch + a + IsOdd + a + + +Switch + Default + EndSwitch + Default + + +EndSwitch + a + EndOfInitLoop + Index + + +ValEven + Even + EndSwitch + Even + + + +GraphWrongPythonFunctions_1 + InitLoop__Index + InitLoop + Index + +3 + 0 + + +GraphWrongPythonFunctions_1 + InitLoop__Min + InitLoop + Min + +3 + 5 + + +GraphWrongPythonFunctions_1 + InitLoop__Max + InitLoop + Max + +3 + 23 + diff --git a/examples/PAL9342.py b/examples/PAL9342.py new file mode 100644 index 0000000..e7c0b28 --- /dev/null +++ b/examples/PAL9342.py @@ -0,0 +1,94 @@ + +# Generated python file of Graph PAL9342 + +from SuperV import * + +# Graph creation of PAL9342 +def DefPAL9342() : + PAL9342 = Graph( 'PAL9342' ) + PAL9342.SetName( 'PAL9342' ) + PAL9342.SetAuthor( 'Nicolas Crouzet & JR' ) + PAL9342.SetComment( '' ) + PAL9342.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + compute_power = PAL9342.FNode( 'DKCORE' , 'DKCORE' , 'compute_power' ) + compute_power.SetName( 'compute_power' ) + compute_power.SetAuthor( '' ) + compute_power.SetContainer( 'localhost/FactoryServer' ) + compute_power.SetComment( 'compute_power from DKCORE' ) + compute_power.Coords( 224 , 101 ) + Icompute_powernitermax = compute_power.GetInPort( 'nitermax' ) + Icompute_powerepsflux = compute_power.GetInPort( 'epsflux' ) + Icompute_powerespeigenvalue = compute_power.GetInPort( 'espeigenvalue' ) + Icompute_powerGate = compute_power.GetInPort( 'Gate' ) + Ocompute_powerreturn = compute_power.GetOutPort( 'return' ) + Ocompute_powerGate = compute_power.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyLoop = [] + PyLoop.append( 'def Loop(it,itMax): ' ) + PyLoop.append( ' return it,itMax ' ) + PyMoreLoop = [] + PyMoreLoop.append( 'def More(it,itMax): ' ) + PyMoreLoop.append( ' if it<=itMax : ' ) + PyMoreLoop.append( ' DoLoop=1 ' ) + PyMoreLoop.append( ' else: ' ) + PyMoreLoop.append( ' DoLoop=0 ' ) + PyMoreLoop.append( ' return DoLoop,it,itMax ' ) + PyNextLoop = [] + PyNextLoop.append( 'def Next(it,itMax): ' ) + PyNextLoop.append( ' it+=1 ' ) + PyNextLoop.append( ' return it,itMax ' ) + Loop,EndLoop = PAL9342.LNode( 'Loop' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop ) + EndLoop.SetName( 'EndLoop' ) + EndLoop.SetAuthor( '' ) + EndLoop.SetComment( 'Compute Node' ) + EndLoop.Coords( 426 , 161 ) + PyEndLoop = [] + EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop ) + ILoopDoLoop = Loop.GetInPort( 'DoLoop' ) + ILoopit = Loop.InPort( 'it' , 'int' ) + ILoopitMax = Loop.InPort( 'itMax' , 'int' ) + ILoopGate = Loop.GetInPort( 'Gate' ) + OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) + OLoopit = Loop.GetOutPort( 'it' ) + OLoopitMax = Loop.GetOutPort( 'itMax' ) + IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' ) + IEndLoopit = EndLoop.GetInPort( 'it' ) + IEndLoopitMax = EndLoop.GetInPort( 'itMax' ) + IEndLoopGate = EndLoop.GetInPort( 'Gate' ) + OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' ) + OEndLoopit = EndLoop.GetOutPort( 'it' ) + OEndLoopitMax = EndLoop.GetOutPort( 'itMax' ) + OEndLoopGate = EndLoop.GetOutPort( 'Gate' ) + Loop.SetName( 'Loop' ) + Loop.SetAuthor( '' ) + Loop.SetComment( 'Compute Node' ) + Loop.Coords( 21 , 161 ) + + # Creation of Links + LLoopitEndLoopit = PAL9342.Link( OLoopit , IEndLoopit ) + + LLoopitMaxEndLoopitMax = PAL9342.Link( OLoopitMax , IEndLoopitMax ) + + LLoopGatecompute_powerGate = PAL9342.Link( OLoopGate , Icompute_powerGate ) + + # Input datas + ILoopit.Input( 1 ) + ILoopitMax.Input( 5 ) + + # Input Ports of the graph + #Icompute_powernitermax = compute_power.GetInPort( 'nitermax' ) + #Icompute_powerepsflux = compute_power.GetInPort( 'epsflux' ) + #Icompute_powerespeigenvalue = compute_power.GetInPort( 'espeigenvalue' ) + + # Output Ports of the graph + #OEndLoopit = EndLoop.GetOutPort( 'it' ) + #OEndLoopitMax = EndLoop.GetOutPort( 'itMax' ) + #Ocompute_powerreturn = compute_power.GetOutPort( 'return' ) + return PAL9342 + + +PAL9342 = DefPAL9342() diff --git a/examples/PAL9342.xml b/examples/PAL9342.xml new file mode 100644 index 0000000..1ab00d3 --- /dev/null +++ b/examples/PAL9342.xml @@ -0,0 +1,215 @@ + + + + + +? + ? + PAL9342 + 1 + ? + +PAL9342 + + +int + Loop__it + +int + Loop__itMax + +long + compute_power__nitermax + +double + compute_power__epsflux + +double + compute_power__espeigenvalue + + +int + EndLoop__it + +int + EndLoop__itMax + +double + compute_power__return + + + 10/6/2005 - 11:33:49 + 7/7/2005 - 11:26:50 + 2.0 + Nicolas Crouzet & JR + ? + ? + 0 + 0 + + +? + ? + Loop + 4 + EndLoop + +Loop + + +int + it + +int + itMax + + +int + it + +int + itMax + + + +Loop + + + +More + + + + + + + +Next + + + + 7/7/2005 - 11:26:50 + 7/7/2005 - 11:26:50 + 2.0 + ? + ? + Compute Node + 21 + 161 + +? + ? + EndLoop + 5 + Loop + +EndLoop + + +int + it + +int + itMax + + +int + it + +int + itMax + + + +EndLoop + + 7/7/2005 - 11:26:50 + 7/7/2005 - 11:26:50 + 2.0 + ? + ? + Compute Node + 426 + 161 + +DKCORE + DKCORE + compute_power + 0 + ? + +compute_power + + +long + nitermax + +double + epsflux + +double + espeigenvalue + + +double + return + + + 7/7/2005 - 11:26:50 + 7/7/2005 - 11:26:50 + 2.0 + ? + localhost/FactoryServer + compute_power from DKCORE + 224 + 101 + + +Loop + DoLoop + EndLoop + DoLoop + + +Loop + it + EndLoop + it + + +Loop + itMax + EndLoop + itMax + + +Loop + Gate + compute_power + Gate + + +EndLoop + DoLoop + Loop + DoLoop + + + +PAL9342 + Loop__it + Loop + it + +3 + 1 + + +PAL9342 + Loop__itMax + Loop + itMax + +3 + 5 +