-
Notifications
You must be signed in to change notification settings - Fork 0
natemwilson/interactive_unix_shell
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Assignment 7 readme File ------------------------------------------------------------------------ What is your name? Nate Wilson ------------------------------------------------------------------------ What authorized sources of information did you use to complete the assignment? COPY THE LIST of authorized sources of information given in the "Policies" web page to this section of the readme file, and edit it as appropriate. The course's lectures. - Helpful for understanding the many system calls we were making. The course's precepts. - Absolutely essential. The course's website. - Used. Documents that are referenced directly by the course's website. Such documents include the course's lecture slides and precept handouts. - Used The course's textbooks. - Used The man pages on the CourseLab cluster. - Very useful for this assignment. The course's current staff members outside of class time through office hours. - Dr Dondero was very helpful at office hours as always. The course's current staff members outside of class time through meetings. - Not used. The course's current staff members outside of class time through Piazza. - Dr. Dondero's posts on piazza were essential as always. The course's current staff members outside of class time through e-mail. - Not used. Current lab teaching assistants through visits to the course labs. - Not used. ------------------------------------------------------------------------ What unauthorized sources of information did you use to complete the assignment? List any unauthorized sources of information that you used to complete the assignment, and describe how you used them. The course "Policies" web page defines unauthorized sources of information, and any source that you have used but not listed in the authorized sources should be included here. Please note that using an unauthorized source may trigger a course penalty, and depending on the nature of the interaction, may additionally require the interaction being reported to the Committee on Discipline. Write "None" if you used no unauthorized sources of information. None ------------------------------------------------------------------------ What is your assessment of the assignment? Was it helpful? Was it fun? I liked this one a lot. It was actually a lot easier than I expected it to be after learning about it in precepts. ------------------------------------------------------------------------ (optional) What information can you provide about your submission that will help your grader to grade it in the most favorable light? In particular, what bugs are in your submission? No known bugs. I did not attempt the extra challenge. ------------------------------------------------------------------------ What warnings does splint generate on your code, and what are your disagreements with them? Copy the splint warnings here, and express your disagreement after each warning. If there are no warnings, then write "None." $ splint ish.c lex.c dynarray.c command.c token.c Splint 3.1.2 --- 08 Jul 2016 ish.c: (in function ish_handleBuiltIn) ish.c:195:10: Unrecognized identifier: setenv Identifier used in code has not been declared. (Use -unrecog to inhibit warning) ish.c:223:10: Unrecognized identifier: unsetenv These two warning were addressed on piazza -- splint doesn't parse some Linux-specific .h files properly, but the warnings are innocuous and unavoidable. No other splint errors generated by ishsyn and ishlex. ------------------------------------------------------------------------ What warnings does critTer generate on your code, and what are your disagreements with them? Copy the splint warnings here, and express your disagreement after each warning. If there are no warnings, then write "None." $ critTer command.c Checking command.c command.c: line 191: low priority: A loop should consist of fewer than 35 lines; this loop consists of 55 lines; consider refactoring - This loop does a lot that must be error checked, and has lots of comments, artificially expanding the length. In reality it do. command.c: line 206: low priority: This area is deeply nested at level 4, consider refactoring - I think that in this case, where the logic is quite simple, the nesting makes things clearer. Because of the nesting, it is obvious that only in the strict case that both the current token and the next token are special, should we throw this specific error and return NULL. Also the deepest level of nesting here is the error checking, again not something that is logically complex at all. command.c: line 218: low priority: This area is deeply nested at level 4, consider refactoring - Same as previous answer. $ critTer lex.c Checking lex.c lex.c: line 199: low priority: A loop should consist of fewer than 35 lines; this loop consists of 151 lines; consider refactoring - I used a dfa approach, which naturally results in many more lines than a simple function. I also have a tendency to write NOT compact code in favor of clear code. All these factors gave good reason for this function to be much larger than a normal function should be. lex.c: line 156: low priority: A function should consist of fewer than 140 lines; this function consists of 192 lines; consider refactoring - Same as previous answer. lex.c: line 156: low priority: This function definition probably needs more local comments - The dfa is explicitly documented in setup, but self-documenting in the actual loop, where critTer likely sees lots of lines and not lots of comments. $ critTer ish.c Checking ish.c ish.c: line 300: low priority: This area is deeply nested at level 4, consider refactoring ish.c: line 304: low priority: This area is deeply nested at level 4, consider refactoring ish.c: line 307: low priority: This area is deeply nested at level 5, consider refactoring ish.c: line 312: low priority: This area is deeply nested at level 4, consider refactoring - Lots of error checking and my overly clear coding style have lead me this loop with a lot of nesting, but I think it is still well documented, clear, and has an intuitive logic. No other critTer warnings generated by any other submitted c files. ------------------------------------------------------------------------
About
a simple unix shell
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published