Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Part A-

1. What arguments can you make for the idea of a single programming language for all programming domains?

It would be ideal to have a single programming language for all

2. What arguments can you make against the idea of a single programming language for all programming domains?

3. What are the arguments for writing efficient programs even though hardware is relatively inexpensive?

4. Describe some design trade-offs between efficiency and safety in some language you know.

Part B-

1. Which of the three original goals of ALGOL design committee, in your opinion, was the most difficult to achieve at that time?

2. Make an educated guess as to the most common syntax error in Lisp programs.

3. Describe, in your own words, the concept of orthogonality in programming language design.

4. What are the arguments both for and against the idea of typeless language?

5. What is your opinion of the argument that languages that are too complex are too dangerous to use, and we should therefore keep all languages small and simple?

6. Why, in your opinion, do new scripting languages appear more frequently than new compiled languages?

Part C - Programming exercise

1. To understand the value of records in a programming language, write a small program in a C-based language that uses an array of structs that store student information, including name, age GPA as a float and a grade level as a string (e.g., "freshmen" etc). Also, write the same program in the same language without structs

2. To understand the value of recursion in a programming language, write a program that implements quicksort, first using recursion and then without recursion

Chapter 3

1. Us the grammar in example 3.2, show a parse tree and a leftmost derivation for each of the following statements

a. A = A * (B + (C * A))

b. B = C * (A * C + B)

c. A = A * (B + (C) )

2. Prove that the following grammar is ambiguous

a. ->

b. -> + |

c. -> a|b|c

3. Describe, in English, the language defined by the following grammar:

a. ->

-> a | a

-> b |b

-> c | c

4. Consider the following grammar:

a. -> a b

-> b | b

-> a | a

Which of the following sentences are in the language generated by this grammar?

a. baab

b. bbbab

c. bbaaaaaS

d. bbaab

5. Write a grammar for the language consisting of strings that have n copies of the letter a followed by the same number of copies of the letter b, where n > 0. For example, the strings ab, aaaabbbb, and aaaaaaaabbbbbbbb are in the language but a, abb,ba and aaabb are NOT.

6. Compute the weakest precondition for each of the following assignment statements and postconditions:

a. A = 2 * (b -1) - 1 {a > 0}

b. B = (c + 10) / 3 {b > 6}

c. A = a + 2 * b - 1 {a > 1}

d. X = 2 * y + x - 1 {x > 11}

Part D-

1. Perform the pairwise disjointness test for the following grammar rules.

a. A -> aB |b |cBB

b. B -> aB |bA| aBb

c. C -> aaA |b | caB

2. Perform the pairwise disjointness test for the following grammar rules.

a. S -> aSb | bAA

b. A -> b{aB} | a

c. B -> aB | a

3. Show a trace of the recursive decent parser given in Section 4.4.1 for the string a + b * c.

4. Show a trace of the recursive decent parser given in Section 4.4.1 for the string a * (b + c)

Part E- Programming excersises:

1. Design a state diagram to recognize the floating-point literals of your favorite programming language.

2. Write and test the code to implement the state diagram of problem 2.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91974460

Have any Question?


Related Questions in Programming Language

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As