public ProgramParamExp copy() { ProgramParamExp result = new ProgramParamExp(location, name, arguments, semanticExp); result.setType(getType()); result.setMathType(myMathType); result.setMathTypeValue(myMathTypeValue); return result; }
private boolean differentTypeCompare1(ProgramParamExp programParamExp, VariableExp variableExp) { String paramExp = programParamExp.getName().toString(); String varName = variableExp.toString(); if (paramExp.equals(varName)) { return true; } // System.out.println("not equal"); return false; }
private boolean paramCompare(ProgramParamExp p1, ProgramParamExp p2) { List<Exp> subExp1 = p1.getSubExpressions(); List<Exp> subExp2 = p2.getSubExpressions(); String varName1 = p2.getName().toString(); String varName2 = p1.getName().toString(); String semantic = p1.getSemanticExp().toString(); // System.out.println("Semantic Exp:" + semantic); List args = p1.getArguments(); for (int i = 0; i < args.size(); i++) { // System.out.println("args:" + args.get(i).toString()); } // System.out.println(subExp1.toString()); // System.out.println(subExp2.toString()); // System.out.println("..." + varName1); // System.out.println(varName2); // System.out.println(p1.toString()); if (varName1.equals(varName2)) { // System.out.println("they are equal"); return true; } return false; }