+ ((HashMap)all_states).put(hs, this);
+
+ for(Position p : hs) {
+ if (!p.isFirst()) continue;
+ for(Sequence s : p.owner().needs()) {
+ if (hs.contains(s.firstp())) continue;
+ HashSet<Position> h2 = new HashSet<Position>();
+ reachable(s.firstp(), h2);
+ also.add((State<Token>)(all_states.get(h2) == null ? (State)new State<Token>(h2,true) : (State)all_states.get(h2)));
+ }
+ for(Sequence s : p.owner().hates()) {
+ if (hs.contains(s.firstp())) continue;
+ HashSet<Position> h2 = new HashSet<Position>();
+ reachable(s, h2);
+ also.add((State<Token>)(all_states.get(h2) == null ? (State)new State<Token>(h2,true) : (State)all_states.get(h2)));
+ }
+ }