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

12:18 lla Done Attachment 1. List language Evaluation criteria and explain them

ID: 3751635 • Letter: 1

Question

12:18 lla Done Attachment 1. List language Evaluation criteria and explain them (5 points). 2. List language categories and at least one programming language in corresponding category. (5 points) 3. Which language is the first widely used high-level language? What language is the first language designed by international group? (5 points) 4. Show the lexemes and tokens in java statement: number/3-2: (5 points) 5. Explain the meaning of synthesized attributes and inherited attributes. (S points) 6. What is the difference between static semantics and dynamic semantics. (5 points) 7.. Draw a diagram showing the internal representation of the following LISP list: ((A) (BC) D) E) (10 points) 8. Using the following grammar, show a parse tree and a leftmost derivation for the sentence aacccdcce. (10 points) 9. Convert the following EBNF grammar to ordinary BNF: (10 points) (.., and J are metasymbols. 10. Write an Attribute Grammar(AG) whose base BNF is that of following example and whose type rules are the same as for the assignment statement example of Section 345.(20 points) assign> =

Explanation / Answer

1. The most important criteria for judging a programming language are

(1)Readability

The ease with which programs can be read and understood is called readability. The following describecharacteristics that contribute to the readability of a PLa) Simplicity- The language that has large no. of basic components is more difficult is more difficult tolearn than one with a small no of basic components. The language should not have multiplicity of commands. For eg. I = I + 1 ; I + = 1 ;I + + ; + + I . The language should not have operator overloading in which a single operator symbol has more than one meaning b) Orthogonal – It means that a relatively small number of primitive constructs can be combined in anumber of ways to build the program. Orthogonal language is independent of the context of itsappearance in the program.

(2) Writability

The measure of how easily a language can be used to create programs for a chosen problem domain. Thefeatures that affect the readability of a also affect the writability apart from them, the factors thatinfluence writability are( I ) Support for abstraction – process & data abstraction both( II ) Expressivity- The great deal of computation must be accomplished with a very small program

(3) Reliability

A program is said to be reliable if it performs to its specifications under all conditions. Along with allthe features that affect readability and writability there are several other features that affect reliabilitya)Type checking – It is the testing for type errors in a given program either by compiler or during program execution. Runtime checking is expensive.

(4) Cost

The ultimate cost of a programming language is a function of many of its characteristicsa)The cost of training programmers b)The cost of writing programsc)The cost of compiling programsd)The cost of executing programse)The cost of Language implementation Systemf)The cost of poor reliabilityg)The cost of maintaining programs

2. List of language categories are

1.system language

2.Application language

3.Architectural language

System Languages

… best used to build operating systems, hardware drivers etc. Fast and gives you low level (close to the core) access to the computer. These languages are used when speed is critical.

These languages include:

C

C++

Assembler

Architectural Languages

… best used to build frameworks that support (make easy) application building. Not as fast (at run-time) as system level languages, but they provide a higher level of abstraction that makes writing software quicker and more productive.

These languages include:

Java

C#

Application languages:

Ruby

Python

3. Fortran was developed at IBM in the mid 1950s, and became the first widely used high-level general purpose programming language.

Italian language is the first language designed by international group

4. A token is small unit of a language.

token <= identifier | keyword | separator | operator | literal | comment

here

identifier=num

keyword=int

separator=semi colon

operator= -

literal numeric(int)

comments=line

5. Synthesized attributes:

A Synthesized attribute is an attribute of the nonterminal on the left-hand side of a production.

All of the attributes that we have used so far have been synthesized. Synthesized attributes represent information that is being passed up the parse tree.

Inherited attributes:

In general, attribute equations are allowed to define attributes of any of the nonterminals in a production, even those on the right-hand side.

An attribute of a nonterminal on the right-hand side of a production is called an inherited attribute.

6. The static semantics of a language is only indirectly related to the meaning of programs during execution; rather, it has to do with the legal forms of programs (syntax rather than semantics). Many static semantic rules of a language state its type constraints. Static semantics is so named because the analysis required checking these specifications can be done at compile time.

The dynamic semantics is the meaning, of expressions, statement, and program units. Because of the power of the naturalness of the available notation, describing syntax is a relatively simple matter. On the other hand, no universally accepted notation has been devised for dynamic semantics. The dynamic semantics approaches investigate how the interpretation of a natural language expression changes the context.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote