Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / University of California, Irvine ICS 141 CHAPTER 1

University of California, Irvine ICS 141 CHAPTER 1

Communications

University of California, Irvine

ICS 141

CHAPTER 1.8

1)Errors in a computer program can be classified according to when they are detected and, if they are detected at compile time, what part of the compiler detects them. Using your favorite imperative language, give an example of each of the following:

  1. Consider again the Pascal tool set. After successfully building a machine language version of the Pascal compiler, one could in principle discard the P-code interpreter and the P-code version of the compiler. Why might one choose not to do so?
  2. Imperative languages like Fortran and C are typically compiled, while scripting languages (in which many issues can’t be settled until run time) are typically interpreted. Is interpretation simply what one “has to do” when compilation is infeasible, or are there advantages to interpreting a language, even when a compiler is available?
  3. Consider the gcd program. Does this particular example (look in the book to see it) compute the same result? If not, can you fix it? Under what circumstance would you expect one or the other to be faster?

 

  1. Both interpretation and code generation can be performed by a traversal of a syntax tree. Compare these two kinds of traversals. In what ways are they similar/different?

 

  1. In your local implementation of C, what is the limit on the size of integers? What happens during arithmetic overflow? What are the implications of size limits on the portability of programs from one machine/compiler to another? How does this differ from other languages?

 

  1. The Unix make utility allows the programmer to specify dependencies among the separately compiled pieces of a program. If file A depends on file B and file B is modified, make decides that A must be recompiled, in case any of the changes to B would affect the code produced for A. How accurate is this sort of dependence management? Under what circumstances will it lead to unnecessary work? Under what circumstances will it fail to recompile something that needs to be recompiled?

 

 

  1. Why is it difficult to tell whether a program is correct? How do you go about finding bugs in your code? What kinds of bugs are revealed by testing? What kinds of bugs are not?

 

Option 1

Low Cost Option
Download this past answer in few clicks

2.83 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions