diff --git a/AlgebraicDataflowArchitectureModel/models/GroupChat.model b/AlgebraicDataflowArchitectureModel/models/GroupChat.model index 634ddf0..1203e1a 100644 --- a/AlgebraicDataflowArchitectureModel/models/GroupChat.model +++ b/AlgebraicDataflowArchitectureModel/models/GroupChat.model @@ -22,6 +22,6 @@ in groups.{gid}.messages(prevMesList, notify(m)) = mesList for EachMember(mno:Int) { ref groups.{gid}.members.{mno}(m.{mno}:Str, notify(m)) - out accounts.{m.{mno}}.notifications(prevNtMap:Map, notify(m)) = insert(prevNtMap, gid, true) + out accounts.{m.{mno}:Str}.notifications(prevNtMap:Map, notify(m)) = insert(prevNtMap, gid, true) } } diff --git a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/ResourcePath.java b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/ResourcePath.java index 293d148..c1125f1 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/ResourcePath.java +++ b/AlgebraicDataflowArchitectureModel/src/models/dataConstraintModel/ResourcePath.java @@ -175,6 +175,15 @@ return curPath; } + public boolean isAncestorOf(ResourcePath another) { + Set ancestors = new HashSet<>(); + while (another != null) { + ancestors.add(another); + another = another.getParent(); + } + return ancestors.contains(this); + } + public String toString() { return resourceHierarchy.toString(pathParams); } diff --git a/AlgebraicDataflowArchitectureModel/src/models/dataFlowModel/ResourceNode.java b/AlgebraicDataflowArchitectureModel/src/models/dataFlowModel/ResourceNode.java index d382534..8dea216 100644 --- a/AlgebraicDataflowArchitectureModel/src/models/dataFlowModel/ResourceNode.java +++ b/AlgebraicDataflowArchitectureModel/src/models/dataFlowModel/ResourceNode.java @@ -136,6 +136,10 @@ return inSide.get(channel); } + public Set getInSideChannels() { + return inSide.keySet(); + } + public Collection getOutSideResources() { return outSide.values(); } @@ -144,7 +148,7 @@ return outSide.get(channel); } - public Set getOutSideChannel() { + public Set getOutSideChannels() { return outSide.keySet(); }