@Override
 public String toString() {
   if (node == null) {
     return "node (not elaborated)";
   } else {
     return "node (" + node.toString() + ")";
   }
 }
 // Connect all input ports to their sources and return all connections formed.
 public List<ConnectionValue> connect()
     throws UndeclaredIdentifierException, UndeclaredAttributeException, InvalidAttributeException,
         TypeMismatchException {
   List<ConnectionValue> connections = new LinkedList<>();
   for (Map.Entry<String, FuturePortValue> e : futureInputPorts.entrySet()) {
     String inputPortName = e.getKey();
     FuturePortValue source = e.getValue();
     PortValue sourcePort = source.getPort();
     PortValue targetPort = node.getPort(inputPortName);
     // TODO connection attributes; for now we assume none
     Map<String, Value> attrs = new HashMap<>();
     ConnectionValue conn = new ConnectionValue(sourcePort, targetPort, attrs);
     connections.add(conn);
   }
   return connections;
 }