diff --git a/AlgebraicDataflowArchitectureModel/models/JumpGame.model b/AlgebraicDataflowArchitectureModel/models/JumpGame.model index 36ce9b7..1a4c6b0 100644 --- a/AlgebraicDataflowArchitectureModel/models/JumpGame.model +++ b/AlgebraicDataflowArchitectureModel/models/JumpGame.model @@ -1,3 +1,16 @@ +init { + force := pair(0.0, 0.0) + time := 0.0 + move := pair(0.0, 0.0) + mass := 1.0 + ground := true + acceleration := pair(0.0, 0.0) + velocity := pair(0.0, 0.0) + onground := true + position := pair(0.0, 0.0) + clear := false + gameover := false +} channel CIO { out force(f:Pair, gravity(y:Double)) == pair(0.0, y) out time(t:Double, gravity(y)) == t + 0.01 diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java index 821a517..fbdc6dc 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java @@ -97,13 +97,9 @@ } else { if (rn.getIndegree() > 1) { // Declare a field to cash the state of the source resource in the type of the destination resource. - String cashInitializer = null; - Type cashType = ((ResourceNode) re.getSource()).getIdentifierTemplate().getResourceStateType(); - if (DataConstraintModel.typeList.isAncestorOf(cashType)) { - cashInitializer = "new " + cashType.getImplementationTypeName() + "()"; - } + IdentifierTemplate cashResId = ((ResourceNode) re.getSource()).getIdentifierTemplate(); type.addField(new FieldDeclaration( - cashType, ((ResourceNode) re.getSource()).getIdentifierTemplate().getResourceName(), cashInitializer)); + cashResId.getResourceStateType(), ((ResourceNode) re.getSource()).getIdentifierTemplate().getResourceName(), getInitializer(cashResId))); } } } @@ -236,10 +232,8 @@ // Declare the field to store the state in the type of each resource. if (((StoreAttribute) rn.getAttribute()).isStored()) { - String initializer = "new " + rn.getIdentifierTemplate().getResourceStateType().getImplementationTypeName() + "()"; - Type stateType = rn.getIdentifierTemplate().getResourceStateType(); - if (!DataConstraintModel.typeList.isAncestorOf(stateType)) initializer = null; - type.addField(new FieldDeclaration(stateType, "value", initializer)); + IdentifierTemplate resId = rn.getIdentifierTemplate(); + type.addField(new FieldDeclaration(resId.getResourceStateType(), "value", getInitializer(resId))); } // Declare the getter method to obtain the state in the type of each resource. @@ -318,6 +312,19 @@ return codes; } + private static String getInitializer(IdentifierTemplate resId) { + Type stateType = resId.getResourceStateType(); + String initializer = null; + if (resId.getInitialValue() != null) { + initializer = resId.getInitialValue().toImplementation(new String[] {}); + } else { + if (DataConstraintModel.typeList.isAncestorOf(stateType)) { + initializer = "new " + resId.getResourceStateType().getImplementationTypeName() + "()"; + } + } + return initializer; + } + static public ArrayList getCodes(ArrayList codeTree) { ArrayList codes = new ArrayList<>(); for (TypeDeclaration type : codeTree) { diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/JavaMethodBodyGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/JavaMethodBodyGenerator.java index b2f0f0a..4e75870 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/JavaMethodBodyGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/JavaMethodBodyGenerator.java @@ -107,8 +107,9 @@ for (MethodDeclaration srcUpdate: getUpdateMethods(srcType)) { srcUpdate.addStatement(dstResourceName + ".update" + srcType.getTypeName() + "(value);"); } - MethodDeclaration srcInput = getInputMethod(srcType, src, model); - if (srcInput != null) srcInput.addStatement(dstResourceName + ".update" + srcType.getTypeName() + "(value);"); + for (MethodDeclaration srcInput: getInputMethods(srcType, src, model)) { + srcInput.addStatement(dstResourceName + ".update" + srcType.getTypeName() + "(value);"); + } } else { // for pull (or push/pull) data transfer MethodDeclaration getter = getGetterMethod(dstType); @@ -246,18 +247,19 @@ return new AbstractMap.SimpleEntry<>(channel, channelMembers); } - private static MethodDeclaration getInputMethod(TypeDeclaration type, ResourceNode resource, DataFlowModel model) { + private static List getInputMethods(TypeDeclaration type, ResourceNode resource, DataFlowModel model) { + List inputs = new ArrayList<>(); for (ChannelGenerator c: model.getIOChannelGenerators()) { DataflowChannelGenerator channel = (DataflowChannelGenerator) c; // I/O channel for (ChannelMember out: channel.getOutputChannelMembers()) { if (out.getIdentifierTemplate().equals(resource.getIdentifierTemplate())) { MethodDeclaration input = getInputMethod(type, out); - if (input != null) return input; + inputs.add(input); } } } - return null; + return inputs; } private static MethodDeclaration getInputMethod(TypeDeclaration type, ChannelMember out) { diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyCodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyCodeGenerator.java index 034b89f..c6ba347 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyCodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyCodeGenerator.java @@ -117,12 +117,8 @@ // For each source resource, a child resource is defined in the destination resource so that its state can be updated separately. update.addAnnotation(new Annotation("Path", "\"/" + srcName + "\"")); // Declare a field to cash the state of the source resource in the type of the destination resource. - String cashInitializer = null; - Type cashType = ((ResourceNode) re.getSource()).getIdentifierTemplate().getResourceStateType(); - if (DataConstraintModel.typeList.isAncestorOf(cashType)) { - cashInitializer = "new " + cashType.getImplementationTypeName() + "()"; - } - type.addField(new FieldDeclaration(cashType, srcName, cashInitializer)); + IdentifierTemplate cashResId = ((ResourceNode) re.getSource()).getIdentifierTemplate(); + type.addField(new FieldDeclaration(cashResId.getResourceStateType(), srcName, getInitializer(cashResId))); } type.addMethod(update); } @@ -185,10 +181,8 @@ // Declare the field to store the state in the type of each resource. if (((StoreAttribute) rn.getAttribute()).isStored()) { - String initializer = "new " + rn.getIdentifierTemplate().getResourceStateType().getImplementationTypeName() + "()"; - Type stateType = rn.getIdentifierTemplate().getResourceStateType(); - if (!DataConstraintModel.typeList.isAncestorOf(stateType)) initializer = null; - type.addField(new FieldDeclaration(stateType, "value", initializer)); + IdentifierTemplate resId = rn.getIdentifierTemplate(); + type.addField(new FieldDeclaration(resId.getResourceStateType(), "value", getInitializer(resId))); } // Declare the getter method to obtain the state in the type of each resource. @@ -254,6 +248,19 @@ return codes; } + private static String getInitializer(IdentifierTemplate resId) { + Type stateType = resId.getResourceStateType(); + String initializer = null; + if (resId.getInitialValue() != null) { + initializer = resId.getInitialValue().toImplementation(new String[] {}); + } else { + if (DataConstraintModel.typeList.isAncestorOf(stateType)) { + initializer = "new " + resId.getResourceStateType().getImplementationTypeName() + "()"; + } + } + return initializer; + } + static public ArrayList getCodes(ArrayList codeTree) { ArrayList codes = new ArrayList<>(); for (TypeDeclaration type : codeTree) { diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyMethodBodyGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyMethodBodyGenerator.java index 26e29fc..580df67 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyMethodBodyGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/JerseyMethodBodyGenerator.java @@ -193,8 +193,7 @@ srcUpdate.addThrow("JsonProcessingException"); } } - MethodDeclaration srcInput = getInputMethod(srcType, src, model); - if (srcInput != null) { + for (MethodDeclaration srcInput: getInputMethods(srcType, src, model)) { String srcResName = null; if (dst.getIndegree() > 1) { srcResName = srcResourceName; @@ -447,18 +446,19 @@ return new AbstractMap.SimpleEntry<>(channel, channelMembers); } - private static MethodDeclaration getInputMethod(TypeDeclaration type, ResourceNode resource, DataFlowModel model) { + private static List getInputMethods(TypeDeclaration type, ResourceNode resource, DataFlowModel model) { + List inputs = new ArrayList<>(); for (ChannelGenerator c: model.getIOChannelGenerators()) { DataflowChannelGenerator channel = (DataflowChannelGenerator) c; // I/O channel for (ChannelMember out: channel.getOutputChannelMembers()) { if (out.getIdentifierTemplate().equals(resource.getIdentifierTemplate())) { MethodDeclaration input = getInputMethod(type, out); - if (input != null) return input; + inputs.add(input); } } } - return null; + return inputs; } private static MethodDeclaration getInputMethod(TypeDeclaration type, ChannelMember out) { diff --git a/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/editor/Editor.java b/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/editor/Editor.java index 367ae7c..19a23a3 100644 --- a/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/editor/Editor.java +++ b/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/editor/Editor.java @@ -26,6 +26,7 @@ import models.dataFlowModel.ResourceDependency; import models.dataFlowModel.ResourceDependencyGraph; import models.dataFlowModel.ResourceNode; +import parser.ExpectedAssignment; import parser.ExpectedChannel; import parser.ExpectedChannelName; import parser.ExpectedEquals; @@ -44,9 +45,9 @@ private mxGraph graph = null; private String curFileName = null; - private DataFlowModel model = null; + private DataFlowModel model = null; private ResourceDependencyGraph resourceDependencyGraph = null; - private ArrayList codes = null; + private ArrayList codes = null; public Editor(mxGraph graph) { this.graph = graph; @@ -67,7 +68,7 @@ public void setModel(DataFlowModel model) { this.model = model; } - + public ResourceDependencyGraph getResourceDependencyGraph() { return resourceDependencyGraph; } @@ -81,7 +82,7 @@ } public void setCodes(ArrayList codes) { - this.codes = codes; + this.codes = codes; } public String getCurFileName() { @@ -101,7 +102,7 @@ return model; } catch (ExpectedChannel | ExpectedChannelName | ExpectedLeftCurlyBracket | ExpectedInOrOutOrRefKeyword | ExpectedStateTransition | ExpectedEquals | ExpectedRHSExpression | WrongLHSExpression - | WrongRHSExpression | ExpectedRightBracket e) { + | WrongRHSExpression | ExpectedRightBracket | ExpectedAssignment e) { e.printStackTrace(); } } catch (FileNotFoundException e) { @@ -110,7 +111,7 @@ return null; } - public mxGraph constructGraph(DataFlowModel model, ResourceDependencyGraph resourceDependencyGraph) { + public mxGraph constructGraph(DataFlowModel model, ResourceDependencyGraph resourceDependencyGraph) { ((mxGraphModel) graph.getModel()).clear(); Object parent = graph.getDefaultParent(); graph.getModel().beginUpdate(); diff --git a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/IdentifierTemplate.java b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/IdentifierTemplate.java index d16617b..22f5c48 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/IdentifierTemplate.java +++ b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/IdentifierTemplate.java @@ -1,11 +1,13 @@ package models.dataConstraintModel; +import models.algebra.Expression; import models.algebra.Type; public class IdentifierTemplate { private String resourceName = null; private Type resourceStateType = null; private int numParameters = 0; + private Expression initialValue = null; public IdentifierTemplate(String resourceName, int numParameters) { this.resourceName = resourceName; @@ -34,6 +36,14 @@ this.resourceStateType = resourceStateType; } + public Expression getInitialValue() { + return initialValue; + } + + public void setInitialValue(Expression initialValue) { + this.initialValue = initialValue; + } + public boolean equals(Object another) { if (!(another instanceof IdentifierTemplate)) return false; return resourceName.equals(((IdentifierTemplate) another).resourceName); diff --git a/AlgebraicDataflowArchitectureModel/src/parser/ExpectedAssignment.java b/AlgebraicDataflowArchitectureModel/src/parser/ExpectedAssignment.java new file mode 100644 index 0000000..2b7a495 --- /dev/null +++ b/AlgebraicDataflowArchitectureModel/src/parser/ExpectedAssignment.java @@ -0,0 +1,8 @@ +package parser; + +public class ExpectedAssignment extends ParseException { + + public ExpectedAssignment(int line) { + super(line); + } +} diff --git a/AlgebraicDataflowArchitectureModel/src/parser/Parser.java b/AlgebraicDataflowArchitectureModel/src/parser/Parser.java index 058a2fc..c41a255 100644 --- a/AlgebraicDataflowArchitectureModel/src/parser/Parser.java +++ b/AlgebraicDataflowArchitectureModel/src/parser/Parser.java @@ -21,6 +21,7 @@ public class Parser { private BufferedReader reader; public static final String CHANNEL = "channel"; + public static final String INIT = "init"; public static final String LEFT_CURLY_BRACKET = "{"; public static final String RIGHT_CURLY_BRACKET = "}"; public static final String LEFT_CURLY_BRACKET_REGX = "\\{"; @@ -42,6 +43,7 @@ public static final String OUT = "out"; public static final String REF = "ref"; public static final String EQUALS = "=="; + public static final String ASSIGNMENT = "="; public static final String COMMA = ","; public static final String COLON = ":"; @@ -50,7 +52,7 @@ } public DataFlowModel doParse() - throws ExpectedRightBracket, ExpectedChannel, ExpectedChannelName, ExpectedLeftCurlyBracket, ExpectedInOrOutOrRefKeyword, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression { + throws ExpectedRightBracket, ExpectedChannel, ExpectedChannelName, ExpectedLeftCurlyBracket, ExpectedInOrOutOrRefKeyword, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression, ExpectedAssignment { TokenStream stream = new TokenStream(); try { String line; @@ -67,7 +69,7 @@ } public static DataFlowModel parseDataFlowModel(TokenStream stream) - throws ExpectedRightBracket, ExpectedChannel, ExpectedChannelName, ExpectedLeftCurlyBracket, ExpectedInOrOutOrRefKeyword, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression { + throws ExpectedRightBracket, ExpectedChannel, ExpectedChannelName, ExpectedLeftCurlyBracket, ExpectedInOrOutOrRefKeyword, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression, ExpectedAssignment { DataFlowModel model = new DataFlowModel(); DataflowChannelGenerator channel; while ((channel = parseChannel(stream, model)) != null) { @@ -81,10 +83,14 @@ } public static DataflowChannelGenerator parseChannel(TokenStream stream, DataFlowModel model) - throws ExpectedRightBracket, ExpectedChannel, ExpectedChannelName, ExpectedLeftCurlyBracket, ExpectedInOrOutOrRefKeyword, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression { + throws ExpectedRightBracket, ExpectedChannel, ExpectedChannelName, ExpectedLeftCurlyBracket, ExpectedInOrOutOrRefKeyword, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression, ExpectedAssignment { if (!stream.hasNext()) return null; - String channelKeyword = stream.next(); - if (!channelKeyword.equals(CHANNEL)) throw new ExpectedChannel(stream.getLine()); + String channelOtInitKeyword = stream.next(); + if (!channelOtInitKeyword.equals(CHANNEL)) { + if (!channelOtInitKeyword.equals(INIT)) throw new ExpectedChannel(stream.getLine()); + parseInit(stream, model); + channelOtInitKeyword = stream.next(); + } if (!stream.hasNext()) throw new ExpectedChannelName(stream.getLine()); String channelName = stream.next(); if (channelName.equals(LEFT_CURLY_BRACKET)) throw new ExpectedChannelName(stream.getLine()); @@ -117,6 +123,33 @@ return channel; } + public static void parseInit(TokenStream stream, DataFlowModel model) throws ExpectedLeftCurlyBracket, ExpectedAssignment, ExpectedRHSExpression, WrongRHSExpression, ExpectedRightBracket { + String leftBracket = stream.next(); + if (!leftBracket.equals(LEFT_CURLY_BRACKET)) throw new ExpectedLeftCurlyBracket(stream.getLine()); + String resourceName = null; + while (stream.hasNext() && !(resourceName = stream.next()).equals(RIGHT_CURLY_BRACKET)) { + IdentifierTemplate identifier = model.getIdentifierTemplate(resourceName); + if (identifier == null) { + identifier = new IdentifierTemplate(resourceName, 0); + model.addIdentifierTemplates(identifier); + } + + if (!stream.hasNext()) throw new ExpectedAssignment(stream.getLine()); + String colon = stream.next(); + if (!colon.equals(COLON)) throw new ExpectedAssignment(stream.getLine()); + if (!stream.hasNext()) throw new ExpectedAssignment(stream.getLine()); + String equals = stream.next(); + if (!equals.equals(ASSIGNMENT)) throw new ExpectedAssignment(stream.getLine()); + + Expression rightTerm = null; + if (!stream.hasNext()) throw new ExpectedRHSExpression(stream.getLine()); + rightTerm = parseTerm(stream, model); + if (rightTerm == null) throw new WrongRHSExpression(stream.getLine()); + + identifier.setInitialValue(rightTerm); + } + } + public static ChannelMember parseChannelMember(TokenStream stream, DataFlowModel model, String inOrOutOrRef) throws ExpectedRightBracket, ExpectedStateTransition, ExpectedEquals, ExpectedRHSExpression, WrongLHSExpression, WrongRHSExpression { if (!stream.hasNext()) throw new ExpectedStateTransition(stream.getLine()); diff --git a/AlgebraicDataflowArchitectureModel/src/tests/CodeGeneratorTest.java b/AlgebraicDataflowArchitectureModel/src/tests/CodeGeneratorTest.java index 4186c68..bd733d1 100644 --- a/AlgebraicDataflowArchitectureModel/src/tests/CodeGeneratorTest.java +++ b/AlgebraicDataflowArchitectureModel/src/tests/CodeGeneratorTest.java @@ -27,7 +27,7 @@ System.out.println(codetree); } catch (ExpectedChannel | ExpectedChannelName | ExpectedLeftCurlyBracket | ExpectedInOrOutOrRefKeyword | ExpectedStateTransition | ExpectedEquals | ExpectedRHSExpression | WrongLHSExpression - | WrongRHSExpression | ExpectedRightBracket e) { + | WrongRHSExpression | ExpectedRightBracket | ExpectedAssignment e) { e.printStackTrace(); } } catch (FileNotFoundException e) { diff --git a/AlgebraicDataflowArchitectureModel/src/tests/DataStorageDecisionTest.java b/AlgebraicDataflowArchitectureModel/src/tests/DataStorageDecisionTest.java index fe2d5be..b02dbb5 100644 --- a/AlgebraicDataflowArchitectureModel/src/tests/DataStorageDecisionTest.java +++ b/AlgebraicDataflowArchitectureModel/src/tests/DataStorageDecisionTest.java @@ -27,7 +27,7 @@ } } catch (ExpectedChannel | ExpectedChannelName | ExpectedLeftCurlyBracket | ExpectedInOrOutOrRefKeyword | ExpectedStateTransition | ExpectedEquals | ExpectedRHSExpression | WrongLHSExpression - | WrongRHSExpression | ExpectedRightBracket e) { + | WrongRHSExpression | ExpectedRightBracket | ExpectedAssignment e) { e.printStackTrace(); } } catch (FileNotFoundException e) { diff --git a/AlgebraicDataflowArchitectureModel/src/tests/DataStorageNecessityTest.java b/AlgebraicDataflowArchitectureModel/src/tests/DataStorageNecessityTest.java index d82ab9d..6682f4c 100644 --- a/AlgebraicDataflowArchitectureModel/src/tests/DataStorageNecessityTest.java +++ b/AlgebraicDataflowArchitectureModel/src/tests/DataStorageNecessityTest.java @@ -8,6 +8,7 @@ import algorithms.NecessityOfStoringResourceStates; import models.Node; import models.dataFlowModel.*; +import parser.ExpectedAssignment; import parser.ExpectedChannel; import parser.ExpectedChannelName; import parser.ExpectedEquals; @@ -38,7 +39,7 @@ } } catch (ExpectedChannel | ExpectedChannelName | ExpectedLeftCurlyBracket | ExpectedInOrOutOrRefKeyword | ExpectedStateTransition | ExpectedEquals | ExpectedRHSExpression | WrongLHSExpression - | WrongRHSExpression | ExpectedRightBracket e) { + | WrongRHSExpression | ExpectedRightBracket | ExpectedAssignment e) { e.printStackTrace(); } } catch (FileNotFoundException e) { diff --git a/AlgebraicDataflowArchitectureModel/src/tests/EdgeTransitionSelectableTest.java b/AlgebraicDataflowArchitectureModel/src/tests/EdgeTransitionSelectableTest.java index b90f5c3..4bec80a 100644 --- a/AlgebraicDataflowArchitectureModel/src/tests/EdgeTransitionSelectableTest.java +++ b/AlgebraicDataflowArchitectureModel/src/tests/EdgeTransitionSelectableTest.java @@ -27,7 +27,7 @@ } } catch (ExpectedChannel | ExpectedChannelName | ExpectedLeftCurlyBracket | ExpectedInOrOutOrRefKeyword | ExpectedStateTransition | ExpectedEquals | ExpectedRHSExpression | WrongLHSExpression - | WrongRHSExpression | ExpectedRightBracket e) { + | WrongRHSExpression | ExpectedRightBracket | ExpectedAssignment e) { e.printStackTrace(); } } catch (FileNotFoundException e) { diff --git a/AlgebraicDataflowArchitectureModel/src/tests/ParseTest.java b/AlgebraicDataflowArchitectureModel/src/tests/ParseTest.java index 1a2e487..9df3bcd 100644 --- a/AlgebraicDataflowArchitectureModel/src/tests/ParseTest.java +++ b/AlgebraicDataflowArchitectureModel/src/tests/ParseTest.java @@ -13,6 +13,7 @@ import models.dataConstraintModel.ChannelGenerator; import models.dataConstraintModel.ChannelMember; import models.dataFlowModel.*; +import parser.ExpectedAssignment; import parser.ExpectedChannel; import parser.ExpectedChannelName; import parser.ExpectedEquals; @@ -53,7 +54,7 @@ | ExpectedStateTransition | ExpectedEquals | ExpectedRHSExpression | WrongLHSExpression | WrongRHSExpression | ExpectedRightBracket | ParameterizedIdentifierIsFutureWork | ResolvingMultipleDefinitionIsFutureWork | InvalidMessage - | UnificationFailed | ValueUndefined e) { + | UnificationFailed | ValueUndefined | ExpectedAssignment e) { e.printStackTrace(); } } catch (FileNotFoundException e) { diff --git a/AlgebraicDataflowArchitectureModel/src/tests/UpdateConflictCheckTest.java b/AlgebraicDataflowArchitectureModel/src/tests/UpdateConflictCheckTest.java index 5ad03af..3b80d63 100644 --- a/AlgebraicDataflowArchitectureModel/src/tests/UpdateConflictCheckTest.java +++ b/AlgebraicDataflowArchitectureModel/src/tests/UpdateConflictCheckTest.java @@ -7,6 +7,7 @@ import algorithms.*; import models.dataFlowModel.DataFlowModel; +import parser.ExpectedAssignment; import parser.ExpectedChannel; import parser.ExpectedChannelName; import parser.ExpectedEquals; @@ -57,6 +58,9 @@ } catch (WrongRHSExpression e) { // TODO Auto-generated catch block e.printStackTrace(); + } catch (ExpectedAssignment e) { + // TODO Auto-generated catch block + e.printStackTrace(); } } catch (FileNotFoundException e) { e.printStackTrace();