[an error occurred while processing this directive]
class CPrimitiveType(CType): def __init__(self, s): self._name = s def __str__(self): return self._name def isPrimitiveType(self): return True def matches(self, other): return other.isPrimitiveType() \ and ________________________
class CProcedureType(CType): def __init__(self, args, rettype): self._args = args self._rettype = rettype def __str__(self): return "(" + str(self._args) + " -> " \ + str(self._rettype) + ")" def isProcedureType(self): return True def getReturnType(self): return self._rettype def getParameters(self): return self._args def matches(self, other): return ________________________________ and ___________________________________________ and ___________________________________________
def typecheck(expr, env): if isPrimitive(expr): return typePrimitive(expr) elif isConditional(expr): return typeConditional(expr, env) elif isLambda(expr): return typeLambda(expr, env) elif isDefinition(expr): typeDefinition(expr, env) elif isName(expr): return typeName(expr, env) elif isApplication(expr): return typeApplication(expr, env) else: evalError ("Unknown expression: " + str(expr))
class Environment: # Store a [type, value] pair for each variable. ... def addVariable(self, name, typ, value): self._frame[name] = (typ, value) def lookupPlace(self, name): if self._frame.has_key(name): return self._frame[name] elif (self._parent): return self._parent.lookupPlace(name) else: return None def lookupVariableType(self, name): place = _____________________ if place: return ______________ else: return CErrorType("Name not found") def lookupVariable(self, name): return self.lookupPlace(name)[1] ...
def typeDefinition(expr, env): assert isDefinition(expr) if len(expr) != 5: evalError ("Bad definition: %s" % str(expr)) name = expr[1] if isinstance(name, str): if expr[2] != ':': evalError ("Definition missing type: %s" % str(expr)) typ = CType.fromParsed(expr[3]) etyp = __________________________ if not typ.matches(etyp): evalError("Mistyped definition: ..." % (name, typ, etyp)) elif isinstance(name, list): evalError ("Procedure definition syntax not implemented") else: evalError ("Bad definition: %s" % str(expr))
def typeLambda(expr, env): # error checking code removed newenv = Environment(env) params = expr[1] paramnames = [] paramtypes = [] for i in range(0, len(params) / 3): name = params[i*3] typ = CType.fromParsed(params[(i*3)+2]) paramnames.append(name) paramtypes.append(typ) newenv._________________________________ resulttype = ___________(expr[2], newenv) return CProcedureType(CProductType(paramtypes), resulttype)
Bandwidth: how much data can be transmitted per unit time (bits per second)
You can think of latency as the length of the pipe, and bandwidth as the width of the pipe.
How can we improve latency of a network?
How can we improve bandwidth of a network?
What things you do on the Internet would be better if latency was lower (faster) and bandwidth was reduced?
What things you do on the Internet would be better if latency was higher (slower) and bandwidth was increased?
Is data moving at a faster average speed between your computer and Washington, DC or your computer and Austrailia?
In the next 5 years, do you expect a more noticable improvement in the latency or bandwidth of the Internet?
How close are we to achieving Licklider and Taylor's vision (1968) for the Internet?
Available within the network will be functions and services to which you subscribe on a regular basis and others that you call for when you need them. In the former group will be investment guidance, tax counseling, selective dissemination of information in your field of specialization, announcement of cultural, sport, and entertainment events that fit your interests, etc. In the latter group will be dictionaries, encyclopedias, indexes, catalogues, editing programs, teaching programs, testing programs, programming systems, data bases, and - most important - communication, display, and modeling programs. All these will be - at some late date in the history of networking - systematized and coherent; you will be able to get along in one basic language up to the point at which you choose a specialized language for its power or terseness.