Test 1 Flashcards

1
Q

List the five programming domains and give an example language for each

A

Scientific applications -Fortran Business applications -COBOL Artificial intelligence -L1SP Systems programming Web Software -Java

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List the four major language evaluation criteria.

A
  1. Readability
  2. Writability
  3. Reliability
  4. Cost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

the ease with which programs can be read and understood

A

Readability :l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

the ease with which a language can be used to create programs

A

Writability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

conformance to specifications (i.e., performs to its specifications)

A

Reliability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

the ultimate total cost

A

Cost

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List the four programming language categories

A

Imperative
Functional
Logic
Markup/programming hybrid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Programming domain : Large numbers of floating point computations use of arrays

A

Scientific applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Programming domain : Produce reports, use decimal numbers and characters

A

Buisness applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Programming domain : Symbols rather than numbers manipulateduse of linked lists

A

Artificial intelligence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Programming domain : Need efficiency because of continuous use

A

Systems programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Programming domain : Eclectic collection of languages markup (e.g., HTML ), scripting (e.g., PHP), general-purpose (e.g., Java)

A

Web software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • Central features are variables, assignment statements, and iteration
  • Include languages that support object-oriented programming
  • Include scripting languages
  • Include the visual languages
  • Examples C, Java, Perl, JavaScript , Visual BASIC .NET, C++
A

Imperative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • Main means of making computations is by applying functions to given parameters
  • Examples LISP, Scheme, ML , F#
A

Functional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  • Rule-based (rules are specified in no particular order )

- Example: Prolog

A

Logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • languages extended to support some programming

- Examples: JSTL, XSLT

A

Markup/programming hybrid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

the form or structure of the expressions , statements , and program units

A

Syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

the meaning of the expressions, statements, and program units

A

Semantics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

is a language that is used to describe another language .

A

metalanguage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

abstractions are used to represent classes of syntactic structures–they act like syntactic variables (also called nonterminal symbols, or just terminals )

A

BNF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

A grammar that generates a sentential form for which there are two or more parse trees can be said to be

A

Ambiguous grammars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

An unambiguous grammar will indicate the precedence levels of the operators

A

Precedence is introduced by adding new non terminal symbols .

Symbols with lowest precedence are cascaded closest to the start symbol .

23
Q

Because of minor inconveniences in BNF , there are a number of extended versions (________) . The extended versions do not enhance the descriptive power of BNF , they only increase its readability and writability .

A

EBNF

24
Q

Describing the Meanings of Programs: Dynamic Semantics

A

Operational Semantics
Denotational
Semantics Axiomatic Semantics

25
Q
  • Programmers need to know what statements mean
  • Compiler writers must know exactly what language constructs do.
  • Correctness proofs would be possible
  • Compiler generators would be possible
  • Designers could detect ambiguities and inconsistencies
A

Semantics

26
Q

Describe the meaning of a program by executing its statements on a machine , either simulated or actual . The change in the state of the machine ( memory , registers , etc.) defines the meaning of the statement

A

Operational semantics

27
Q

How can we specify tokens?

A
Formal Description 
State Diagram (aka finite automata)
28
Q
  • Recursive cent - a coded implementation

- LL parsers table driven implementation

A

Top-Down parsing

29
Q
  • Left recursion

- Pairwise disjointness

A

Top-Down parsing problems

30
Q

A manageable set of features and constructs Minimal feature multiplicity. Minimal operator overloading

A

Simplicity

31
Q

means that operations change just one thing without affecting others. The regarding sets as instruction set

A

orthogonality

32
Q

the existence of multiple ways of doing the same operation

A

feature multiplicity

33
Q

A set of relatively convenient ways of specifying operations. Strength and number of operators and predefined functions

A

Expressivity

34
Q

Testing for type errors

A

Type checking

35
Q

Intercept run-time errors and take corrective measures

A

Exception handling

36
Q

Presence of two or more distinct referencing methods for the same memory location

A

Aliasing

37
Q

This means C++ has the ability to provide the operators with a special meaning for a data type. For example, we can use a ‘+’ in a class String so that we can concatenate two strings by just using +

A

Operator overloading

38
Q

is based on the stored-program computer concept where instruction data and program data are stored in the same memory.

A

Von Neumann architecture

39
Q

object-oriented software development, led to new programming paradigms and by extension, new programming languages

A

Methodologies

40
Q

Program can be translated into machine language, which can be executed directly on computer. This method is called

Programs are interpreted by another program called an interpreter , with no translation . This method is called

implementation systems are compromise between compilers and pure interpreters, called

A

Compiler

Interpreter

Hybrid

41
Q

Reasons for studying concepts of programming languages:

A

Increased ability to express ideas

Improved background for choosing appropriate languages

Increased ability to learn new languages

Better understanding of significance of implementation

Better use of languages that are already known

42
Q

John backus in 1957. Numerical programming language.

John mcCarthy in 1958. Dwrives from list processor

US department of defense in late 1950s. Stands fot common buisness oriented language

John george kemeny and tom kurtzas as a teaching tool for undergraduates

Niklaus wirth in 1970. Names in honor of a french mathematician, philosopher and physicist.

A
Fortran
Lisp
Cobol
Basic
Pascal
43
Q

Developed at Bell Labs by Dennis Ritchie between 1972 and 1973

Bjarne Stroustrup at Bell Labs in 1979

Originated during online chat. Yukihiro “Matz” mid- 1990s in Japan

Suns microsystems. James gosling led a team if researchers in 1991

1989s by Guido van Rossuk at CWI in the netherlands

A
C
C++
Ruby
Java
Python
44
Q

device reads input strings over the alphabet of the language and decides whether the input strings belong to the language

A

Recognizers

45
Q

A device that generates sentences of a language. One can determine if the syntax of a particular sentence is syntactically correct by comparing it to the structure to itself

A

Generators

46
Q

are a formal approach to both describing and checking the correctness of static semantic rules of a program .

A

Attribute grammars

47
Q

Describe the meaning of a program by executing its statements on a machine , either simulated or actual. The change in the state of the machine ( memory , registers , etc.) defines the meaning of the statement

A

Operational semantics

48
Q

programming language is constructed by giving a domain of interpretation to each of the program -phrase categories together with semantic functions that compositionally describe the meaning of the phrase-forming constructs

A

denotational semantics

49
Q

is an approach based on mathematical logic for proving the correctness of computer programs.

A

Axiomatic semantics

50
Q

Identifies substrings of the source program that belong together

A

lexemes

51
Q

Lexemes match a character pattern , which is associated with a lexical category called a

A

token

52
Q

Given a sentential form, xAa, the parser must choose the correct A-rule to get the next sentential form in the leftmost derivation, using only the first token produced by A

A

Top-down Parsing

53
Q

Given a right sentential form, a, determine what substring of a is the right-hand side of the rule in the grammar that must be reduced to produce the previous sentential form in the right derivation

A

Bottom-up parsing

54
Q

is so named because it consists of a collection of subprograms , many of which are recursive, and it produces a parse tree in top- down order.

A

recursive-descent parser