From 6a2e2fb3016eae959eae1ee07b52f65fa52753a5 Mon Sep 17 00:00:00 2001 From: rahuel Date: Tue, 15 Feb 2005 12:32:50 +0000 Subject: [PATCH] Many new tests of Switches --- examples/GraphSwitchCheckBranch1.py | 34 +- examples/GraphSwitchCheckBranch1.xml | 107 +- examples/GraphSwitchCheckBranch1NoDefault.py | 231 ++++ examples/GraphSwitchCheckBranch1NoDefault.xml | 532 ++++++++ examples/GraphSwitchCheckBranch2NOTValid.py | 237 ++++ examples/GraphSwitchCheckBranch2NOTValid.xml | 548 ++++++++ examples/GraphSwitchCheckDefault2NOTValid2.py | 10 +- .../GraphSwitchCheckDefault2NOTValid2.xml | 74 +- examples/GraphSwitchCheckNoDefault2.py | 332 +++++ examples/GraphSwitchCheckNoDefault2.xml | 781 ++++++++++++ examples/GraphSwitchNOTValid.py | 144 +++ examples/GraphSwitchNOTValid.xml | 350 ++++++ examples/GraphSwitchOutputNOTValid.py | 68 +- examples/GraphSwitchOutputNOTValid.xml | 56 +- examples/GraphSyrControlAborted.py | 278 +++++ examples/GraphSyrControlAborted.xml | 683 ++++++++++ examples/GraphSyrControlAveNOTExecutable.py | 412 +++++++ examples/GraphSyrControlAveNOTExecutable.xml | 1098 +++++++++++++++++ 18 files changed, 5858 insertions(+), 117 deletions(-) create mode 100644 examples/GraphSwitchCheckBranch1NoDefault.py create mode 100644 examples/GraphSwitchCheckBranch1NoDefault.xml create mode 100644 examples/GraphSwitchCheckBranch2NOTValid.py create mode 100644 examples/GraphSwitchCheckBranch2NOTValid.xml create mode 100644 examples/GraphSwitchCheckNoDefault2.py create mode 100644 examples/GraphSwitchCheckNoDefault2.xml create mode 100644 examples/GraphSwitchNOTValid.py create mode 100644 examples/GraphSwitchNOTValid.xml create mode 100644 examples/GraphSyrControlAborted.py create mode 100644 examples/GraphSyrControlAborted.xml create mode 100644 examples/GraphSyrControlAveNOTExecutable.py create mode 100644 examples/GraphSyrControlAveNOTExecutable.xml diff --git a/examples/GraphSwitchCheckBranch1.py b/examples/GraphSwitchCheckBranch1.py index 9ee068c..2cbe1a5 100644 --- a/examples/GraphSwitchCheckBranch1.py +++ b/examples/GraphSwitchCheckBranch1.py @@ -56,12 +56,27 @@ def DefGraphSwitchCheckBranch1() : BranchNode.SetName( 'BranchNode' ) BranchNode.SetAuthor( '' ) BranchNode.SetComment( 'Compute Node' ) - BranchNode.Coords( 604 , 149 ) + 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 = GraphSwitchCheckBranch1.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) : ' ) @@ -84,7 +99,7 @@ def DefGraphSwitchCheckBranch1() : EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) EndOfInitLoopSwitch.SetAuthor( '' ) EndOfInitLoopSwitch.SetComment( 'Compute Node' ) - EndOfInitLoopSwitch.Coords( 1074 , 194 ) + EndOfInitLoopSwitch.Coords( 1073 , 216 ) PyEndOfInitLoopSwitch = [] PyEndOfInitLoopSwitch.append( 'from time import * ' ) PyEndOfInitLoopSwitch.append( 'def EndOfInitLoopSwitch(DoLoop,Index,Min,Max) : ' ) @@ -132,7 +147,7 @@ def DefGraphSwitchCheckBranch1() : EndOfSwitch.SetName( 'EndOfSwitch' ) EndOfSwitch.SetAuthor( '' ) EndOfSwitch.SetComment( 'Compute Node' ) - EndOfSwitch.Coords( 882 , 194 ) + EndOfSwitch.Coords( 880 , 216 ) PyEndOfSwitch = [] PyEndOfSwitch.append( 'from time import * ' ) PyEndOfSwitch.append( 'def EndOfSwitch(a,Branch) : ' ) @@ -186,12 +201,23 @@ def DefGraphSwitchCheckBranch1() : LSwitchaIsEvena.AddCoord( 1 , 381 , 509 ) LSwitchaIsEvena.AddCoord( 2 , 381 , 229 ) + LSwitchadefaulta = GraphSwitchCheckBranch1.Link( OSwitcha , Idefaulta ) + LSwitchadefaulta.AddCoord( 1 , 382 , 377 ) + LSwitchadefaulta.AddCoord( 2 , 382 , 228 ) + LSwitchBranchBranchNodeBranch = GraphSwitchCheckBranch1.Link( OSwitchBranch , IBranchNodeBranch ) - LSwitchdefaultEndOfSwitchDefault = GraphSwitchCheckBranch1.Link( OSwitchdefault , IEndOfSwitchDefault ) + LSwitchdefaultdefaultGate = GraphSwitchCheckBranch1.Link( OSwitchdefault , IdefaultGate ) + LSwitchdefaultdefaultGate.AddCoord( 1 , 410 , 403 ) + LSwitchdefaultdefaultGate.AddCoord( 2 , 410 , 269 ) + LSwitchdefaultdefaultGate.AddCoord( 3 , 410 , 268 ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchCheckBranch1.Link( OSwitchDefault , IEndOfSwitchDefault ) LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckBranch1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + LdefaultaEndOfSwitcha = GraphSwitchCheckBranch1.Link( Odefaulta , IEndOfSwitcha ) + # Input datas IInitLoopSwitchIndex.Input( 0 ) IInitLoopSwitchMin.Input( -5 ) diff --git a/examples/GraphSwitchCheckBranch1.xml b/examples/GraphSwitchCheckBranch1.xml index 98a2977..9e4f3f7 100644 --- a/examples/GraphSwitchCheckBranch1.xml +++ b/examples/GraphSwitchCheckBranch1.xml @@ -33,7 +33,7 @@ 13/1/2005 - 11:48:50 - 19/1/2005 - 17:18:17 + 14/2/2005 - 11:36:28 2.0 JR ? @@ -66,8 +66,8 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? @@ -99,8 +99,8 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? @@ -132,14 +132,14 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? Compute Node - 604 - 149 + 529 + 177 ? ? @@ -190,8 +190,8 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? @@ -234,14 +234,14 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? Compute Node - 1074 - 194 + 1073 + 216 ? ? @@ -285,8 +285,8 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? @@ -320,14 +320,46 @@ - 19/1/2005 - 17:7:48 - 19/1/2005 - 17:7:48 + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 2.0 ? ? Compute Node - 882 - 194 + 880 + 216 + +? + ? + default + 3 + ? + +default + + +long + a + + +long + a + + + +default + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Compute Node + 428 + 308 IsOdd @@ -426,6 +458,18 @@ 381 229 +Switch + a + default + a + + +382 + 377 + +382 + 228 + Switch Branch BranchNode @@ -434,6 +478,21 @@ Switch default + default + Gate + + +410 + 403 + +410 + 269 + +410 + 268 + +Switch + Default EndOfSwitch Default @@ -442,6 +501,12 @@ a EndOfInitLoopSwitch Index + + +default + a + EndOfSwitch + a diff --git a/examples/GraphSwitchCheckBranch1NoDefault.py b/examples/GraphSwitchCheckBranch1NoDefault.py new file mode 100644 index 0000000..ad682c6 --- /dev/null +++ b/examples/GraphSwitchCheckBranch1NoDefault.py @@ -0,0 +1,231 @@ + +# Generated python file of Graph GraphSwitchCheckBranch1NoDefault + +from SuperV import * + +# Graph creation of GraphSwitchCheckBranch1NoDefault +def DefGraphSwitchCheckBranch1NoDefault() : + GraphSwitchCheckBranch1NoDefault = Graph( 'GraphSwitchCheckBranch1NoDefault' ) + GraphSwitchCheckBranch1NoDefault.SetName( 'GraphSwitchCheckBranch1NoDefault' ) + GraphSwitchCheckBranch1NoDefault.SetAuthor( 'JR' ) + GraphSwitchCheckBranch1NoDefault.SetComment( 'Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch' ) + GraphSwitchCheckBranch1NoDefault.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 = GraphSwitchCheckBranch1NoDefault.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 = GraphSwitchCheckBranch1NoDefault.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 = GraphSwitchCheckBranch1NoDefault.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 = GraphSwitchCheckBranch1NoDefault.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 = GraphSwitchCheckBranch1NoDefault.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( ' return 0,0,a,Branch,1 ' ) + 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 = GraphSwitchCheckBranch1NoDefault.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 = GraphSwitchCheckBranch1NoDefault.Link( OIsOdda , IEndOfSwitcha ) + + LIsEvenaEndOfSwitcha = GraphSwitchCheckBranch1NoDefault.Link( OIsEvena , IEndOfSwitcha ) + + LBranchNodeBranchEndOfSwitchBranch = GraphSwitchCheckBranch1NoDefault.Link( OBranchNodeBranch , IEndOfSwitchBranch ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchCheckBranch1NoDefault.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchCheckBranch1NoDefault.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchCheckBranch1NoDefault.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchCheckBranch1NoDefault.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate.AddCoord( 1 , 401 , 101 ) + LSwitchOddIsOddGate.AddCoord( 2 , 401 , 188 ) + + LSwitchEvenIsEvenGate = GraphSwitchCheckBranch1NoDefault.Link( OSwitchEven , IIsEvenGate ) + LSwitchEvenIsEvenGate.AddCoord( 1 , 392 , 533 ) + LSwitchEvenIsEvenGate.AddCoord( 2 , 392 , 208 ) + + LSwitchaIsOdda = GraphSwitchCheckBranch1NoDefault.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 382 , 78 ) + LSwitchaIsOdda.AddCoord( 2 , 382 , 229 ) + + LSwitchaIsEvena = GraphSwitchCheckBranch1NoDefault.Link( OSwitcha , IIsEvena ) + LSwitchaIsEvena.AddCoord( 1 , 381 , 509 ) + LSwitchaIsEvena.AddCoord( 2 , 381 , 229 ) + + LSwitchadefaulta = GraphSwitchCheckBranch1NoDefault.Link( OSwitcha , Idefaulta ) + LSwitchadefaulta.AddCoord( 1 , 382 , 377 ) + LSwitchadefaulta.AddCoord( 2 , 382 , 228 ) + + LSwitchBranchBranchNodeBranch = GraphSwitchCheckBranch1NoDefault.Link( OSwitchBranch , IBranchNodeBranch ) + + LSwitchdefaultdefaultGate = GraphSwitchCheckBranch1NoDefault.Link( OSwitchdefault , IdefaultGate ) + LSwitchdefaultdefaultGate.AddCoord( 1 , 410 , 403 ) + LSwitchdefaultdefaultGate.AddCoord( 2 , 410 , 269 ) + LSwitchdefaultdefaultGate.AddCoord( 3 , 410 , 268 ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckBranch1NoDefault.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + LdefaultaEndOfSwitcha = GraphSwitchCheckBranch1NoDefault.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 GraphSwitchCheckBranch1NoDefault + + +GraphSwitchCheckBranch1NoDefault = DefGraphSwitchCheckBranch1NoDefault() diff --git a/examples/GraphSwitchCheckBranch1NoDefault.xml b/examples/GraphSwitchCheckBranch1NoDefault.xml new file mode 100644 index 0000000..dbc5326 --- /dev/null +++ b/examples/GraphSwitchCheckBranch1NoDefault.xml @@ -0,0 +1,532 @@ + + + + + +? + ? + GraphSwitchCheckBranch1NoDefault + 1 + ? + +GraphSwitchCheckBranch1 + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + + + 13/1/2005 - 11:48:50 + 14/2/2005 - 11:39:30 + 2.0 + JR + ? + Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Python function + 415 + 7 + +? + ? + IsEven + 3 + ? + +IsEven + + +long + a + + +long + a + + + +IsEven + + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Compute Node + 421 + 438 + +? + ? + BranchNode + 3 + ? + +BranchNode + + +string + Branch + + +string + Branch + + + +Print_1 + + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 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 + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Compute Node + 10 + 157 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoopSwitch + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Compute Node + 1073 + 216 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +string + Branch + +boolean + default + + + +Switch + + + + + + + + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Compute Node + 194 + 157 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +string + Branch + + +long + a + + + +EndOfSwitch + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 2.0 + ? + ? + Compute Node + 880 + 216 + +? + ? + default + 3 + ? + +default + + +long + a + + +long + a + + + +default + + + + + 14/2/2005 - 11:36:28 + 14/2/2005 - 11:36:28 + 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 + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + +default + a + EndOfSwitch + a + + + +GraphSwitchCheckBranch1NoDefault + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchCheckBranch1NoDefault + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + -5 + + +GraphSwitchCheckBranch1NoDefault + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 10 + diff --git a/examples/GraphSwitchCheckBranch2NOTValid.py b/examples/GraphSwitchCheckBranch2NOTValid.py new file mode 100644 index 0000000..ee9fb64 --- /dev/null +++ b/examples/GraphSwitchCheckBranch2NOTValid.py @@ -0,0 +1,237 @@ + +# Generated python file of Graph GraphSwitchCheckBranch2NOTValid + +from SuperV import * + +# Graph creation of GraphSwitchCheckBranch2NOTValid +def DefGraphSwitchCheckBranch2NOTValid() : + GraphSwitchCheckBranch2NOTValid = Graph( 'GraphSwitchCheckBranch2NOTValid' ) + GraphSwitchCheckBranch2NOTValid.SetName( 'GraphSwitchCheckBranch2NOTValid' ) + GraphSwitchCheckBranch2NOTValid.SetAuthor( 'JR' ) + GraphSwitchCheckBranch2NOTValid.SetComment( 'Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch +Shared Node between Branches' ) + GraphSwitchCheckBranch2NOTValid.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyIsOdd = [] + PyIsOdd.append( 'from time import * ' ) + PyIsOdd.append( 'def IsOdd(aBranch) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphSwitchCheckBranch2NOTValid.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 649 , 6 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddBranch = IsOdd.InPort( 'Branch' , 'string' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + PyIsEven = [] + PyIsEven.append( 'from time import * ' ) + PyIsEven.append( 'def IsEven(aBranch) : ' ) + PyIsEven.append( ' print a,"IsEven (GraphSwitch)" ' ) + PyIsEven.append( ' sleep( 1 ) ' ) + PyIsEven.append( ' return a ' ) + IsEven = GraphSwitchCheckBranch2NOTValid.INode( 'IsEven' , PyIsEven ) + IsEven.SetName( 'IsEven' ) + IsEven.SetAuthor( '' ) + IsEven.SetComment( 'Compute Node' ) + IsEven.Coords( 657 , 451 ) + IIsEvena = IsEven.InPort( 'a' , 'long' ) + IIsEvenBranch = IsEven.InPort( 'Branch' , 'string' ) + 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 = GraphSwitchCheckBranch2NOTValid.INode( 'Print_1' , PyBranchNode ) + BranchNode.SetName( 'BranchNode' ) + BranchNode.SetAuthor( '' ) + BranchNode.SetComment( 'Compute Node' ) + BranchNode.Coords( 429 , 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,Branch) : ' ) + Pydefault.append( ' sleep(1) ' ) + Pydefault.append( ' return a ' ) + default = GraphSwitchCheckBranch2NOTValid.INode( 'default' , Pydefault ) + default.SetName( 'default' ) + default.SetAuthor( '' ) + default.SetComment( 'Compute Node' ) + default.Coords( 655 , 306 ) + Idefaulta = default.InPort( 'a' , 'long' ) + IdefaultBranch = default.InPort( 'Branch' , 'string' ) + 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 = GraphSwitchCheckBranch2NOTValid.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( ' return 0,0,a,Branch,1 ' ) + 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 = GraphSwitchCheckBranch2NOTValid.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 = GraphSwitchCheckBranch2NOTValid.Link( OIsOdda , IEndOfSwitcha ) + + LIsEvenaEndOfSwitcha = GraphSwitchCheckBranch2NOTValid.Link( OIsEvena , IEndOfSwitcha ) + + LBranchNodeBranchEndOfSwitchBranch = GraphSwitchCheckBranch2NOTValid.Link( OBranchNodeBranch , IEndOfSwitchBranch ) + + LBranchNodeBranchIsOddBranch = GraphSwitchCheckBranch2NOTValid.Link( OBranchNodeBranch , IIsOddBranch ) + + LBranchNodeBranchdefaultBranch = GraphSwitchCheckBranch2NOTValid.Link( OBranchNodeBranch , IdefaultBranch ) + + LBranchNodeBranchIsEvenBranch = GraphSwitchCheckBranch2NOTValid.Link( OBranchNodeBranch , IIsEvenBranch ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchCheckBranch2NOTValid.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchCheckBranch2NOTValid.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchCheckBranch2NOTValid.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchCheckBranch2NOTValid.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate.AddCoord( 1 , 400 , 121 ) + LSwitchOddIsOddGate.AddCoord( 2 , 401 , 188 ) + + LSwitchEvenIsEvenGate = GraphSwitchCheckBranch2NOTValid.Link( OSwitchEven , IIsEvenGate ) + LSwitchEvenIsEvenGate.AddCoord( 1 , 391 , 568 ) + LSwitchEvenIsEvenGate.AddCoord( 2 , 392 , 208 ) + + LSwitchadefaulta = GraphSwitchCheckBranch2NOTValid.Link( OSwitcha , Idefaulta ) + + LSwitchaIsEvena = GraphSwitchCheckBranch2NOTValid.Link( OSwitcha , IIsEvena ) + + LSwitchaIsOdda = GraphSwitchCheckBranch2NOTValid.Link( OSwitcha , IIsOdda ) + + LSwitchBranchBranchNodeBranch = GraphSwitchCheckBranch2NOTValid.Link( OSwitchBranch , IBranchNodeBranch ) + + LSwitchdefaultdefaultGate = GraphSwitchCheckBranch2NOTValid.Link( OSwitchdefault , IdefaultGate ) + LSwitchdefaultdefaultGate.AddCoord( 1 , 410 , 422 ) + LSwitchdefaultdefaultGate.AddCoord( 2 , 410 , 269 ) + LSwitchdefaultdefaultGate.AddCoord( 3 , 410 , 268 ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchCheckBranch2NOTValid.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckBranch2NOTValid.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + LdefaultaEndOfSwitcha = GraphSwitchCheckBranch2NOTValid.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 GraphSwitchCheckBranch2NOTValid + + +GraphSwitchCheckBranch2NOTValid = DefGraphSwitchCheckBranch2NOTValid() diff --git a/examples/GraphSwitchCheckBranch2NOTValid.xml b/examples/GraphSwitchCheckBranch2NOTValid.xml new file mode 100644 index 0000000..0833676 --- /dev/null +++ b/examples/GraphSwitchCheckBranch2NOTValid.xml @@ -0,0 +1,548 @@ + + + + + +? + ? + GraphSwitchCheckBranch2NOTValid + 1 + ? + +GraphSwitchCheckBranch2NOTValid + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + + + 13/1/2005 - 11:48:50 + 15/2/2005 - 11:47:4 + 2.0 + JR + ? + Switch with two SwitchBranches, One NotSwitchBranch and the DefaultBranch +Shared Node between Branches + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + +string + Branch + + +long + a + + + +IsOdd + + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Python function + 649 + 6 + +? + ? + IsEven + 3 + ? + +IsEven + + +long + a + +string + Branch + + +long + a + + + +IsEven + + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 657 + 451 + +? + ? + BranchNode + 3 + ? + +BranchNode + + +string + Branch + + +string + Branch + + + +Print_1 + + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 429 + 177 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + +MoreLoop + + + + = Min : ]]> + + + + + +NextLoop + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 10 + 157 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoopSwitch + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 1073 + 216 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +string + Branch + +boolean + default + + + +Switch + + + + + + + + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 194 + 157 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +string + Branch + + +long + a + + + +EndOfSwitch + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 880 + 216 + +? + ? + default + 3 + ? + +default + + +long + a + +string + Branch + + +long + a + + + +default + + + + + 15/2/2005 - 11:42:57 + 15/2/2005 - 11:42:57 + 2.0 + ? + ? + Compute Node + 655 + 306 + + +IsOdd + a + EndOfSwitch + a + + +IsEven + a + EndOfSwitch + a + + +BranchNode + Branch + EndOfSwitch + Branch + + +BranchNode + Branch + IsOdd + Branch + + +BranchNode + Branch + default + Branch + + +BranchNode + Branch + IsEven + 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 + + +400 + 121 + +401 + 188 + +Switch + Even + IsEven + Gate + + +391 + 568 + +392 + 208 + +Switch + a + default + a + + +Switch + a + IsEven + a + + +Switch + a + IsOdd + a + + +Switch + Branch + BranchNode + Branch + + +Switch + default + default + Gate + + +410 + 422 + +410 + 269 + +410 + 268 + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + +default + a + EndOfSwitch + a + + + +GraphSwitchCheckBranch2NOTValid + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchCheckBranch2NOTValid + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + -5 + + +GraphSwitchCheckBranch2NOTValid + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 10 + diff --git a/examples/GraphSwitchCheckDefault2NOTValid2.py b/examples/GraphSwitchCheckDefault2NOTValid2.py index a94310f..bb256d9 100644 --- a/examples/GraphSwitchCheckDefault2NOTValid2.py +++ b/examples/GraphSwitchCheckDefault2NOTValid2.py @@ -123,7 +123,7 @@ def DefGraphSwitchCheckDefault2NOTValid2() : Puta.SetName( 'Puta' ) Puta.SetAuthor( '' ) Puta.SetComment( 'Compute Node' ) - Puta.Coords( 665 , 486 ) + Puta.Coords( 653 , 414 ) IPutaa = Puta.InPort( 'a' , 'long' ) IPutaGate = Puta.GetInPort( 'Gate' ) OPutaa = Puta.OutPort( 'a' , 'long' ) @@ -245,6 +245,8 @@ def DefGraphSwitchCheckDefault2NOTValid2() : LIsEvenaEndOfSwitcha = GraphSwitchCheckDefault2NOTValid2.Link( OIsEvena , IEndOfSwitcha ) + LIsEvenaPutaa = GraphSwitchCheckDefault2NOTValid2.Link( OIsEvena , IPutaa ) + LPrintOddBranchEmptyNodeBranch = GraphSwitchCheckDefault2NOTValid2.Link( OPrintOddBranch , IEmptyNodeBranch ) LPrintEvenBranchEndOfSwitchBranch = GraphSwitchCheckDefault2NOTValid2.Link( OPrintEvenBranch , IEndOfSwitchBranch ) @@ -253,7 +255,9 @@ def DefGraphSwitchCheckDefault2NOTValid2() : LEmptyNodeBranchEndOfSwitchBranch = GraphSwitchCheckDefault2NOTValid2.Link( OEmptyNodeBranch , IEndOfSwitchBranch ) - LDefaultaPutaa = GraphSwitchCheckDefault2NOTValid2.Link( ODefaulta , IPutaa ) + LDefaultaEndOfSwitcha = GraphSwitchCheckDefault2NOTValid2.Link( ODefaulta , IEndOfSwitcha ) + + LDefaultBranchEndOfSwitchBranch = GraphSwitchCheckDefault2NOTValid2.Link( ODefaultBranch , IEndOfSwitchBranch ) LDefaultBranchPutBranchBranch = GraphSwitchCheckDefault2NOTValid2.Link( ODefaultBranch , IPutBranchBranch ) @@ -311,6 +315,8 @@ def DefGraphSwitchCheckDefault2NOTValid2() : LSwitchdefaultDefaultGate.AddCoord( 1 , 363 , 707 ) LSwitchdefaultDefaultGate.AddCoord( 2 , 362 , 239 ) + LSwitchDefaultEndOfSwitchDefault = GraphSwitchCheckDefault2NOTValid2.Link( OSwitchDefault , IEndOfSwitchDefault ) + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckDefault2NOTValid2.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) LPutaaEndOfSwitcha = GraphSwitchCheckDefault2NOTValid2.Link( OPutaa , IEndOfSwitcha ) diff --git a/examples/GraphSwitchCheckDefault2NOTValid2.xml b/examples/GraphSwitchCheckDefault2NOTValid2.xml index f628cd0..f2a1852 100644 --- a/examples/GraphSwitchCheckDefault2NOTValid2.xml +++ b/examples/GraphSwitchCheckDefault2NOTValid2.xml @@ -33,7 +33,7 @@ 13/1/2005 - 12:21:43 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:44:23 2.0 JR ? @@ -66,8 +66,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -99,8 +99,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -135,8 +135,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -171,8 +171,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -209,8 +209,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -247,8 +247,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -305,8 +305,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -349,8 +349,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -400,8 +400,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -435,8 +435,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -467,14 +467,14 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? Compute Node - 665 - 486 + 653 + 414 ? ? @@ -499,8 +499,8 @@ - 19/1/2005 - 12:17:7 - 19/1/2005 - 12:17:7 + 15/2/2005 - 9:41:21 + 15/2/2005 - 9:41:21 2.0 ? ? @@ -524,6 +524,12 @@ a +IsEven + a + Puta + a + + PrintOdd Branch EmptyNode @@ -550,10 +556,16 @@ Default a - Puta + EndOfSwitch a +Default + Branch + EndOfSwitch + Branch + + Default Branch PutBranch @@ -734,6 +746,12 @@ 362 239 +Switch + Default + EndOfSwitch + Default + + EndOfSwitch a EndOfInitLoopSwitch diff --git a/examples/GraphSwitchCheckNoDefault2.py b/examples/GraphSwitchCheckNoDefault2.py new file mode 100644 index 0000000..55ee62f --- /dev/null +++ b/examples/GraphSwitchCheckNoDefault2.py @@ -0,0 +1,332 @@ + +# Generated python file of Graph GraphSwitchCheckNoDefault2 + +from SuperV import * + +# Graph creation of GraphSwitchCheckNoDefault2 +def DefGraphSwitchCheckNoDefault2() : + GraphSwitchCheckNoDefault2 = Graph( 'GraphSwitchCheckNoDefault2' ) + GraphSwitchCheckNoDefault2.SetName( 'GraphSwitchCheckNoDefault2' ) + GraphSwitchCheckNoDefault2.SetAuthor( 'JR' ) + GraphSwitchCheckNoDefault2.SetComment( '' ) + GraphSwitchCheckNoDefault2.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 = GraphSwitchCheckNoDefault2.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 = GraphSwitchCheckNoDefault2.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' ) + + PyPrintOdd = [] + PyPrintOdd.append( 'from time import * ' ) + PyPrintOdd.append( 'def Print(a,Branch) : ' ) + PyPrintOdd.append( ' print "Print ",a,Branch ' ) + PyPrintOdd.append( ' sleep(1) ' ) + PyPrintOdd.append( ' return Branch ' ) + PrintOdd = GraphSwitchCheckNoDefault2.INode( 'Print' , PyPrintOdd ) + PrintOdd.SetName( 'PrintOdd' ) + PrintOdd.SetAuthor( '' ) + PrintOdd.SetComment( 'Compute Node' ) + PrintOdd.Coords( 415 , 130 ) + IPrintOdda = PrintOdd.InPort( 'a' , 'long' ) + IPrintOddBranch = PrintOdd.InPort( 'Branch' , 'string' ) + IPrintOddGate = PrintOdd.GetInPort( 'Gate' ) + OPrintOddBranch = PrintOdd.OutPort( 'Branch' , 'string' ) + OPrintOddGate = PrintOdd.GetOutPort( 'Gate' ) + + PyPrintEven = [] + PyPrintEven.append( 'from time import * ' ) + PyPrintEven.append( 'def Print_1(a,Branch) : ' ) + PyPrintEven.append( ' print "Print ",a,Branch ' ) + PyPrintEven.append( ' sleep(1) ' ) + PyPrintEven.append( ' return Branch ' ) + PrintEven = GraphSwitchCheckNoDefault2.INode( 'Print_1' , PyPrintEven ) + PrintEven.SetName( 'PrintEven' ) + PrintEven.SetAuthor( '' ) + PrintEven.SetComment( 'Compute Node' ) + PrintEven.Coords( 423 , 289 ) + IPrintEvena = PrintEven.InPort( 'a' , 'long' ) + IPrintEvenBranch = PrintEven.InPort( 'Branch' , 'string' ) + IPrintEvenGate = PrintEven.GetInPort( 'Gate' ) + OPrintEvenBranch = PrintEven.OutPort( 'Branch' , 'string' ) + OPrintEvenGate = PrintEven.GetOutPort( 'Gate' ) + + PyEmptyNode = [] + PyEmptyNode.append( 'from time import * ' ) + PyEmptyNode.append( 'def EmptyNode(a,Branch) : ' ) + PyEmptyNode.append( ' sleep(1) ' ) + PyEmptyNode.append( ' return a,Branch ' ) + EmptyNode = GraphSwitchCheckNoDefault2.INode( 'EmptyNode' , PyEmptyNode ) + EmptyNode.SetName( 'EmptyNode' ) + EmptyNode.SetAuthor( '' ) + EmptyNode.SetComment( 'Compute Node' ) + EmptyNode.Coords( 652 , 110 ) + IEmptyNodea = EmptyNode.InPort( 'a' , 'long' ) + IEmptyNodeBranch = EmptyNode.InPort( 'Branch' , 'string' ) + IEmptyNodeGate = EmptyNode.GetInPort( 'Gate' ) + OEmptyNodea = EmptyNode.OutPort( 'a' , 'long' ) + OEmptyNodeBranch = EmptyNode.OutPort( 'Branch' , 'string' ) + OEmptyNodeGate = EmptyNode.GetOutPort( 'Gate' ) + + PyDefault = [] + PyDefault.append( 'from time import * ' ) + PyDefault.append( 'def Default(a,Branch) : ' ) + PyDefault.append( ' sleep(1) ' ) + PyDefault.append( ' return a,Branch ' ) + Default = GraphSwitchCheckNoDefault2.INode( 'Default' , PyDefault ) + Default.SetName( 'Default' ) + Default.SetAuthor( '' ) + Default.SetComment( 'Compute Node' ) + Default.Coords( 421 , 592 ) + IDefaulta = Default.InPort( 'a' , 'long' ) + IDefaultBranch = Default.InPort( 'Branch' , 'string' ) + IDefaultGate = Default.GetInPort( 'Gate' ) + ODefaulta = Default.OutPort( 'a' , 'long' ) + ODefaultBranch = Default.OutPort( 'Branch' , 'string' ) + ODefaultGate = Default.GetOutPort( 'Gate' ) + + PyPuta = [] + PyPuta.append( 'from time import * ' ) + PyPuta.append( 'def Puta(a) : ' ) + PyPuta.append( ' sleep(1) ' ) + PyPuta.append( ' return a ' ) + Puta = GraphSwitchCheckNoDefault2.INode( 'Puta' , PyPuta ) + Puta.SetName( 'Puta' ) + Puta.SetAuthor( '' ) + Puta.SetComment( 'Compute Node' ) + Puta.Coords( 665 , 486 ) + IPutaa = Puta.InPort( 'a' , 'long' ) + IPutaGate = Puta.GetInPort( 'Gate' ) + OPutaa = Puta.OutPort( 'a' , 'long' ) + OPutaGate = Puta.GetOutPort( 'Gate' ) + + PyPutBranch = [] + PyPutBranch.append( 'from time import * ' ) + PyPutBranch.append( 'def PutBranch(Branch) : ' ) + PyPutBranch.append( ' sleep(1) ' ) + PyPutBranch.append( ' return Branch ' ) + PutBranch = GraphSwitchCheckNoDefault2.INode( 'PutBranch' , PyPutBranch ) + PutBranch.SetName( 'PutBranch' ) + PutBranch.SetAuthor( '' ) + PutBranch.SetComment( 'Compute Node' ) + PutBranch.Coords( 662 , 613 ) + IPutBranchBranch = PutBranch.InPort( 'Branch' , 'string' ) + IPutBranchGate = PutBranch.GetInPort( 'Gate' ) + OPutBranchBranch = PutBranch.OutPort( 'Branch' , 'string' ) + OPutBranchGate = PutBranch.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 = GraphSwitchCheckNoDefault2.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) + EndOfInitLoopSwitch.SetAuthor( '' ) + EndOfInitLoopSwitch.SetComment( 'Compute Node' ) + EndOfInitLoopSwitch.Coords( 1074 , 194 ) + 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 , 129 ) + + # 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( ' return 0,0,a,Branch,1 ' ) + 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 = GraphSwitchCheckNoDefault2.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 882 , 194 ) + 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( 190 , 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' ) + OSwitchBranch = Switch.OutPort( 'Branch' , 'string' ) + OSwitchdefault = Switch.OutPort( 'default' , 'boolean' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEmptyNodea = GraphSwitchCheckNoDefault2.Link( OIsOdda , IEmptyNodea ) + LIsOddaEmptyNodea.AddCoord( 1 , 646 , 78 ) + + LIsEvenaEndOfSwitcha = GraphSwitchCheckNoDefault2.Link( OIsEvena , IEndOfSwitcha ) + + LPrintOddBranchEmptyNodeBranch = GraphSwitchCheckNoDefault2.Link( OPrintOddBranch , IEmptyNodeBranch ) + + LPrintEvenBranchEndOfSwitchBranch = GraphSwitchCheckNoDefault2.Link( OPrintEvenBranch , IEndOfSwitchBranch ) + + LEmptyNodeaEndOfSwitcha = GraphSwitchCheckNoDefault2.Link( OEmptyNodea , IEndOfSwitcha ) + + LEmptyNodeBranchEndOfSwitchBranch = GraphSwitchCheckNoDefault2.Link( OEmptyNodeBranch , IEndOfSwitchBranch ) + + LDefaultaPutaa = GraphSwitchCheckNoDefault2.Link( ODefaulta , IPutaa ) + + LDefaultBranchPutBranchBranch = GraphSwitchCheckNoDefault2.Link( ODefaultBranch , IPutBranchBranch ) + + LInitLoopSwitchIndexSwitcha = GraphSwitchCheckNoDefault2.Link( OInitLoopSwitchIndex , ISwitcha ) + + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchCheckNoDefault2.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchCheckNoDefault2.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + + LSwitchOddIsOddGate = GraphSwitchCheckNoDefault2.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate.AddCoord( 1 , 401 , 101 ) + LSwitchOddIsOddGate.AddCoord( 2 , 401 , 160 ) + + LSwitchOddPrintOddGate = GraphSwitchCheckNoDefault2.Link( OSwitchOdd , IPrintOddGate ) + LSwitchOddPrintOddGate.AddCoord( 1 , 401 , 245 ) + LSwitchOddPrintOddGate.AddCoord( 2 , 401 , 159 ) + + LSwitchEvenIsEvenGate = GraphSwitchCheckNoDefault2.Link( OSwitchEven , IIsEvenGate ) + LSwitchEvenIsEvenGate.AddCoord( 1 , 392 , 533 ) + LSwitchEvenIsEvenGate.AddCoord( 2 , 392 , 182 ) + + LSwitchEvenPrintEvenGate = GraphSwitchCheckNoDefault2.Link( OSwitchEven , IPrintEvenGate ) + LSwitchEvenPrintEvenGate.AddCoord( 1 , 392 , 403 ) + LSwitchEvenPrintEvenGate.AddCoord( 2 , 392 , 181 ) + + LSwitchaIsOdda = GraphSwitchCheckNoDefault2.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 382 , 78 ) + LSwitchaIsOdda.AddCoord( 2 , 382 , 199 ) + + LSwitchaIsEvena = GraphSwitchCheckNoDefault2.Link( OSwitcha , IIsEvena ) + LSwitchaIsEvena.AddCoord( 1 , 381 , 509 ) + LSwitchaIsEvena.AddCoord( 2 , 382 , 200 ) + + LSwitchaPrintOdda = GraphSwitchCheckNoDefault2.Link( OSwitcha , IPrintOdda ) + + LSwitchaPrintEvena = GraphSwitchCheckNoDefault2.Link( OSwitcha , IPrintEvena ) + LSwitchaPrintEvena.AddCoord( 1 , 381 , 361 ) + LSwitchaPrintEvena.AddCoord( 2 , 382 , 200 ) + + LSwitchaDefaulta = GraphSwitchCheckNoDefault2.Link( OSwitcha , IDefaulta ) + LSwitchaDefaulta.AddCoord( 1 , 382 , 663 ) + LSwitchaDefaulta.AddCoord( 2 , 382 , 199 ) + + LSwitchBranchPrintOddBranch = GraphSwitchCheckNoDefault2.Link( OSwitchBranch , IPrintOddBranch ) + + LSwitchBranchPrintEvenBranch = GraphSwitchCheckNoDefault2.Link( OSwitchBranch , IPrintEvenBranch ) + LSwitchBranchPrintEvenBranch.AddCoord( 1 , 369 , 381 ) + LSwitchBranchPrintEvenBranch.AddCoord( 2 , 369 , 219 ) + + LSwitchBranchDefaultBranch = GraphSwitchCheckNoDefault2.Link( OSwitchBranch , IDefaultBranch ) + LSwitchBranchDefaultBranch.AddCoord( 1 , 370 , 683 ) + LSwitchBranchDefaultBranch.AddCoord( 2 , 370 , 220 ) + + LSwitchdefaultDefaultGate = GraphSwitchCheckNoDefault2.Link( OSwitchdefault , IDefaultGate ) + LSwitchdefaultDefaultGate.AddCoord( 1 , 363 , 707 ) + LSwitchdefaultDefaultGate.AddCoord( 2 , 362 , 239 ) + + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchCheckNoDefault2.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + + LPutaaEndOfSwitcha = GraphSwitchCheckNoDefault2.Link( OPutaa , IEndOfSwitcha ) + + LPutBranchBranchEndOfSwitchBranch = GraphSwitchCheckNoDefault2.Link( OPutBranchBranch , IEndOfSwitchBranch ) + + # 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 GraphSwitchCheckNoDefault2 + + +GraphSwitchCheckNoDefault2 = DefGraphSwitchCheckNoDefault2() diff --git a/examples/GraphSwitchCheckNoDefault2.xml b/examples/GraphSwitchCheckNoDefault2.xml new file mode 100644 index 0000000..d7ccd5e --- /dev/null +++ b/examples/GraphSwitchCheckNoDefault2.xml @@ -0,0 +1,781 @@ + + + + + +? + ? + GraphSwitchCheckNoDefault2 + 1 + ? + +GraphSwitchCheckDefault2NOTValid2 + + +long + InitLoopSwitch__Index + +long + InitLoopSwitch__Min + +long + InitLoopSwitch__Max + + +long + EndOfInitLoopSwitch__Index + +long + EndOfInitLoopSwitch__Min + +long + EndOfInitLoopSwitch__Max + + + 13/1/2005 - 12:21:43 + 14/2/2005 - 14:13:3 + 2.0 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Python function + 415 + 7 + +? + ? + IsEven + 3 + ? + +IsEven + + +long + a + + +long + a + + + +IsEven + + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 421 + 438 + +? + ? + PrintOdd + 3 + ? + +PrintOdd + + +long + a + +string + Branch + + +string + Branch + + + +Print + + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 415 + 130 + +? + ? + PrintEven + 3 + ? + +PrintEven + + +long + a + +string + Branch + + +string + Branch + + + +Print_1 + + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 423 + 289 + +? + ? + EmptyNode + 3 + ? + +EmptyNode + + +long + a + +string + Branch + + +long + a + +string + Branch + + + +EmptyNode + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 652 + 110 + +? + ? + Default + 3 + ? + +Default + + +long + a + +string + Branch + + +long + a + +string + Branch + + + +Default + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 421 + 592 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + + +MoreLoop + + + + = Min : ]]> + + + + + +NextLoop + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoopSwitch + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 1074 + 194 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + +string + Branch + +boolean + default + + + +Switch + + + + + + + + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 190 + 129 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + +string + Branch + + +long + a + + + +EndOfSwitch + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 882 + 194 + +? + ? + Puta + 3 + ? + +Puta + + +long + a + + +long + a + + + +Puta + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 665 + 486 + +? + ? + PutBranch + 3 + ? + +PutBranch + + +string + Branch + + +string + Branch + + + +PutBranch + + + + + 14/2/2005 - 14:13:3 + 14/2/2005 - 14:13:3 + 2.0 + ? + ? + Compute Node + 662 + 613 + + +IsOdd + a + EmptyNode + a + + +646 + 78 + +IsEven + a + EndOfSwitch + a + + +PrintOdd + Branch + EmptyNode + Branch + + +PrintEven + Branch + EndOfSwitch + Branch + + +EmptyNode + a + EndOfSwitch + a + + +EmptyNode + Branch + EndOfSwitch + Branch + + +Default + a + Puta + a + + +Default + Branch + PutBranch + 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 + 160 + +Switch + Odd + PrintOdd + Gate + + +401 + 245 + +401 + 159 + +Switch + Even + IsEven + Gate + + +392 + 533 + +392 + 182 + +Switch + Even + PrintEven + Gate + + +392 + 403 + +392 + 181 + +Switch + a + IsOdd + a + + +382 + 78 + +382 + 199 + +Switch + a + IsEven + a + + +381 + 509 + +382 + 200 + +Switch + a + PrintOdd + a + + +Switch + a + PrintEven + a + + +381 + 361 + +382 + 200 + +Switch + a + Default + a + + +382 + 663 + +382 + 199 + +Switch + Branch + PrintOdd + Branch + + +Switch + Branch + PrintEven + Branch + + +369 + 381 + +369 + 219 + +Switch + Branch + Default + Branch + + +370 + 683 + +370 + 220 + +Switch + default + Default + Gate + + +363 + 707 + +362 + 239 + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + +Puta + a + EndOfSwitch + a + + +PutBranch + Branch + EndOfSwitch + Branch + + + +GraphSwitchCheckNoDefault2 + InitLoopSwitch__Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchCheckNoDefault2 + InitLoopSwitch__Min + InitLoopSwitch + Min + +3 + -5 + + +GraphSwitchCheckNoDefault2 + InitLoopSwitch__Max + InitLoopSwitch + Max + +3 + 10 + diff --git a/examples/GraphSwitchNOTValid.py b/examples/GraphSwitchNOTValid.py new file mode 100644 index 0000000..e1f588d --- /dev/null +++ b/examples/GraphSwitchNOTValid.py @@ -0,0 +1,144 @@ + +# Generated python file of Graph GraphSwitchNOTValid + +from SuperV import * + +# Graph creation of GraphSwitchNOTValid +def DefGraphSwitchNOTValid() : + GraphSwitchNOTValid = Graph( 'GraphSwitchNOTValid' ) + GraphSwitchNOTValid.SetName( 'GraphSwitchNOTValid' ) + GraphSwitchNOTValid.SetAuthor( 'JR' ) + GraphSwitchNOTValid.SetComment( '' ) + GraphSwitchNOTValid.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyIsOdd = [] + PyIsOdd.append( 'from time import * ' ) + PyIsOdd.append( 'def IsOdd(a) : ' ) + PyIsOdd.append( ' print a,"IsOdd (GraphSwitch1)" ' ) + PyIsOdd.append( ' sleep( 1 ) ' ) + PyIsOdd.append( ' return a ' ) + IsOdd = GraphSwitchNOTValid.INode( 'IsOdd' , PyIsOdd ) + IsOdd.SetName( 'IsOdd' ) + IsOdd.SetAuthor( '' ) + IsOdd.SetComment( 'Python function' ) + IsOdd.Coords( 389 , 65 ) + IIsOdda = IsOdd.InPort( 'a' , 'long' ) + IIsOddGate = IsOdd.GetInPort( 'Gate' ) + OIsOdda = IsOdd.OutPort( 'a' , 'long' ) + OIsOddGate = IsOdd.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInitLoop = [] + PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) + PyInitLoop.append( ' return Index,Min,Max ' ) + PyMoreInitLoop = [] + PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) + PyMoreInitLoop.append( ' if Index <= Max : ' ) + PyMoreInitLoop.append( ' DoLoop = 1 ' ) + PyMoreInitLoop.append( ' else : ' ) + PyMoreInitLoop.append( ' DoLoop = 0 ' ) + PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) + PyNextInitLoop = [] + PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) + PyNextInitLoop.append( ' Index = Index + 1 ' ) + PyNextInitLoop.append( ' return Index,Min,Max ' ) + InitLoop,EndOfInitLoop = GraphSwitchNOTValid.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) + EndOfInitLoop.SetName( 'EndOfInitLoop' ) + EndOfInitLoop.SetAuthor( '' ) + EndOfInitLoop.SetComment( 'Compute Node' ) + EndOfInitLoop.Coords( 777 , 170 ) + PyEndOfInitLoop = [] + EndOfInitLoop.SetPyFunction( '' , PyEndOfInitLoop ) + IInitLoopDoLoop = InitLoop.GetInPort( 'DoLoop' ) + IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' ) + IInitLoopMin = InitLoop.InPort( 'Min' , 'long' ) + IInitLoopMax = InitLoop.InPort( 'Max' , 'long' ) + IInitLoopGate = InitLoop.GetInPort( 'Gate' ) + OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' ) + OInitLoopIndex = InitLoop.GetOutPort( 'Index' ) + OInitLoopMin = InitLoop.GetOutPort( 'Min' ) + OInitLoopMax = InitLoop.GetOutPort( 'Max' ) + IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' ) + IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' ) + IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' ) + IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' ) + IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' ) + OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' ) + OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + OEndOfInitLoopGate = EndOfInitLoop.GetOutPort( 'Gate' ) + InitLoop.SetName( 'InitLoop' ) + InitLoop.SetAuthor( '' ) + InitLoop.SetComment( 'Compute Node' ) + InitLoop.Coords( 10 , 129 ) + + # Creation of Switch Nodes + PySwitch = [] + PySwitch.append( 'from time import * ' ) + PySwitch.append( 'def Switch(a) : ' ) + PySwitch.append( ' if ( a & 1 ) == 0 : ' ) + PySwitch.append( ' sleep(1) ' ) + PySwitch.append( ' return a & 1,1-(a&1),a ' ) + Switch,EndOfSwitch = GraphSwitchNOTValid.SNode( 'Switch' , PySwitch ) + EndOfSwitch.SetName( 'EndOfSwitch' ) + EndOfSwitch.SetAuthor( '' ) + EndOfSwitch.SetComment( 'Compute Node' ) + EndOfSwitch.Coords( 589 , 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( 195 , 130 ) + ISwitcha = Switch.InPort( 'a' , 'long' ) + ISwitchGate = Switch.GetInPort( 'Gate' ) + OSwitchOdd = Switch.OutPort( 'Odd' , 'long' ) + OSwitchEven = Switch.OutPort( 'Even' , 'int' ) + OSwitcha = Switch.OutPort( 'a' , 'int' ) + OSwitchDefault = Switch.GetOutPort( 'Default' ) + + # Creation of Links + LIsOddaEndOfSwitcha = GraphSwitchNOTValid.Link( OIsOdda , IEndOfSwitcha ) + LIsOddaEndOfSwitcha.AddCoord( 1 , 571 , 201 ) + LIsOddaEndOfSwitcha.AddCoord( 2 , 571 , 136 ) + + LInitLoopIndexSwitcha = GraphSwitchNOTValid.Link( OInitLoopIndex , ISwitcha ) + + LInitLoopMinEndOfInitLoopMin = GraphSwitchNOTValid.Link( OInitLoopMin , IEndOfInitLoopMin ) + + LInitLoopMaxEndOfInitLoopMax = GraphSwitchNOTValid.Link( OInitLoopMax , IEndOfInitLoopMax ) + + LSwitchOddIsOddGate = GraphSwitchNOTValid.Link( OSwitchOdd , IIsOddGate ) + + LSwitchaIsOdda = GraphSwitchNOTValid.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda.AddCoord( 1 , 375 , 136 ) + LSwitchaIsOdda.AddCoord( 2 , 375 , 201 ) + + LSwitchaEndOfSwitcha = GraphSwitchNOTValid.Link( OSwitcha , IEndOfSwitcha ) + + LSwitchDefaultEndOfSwitchDefault = GraphSwitchNOTValid.Link( OSwitchDefault , IEndOfSwitchDefault ) + + LEndOfSwitchaEndOfInitLoopIndex = GraphSwitchNOTValid.Link( OEndOfSwitcha , IEndOfInitLoopIndex ) + + # Input datas + IInitLoopIndex.Input( 0 ) + IInitLoopMin.Input( 0 ) + IInitLoopMax.Input( 23 ) + + # Output Ports of the graph + #OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) + #OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) + #OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + #OSwitchEven = Switch.GetOutPort( 'Even' ) + return GraphSwitchNOTValid + + +GraphSwitchNOTValid = DefGraphSwitchNOTValid() diff --git a/examples/GraphSwitchNOTValid.xml b/examples/GraphSwitchNOTValid.xml new file mode 100644 index 0000000..4cbd8c7 --- /dev/null +++ b/examples/GraphSwitchNOTValid.xml @@ -0,0 +1,350 @@ + + + + + +? + ? + GraphSwitchNOTValid + 1 + ? + +GraphSwitchNOTValid + + +long + InitLoop__Index + +long + InitLoop__Min + +long + InitLoop__Max + + +long + EndOfInitLoop__Index + +long + EndOfInitLoop__Min + +long + EndOfInitLoop__Max + +int + Switch__Even + + + 1/10/2003 - 17:12:48 + 15/2/2005 - 9:51:57 + 1.05 + JR + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 15/2/2005 - 9:51:57 + 15/2/2005 - 9:51:57 + 1.05 + ? + ? + Python function + 389 + 65 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 15/2/2005 - 9:51:57 + 15/2/2005 - 9:51:57 + 1.05 + ? + ? + Compute Node + 10 + 129 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + 15/2/2005 - 9:51:57 + 15/2/2005 - 9:51:57 + 1.05 + ? + ? + Compute Node + 777 + 170 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 15/2/2005 - 9:51:57 + 15/2/2005 - 9:51:57 + 1.05 + ? + ? + Compute Node + 195 + 130 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + + +long + a + + + +? + + 15/2/2005 - 9:51:57 + 15/2/2005 - 9:51:57 + 1.05 + ? + ? + Compute Node + 589 + 170 + + +IsOdd + a + EndOfSwitch + a + + +571 + 201 + +571 + 136 + +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 + a + IsOdd + a + + +375 + 136 + +375 + 201 + +Switch + a + EndOfSwitch + a + + +Switch + Default + EndOfSwitch + Default + + +EndOfSwitch + a + EndOfInitLoop + Index + + + +GraphSwitchNOTValid + InitLoop__Index + InitLoop + Index + +3 + 0 + + +GraphSwitchNOTValid + InitLoop__Min + InitLoop + Min + +3 + 0 + + +GraphSwitchNOTValid + InitLoop__Max + InitLoop + Max + +3 + 23 + diff --git a/examples/GraphSwitchOutputNOTValid.py b/examples/GraphSwitchOutputNOTValid.py index 94ae98d..bf061a1 100644 --- a/examples/GraphSwitchOutputNOTValid.py +++ b/examples/GraphSwitchOutputNOTValid.py @@ -1,15 +1,15 @@ -# Generated python file of Graph GraphSwitch_1_1_1 +# Generated python file of Graph GraphSwitchOutputNOTValid from SuperV import * -# Graph creation of GraphSwitch_1_1_1 -def DefGraphSwitch_1_1_1() : - GraphSwitch_1_1_1 = Graph( 'GraphSwitch_1_1_1' ) - GraphSwitch_1_1_1.SetName( 'GraphSwitch_1_1_1' ) - GraphSwitch_1_1_1.SetAuthor( '' ) - GraphSwitch_1_1_1.SetComment( '' ) - GraphSwitch_1_1_1.Coords( 0 , 0 ) +# Graph creation of GraphSwitchOutputNOTValid +def DefGraphSwitchOutputNOTValid() : + GraphSwitchOutputNOTValid = Graph( 'GraphSwitchOutputNOTValid' ) + GraphSwitchOutputNOTValid.SetName( 'GraphSwitchOutputNOTValid' ) + GraphSwitchOutputNOTValid.SetAuthor( 'JR' ) + GraphSwitchOutputNOTValid.SetComment( '' ) + GraphSwitchOutputNOTValid.Coords( 0 , 0 ) # Creation of Factory Nodes @@ -20,7 +20,7 @@ def DefGraphSwitch_1_1_1() : PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) PyIsOdd.append( ' sleep( 1 ) ' ) PyIsOdd.append( ' return a ' ) - IsOdd = GraphSwitch_1_1_1.INode( 'IsOdd' , PyIsOdd ) + IsOdd = GraphSwitchOutputNOTValid.INode( 'IsOdd' , PyIsOdd ) IsOdd.SetName( 'IsOdd' ) IsOdd.SetAuthor( '' ) IsOdd.SetComment( 'Python function' ) @@ -36,11 +36,11 @@ def DefGraphSwitch_1_1_1() : PyIsEven.append( ' print a,"IsEven (GraphSwitch)" ' ) PyIsEven.append( ' sleep( 1 ) ' ) PyIsEven.append( ' return a ' ) - IsEven = GraphSwitch_1_1_1.INode( 'IsEven' , PyIsEven ) + IsEven = GraphSwitchOutputNOTValid.INode( 'IsEven' , PyIsEven ) IsEven.SetName( 'IsEven' ) IsEven.SetAuthor( '' ) IsEven.SetComment( 'Compute Node' ) - IsEven.Coords( 395 , 334 ) + IsEven.Coords( 432 , 337 ) IIsEvena = IsEven.InPort( 'a' , 'long' ) IIsEvenGate = IsEven.GetInPort( 'Gate' ) OIsEvena = IsEven.OutPort( 'a' , 'long' ) @@ -50,11 +50,11 @@ def DefGraphSwitch_1_1_1() : PyPrint.append( 'def Print(a,Branch) : ' ) PyPrint.append( ' print "Print ",Branch ' ) PyPrint.append( ' return a,Branch ' ) - Print = GraphSwitch_1_1_1.INode( 'Print' , PyPrint ) + Print = GraphSwitchOutputNOTValid.INode( 'Print' , PyPrint ) Print.SetName( 'Print' ) Print.SetAuthor( '' ) Print.SetComment( 'Compute Node' ) - Print.Coords( 639 , 63 ) + Print.Coords( 639 , 50 ) IPrinta = Print.InPort( 'a' , 'long' ) IPrintBranch = Print.InPort( 'Branch' , 'string' ) IPrintGate = Print.GetInPort( 'Gate' ) @@ -66,11 +66,11 @@ def DefGraphSwitch_1_1_1() : PyPrint_1.append( 'def Print_1(a,Branch) : ' ) PyPrint_1.append( ' print "Print ",Branch ' ) PyPrint_1.append( ' return a,Branch ' ) - Print_1 = GraphSwitch_1_1_1.INode( 'Print_1' , PyPrint_1 ) + Print_1 = GraphSwitchOutputNOTValid.INode( 'Print_1' , PyPrint_1 ) Print_1.SetName( 'Print_1' ) Print_1.SetAuthor( '' ) Print_1.SetComment( 'Compute Node' ) - Print_1.Coords( 639 , 263 ) + Print_1.Coords( 645 , 250 ) IPrint_1a = Print_1.InPort( 'a' , 'long' ) IPrint_1Branch = Print_1.InPort( 'Branch' , 'string' ) IPrint_1Gate = Print_1.GetInPort( 'Gate' ) @@ -94,7 +94,7 @@ def DefGraphSwitch_1_1_1() : PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) PyNextInitLoopSwitch.append( ' Index = Index - 1 ' ) PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) - InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch_1_1_1.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) + InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchOutputNOTValid.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) EndOfInitLoopSwitch.SetAuthor( '' ) EndOfInitLoopSwitch.SetComment( 'Compute Node' ) @@ -138,7 +138,7 @@ def DefGraphSwitch_1_1_1() : PySwitch.append( ' Branch = 'Odd' ' ) PySwitch.append( ' sleep(1) ' ) PySwitch.append( ' return a & 1,1-(a&1),a,Branch,0 ' ) - Switch,EndOfSwitch = GraphSwitch_1_1_1.SNode( 'Switch' , PySwitch ) + Switch,EndOfSwitch = GraphSwitchOutputNOTValid.SNode( 'Switch' , PySwitch ) EndOfSwitch.SetName( 'EndOfSwitch' ) EndOfSwitch.SetAuthor( '' ) EndOfSwitch.SetComment( 'Compute Node' ) @@ -163,35 +163,35 @@ def DefGraphSwitch_1_1_1() : OSwitchDefault = Switch.GetOutPort( 'Default' ) # Creation of Links - LIsOddaPrinta = GraphSwitch_1_1_1.Link( OIsOdda , IPrinta ) + LIsOddaPrinta = GraphSwitchOutputNOTValid.Link( OIsOdda , IPrinta ) - LInitLoopSwitchIndexSwitcha = GraphSwitch_1_1_1.Link( OInitLoopSwitchIndex , ISwitcha ) + LInitLoopSwitchIndexSwitcha = GraphSwitchOutputNOTValid.Link( OInitLoopSwitchIndex , ISwitcha ) - LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitch_1_1_1.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) + LInitLoopSwitchMinEndOfInitLoopSwitchMin = GraphSwitchOutputNOTValid.Link( OInitLoopSwitchMin , IEndOfInitLoopSwitchMin ) - LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitch_1_1_1.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) + LInitLoopSwitchMaxEndOfInitLoopSwitchMax = GraphSwitchOutputNOTValid.Link( OInitLoopSwitchMax , IEndOfInitLoopSwitchMax ) - LIsEvenaPrint_1a = GraphSwitch_1_1_1.Link( OIsEvena , IPrint_1a ) + LIsEvenaPrint_1a = GraphSwitchOutputNOTValid.Link( OIsEvena , IPrint_1a ) - LSwitchOddIsOddGate = GraphSwitch_1_1_1.Link( OSwitchOdd , IIsOddGate ) + LSwitchOddIsOddGate = GraphSwitchOutputNOTValid.Link( OSwitchOdd , IIsOddGate ) - LSwitchEvenIsEvenGate = GraphSwitch_1_1_1.Link( OSwitchEven , IIsEvenGate ) + LSwitchEvenIsEvenGate = GraphSwitchOutputNOTValid.Link( OSwitchEven , IIsEvenGate ) - LSwitchaIsOdda = GraphSwitch_1_1_1.Link( OSwitcha , IIsOdda ) + LSwitchaIsOdda = GraphSwitchOutputNOTValid.Link( OSwitcha , IIsOdda ) - LSwitchaIsEvena = GraphSwitch_1_1_1.Link( OSwitcha , IIsEvena ) + LSwitchaIsEvena = GraphSwitchOutputNOTValid.Link( OSwitcha , IIsEvena ) - LSwitchBranchPrintBranch = GraphSwitch_1_1_1.Link( OSwitchBranch , IPrintBranch ) + LSwitchBranchPrintBranch = GraphSwitchOutputNOTValid.Link( OSwitchBranch , IPrintBranch ) - LSwitchBranchPrint_1Branch = GraphSwitch_1_1_1.Link( OSwitchBranch , IPrint_1Branch ) + LSwitchBranchPrint_1Branch = GraphSwitchOutputNOTValid.Link( OSwitchBranch , IPrint_1Branch ) - LSwitchDefaultEndOfSwitchDefault = GraphSwitch_1_1_1.Link( OSwitchDefault , IEndOfSwitchDefault ) + LSwitchDefaultEndOfSwitchDefault = GraphSwitchOutputNOTValid.Link( OSwitchDefault , IEndOfSwitchDefault ) - LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitch_1_1_1.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) + LEndOfSwitchaEndOfInitLoopSwitchIndex = GraphSwitchOutputNOTValid.Link( OEndOfSwitcha , IEndOfInitLoopSwitchIndex ) - LPrintaEndOfSwitcha = GraphSwitch_1_1_1.Link( OPrinta , IEndOfSwitcha ) + LPrintaEndOfSwitcha = GraphSwitchOutputNOTValid.Link( OPrinta , IEndOfSwitcha ) - LPrint_1aEndOfSwitcha = GraphSwitch_1_1_1.Link( OPrint_1a , IEndOfSwitcha ) + LPrint_1aEndOfSwitcha = GraphSwitchOutputNOTValid.Link( OPrint_1a , IEndOfSwitcha ) # Input datas IInitLoopSwitchIndex.Input( 0 ) @@ -205,7 +205,7 @@ def DefGraphSwitch_1_1_1() : #OSwitchdefault = Switch.GetOutPort( 'default' ) #OPrintBranch = Print.GetOutPort( 'Branch' ) #OPrint_1Branch = Print_1.GetOutPort( 'Branch' ) - return GraphSwitch_1_1_1 + return GraphSwitchOutputNOTValid -GraphSwitch_1_1_1 = DefGraphSwitch_1_1_1() +GraphSwitchOutputNOTValid = DefGraphSwitchOutputNOTValid() diff --git a/examples/GraphSwitchOutputNOTValid.xml b/examples/GraphSwitchOutputNOTValid.xml index 30a7c29..3cb82df 100644 --- a/examples/GraphSwitchOutputNOTValid.xml +++ b/examples/GraphSwitchOutputNOTValid.xml @@ -5,11 +5,11 @@ ? ? - GraphSwitch_1_1_1 + GraphSwitchOutputNOTValid 1 ? -GraphSwitch_1_1_1 +GraphSwitchOutputNOTValid long @@ -42,9 +42,9 @@ 1/10/2003 - 17:23:54 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 1.05 - ? + JR ? ? 0 @@ -75,8 +75,8 @@ - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 1.05 ? ? @@ -131,8 +131,8 @@ - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 1.05 ? ? @@ -172,8 +172,8 @@ ? - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 1.05 ? ? @@ -205,14 +205,14 @@ - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 2.0 ? ? Compute Node - 395 - 334 + 432 + 337 ? ? @@ -256,8 +256,8 @@ - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 2.0 ? ? @@ -285,8 +285,8 @@ EndSwitch_1 - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 2.0 ? ? @@ -322,14 +322,14 @@ - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 2.0 ? ? Compute Node 639 - 63 + 50 ? ? @@ -359,14 +359,14 @@ - 20/1/2005 - 12:54:59 - 20/1/2005 - 12:54:59 + 15/2/2005 - 10:1:39 + 15/2/2005 - 10:1:39 2.0 ? ? Compute Node - 639 - 263 + 645 + 250 IsOdd @@ -472,7 +472,7 @@ -GraphSwitch_1_1_1 +GraphSwitchOutputNOTValid InitLoopSwitch__Index InitLoopSwitch Index @@ -481,7 +481,7 @@ 0 -GraphSwitch_1_1_1 +GraphSwitchOutputNOTValid InitLoopSwitch__Min InitLoopSwitch Min @@ -490,7 +490,7 @@ -5 -GraphSwitch_1_1_1 +GraphSwitchOutputNOTValid InitLoopSwitch__Max InitLoopSwitch Max diff --git a/examples/GraphSyrControlAborted.py b/examples/GraphSyrControlAborted.py new file mode 100644 index 0000000..c14560c --- /dev/null +++ b/examples/GraphSyrControlAborted.py @@ -0,0 +1,278 @@ + +# Generated python file of Graph GraphSyrControlAborted + +from SuperV import * + +# Graph creation of GraphSyrControlAborted +def DefGraphSyrControlAborted() : + GraphSyrControlAborted = Graph( 'GraphSyrControlAborted' ) + GraphSyrControlAborted.SetName( 'GraphSyrControlAborted' ) + GraphSyrControlAborted.SetAuthor( 'JR' ) + GraphSyrControlAborted.SetComment( 'Syracuse algorithm' ) + GraphSyrControlAborted.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + test_ISEVEN = GraphSyrControlAborted.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( 190 , 338 ) + 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 = GraphSyrControlAborted.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( 196 , 131 ) + 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 = GraphSyrControlAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) + m3p1.SetName( 'm3p1' ) + m3p1.SetAuthor( '' ) + m3p1.SetContainer( 'localhost/FactoryServer' ) + m3p1.SetComment( 'C_M3P1 from SyrComponent' ) + m3p1.Coords( 788 , 22 ) + Im3p1anOddInteger = m3p1.GetInPort( 'anOddInteger' ) + Im3p1Gate = m3p1.GetInPort( 'Gate' ) + Om3p1anEvenInteger = m3p1.GetOutPort( 'anEvenInteger' ) + Om3p1Gate = m3p1.GetOutPort( 'Gate' ) + + div2 = GraphSyrControlAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) + div2.SetName( 'div2' ) + div2.SetAuthor( '' ) + div2.SetContainer( 'localhost/FactoryServer' ) + div2.SetComment( 'C_DIV2 from SyrComponent' ) + div2.Coords( 794 , 427 ) + Idiv2anEvenInteger = div2.GetInPort( 'anEvenInteger' ) + Idiv2Gate = div2.GetInPort( 'Gate' ) + Odiv2anInteger = div2.GetOutPort( 'anInteger' ) + Odiv2Gate = div2.GetOutPort( 'Gate' ) + + incr = GraphSyrControlAborted.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) + incr.SetName( 'incr' ) + incr.SetAuthor( '' ) + incr.SetContainer( 'localhost/FactoryServer' ) + incr.SetComment( 'C_INCR from SyrComponent' ) + incr.Coords( 790 , 158 ) + IincraCount = incr.GetInPort( 'aCount' ) + IincrGate = incr.GetInPort( 'Gate' ) + OincraNewCount = incr.GetOutPort( 'aNewCount' ) + OincrGate = incr.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + Pylabel_begin = [] + Pylabel_begin.append( 'def label_begin( NB , KB ):' ) + Pylabel_begin.append( ' print "label_begin",NB,KB' ) + Pylabel_begin.append( ' return NB,KB' ) + label_begin = GraphSyrControlAborted.INode( 'label_begin' , Pylabel_begin ) + label_begin.SetName( 'label_begin' ) + label_begin.SetAuthor( '' ) + label_begin.SetComment( 'Python function' ) + label_begin.Coords( 8 , 205 ) + Ilabel_beginNB = label_begin.InPort( 'NB' , 'long' ) + Ilabel_beginKB = label_begin.InPort( 'KB' , 'long' ) + Ilabel_beginGate = label_begin.GetInPort( 'Gate' ) + Olabel_beginNT = label_begin.OutPort( 'NT' , 'long' ) + Olabel_beginKT = label_begin.OutPort( 'KT' , 'long' ) + Olabel_beginGate = label_begin.GetOutPort( 'Gate' ) + + Pylabel_test = [] + Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' ) + Pylabel_test.append( ' print "label_begin",ValEven,ValOne,NB,KB' ) + Pylabel_test.append( ' return ValEven,ValOne,NB,KB' ) + label_test = GraphSyrControlAborted.INode( 'label_test' , Pylabel_test ) + label_test.SetName( 'label_test' ) + label_test.SetAuthor( '' ) + label_test.SetComment( 'Python function' ) + label_test.Coords( 397 , 165 ) + Ilabel_testValEven = label_test.InPort( 'ValEven' , 'long' ) + Ilabel_testValOne = label_test.InPort( 'ValOne' , 'long' ) + Ilabel_testNT = label_test.InPort( 'NT' , 'long' ) + Ilabel_testKT = label_test.InPort( 'KT' , 'long' ) + Ilabel_testGate = label_test.GetInPort( 'Gate' ) + Olabel_testValEven = label_test.OutPort( 'ValEven' , 'long' ) + Olabel_testValOne = label_test.OutPort( 'ValOne' , 'long' ) + Olabel_testNT = label_test.OutPort( 'NT' , 'long' ) + Olabel_testKT = label_test.OutPort( 'KT' , 'long' ) + Olabel_testGate = label_test.GetOutPort( 'Gate' ) + + # Creation of Switch Nodes + Pytest = [] + Pytest.append( 'def Switch_OneEven( ValOne , ValEven , NT , KT ) :' ) + Pytest.append( ' Finished = ValOne' ) + Pytest.append( ' if Finished == 0 :' ) + Pytest.append( ' Incr = 1' ) + Pytest.append( ' Even = ValEven' ) + Pytest.append( ' if Even == 0 :' ) + Pytest.append( ' Odd = 1' ) + Pytest.append( ' else :' ) + Pytest.append( ' Odd = 0' ) + Pytest.append( ' else :' ) + Pytest.append( ' Incr = 0' ) + Pytest.append( ' Even = 0' ) + Pytest.append( ' Odd = 0' ) + Pytest.append( ' Even = ValEven' ) + Pytest.append( ' return Finished,Incr,Even,Odd,NT,KT' ) + test,EndSwitch_OneEven = GraphSyrControlAborted.SNode( 'Switch_OneEven' , Pytest ) + EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' ) + EndSwitch_OneEven.SetAuthor( '' ) + EndSwitch_OneEven.SetComment( 'Compute Node' ) + EndSwitch_OneEven.Coords( 1065 , 356 ) + PyEndSwitch_OneEven = [] + PyEndSwitch_OneEven.append( 'def EndSwitch_OneEven( Finished , K ):' ) + PyEndSwitch_OneEven.append( ' print "label_begin",Finished,K' ) + PyEndSwitch_OneEven.append( ' return Finished,K' ) + EndSwitch_OneEven.SetPyFunction( 'EndSwitch_OneEven' , PyEndSwitch_OneEven ) + IEndSwitch_OneEvenFinished = EndSwitch_OneEven.InPort( 'Finished' , 'long' ) + IEndSwitch_OneEvenK = EndSwitch_OneEven.InPort( 'K' , 'long' ) + IEndSwitch_OneEvenDefault = EndSwitch_OneEven.GetInPort( 'Default' ) + OEndSwitch_OneEvenFinished = EndSwitch_OneEven.OutPort( 'Finished' , 'long' ) + OEndSwitch_OneEvenK = EndSwitch_OneEven.OutPort( 'K' , 'long' ) + OEndSwitch_OneEvenGate = EndSwitch_OneEven.GetOutPort( 'Gate' ) + test.SetName( 'test' ) + test.SetAuthor( '' ) + test.SetComment( 'Compute Node' ) + test.Coords( 575 , 205 ) + ItestValOne = test.InPort( 'ValOne' , 'long' ) + ItestValEven = test.InPort( 'ValEven' , 'long' ) + ItestNT = test.InPort( 'NT' , 'long' ) + ItestKT = test.InPort( 'KT' , 'long' ) + ItestGate = test.GetInPort( 'Gate' ) + OtestFinished = test.OutPort( 'Finished' , 'long' ) + OtestIncr = test.OutPort( 'Incr' , 'long' ) + OtestEven = test.OutPort( 'Even' , 'long' ) + OtestOdd = test.OutPort( 'Odd' , 'long' ) + OtestN = test.OutPort( 'N' , 'long' ) + OtestK = test.OutPort( 'K' , 'long' ) + OtestDefault = test.GetOutPort( 'Default' ) + + # Creation of GOTO Nodes + Pycontrol_m3p1 = [] + Pycontrol_m3p1.append( 'def control_m3p1( N , K ):' ) + Pycontrol_m3p1.append( ' return 0,1,N,K' ) + control_m3p1 = GraphSyrControlAborted.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' ) + control_m3p1.SetName( 'control_m3p1' ) + control_m3p1.SetAuthor( '' ) + control_m3p1.SetComment( 'Compute Node' ) + control_m3p1.Coords( 1013 , 63 ) + Icontrol_m3p1N = control_m3p1.InPort( 'N' , 'long' ) + Icontrol_m3p1K = control_m3p1.InPort( 'K' , 'long' ) + 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_m3p1Gate = control_m3p1.GetOutPort( 'Gate' ) + + Pycontrol_div2 = [] + Pycontrol_div2.append( 'def control_div2( N , NB ) :' ) + Pycontrol_div2.append( ' return N,NB' ) + control_div2 = GraphSyrControlAborted.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) + control_div2.SetName( 'control_div2' ) + control_div2.SetAuthor( '' ) + control_div2.SetComment( 'Compute Node' ) + control_div2.Coords( 1010 , 473 ) + Icontrol_div2N = control_div2.InPort( 'N' , 'long' ) + Icontrol_div2K = control_div2.InPort( 'K' , 'long' ) + Icontrol_div2Gate = control_div2.GetInPort( 'Gate' ) + Ocontrol_div2NB = control_div2.OutPort( 'NB' , 'long' ) + Ocontrol_div2KB = control_div2.OutPort( 'KB' , 'long' ) + Ocontrol_div2Gate = control_div2.GetOutPort( 'Gate' ) + + # Creation of Links + Ltest_ISEVENBoolEvenlabel_testValEven = GraphSyrControlAborted.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 381 , 234 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 381 , 410 ) + + Ltest_ISONEBoolOnelabel_testValOne = GraphSyrControlAborted.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 367 , 256 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 367 , 201 ) + + Lm3p1anEvenIntegercontrol_m3p1N = GraphSyrControlAborted.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + + Ldiv2anIntegercontrol_div2N = GraphSyrControlAborted.Link( Odiv2anInteger , Icontrol_div2N ) + + LincraNewCountcontrol_m3p1K = GraphSyrControlAborted.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 978 , 114 ) + LincraNewCountcontrol_m3p1K.AddCoord( 2 , 978 , 230 ) + + LincraNewCountcontrol_div2K = GraphSyrControlAborted.Link( OincraNewCount , Icontrol_div2K ) + LincraNewCountcontrol_div2K.AddCoord( 1 , 981 , 524 ) + LincraNewCountcontrol_div2K.AddCoord( 2 , 978 , 229 ) + + Llabel_beginNTlabel_testNT = GraphSyrControlAborted.Link( Olabel_beginNT , Ilabel_testNT ) + + Llabel_beginNTtest_ISEVENanInteger = GraphSyrControlAborted.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 179 , 408 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 179 , 276 ) + + Llabel_beginNTtest_ISONEanInteger = GraphSyrControlAborted.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 179 , 203 ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 180 , 275 ) + + Llabel_beginKTlabel_testKT = GraphSyrControlAborted.Link( Olabel_beginKT , Ilabel_testKT ) + + Llabel_testValEventestValEven = GraphSyrControlAborted.Link( Olabel_testValEven , ItestValEven ) + + Llabel_testValOnetestValOne = GraphSyrControlAborted.Link( Olabel_testValOne , ItestValOne ) + + Llabel_testNTtestNT = GraphSyrControlAborted.Link( Olabel_testNT , ItestNT ) + + Llabel_testKTtestKT = GraphSyrControlAborted.Link( Olabel_testKT , ItestKT ) + + LtestFinishedEndSwitch_OneEvenFinished = GraphSyrControlAborted.Link( OtestFinished , IEndSwitch_OneEvenFinished ) + + LtestEvendiv2Gate = GraphSyrControlAborted.Link( OtestEven , Idiv2Gate ) + LtestEvendiv2Gate.AddCoord( 1 , 763 , 522 ) + LtestEvendiv2Gate.AddCoord( 2 , 763 , 278 ) + + LtestOddm3p1Gate = GraphSyrControlAborted.Link( OtestOdd , Im3p1Gate ) + LtestOddm3p1Gate.AddCoord( 1 , 772 , 117 ) + LtestOddm3p1Gate.AddCoord( 2 , 772 , 297 ) + + LtestNm3p1anOddInteger = GraphSyrControlAborted.Link( OtestN , Im3p1anOddInteger ) + LtestNm3p1anOddInteger.AddCoord( 1 , 751 , 93 ) + LtestNm3p1anOddInteger.AddCoord( 2 , 752 , 317 ) + + LtestNdiv2anEvenInteger = GraphSyrControlAborted.Link( OtestN , Idiv2anEvenInteger ) + LtestNdiv2anEvenInteger.AddCoord( 1 , 751 , 498 ) + LtestNdiv2anEvenInteger.AddCoord( 2 , 752 , 318 ) + + LtestKEndSwitch_OneEvenK = GraphSyrControlAborted.Link( OtestK , IEndSwitch_OneEvenK ) + + LtestKincraCount = GraphSyrControlAborted.Link( OtestK , IincraCount ) + LtestKincraCount.AddCoord( 1 , 779 , 229 ) + LtestKincraCount.AddCoord( 2 , 779 , 336 ) + + Lcontrol_m3p1Gatelabel_testGate = GraphSyrControlAborted.Link( Ocontrol_m3p1Gate , Ilabel_testGate ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 1 , 374 , 321 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 2 , 374 , 15 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 3 , 1180 , 9 ) + Lcontrol_m3p1Gatelabel_testGate.AddCoord( 4 , 1181 , 217 ) + + Lcontrol_div2Gatelabel_beginGate = GraphSyrControlAborted.Link( Ocontrol_div2Gate , Ilabel_beginGate ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 1 , 4 , 608 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 2 , 1184 , 604 ) + Lcontrol_div2Gatelabel_beginGate.AddCoord( 3 , 1184 , 548 ) + + # Input datas + Ilabel_beginNB.Input( 7 ) + Ilabel_beginKB.Input( 0 ) + + # Output Ports of the graph + #OtestIncr = test.GetOutPort( 'Incr' ) + #OEndSwitch_OneEvenFinished = EndSwitch_OneEven.GetOutPort( 'Finished' ) + #OEndSwitch_OneEvenK = EndSwitch_OneEven.GetOutPort( 'K' ) + return GraphSyrControlAborted + + +GraphSyrControlAborted = DefGraphSyrControlAborted() diff --git a/examples/GraphSyrControlAborted.xml b/examples/GraphSyrControlAborted.xml new file mode 100644 index 0000000..1ee7050 --- /dev/null +++ b/examples/GraphSyrControlAborted.xml @@ -0,0 +1,683 @@ + + + + + +? + ? + GraphSyrControlAborted + 1 + ? + +GraphSyrControl + + +long + label_begin__NB + +long + label_begin__KB + + +long + test__Incr + +long + EndSwitch_OneEven__Finished + +long + EndSwitch_OneEven__K + + + 11/3/2003 - 18:34:21 + 15/2/2005 - 11:29:21 + 1.04 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 15/2/2005 - 11:4:0 + 15/2/2005 - 11:4:0 + 1.04 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 190 + 338 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 196 + 131 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 788 + 22 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 794 + 427 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 790 + 158 + +? + ? + label_begin + 3 + ? + +label_begin + + +long + NB + +long + KB + + +long + NT + +long + KT + + + +label_begin + + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + ? + Python function + 8 + 205 + +? + ? + label_test + 3 + ? + +label_test + + +long + ValEven + +long + ValOne + +long + NT + +long + KT + + +long + ValEven + +long + ValOne + +long + NT + +long + KT + + + +label_test + + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + ? + Python function + 397 + 165 + +? + ? + test + 6 + EndSwitch_OneEven + +test + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + + +long + Finished + +long + Incr + +long + Even + +long + Odd + +long + N + +long + K + + + +Switch_OneEven + + + + + + + + + + + + + + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + ? + Compute Node + 575 + 205 + +? + ? + EndSwitch_OneEven + 7 + test + +EndSwitch_OneEven + + +long + Finished + +long + K + + +long + Finished + +long + K + + + +EndSwitch_OneEven + + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + ? + Compute Node + 1065 + 356 + +? + ? + control_m3p1 + 8 + label_test + +control_m3p1 + + +long + N + +long + K + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + + + +control_m3p1 + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + ? + Compute Node + 1013 + 63 + +? + ? + control_div2 + 8 + label_begin + +control_div2 + + +long + N + +long + K + + +long + NB + +long + KB + + + +control_div2 + + + 15/2/2005 - 11:4:1 + 15/2/2005 - 11:4:1 + 1.04 + ? + ? + Compute Node + 1010 + 473 + + +test_ISEVEN + BoolEven + label_test + ValEven + + +381 + 234 + +381 + 410 + +test_ISONE + BoolOne + label_test + ValOne + + +367 + 256 + +367 + 201 + +m3p1 + anEvenInteger + control_m3p1 + N + + +div2 + anInteger + control_div2 + N + + +incr + aNewCount + control_m3p1 + K + + +978 + 114 + +978 + 230 + +incr + aNewCount + control_div2 + K + + +981 + 524 + +978 + 229 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISEVEN + anInteger + + +179 + 408 + +179 + 276 + +label_begin + NT + test_ISONE + anInteger + + +179 + 203 + +180 + 275 + +label_begin + KT + label_test + KT + + +label_test + ValEven + test + ValEven + + +label_test + ValOne + test + ValOne + + +label_test + NT + test + NT + + +label_test + KT + test + KT + + +test + Finished + EndSwitch_OneEven + Finished + + +test + Even + div2 + Gate + + +763 + 522 + +763 + 278 + +test + Odd + m3p1 + Gate + + +772 + 117 + +772 + 297 + +test + N + m3p1 + anOddInteger + + +751 + 93 + +752 + 317 + +test + N + div2 + anEvenInteger + + +751 + 498 + +752 + 318 + +test + K + EndSwitch_OneEven + K + + +test + K + incr + aCount + + +779 + 229 + +779 + 336 + +control_m3p1 + Gate + label_test + Gate + + +374 + 321 + +374 + 15 + +1180 + 9 + +1181 + 217 + +control_div2 + Gate + label_begin + Gate + + +4 + 608 + +1184 + 604 + +1184 + 548 + + +GraphSyrControlAborted + label_begin__NB + label_begin + NB + +3 + 7 + + +GraphSyrControlAborted + label_begin__KB + label_begin + KB + +3 + 0 + diff --git a/examples/GraphSyrControlAveNOTExecutable.py b/examples/GraphSyrControlAveNOTExecutable.py new file mode 100644 index 0000000..97cb49a --- /dev/null +++ b/examples/GraphSyrControlAveNOTExecutable.py @@ -0,0 +1,412 @@ + +# Generated python file of Graph GraphSyrControlAveNOTExecutable + +from SuperV import * + +# Graph creation of GraphSyrControlAveNOTExecutable +def DefGraphSyrControlAveNOTExecutable() : + GraphSyrControlAveNOTExecutable = Graph( 'GraphSyrControlAveNOTExecutable' ) + GraphSyrControlAveNOTExecutable.SetName( 'GraphSyrControlAveNOTExecutable' ) + GraphSyrControlAveNOTExecutable.SetAuthor( 'JR' ) + GraphSyrControlAveNOTExecutable.SetComment( 'Syracuse algorithm' ) + GraphSyrControlAveNOTExecutable.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + test_ISEVEN = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.Link( Otest_ISEVENBoolEven , Ilabel_testValEven ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 1 , 544 , 256 ) + Ltest_ISEVENBoolEvenlabel_testValEven.AddCoord( 2 , 544 , 524 ) + + Ltest_ISONEBoolOnelabel_testValOne = GraphSyrControlAveNOTExecutable.Link( Otest_ISONEBoolOne , Ilabel_testValOne ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 1 , 546 , 237 ) + Ltest_ISONEBoolOnelabel_testValOne.AddCoord( 2 , 546 , 198 ) + + Lm3p1anEvenIntegercontrol_m3p1N = GraphSyrControlAveNOTExecutable.Link( Om3p1anEvenInteger , Icontrol_m3p1N ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 1 , 975 , 38 ) + Lm3p1anEvenIntegercontrol_m3p1N.AddCoord( 2 , 976 , 81 ) + + Ldiv2anIntegercontrol_div2N = GraphSyrControlAveNOTExecutable.Link( Odiv2anInteger , Icontrol_div2N ) + Ldiv2anIntegercontrol_div2N.AddCoord( 1 , 1012 , 585 ) + Ldiv2anIntegercontrol_div2N.AddCoord( 2 , 1011 , 346 ) + + LincraNewCountcontrol_div2K = GraphSyrControlAveNOTExecutable.Link( OincraNewCount , Icontrol_div2K ) + LincraNewCountcontrol_div2K.AddCoord( 1 , 966 , 606 ) + LincraNewCountcontrol_div2K.AddCoord( 2 , 968 , 207 ) + + LincraNewCountcontrol_m3p1K = GraphSyrControlAveNOTExecutable.Link( OincraNewCount , Icontrol_m3p1K ) + LincraNewCountcontrol_m3p1K.AddCoord( 1 , 965 , 59 ) + LincraNewCountcontrol_m3p1K.AddCoord( 2 , 966 , 208 ) + + LincraNewCountC_AVERAGEaCount = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.Link( OC_MINaNewMinVal , Icontrol_m3p1MINT ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 1 , 991 , 78 ) + LC_MINaNewMinValcontrol_m3p1MINT.AddCoord( 2 , 991 , 905 ) + + LC_MINaNewMinValcontrol_div2MINT = GraphSyrControlAveNOTExecutable.Link( OC_MINaNewMinVal , Icontrol_div2MINT ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 1 , 991 , 626 ) + LC_MINaNewMinValcontrol_div2MINT.AddCoord( 2 , 991 , 905 ) + + LC_MAXaNewMaxValcontrol_m3p1MAXT = GraphSyrControlAveNOTExecutable.Link( OC_MAXaNewMaxVal , Icontrol_m3p1MAXT ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 1 , 976 , 98 ) + LC_MAXaNewMaxValcontrol_m3p1MAXT.AddCoord( 2 , 974 , 738 ) + + LC_MAXaNewMaxValcontrol_div2MAXT = GraphSyrControlAveNOTExecutable.Link( OC_MAXaNewMaxVal , Icontrol_div2MAXT ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 1 , 972 , 648 ) + LC_MAXaNewMaxValcontrol_div2MAXT.AddCoord( 2 , 974 , 738 ) + + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT = GraphSyrControlAveNOTExecutable.Link( OC_AVERAGEaNewListOfSyr , Icontrol_m3p1SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 1 , 1037 , 137 ) + LC_AVERAGEaNewListOfSyrcontrol_m3p1SYRLISTT.AddCoord( 2 , 1038 , 556 ) + + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT = GraphSyrControlAveNOTExecutable.Link( OC_AVERAGEaNewListOfSyr , Icontrol_div2SYRLISTT ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 1 , 1038 , 686 ) + LC_AVERAGEaNewListOfSyrcontrol_div2SYRLISTT.AddCoord( 2 , 1038 , 555 ) + + LC_AVERAGEanAveragecontrol_m3p1AVERAGET = GraphSyrControlAveNOTExecutable.Link( OC_AVERAGEanAverage , Icontrol_m3p1AVERAGET ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 1 , 1026 , 118 ) + LC_AVERAGEanAveragecontrol_m3p1AVERAGET.AddCoord( 2 , 1027 , 567 ) + + LC_AVERAGEanAveragecontrol_div2AVERAGET = GraphSyrControlAveNOTExecutable.Link( OC_AVERAGEanAverage , Icontrol_div2AVERAGET ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 1 , 1027 , 668 ) + LC_AVERAGEanAveragecontrol_div2AVERAGET.AddCoord( 2 , 1026 , 568 ) + + LC_LISTOFSYRaListOfSyrlabel_beginSYRLISTB = GraphSyrControlAveNOTExecutable.Link( OC_LISTOFSYRaListOfSyr , Ilabel_beginSYRLISTB ) + + Llabel_beginNTtest_ISONEanInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_beginNT , Itest_ISONEanInteger ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 1 , 361 , 197 ) + Llabel_beginNTtest_ISONEanInteger.AddCoord( 2 , 360 , 290 ) + + Llabel_beginNTlabel_testNT = GraphSyrControlAveNOTExecutable.Link( Olabel_beginNT , Ilabel_testNT ) + + Llabel_beginNTtest_ISEVENanInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_beginNT , Itest_ISEVENanInteger ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 1 , 359 , 525 ) + Llabel_beginNTtest_ISEVENanInteger.AddCoord( 2 , 361 , 291 ) + + Llabel_beginKTlabel_testKT = GraphSyrControlAveNOTExecutable.Link( Olabel_beginKT , Ilabel_testKT ) + + Llabel_beginMINlabel_testMIN = GraphSyrControlAveNOTExecutable.Link( Olabel_beginMIN , Ilabel_testMIN ) + + Llabel_beginMAXlabel_testMAX = GraphSyrControlAveNOTExecutable.Link( Olabel_beginMAX , Ilabel_testMAX ) + + Llabel_beginAVERAGElabel_testAVERAGE = GraphSyrControlAveNOTExecutable.Link( Olabel_beginAVERAGE , Ilabel_testAVERAGE ) + + Llabel_beginSYRLISTlabel_testSYRLIST = GraphSyrControlAveNOTExecutable.Link( Olabel_beginSYRLIST , Ilabel_testSYRLIST ) + + Llabel_testEvendiv2Gate = GraphSyrControlAveNOTExecutable.Link( Olabel_testEven , Idiv2Gate ) + Llabel_testEvendiv2Gate.AddCoord( 1 , 777 , 351 ) + Llabel_testEvendiv2Gate.AddCoord( 2 , 777 , 286 ) + + Llabel_testOddm3p1Gate = GraphSyrControlAveNOTExecutable.Link( Olabel_testOdd , Im3p1Gate ) + Llabel_testOddm3p1Gate.AddCoord( 1 , 757 , 95 ) + Llabel_testOddm3p1Gate.AddCoord( 2 , 757 , 310 ) + + Llabel_testNm3p1anOddInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_testN , Im3p1anOddInteger ) + Llabel_testNm3p1anOddInteger.AddCoord( 1 , 741 , 72 ) + Llabel_testNm3p1anOddInteger.AddCoord( 2 , 741 , 331 ) + + Llabel_testNdiv2anEvenInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_testN , Idiv2anEvenInteger ) + + Llabel_testNC_MINanInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_testN , IC_MINanInteger ) + Llabel_testNC_MINanInteger.AddCoord( 1 , 744 , 923 ) + Llabel_testNC_MINanInteger.AddCoord( 2 , 742 , 331 ) + + Llabel_testNC_MAXanInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_testN , IC_MAXanInteger ) + Llabel_testNC_MAXanInteger.AddCoord( 1 , 742 , 759 ) + Llabel_testNC_MAXanInteger.AddCoord( 2 , 743 , 332 ) + + Llabel_testNC_AVERAGEanInteger = GraphSyrControlAveNOTExecutable.Link( Olabel_testN , IC_AVERAGEanInteger ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 1 , 741 , 568 ) + Llabel_testNC_AVERAGEanInteger.AddCoord( 2 , 742 , 330 ) + + Llabel_testKincraCount = GraphSyrControlAveNOTExecutable.Link( Olabel_testK , IincraCount ) + Llabel_testKincraCount.AddCoord( 1 , 766 , 207 ) + Llabel_testKincraCount.AddCoord( 2 , 766 , 343 ) + + Llabel_testMINTC_MINaMinVal = GraphSyrControlAveNOTExecutable.Link( Olabel_testMINT , IC_MINaMinVal ) + Llabel_testMINTC_MINaMinVal.AddCoord( 1 , 760 , 904 ) + Llabel_testMINTC_MINaMinVal.AddCoord( 2 , 756 , 372 ) + + Llabel_testMAXTC_MAXaMaxVal = GraphSyrControlAveNOTExecutable.Link( Olabel_testMAXT , IC_MAXaMaxVal ) + Llabel_testMAXTC_MAXaMaxVal.AddCoord( 1 , 765 , 742 ) + Llabel_testMAXTC_MAXaMaxVal.AddCoord( 2 , 766 , 384 ) + + Llabel_testSYRLISTTC_AVERAGEaListOfSyr = GraphSyrControlAveNOTExecutable.Link( Olabel_testSYRLISTT , IC_AVERAGEaListOfSyr ) + Llabel_testSYRLISTTC_AVERAGEaListOfSyr.AddCoord( 1 , 773 , 546 ) + Llabel_testSYRLISTTC_AVERAGEaListOfSyr.AddCoord( 2 , 772 , 424 ) + + Llabel_testDefaultEndL_OneEvenDefault = GraphSyrControlAveNOTExecutable.Link( Olabel_testDefault , IEndL_OneEvenDefault ) + + Lcontrol_m3p1Gatelabel_testGate = GraphSyrControlAveNOTExecutable.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 = GraphSyrControlAveNOTExecutable.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_testAVERAGET = label_test.GetOutPort( 'AVERAGET' ) + #OEndL_OneEvenMIN = EndL_OneEven.GetOutPort( 'MIN' ) + #OEndL_OneEvenMAX = EndL_OneEven.GetOutPort( 'MAX' ) + #OEndL_OneEvenAVERAGE = EndL_OneEven.GetOutPort( 'AVERAGE' ) + return GraphSyrControlAveNOTExecutable + + +GraphSyrControlAveNOTExecutable = DefGraphSyrControlAveNOTExecutable() diff --git a/examples/GraphSyrControlAveNOTExecutable.xml b/examples/GraphSyrControlAveNOTExecutable.xml new file mode 100644 index 0000000..220c3e6 --- /dev/null +++ b/examples/GraphSyrControlAveNOTExecutable.xml @@ -0,0 +1,1098 @@ + + + + + +? + ? + GraphSyrControlAveNOTExecutable + 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__AVERAGET + +long + EndL_OneEven__MIN + +long + EndL_OneEven__MAX + +double + EndL_OneEven__AVERAGE + + + 2/10/2003 - 11:17:14 + 15/2/2005 - 11:27:6 + 1.05 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 370 + 455 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 370 + 127 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 789 + 0 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 789 + 255 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 790 + 136 + +SyrComponent + SyrComponent + C_MIN + 0 + ? + +C_MIN + + +long + aMinVal + +long + anInteger + + +long + aNewMinVal + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_MIN from SyrComponent + 798 + 833 + +SyrComponent + SyrComponent + C_MAX + 0 + ? + +C_MAX + + +long + aMaxVal + +long + anInteger + + +long + aNewMaxVal + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 1.05 + ? + localhost/FactoryServer + C_AVERAGE from SyrComponent + 784 + 476 + +SyrComponent + SyrComponent + C_LISTOFSYR + 0 + ? + +C_LISTOFSYR + + + +ListOfSyr + aListOfSyr + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + + + + + + + + + + + + + + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + + + +? + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + + + 15/2/2005 - 11:25:41 + 15/2/2005 - 11:25:41 + 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 + MAXT + C_MAX + aMaxVal + + +765 + 742 + +766 + 384 + +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 + + +GraphSyrControlAveNOTExecutable + label_begin__NB + label_begin + NB + +3 + 31 + + +GraphSyrControlAveNOTExecutable + label_begin__KB + label_begin + KB + +3 + 0 + + +GraphSyrControlAveNOTExecutable + label_begin__MINB + label_begin + MINB + +3 + 0 + + +GraphSyrControlAveNOTExecutable + label_begin__MAXB + label_begin + MAXB + +3 + 0 + + +GraphSyrControlAveNOTExecutable + label_begin__AVERAGEB + label_begin + AVERAGEB + +7 + 0 + -- 2.39.2