Intermediate Programming 600.120 Project 3 --------- 1. Design and develop a repository based on the Super List data structure presented in class. An exact definition of the repository access functions is given in the file repository.h from Project2 (which should not be changed). A Makefile and a program C file for project3 can be based on those from Project2. However, the program should receive as command line arguments its input parameters (see below). You should implement a super list version of the 5 repository access functions that should reside in a new file sl_repository.c : 1. void repository_init() - should initialize the repository. 2. int repository_insert( int key, int data ) - inserts a {key, data} record into the repository, sorted according to the key. Each key should only appear at most once in the repository. The operation should return 1 if the {key, data} record was inserted, return 0 if the record was not inserted (because there was already a record with the same key in the repository), and -1 if the operation had a problem completing correctly. 3. int repository_delete( int key ) - removes a record with the given key from the repository if such exists. The operation should return 1 if such record was removed and 0 if there was no such record in the repository. 4. int repository_get( int key, int *data ) - gets a record with a specific key from the repository and stores its data into the data parameter, if such a record exists. The operation should return 1 if the record was found in the Repository and 0 if the record was not found. 5. void repository_print( int print_elements ) - prints the number of unique records in the repository, the total number of records in each level of the Super List structure, the current number of levels in the Super List, and the number of 'next' steps performed so far (see below). if print_elements is 1, the function should print the list of unique records in the repository. If print_elements is 2, the function should print the list of records in each level of the repository in a way that nicely presents the super list structure (think about how to do this). Otherwise, the function should not print the specific records. A counter should maintain the number of steps performed on the Super list. The counter should be initialized to 0 and should be incremented each time a pointer is set to point to another record in any level of the Super List. This gives an indication of how much effort was spent so far. 1.a Run it with numbers between 1..10, for 1000 operations, printing (print_element = 2 ) every 100 operations. 1.b Run it with numbers between 1..100, for 10,000 operations, printing (print_element = 2 ) every 1000 operations. 1.c Run it with numbers between 1..100, for 1,000,000 operations, printing (print_element = 1 ) every 100,000 operations. 1.d Run it with numbers between 1..1000, for 10,000,000 operations, printing (print_element = 0 ) every 1,000,000 operations. 1.e Run it with numbers between 1..1000, for 100,000,000 operations, printing (print_element = 0 ) every 10,000,000 operations. 1.f Run it with numbers between 1..10000, for 20,000,000 operations, printing (print_element = 0 ) every 2,000,000 operations. 2. Re-run 1.d, 1.e, and 1.f with 5 different seeds 1-5. Include in your document the number of steps in each case and calculate the average number of steps. Please explain the results. 3. In a standard Super List (1.a-1.f, 2) p=50%, the probability used when randomizing level instantiation upon insertion. Re-run 1.d with p=25% and also with p=75% instead. Include the number of steps in each case with 5 different seeds 1-5, calculate the average number of steps. Note: All through this project, you must use the rand100 related functions (see rand100.h) to randomize on the p parameter of the Super List. The Get_next_op function should be the only function that uses the usual rand functions from Projects 1 and 2. This is done to create a separation between the random number streams so that your results for 1.a – 1.b will be similar to those in project1 and project2. Input parameters: The program should receive the following (optional) input parameters, in any order, with the following defaults, as command line parameters: -r with a default of 100 (for numbers between 1..100) -o with a default of 1,000,000 (for the number of operations). -s with a default of 1, for the starting seed. -p with a default of 50. The program should exit after completing the run. Please come to your tutorial with a complete design (10/11 or 10/12). Please try hard to complete implementation of the Super List by Tuesday 10/16. Submission date of a complete project including design document, code, and results is: Monday October 22, 11am. Submission is accomplished by e-mailing a tar file to cs120@cs.jhu.edu. Please do not include executable/object files or cores in your tar (include only the files you want to submit) The development environment and the place where you have to check your program is *only* on the ugrad1-20 machines. We ask that your program can be demonstrated there.