Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2.1. What are the differences between a compiler and an interpreter? Give exampl

ID: 662332 • Letter: 2

Question

2.1. What are the differences between a compiler and an interpreter? Give examples of each and specific languages/environments for each.

A) Internally, does NVIDIA CUDA effectively use a compiler or an interpreter for many situations? Consider the cases in which the same CUDA source program is used for different compute capability GPUs. ?

B) Two major issues with any software system are portability and reuse. What do each of these terms mean? Give examples of each.

c). Why are each of these concepts important to software systems?

Explanation / Answer

2.1
A compiler scans a complete program and translates it whole into machine code.
An interpretor reads the program one statement at a time, and completes that statement as machine code.

Examples of compiler:
C, C++
Examples of interpretor:
Python, Perl

A)
Cuda uses a compiler, compiled through a PathScale Open64 C compiler

B & C)
Portability means ability to use of the same software in different environments. It is useful because it saves us from the extra effort to write the code of the same software for a different environment.

Software reuse means using an existing software to build a new software. The importance of software reuse is that by reusing code while moving to the next-generation platform, corporations can leverage their existing software investment and lessen time to market.