This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:spring2015:data:projects:dll1 [2014/03/23 13:53] – external edit 127.0.0.1 | haas:spring2015:data:projects:dll1 [2015/04/15 18:48] (current) – [Errata] wedge | ||
---|---|---|---|
Line 6: | Line 6: | ||
~~TOC~~ | ~~TOC~~ | ||
- | ======Project: | + | ======Project: |
- | =====Overview===== | + | =====Errata===== |
- | We will be extending our sll2 project in dll1 with the addition of doubly-linked lists, as well as the implementation of the queue data structure (using a doubly linked list). You are also to enhance/ | + | This section |
- | =====Update and Upgrade===== | + | |
- | For this project, you'll update your **sll2** project | + | |
- | ====Step 0. Change into project directory==== | + | =====Objective===== |
- | Change to wherever you copied your code (I'm assuming **~/ | + | In this project, we continue our doubly linked list re-write, completing the remaining library functions. |
- | + | ||
- | < | + | |
- | lab46:~$ cd src/ | + | |
- | lab46: | + | |
- | </ | + | |
- | ====Step 1. Update | + | =====Procedure |
+ | As this project utilizes the code you wrote in dll0, you must upgrade to dll1 from dll0 (same thing that we did to transition between the sll* projects): | ||
<cli> | <cli> | ||
- | lab46: | + | lab46: |
... | ... | ||
</ | </ | ||
- | ====Step 2. Upgrade to dll1 project (copies over your code)==== | + | =====Project Overview===== |
- | < | + | |
- | lab46: | + | |
- | ... | + | |
- | </ | + | |
- | ====Step 3. Change into dll1 directory==== | + | As we started with the last project, we're implementing the remaining functions of our new doubly linked list implementation. |
- | < | + | As such, new function prototypes have been added to the list.h header file: |
- | lab46: | + | |
- | lab46:~/ | + | |
- | </ | + | |
- | =====Layout===== | + | < |
- | This project codebase is largely identical to the sll2 codebase; it merely adds the new files for the doubly linked | + | unsigned char rmlist (List **); // deallocate empty list |
- | * inc - queue.h header and updated node.h header | + | unsigned char obtain (List **, Node **); // obtain/ |
- | | + | |
- | | + | |
- | =====Queues===== | + | unsigned char compare(List *, List *, long int *); // compare |
- | Queues are frequently considered a peer to the stack data structure, in that the two share many common traits | + | unsigned char empty |
- | It works on a principle of " | + | unsigned char sort (List **, char); |
+ | unsigned char swap (List **, Node *, Node *); // swap positions of given nodes in list | ||
+ | </ | ||
- | Everyone | + | These functions will also make use of the status/ |
+ | ====list operation status codes==== | ||
+ | You'll notice | ||
- | So, with a queue, we only add to the back, and take off from the front. No other aspect of the linked list is modified or accessed under the guise of a queue. This restriction of access creates new possibilities for algorithms, enabling useful functionality. | + | They are not exclusive- in some cases, multiple states can be applied. The intent is that you will OR together all pertinent states |
- | The basic queue operations are: **enqueue()** and **dequeue()** which will call the necessary underlying list operations (likely | + | |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | The queue has a **buffer** variable, which unlike | + | For example, in the case of " |
+ | | ||
+ | | ||
+ | | ||
- | To further test your understanding, | + | ALL THREE states must be returned from the function in question should such an occurrence take place. |
+ | ====list library==== | ||
+ | In **src/list/**, you will find the addition of a new set of skeletons of the above prototyped functions, hollowed out in anticipation of being made operational. | ||
- | =====Errata===== | + | Figure out what is going on, the connections, |
- | ====03/ | + | |
- | * **Update 1**: The issue with stacktest.c would also exist in queuetest.c, | + | |
- | * An attempt to standardize replaced files has been started- any replaced files will be renamed with a **.rev-PREVIOUSREV** extension. So going from rev 0 to rev 1, should now end with **.rev-0** | + | |
- | =====Submission===== | + | |
- | To successfully complete this project, the following criteria must be met: | + | |
- | * All code must compile cleanly (no warnings or errors) | + | Be sure to focus on implementing the functionality from scratch |
- | * Code must be nicely and consistently indented | + | |
- | * Code must be commented | + | |
- | * Resulting libraries must be operational and functionally correct | + | |
- | * stack functions must operate as described, conforming to provided function prototypes | + | |
- | * code must make use of the other node/list functions as appropriate- do not reinvent the wheel | + | |
- | * evaluations of libraries using various unit tests will be an assessment criteria | + | |
- | * Track/ | + | |
- | * Submit a copy of your source code to me using the **submit** tool (or **make submit**). | + | |
- | To submit this program to me using the base Makefile, run the following command at your lab46 prompt: | + | ====List library unit tests==== |
+ | In **testing/ | ||
- | <cli> | + | * **unit-rmlist.c** - unit test for **rmlist()** library function |
- | lab46: | + | * **unit-obtain.c** - unit test for **obtain()** library function |
- | ... | + | * **unit-compare.c** - unit test for **compare()** library function |
- | Submitting data project " | + | * **unit-empty.c** - unit test for **empty()** library function |
- | | + | * **unit-sort.c** |
+ | * **unit-swap.c** - unit test for **swap()** library function | ||
- | SUCCESSFULLY SUBMITTED | + | Enhancements to these unit tests may be provided via dll1 project updates. |
- | </cli> | + | |
+ | There are also corresponding **verify-FUNCTION.sh** scripts that will output a " | ||
- | You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. | + | These are complete runnable programs (when compiled, and linked against the list library, which is all handled for you by the **Makefile** system in place). |
- | ====Saving your work==== | + | Of particular importance, I want you to take a close look at: |
- | To submit the project, | + | |
+ | * the source code to each of these unit tests | ||
+ | * the purpose of these programs is to validate the correct functionality of the respective library functions | ||
+ | * follow the logic | ||
+ | * make sure you understand what is going on | ||
+ | * ask questions to get clarification! | ||
+ | * the output from these programs once compiled and ran | ||
+ | * analyze the output | ||
+ | * make sure you understand what is going on | ||
+ | * ask questions to get clarification! | ||
+ | |||
+ | =====Expected Results===== | ||
+ | To assist | ||
+ | |||
+ | ====node library==== | ||
+ | Here is what you should get for node: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46: |
- | ... make save now issues a pre-emptive make clean ... | + | ==================================================== |
- | Archiving the project ... | + | = Verifying Doubly-Linked Node Functionality |
- | Compressing the archive ... | + | ==================================================== |
- | Setting permissions ... | + | |
- | lab46:~/ | + | |
- | lab46:~/src/data$ ls dll1*gz | + | |
- | dll2-20140412-14.tar.gz | + | ==================================================== |
- | lab46: | + | |
+ | ==================================================== | ||
+ | lab46: | ||
</ | </ | ||
+ | There were no changes required to the node library between dll0 and dll1, so once you achieved a working implementation, | ||
+ | ====list library==== | ||
+ | Here is what you should get for list: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | ==================================================== | ||
+ | = Verifying Doubly-Linked List Functionality | ||
+ | ==================================================== | ||
+ | [mklist] Total: | ||
+ | [cplist] Total: | ||
+ | [append] Total: | ||
+ | [insert] Total: | ||
+ | | ||
+ | [find] Total: | ||
+ | | ||
+ | | ||
+ | [rmlist] Total: | ||
+ | [obtain] Total: | ||
+ | [swap] Total: | ||
+ | [sort] Total: | ||
+ | ==================================================== | ||
+ | | ||
+ | ==================================================== | ||
+ | lab46: | ||
+ | </ | ||
+ | =====Submission Criteria===== | ||
+ | To be successful in this project, the following criteria must be met: | ||
+ | |||
+ | * Project must be submit on time, by the posted deadline. | ||
+ | * Late submissions will lose 25% credit per day, with the submission window closing on the 4th day following the deadline. | ||
+ | * All code must compile cleanly (no warnings or errors) | ||
+ | * all requested functions must be implemented in the related library | ||
+ | * all requested functionality must conform to stated requirements (either on this project page or in comment banner in source code files themselves). | ||
+ | * Executed programs must display in a manner similar to provided output | ||
+ | * output formatted, where applicable, must match that of project requirements | ||
+ | * Processing must be correct based on input given and output requested | ||
+ | * Output must be correct (i.e. the list visualization, | ||
+ | * Code must be nicely and consistently indented (you may use the **indent** tool) | ||
+ | * Code must be commented | ||
+ | * Any "to be implemented" | ||
+ | * these "to be implemented" | ||
+ | * Sufficient comments explaining the point of provided logic **MUST** be present | ||
+ | * Track/ | ||
+ | * Submit a copy of your source code to me using the **submit** tool (**make submit** will do this) by the deadline. |