Questions/Review 1,2,3

0.0(0)
studied byStudied by 2 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/123

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:58 PM on 10/16/23
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

124 Terms

1
New cards

Define lexeme and token.

Formal descriptions of the syntax of programming languages, for simplicity's sake, often do not include descriptions of the lowest-level syntactic

units. These small units are called lexemes.

So, a token

of a language is a category of its lexemes. For example, an identifier is a token

that can have lexemes, or instances, such as sum and total.

2
New cards

How are programming languages formally defined?

Two distinct ways: by recognition and by generation

3
New cards

In which form is the programming language syntax commonly described?

by context-free grammars.

4
New cards

What is a metalanguage?

A language that is used to describe another language

5
New cards

What is a derivation in the context of grammar?

the sequence of rule application

6
New cards

What is an ambiguous grammar?

A grammar that generates a sentential form for which there are two or more distinct parse trees

7
New cards

What is a left-recursive grammar?

When a grammar rule has its LHS also appearing at the beginning of its RHS, the rule is said to be left recursive

8
New cards

Explain the use of meta symbols in EBNFs.

Notational tools and not terminal symbols in the syntactic entities they help describe . These include brackets, braces, and parentheses in the EBNF extensions.

9
New cards

What is the purpose of a predicate function?

States the static semantic rules of the language and associated with grammar rules.

10
New cards

When can the parse tree be called fully attributed?

If all the attribute values in the parse tree have been computed

11
New cards

How is the order of evaluation of attributes determined for the trees of a given attribute grammar?

With the construction of a dependency graph to show all attribute dependencies.

12
New cards

What is the use of intrinsic attributes?

Can be used to compute the remaining attribute values.

13
New cards

What is meant by decorating a parse tree?

The process of computing the attribute values of a parse tree.

14
New cards

Why can machine languages not be used to define statements in operational semantics?

First the individual steps in the execution of machine language and the resulting changes to the state of the machine are too small and too numerous. Second the storage of a real computer is too large and complex. There are usually several levels of memory devices, as well as connections to enumerable other computers and memory devices through networks.

15
New cards

Describe the two levels of uses of operational semantics.

At highest level, the interest is in the final result of the execution of a complete program. This is sometimes called natural operational semantics.

At lowest level, operational semantics can be used to determine the precise meaning of a program through an examination of the complete sequence of state changes that occur when the program is executed. This is sometimes called structural operational semantics

16
New cards

In denotational semantics, what are the syntactic and semantic domains?

The domain is called the syntactic domain, because it is syntactic structures that are mapped. The range is called the semantic domain.

17
New cards

What is stored in the state of a program for denotational semantics?

The values of all of the program's variables.

18
New cards

What is an assertion in axiomatic semantics?

Describes the constraints on the program variables at that point in the program.

19
New cards

What two things must be defined for each language entity in order to

construct a denotational description of the language?

Both a mathematical object and a function that maps instances of that language entity onto instances of the mathematical object.

20
New cards

Which part of an inference rule is the antecedent?

The top part of an inference rule.

21
New cards

What is the weakest precondition?

The least restrictive precondition that will guarantee the validity of the associated postcondition.

22
New cards

What is an inference rule?

A method of inferring the truth of one assertion on the basis of the values of other assertions.

23
New cards

Give an example of a logical pretest loop.

Msl and Mb, that map statement lists and states to states and Boolean expressions to Boolean values (or error), respectively.

24
New cards

On what branch of mathematics is denotational semantics based?

Recursive function theory.

25
New cards

What is the problem with using a software pure interpreter for operational semantics?

The detailed characteristics of the particular computer would make actions difficult to understand. Such a semantic definition would be machine-dependent.

26
New cards

Explain what the preconditions and postconditions of a given statement mean in axiomatic semantics.

An assertion before a statement (a precondition) states the relationships and constraints among variables that are true at that point in execution. An assertion following a statement is a postcondition.

27
New cards

What is the difference between total correctness and partial correctness with regard to loop termination?

Because of the difficulty of proving loop termination, that requirement

is often ignored. If loop termination can be shown, the axiomatic description

of the loop is called total correctness. If the other conditions can be met but

termination is not guaranteed, it is called partial correctness.

28
New cards

When is a function called a predicate transformer?

When it takes a predicate, or assertion, as a parameter and returns another predicate.

29
New cards

In what fundamental way do operational semantics and denotational semantics differ?

Unlike operational semantics, denotational semantics does not model the step- by-step computational processing of programs.

30
New cards

What is the meaning of Plankalkül? Who developed Plankalkül?

Plankalkul means program calculus. German scientist Konrad Zuse developed it.

31
New cards

What was the simplest data type in Plankalkül?

The single bit

32
New cards

How did Plankalkül implement iterations?

It included a statement Fin, which used a superscript to specify a jump out of a given number of iteration loop nesting or to the beginning of a new cycle of iteration

33
New cards

