Blame view
circus/src/jcircus/implementationtemplates/ProcessesTemplate.java
3.74 KB
8d0dc533f
![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
package jcircus.implementationtemplates; import net.sourceforge.czt.circus.ast.*; import net.sourceforge.czt.circuspatt.ast.JokerProcess; import net.sourceforge.czt.z.ast.AxPara; import net.sourceforge.czt.z.ast.Expr; import net.sourceforge.czt.z.ast.ZDeclList; import net.sourceforge.czt.z.ast.ZExprList; import net.sourceforge.czt.z.ast.ZName; import net.sourceforge.czt.z.ast.ZNameList; import net.sourceforge.czt.z.ast.ZParaList; public class ProcessesTemplate { public void templatetotal (CircusProcess process) { if (process instanceof Process1) { if (process instanceof RenameProcess) { RenameProcess rp = (RenameProcess)process; CircusProcess proc = rp.getCircusProcess(); AssignmentPairs asspairs = rp.getAssignmentPairs(); ZNameList listOfPairs = asspairs.getZLHS(); ZExprList listOfExprs = asspairs.getZRHS(); //TODO the rest } else if (process instanceof ProcessD) { if (process instanceof ParamProcess) { ParamProcess pp = (ParamProcess)process; CircusProcess cp = pp.getCircusProcess(); BasicProcess cbp = pp.getCircusBasicProcess(); ZDeclList declList = pp.getZDeclList(); //TODO the rest } else if (process instanceof ProcessIdx) { if (process instanceof AlphabetisedParallelProcessIdx) { AlphabetisedParallelProcessIdx appi = (AlphabetisedParallelProcessIdx) process; ChannelSet chanSet = appi.getChannelSet(); BasicProcess bp = appi.getCircusBasicProcess(); CircusProcess cp = appi.getCircusProcess(); ZDeclList declList = appi.getZDeclList(); //TODO the rest } else if (process instanceof ExtChoiceProcessIdx) { } else if (process instanceof IntChoiceProcessIdx) { } else if (process instanceof ParProcessIdx) { if (process instanceof InterleaveProcessIdx) { } else if (process instanceof ParallelProcessIdx) { } } else if (process instanceof SeqProcessIdx) { } } else if (process instanceof ProcessIte) { if (process instanceof AlphabetisedParallelProcessIte) { } else if (process instanceof ExtChoiceProcessIte) { } else if (process instanceof IntChoiceProcessIte) { } else if (process instanceof ParProcessIte) { if (process instanceof InterleaveProcessIte) { } else if (process instanceof ParallelProcessIte) { } } else if (process instanceof SeqProcessIte) { } } } else if (process instanceof HideProcess) { } else if (process instanceof IndexedProcess) { } } else if (process instanceof Process2) { if (process instanceof AlphabetisedParallelProcess) { } else if (process instanceof ExtChoiceProcess) { } else if (process instanceof IntChoiceProcess) { } else if (process instanceof ParProcess) { if (process instanceof InterleaveProcess) { } else if (process instanceof ParallelProcess) { } } else if (process instanceof SeqProcess) { } } else if (process instanceof BasicProcess) { BasicProcess bp = (BasicProcess) process; AxPara statePara = bp.getStatePara(); ZName stateName = bp.getStateParaZName(); CircusAction mainAction = bp.getMainAction(); ZParaList actionParas = bp.getZParaList(); //TODO the rest } else if (process instanceof CallProcess) { CallProcess cp = (CallProcess) process; Expr ce = cp.getCallExpr(); ZExprList actuals = cp.getZActuals(); CallUsage callusage = cp.getUsage(); //TODO the rest } else if (process instanceof JokerProcess) { JokerProcess jp = (JokerProcess) process; String jokerId = jp.getId(); String jokerName = jp.getName(); //TODO the rest } } } |