diff --git a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java index 0260695..1f40b68 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java +++ b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/DataConstraintModel.java @@ -36,35 +36,6 @@ public static final Symbol cons = new Symbol("cons", 2, Symbol.Type.PREFIX, "($x,$y)->$x.add(0, $y)", Symbol.Type.LAMBDA_WITH_SIDE_EFFECT, new int[] {1, 0}); public static final Symbol head = new Symbol("head", 1, Symbol.Type.PREFIX, "($x)->$x.get(0)", Symbol.Type.LAMBDA); public static final Symbol tail = new Symbol("tail", 1, Symbol.Type.PREFIX, "($x)->$x.subList(1, $x.size())", Symbol.Type.LAMBDA); -// public static final Symbol extractFaceDown = new Symbol("extractFaceDown", 1, Symbol.Type.PREFIX, new Symbol.IImplGenerator() { -// @Override -// public String generate(Type type, String[] children, String[] childrenSideEffects, String[] sideEffect) { -// return children[0]+".stream().filter(item -> item.getValue()==false).collect(Collectors.toList())"; -// } -// }); -// public static final Symbol sortByKey = new Symbol("sortByKey", 1, Symbol.Type.PREFIX, new Symbol.IImplGenerator() { -// @Override -// public String generate(Type type, String[] children, String[] childrenSideEffects, String[] sideEffect) { -// String compType = ""; -// String temp_sort="temp_sort"; -// if (type != null) { -// String interfaceType = type.getInterfaceTypeName(); -// if (interfaceType.contains("<")) { -// compType = interfaceType.substring(interfaceType.indexOf("<") + 1, interfaceType.lastIndexOf(">")); -// } -// String implType = type.getImplementationTypeName(); -// if (implType.indexOf('<') >= 0) { -// implType = implType.substring(0, implType.indexOf('<')); -// } -// -// } -// for (String s: childrenSideEffects) { -// sideEffect[0] += s; -// } -// temp_sort=children[0]+".sort(Comparator.comparing("+compType+"::getKey));\n"; -// return temp_sort; -// } -// },true); public static final Symbol length = new Symbol("length", 1, Symbol.Type.PREFIX, "($x)->$x.size()", Symbol.Type.LAMBDA); public static final Symbol get = new Symbol("get", 2, Symbol.Type.PREFIX, "get", Symbol.Type.METHOD); public static final Symbol set = new Symbol("set", 3, Symbol.Type.PREFIX, "set", Symbol.Type.METHOD_WITH_SIDE_EFFECT); @@ -183,8 +154,6 @@ cons.setInverses(new Symbol[] {head, tail}); cons.setSignature(new Type[] {typeList, null, typeList}); contains.setSignature(new Type[] {typeBoolean, typeList, null}); - //extractFaceDown.setSignature(new Type[] {typeList, null}); - //sortByKey.setSignature(new Type[] {typeList, typeList}); length.setSignature(new Type[] {typeInt, null}); get.setSignature(new Type[] {null, typeList, typeInt}); set.setSignature(new Type[] {typeList, typeList, typeInt, null}); @@ -237,9 +206,7 @@ addSymbol(cons); addSymbol(head); addSymbol(tail); - //addSymbol(extractFaceDown); addSymbol(length); - //addSymbol(sortByKey); addSymbol(contains); addSymbol(get); addSymbol(set);