Speedcoding was invented to overcome two significant shortcomings of the computer hardware of the early 1950s. What were they?

The computer hardware of that age never supported floating point operations and they did not allow some sort of indexing to use arrays easily.

34
New cards

Why was the technique used by Short Code called automatic programming?

It clearly simplified the programming process, but at the expense of execution time.

35
New cards

In what year was IBM 704 introduced?

1954

36
New cards

Where was Fortran developed? By whom?

Fortran was developed by John Backus at IBM

37
New cards

Under what environmental constraints was Fortran developed?

Computers had small memories and were slow and relatively unreliable, the primary use of computers was for scientific computations, there were no existing efficient and effective ways to program computers, and because of the high cost of computers compared to the cost of programmers, speed of the generated object code was the primary goal of the first Fortran compilers.

38
New cards

How were data types specified for variables in Fortran I?

Variables whose names began with I, J, K, L, M, and N were implicitly integer type, and all others were implicitly floating-point.

39
New cards

What was the most significant feature added to Fortran II to get Fortran IV?

explicit type declarations for variables

40
New cards

What syntactic changes did Fortran 90 include?

the required fixed format of code, which required the use of specific character positions for specific parts of statements, was dropped and only the first letter of keywords and identifiers would be uppercase

41
New cards

Which version of Fortran was the first to support object-oriented programming?

Fortran 2003

42
New cards

Which version of Fortran was the first to have local scopes?

Fortran 2008

43
New cards

Why was Fortran list processing language (FLPL) designed and implemented as an extension to Fortran?

FLPL was designed as an extension to Fortran to enhance its capabilities and address the specific needs of the scientific and engineering communities, allowing for more versatile and expressive programming while maintaining compatibility and interoperability with existing Fortran codebases.

44
New cards

Where was Lisp developed? By whom?

At MIT by John McCarthy

45
New cards

In what ways do Scheme and metalanguage (ML) differ from each other?

ML does not use the parenthesized functional syntax that originated with lambda expressions.

46
New cards

What are the features of F# that make it unique?

Some of the key features that make F# unique include:

Functional-First Paradigm, Type Inference, Interoperability, Immutable by Default, Pattern Matching, Concurrency and Parallelism, Units of Measure, Type Providers, Scripting and REPL, Cross-Platform, and is Open Source

47
New cards

What are the goals of the new language developed by GAMM and ACM?

It can smoothly interoperate with any other .NET language, it supports both functional programming and procedural programming, and it also fully supports object-oriented programming.

48
New cards

In what version of ALGOL did the concept of data type appear?

ALGOL 58

49
New cards

What were the most important modifications made to ALGOL 58?

The concept of block structure was introduced. Two different means of passing parameters to subprograms were allowed. Procedures were allowed to be recursive, and stack-dynamic arrays were permitted.

50
New cards

What change did ALGOL provide regarding input and output statements?

ALGOL introduced formatted input and output, allowing programmers to specify data formatting. This made code more readable and improved error handling, influencing later languages.

51
New cards

On what programming language was COBOL based?

FLOW-MATIC

52
New cards

In what year did the Basic design process begin?

1959

53
New cards

How does COBOL allow variable names to be truly connotative?

COBOL allows variable names to be truly connotative by supporting descriptive names. These names can reflect the meaning and purpose of variables in a way that makes the code self-explanatory.

54
New cards

What organization was most responsible for the early success of COBOL (in terms of extent of use)?

the Department of Defense (DoD)

55
New cards

What were the objectives behind developing Basic?

It must be easy for nonscience students to learn and use, It must be "pleasant and friendly.", It must provide fast turnaround for homework, It must allow free and private access, and It must consider user time more important than computer time.

56
New cards

Why is Alan Cooper known as "the father of Visual Basic"?

Cooper's program, combined with Microsoft's QuickBASIC language, became Visual Basic

57
New cards

What facilities did PL/I provide?

PL/I provided versatile facilities, combining features of different languages, including support for data types, I/O operations, and system-level programming.

58
New cards

What are the two fundamental characteristics shared by APL and SNOBOL?

dynamic typing and dynamic storage allocation

59
New cards

What features of SIMULA 67 are now important parts of some object-oriented languages?

the concept of a class and data abstraction

60
New cards

What innovation of data structuring was introduced in ALGOL 68 but is often credited to Pascal?

User defined data structures

61
New cards

What was the primary deficiency of ALGOL 60?

Orthogonality

62
New cards

Which language was used for teaching programming in the 1970s?

Pascal

63
New cards

What operators in C were modeled on similar operators in ALGOL 68?

The assignment operator,

64
New cards

Why is C both liked and disliked?

because of its lack of complete type checking.

65
New cards

What is a procedural language?

one that uses sets of functions and commands to complete actions.

66
New cards

What are the two kinds of statements that populate a Prolog database?

Facts and Rules

67
New cards

What is the primary application area for which Ada was designed?

