This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2017:discrete:projects:pnc0 [2017/08/30 17:34] – [Full Verification Compliance] wedge | haas:fall2017:discrete:projects:pnc0 [2017/10/15 21:11] (current) – [Programs] wedge | ||
---|---|---|---|
Line 3: | Line 3: | ||
< | < | ||
</ | </ | ||
- | |||
- | ~~TOC~~ | ||
======Project: | ======Project: | ||
Line 230: | Line 228: | ||
It is your task to write the following prime number variants: | It is your task to write the following prime number variants: | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
====Program Specifications==== | ====Program Specifications==== | ||
Line 359: | Line 357: | ||
Just another "nice thing" we deserve. | Just another "nice thing" we deserve. | ||
=====Command-Line Arguments===== | =====Command-Line Arguments===== | ||
- | To automate our comparisons, | + | To automate our comparisons, |
====header files==== | ====header files==== | ||
Line 377: | Line 375: | ||
int main(int argc, char **argv) | int main(int argc, char **argv) | ||
</ | </ | ||
+ | |||
+ | There are two very important variables involved here (the types are actually what are important, the names given to the variables are actually quite, variable; you may see other references refer to them as things like " | ||
+ | |||
+ | * int argc: the count (an integer) of tokens given on the command line (program name + arguments) | ||
+ | * < | ||
The arguments are accessible via the argv array, in the order they were specified: | The arguments are accessible via the argv array, in the order they were specified: | ||
Line 385: | Line 388: | ||
* argv[3]: conditionally optional; represents lower bound | * argv[3]: conditionally optional; represents lower bound | ||
* argv[4]: conditionally optional; represents upper bound | * argv[4]: conditionally optional; represents upper bound | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | ===example=== | ||
+ | For example, if we were to execute the **primereg** program: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | We'd have: | ||
+ | |||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | |||
+ | and let's not forget: | ||
+ | |||
+ | * argc: 5 | ||
+ | |||
+ | With the conditionally optional arguments as part of the program spec, for a valid execution of the program, argc could be a value anywhere from 3 to 5. | ||
====Simple argument checks==== | ====Simple argument checks==== | ||
Line 797: | Line 823: | ||
====Evaluation Criteria==== | ====Evaluation Criteria==== | ||
- | What I will be looking for: | + | Grand total points: |
< | < | ||
390: | 390: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
</ | </ | ||
+ | |||
+ | What I will be looking for (for each file): | ||
+ | |||
+ | < | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | </ | ||
+ | |||
+ | As the optimizations improve upon others, some evaluations will be based upon differences between a baseline (in some cases, primereg) and the optimization. |