diff --git a/AlgebraicDataflowArchitectureModel/src/generators/CodeGeneratorFromDataFlowGraph.java b/AlgebraicDataflowArchitectureModel/src/generators/CodeGeneratorFromDataFlowGraph.java index 495452c..57d42bb 100644 --- a/AlgebraicDataflowArchitectureModel/src/generators/CodeGeneratorFromDataFlowGraph.java +++ b/AlgebraicDataflowArchitectureModel/src/generators/CodeGeneratorFromDataFlowGraph.java @@ -778,12 +778,16 @@ // Declare an update method in the type of the destination resource. ArrayList parameters = new ArrayList<>(); + int v = 1; for (Expression exp: dstResPath.getPathParams()) { if (exp instanceof Variable) { Variable pathVar = (Variable) exp; - VariableDeclaration pathParam = langSpec.newVariableDeclaration(pathVar.getType(), pathVar.getName()); + String varName = "self" + (v > 1 ? v : ""); +// String varName = pathVar.getName(); + VariableDeclaration pathParam = langSpec.newVariableDeclaration(pathVar.getType(), varName); parameters.add(pathParam); // A path parameter to identify the self resource. } + v++; } for (Selector selector: ch.getAllSelectors()) { if (selector.getExpression() instanceof Variable) {