| |
---|
| | |
---|
| | import java.util.*; |
---|
| | |
---|
| | import models.*; |
---|
| | import models.dataConstraintModel.ChannelGenerator; |
---|
| | import models.dataConstraintModel.ChannelMember; |
---|
| | import models.dataConstraintModel.IdentifierTemplate; |
---|
| | import models.dataFlowModel.DataFlowModel; |
---|
| | import models.dataFlowModel.DataflowChannelGenerator; |
---|
| | import models.dataConstraintModel.*; |
---|
| | import models.dataFlowModel.*; |
---|
| | |
---|
| | public class UpdateConflictCheck { |
---|
| | private int index = 0; |
---|
| | private Deque<Node> stack = new ArrayDeque<>(); |
---|
| | private Set<Set<Node>> strong = new HashSet<>(); |
---|
| | private Map<Node, Integer> ids = new HashMap<>(); |
---|
| | private Map<Node, Integer> lowlink = new HashMap<>(); |
---|
| | private Map<Node, Boolean> onStack = new HashMap<>(); |
---|
| | private static int index = 0; |
---|
| | private static Deque<Node> stack = new ArrayDeque<>(); |
---|
| | private static Set<Set<Node>> strong = new HashSet<>(); |
---|
| | private static Map<Node, Integer> ids = new HashMap<>(); |
---|
| | private static Map<Node, Integer> lowlink = new HashMap<>(); |
---|
| | private static Map<Node, Boolean> onStack = new HashMap<>(); |
---|
| | |
---|
| | private void init() { |
---|
| | static private void init() { |
---|
| | index = 0; |
---|
| | stack = new ArrayDeque<>(); |
---|
| | strong = new HashSet<>(); |
---|
| | ids = new HashMap<>(); |
---|
| | lowlink = new HashMap<>(); |
---|
| | onStack = new HashMap<>(); |
---|
| | } |
---|
| | |
---|
| | private void strongconnect(Node node) { |
---|
| | static private void strongconnect(Node node) { |
---|
| | ids.put(node, index); |
---|
| | lowlink.put(node, index); |
---|
| | index++; |
---|
| | stack.push(node); |
---|
| |
---|
| | strong.add(tmp); |
---|
| | } |
---|
| | } |
---|
| | |
---|
| | public boolean run(DataFlowModel model) { |
---|
| | static public boolean run(DataFlowModel model) { |
---|
| | init(); |
---|
| | boolean check = true; |
---|
| | for (Node node : model.getResourceDependencyGraph().getNodes()) { |
---|
| | if (ids.containsKey(node)) { |
---|
| |
---|
| | |