Vous êtes sur la page 1sur 2

CSCE 1102 Fall 2019

Lab 1 – Exercise 3
Assigned: Tuesday September 23, 2019 in Lab

Due: Saturday September 28th at 11:55 pm


Delayed submission with penalty until Monday, September 30th at 11:55pm.

Goals
The goal of this lab exercise is to work with functions with their different types
and observe how the compiler generate their corresponding assembly
representation as well as how the preprocessor work with compiler directives.

Details
This lab exercise is an individual exercise that you need to carry out on your own.
During the lab, the instructor will explain some shell commands that you will need
to be able to carry out the lab. All the tasks will be done through a terminal
command line so you need to launch a terminal from the taskbar if you do not have
one opened already.

The follow are the major tasks you need to perform:
1. In this exercise we will work on the 4 directories function_overhead,
inline_functions, preprocessor, and static_functions.
2. You should already have created empty make files and directories in the
previous exercise.
3. Write the make file to compile the source files inside the inline_functions
directory.
1. Read the documentation in the cpp files and make sure you use the
appropriate compiler switches whenever needed.
2. Inspect assembly files generated by the build process and identify
which functions were inlined and which are not.
3. Modify macros_inline such that the parameterized macro works
correctly.
4. Write the make file to compile the source files inside the static_functions
directory and fix the code so it compile and execute.
5. Write the make file to compile the source files inside the
preprocessor_functions directory.
1. use the correct compiler options to make the 2 cpp files execute
exactly the same.
2. Verify that the preprocessed files generated from the 2 cpp files are
the same.
6. Write the make file to compile the source files inside the
function_overhead directory:
1. Modify the assembly file such that you remove the overhead
generated by the compiler.
2. Continue the assembling and the build process from the modified
assembly file.
3. The resulting program should exactly run the same way as the one
produced from the assembly code generated by the compiler.
4. You make file should be designed in a way that it allows executing the
build commands one by one and start from any build stage needed.

What to submit
1. Use tar to build an archive of both directories function_overhead,
inline_functions, preprocessor, and static_functions.
2. A small readme file explaining how to use your make files to compile the
programs and how to recreate the steps you did.
3. A PDF report explaining the tasks you have done in this exercise and
revealing the level of your understanding you have after performing the
exercise.

How to submit:
Compress all your work: source code, report, readme file, and any extra
information into a zip archive. You should name your archive in the specific format
<Student_ID>_<Name>_Lab1_Exercise_3.zip. Finally, upload your code to
blackboard.

Grade
This Lab exercise is worth 2 % of the overall course grade. The exercise will be
graded on a 100% grade scale, and then will be scaled down to the 2% its worth.
The grading of the assignment will be broken down as follows:
1. 10 % for just submitting a meaningful assignment before or on the due
date. This 10% does not account for the correctness of your assignment
but submitting an empty assignment without code will definitely results
in losing this 10% and consequently the whole grade of this assignment.
2. 70 % for the correctness and the quality of the submitted code and make
files.
3. 10 % PDF Report.
4. 10 % readme file.
Delays
You have up to 2 working days of delay, after which the assignment will not be
accepted and your grade in that case will be ZERO. For every day (of the 2 allowed
days), a penalty of 10% will be deducted from the grade. And of course you will
lose the 10% mentioned in point 1 above under the “Grade” section.

Vous aimerez peut-être aussi