1 package edu.berkeley.fleet;
3 import edu.berkeley.sbp.*;
4 import edu.berkeley.sbp.chr.*;
5 import edu.berkeley.sbp.misc.*;
6 import edu.berkeley.sbp.meta.*;
7 import edu.berkeley.sbp.bind.*;
8 import edu.berkeley.sbp.util.*;
14 /** some "halt ship" can turn this on to stop the interpreter */
15 public boolean halt = false;
17 public int[] mem = new int[0];
18 public ArrayList<String> imports = new ArrayList<String>();
20 public HashMap<String,Ship> ships = new HashMap<String,Ship>();
24 for(Ship ship : ships.values())
28 public Ship.Inbox getInbox(String ship, String port) {
29 Ship s = ships.get(ship);
30 if (s == null) throw new RuntimeException("unknown ship \""+ship+"\"");
31 Ship.Inbox ret = s.inboxes.get(port);
32 if (ret == null) throw new RuntimeException("unknown port \""+ship+"."+port+"\"");
36 public Ship.Outbox getOutbox(String ship, String port) {
37 Ship s = ships.get(ship);
38 if (s == null) throw new RuntimeException("unknown ship \""+ship+"\"");
39 Ship.Outbox ret = s.outboxes.get(port);
40 if (ret == null) throw new RuntimeException("unknown port \""+ship+"."+port+"\"");