The Department of Defense (DoD)

68
New cards

What are the concurrent program units of Ada called?

Tasks

69
New cards

What are the different mechanisms in C that show that it was influenced by ALGOL 68?

C was influenced by ALGOL 68, and some mechanisms that reflect this influence include structured control statements, block structure, and pass-by-value parameters.

70
New cards

Why did Ada 95 lose its popularity?

Ada 95 lost popularity due to complexity and the dominance of other languages like C and C++.

71
New cards

What is the meaning of operator overloading in C++?

allows operators to have different implementations for different data types, making code more intuitive and readable.

72
New cards

What additional feature did the release 3.0 of C++ provide?

templates: enabling generic programming by defining functions and classes that work with different data types.

73
New cards

From what language does Objective-C borrow its syntax for method calls?

Smalltalk

74
New cards

What is the primary application for Objective-C?

Mac OS X and iOS

75
New cards

What do the Ada and COBOL languages have in common?

Both are high level languages, both support object oriented programming, future versions of these languages support the program written in these language, both are not good for beginners, and both are frequently used for the applications but not user friendly.

76
New cards

What are threads in Java?

lightweight sub-processes that allow for concurrent execution in a Java program. They can run tasks independently and efficiently, enabling parallelism and multitasking.

77
New cards

What characteristic of Java is most evident in JavaScript?

Format of syntax

78
New cards

How does the typing system of PHP and JavaScript differ from that of Java?

Java is a strongly typed language while JavaScript and PHP are dynamically typed.

79
New cards

What array structure is included in C# but not in C, C++, or Java?

Jagged arrays

80
New cards

What are the characteristics of Perl's arrays?

ordered, flexible data structures that can store both numeric and string values. They have dynamic sizes and can hold mixed data types. Arrays are zero-indexed, and elements can be easily added or removed, making them versatile for various programming tasks.

81
New cards

For what application area is JavaScript most widely used?

Web applications

82
New cards

What is the relationship between JavaScript and PHP, in terms of their use?

JavaScript and PHP are both scripting languages used for web programming, Js used in the browser while PHP is used on the server.

83
New cards

PHP's primary data structure is a combination of what two data structures from other languages?

JavaScript's array and Perl's hashes

84
New cards

What data structure does Python use in place of arrays?

list

85
New cards

What characteristic does Ruby share with Smalltalk?

They are both purely object oriented

86
New cards

What characteristic of Ruby's arithmetic operators makes them unique among those of other languages?

Arithmetic operators can be re-defined

87
New cards

What is the similarity between Lua and JavaScript?

both lightweight, high-level scripting languages. They share similarities in terms of their minimalistic design, simplicity, and ease of integration into other applications. Additionally, both support dynamic typing and are often embedded as scripting engines in software and games.

88
New cards

Is Lua normally compiled, purely interpreted, or impurely interpreted?

Impurely interpreted

89
New cards

What deficiency of the switch statement of C is addressed with the changes made by C# to that statement?

At the end of selectable blocks of code, break statement was not mandatory

90
New cards

What is the primary platform on which C# is used?

.NET

91
New cards

What are the inputs to an XSLT processor?

An XML data document and an XSLT document

92
New cards

What is the output of an XSLT processor?

XML format document, HTML, or plain text

93
New cards

What element of the JSTL is related to a subprogram?

XML action element

94
New cards

To what is a JSP document converted by a JSP processor?

A servlet

95
New cards

Where are servlets executed?

In web server systems

96
New cards

Why is it useful for a programmer to have the ability to learn new

languages, even though he or she may have a good knowledge of a

number of programming languages?

Different languages might have different features that they specialize in. Learning more languages will help you understand the concepts better and be able to simulate them in other languages if you need to.

97
New cards

Why is it essential to choose an appropriate programming language for a

specific software solution?

Languages contain some features that are unique to them. These unique features makes it easier implement specific software solutions.

98
New cards

Which programming language for scientific applications was the first to

be used successfully?

Fortran

99
New cards

Which is the first successful high-level programming language for business?

Cobol

100
New cards

In which programming language were most of the AI applications

developed prior to 1990?

Lisp

Explore top flashcards

Verbos en aleman
Updated 1056d ago
flashcards Flashcards (106)
SAT Vocabulary
Updated 288d ago
flashcards Flashcards (990)
UCSP Reviewer
Updated 691d ago
flashcards Flashcards (104)
Chi square
Updated 1183d ago
flashcards Flashcards (20)
Ap Lang Master list
Updated 107d ago
flashcards Flashcards (95)
Verbos en aleman
Updated 1056d ago
flashcards Flashcards (106)
SAT Vocabulary
Updated 288d ago
flashcards Flashcards (990)
UCSP Reviewer
Updated 691d ago
flashcards Flashcards (104)
Chi square
Updated 1183d ago
flashcards Flashcards (20)
Ap Lang Master list
Updated 107d ago
flashcards Flashcards (95)