cp -R /class/sce/now/222/labs/lab03/Lab03/ .
cd Lab03
submit c222?? lab3 CT/Partial_Map/Kernel_2.hIf you get an error message rather than a confirmation of success, please read the message; it contains useful information! Do not just run the same command again. Save the e-mail you get as a receipt of submission, just in case.
The Initialize operation is a new one. Its purpose is to construct the representation for an initial value of a Partial_Map object (which is an empty set). Initialize is an operation that you never call explicitly; all calls to it are inserted automatically by the C++ compiler at the appropriate places. But for this case, unlike previous examples of kernel implementations, you do have to write a body for it. The reason is that before Initialize executes, C++ has automatically initialized, to their respective initial values, the fields of the Representation record. If automatic initialization of these fields happens to result in the representation of an initial value of the type being implemented then you don't need to write any code for Initialize. That has been the situation in the previous implementation examples you've done. But here, the representation of an empty Partial_Map object must have the bounds of the Array field (called hash_table) set to 0 and hash_table_size-1, respectively; by default they are initially 1 and 0. Therefore, you need to put (only) the following code into the body of Initialize:
self[hash_table].Set_Bounds (0, hash_table_size-1);