PROGRAMMING LANGUAGES

DEPARTMENT OF COMPUTER SCIENCE
UNIVERSITY OF CALABAR
FIRST SEMESTER OPEN-BOOK/TAKE-HOME TEST, PGD-2014/2015 SESSION (27th July, 2015)
CSC 501- ORGANISATION OF PROGRAMMING LANGUAGES
TIME: 2 WEEKS (SUBMISSION DUE DATE: MON, 10th Aug, 2015)
INSTRUCTION: ANSWER ANY TWO QUESTIONS FROM EACH SECTION
(HINT: These questions are as extracted from the work of, Understanding Programming Languages, by M. Ben-Ari)
SECTION A
1. Describe how to implement a compiler for a language in the same language (“bootstrap- ping”).
2. Invent a syntax for an APL-like matrix-based language that uses ordinary characters.
3. Write a list of interesting operations on strings and compare your list with the predefined operations of SNOBOL and Icon.
4. Write a list of interesting operations on sets and compare your list with the predefined operations of SETL.
5. Simulate a (universal) Turing machine in several programming languages.
SECTION B
1. Translate (part of) the BNF syntax of C or Ada into syntax diagrams.
2. Write a program in Pascal or C that compiles and executes, but computes the wrong answer because of a comment that was
not closed.
3. Even if Ada used the style of comments used in C and Pascal, bugs caused by not closing comments would be less frequent.
Why?
4. In most languages, keywords like begin and while are reserved and may not be used as identifiers. Other languages like
FORTRAN and PL/I do not have reserved keywords. What are the advantages and disadvantages of reserved words?
SECTION C
1. Study your compiler’s documentation and list the optimizations that it performs. Write programs and check the resulting object
code for the optimizations.
2. What information does the debugger need from the compiler and linker?
3. Run a profiler and study how it works.
4. How can you write your own simple testing tool? What influence does automated testing have on program design?
5. AdaS is an interpreter for a subset of Ada written in Pascal. It works by compiling the source into P-Code and then executing
the P-Code. Study the AdaS program and write a description of the P-Code machine.
SECTION D
1. Read your compiler documentation and list the precisions used for the different integer types.
2. Write 200 + 55 = 255 and 100 −150 = −50 in two’s complement nota

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency

Order your paper today and save 10% with the discount code HDCOVID10