Exam1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

a- Ada Lovelace b- Charles Babbage

The very first program was written in 1843 by [a], which was designed to execute on the theoretical hardware platform called the Analytical Engine, designed in 1842 by [b].

Syntax Analysis (Parsing)

Two Parts: - low-level: lexical analyzer, a finite automaton based on a regular grammar. - high-level: syntax analyzer, a push-down automaton PDA based on a context-free grammar, or BNF.

For what application area is JavaScript most widely used?

Web Programming

- Compilation - Pure Interpretation - Hybrid implementation

What are the three general methods of implementing a programming language?

- Simplicity, Orthogonality, Data Types, Syntax Design, Support for abstraction, Expresitivity

With respect to language evaluation criteria, select all language characteristics that affect writability.

-Simplicity, Orthogonality, Data types, Syntax designs

With respect to language evaluation critieria, select all language characteristics that affect readability.

Simplicity, Orthogonality, Data Types, Syntax Design, Support for abstraction, Expressivity, Type Checking, Exception Handling, Restricted aliasing

With respect to language evaluation critieria, select all language characteristics that affect reliability.

Ruby

Yukihiro Matsumoto

programming design methodologies

· Structured programming (Late 60's - early 70's) · Procedure-oriented programming (Late 70's - early 80's) · Data-oriented software development (Late 80's - present)- object-oriented design

Sort this list of Functional Programming Languages by the order of the year of their appearance/release.

1. Lisp 2. Scheme 3. ML 4. Miranda 5. Common LISP 6. Haskell 7. Scala 8. Clojure

preprocessor

A [p] is a program that processes a program immediately before the program is compiled.

Hybrid implementation

A compromised between compilers and pure interpreters. They translate high level language programs to an intermediate language designed to allow easy interpretation.

optimization

A simple trade-off can be made between compilation cost and execution speed of the compiled code. [x] is the name given to the collection of techniques that compilers may use to decrease the size and/or increase the execution speed of the code they produce.

Prolog

Alain Colmerauer, Phillippe Roussel, and Robert Kowalski

Smalltalk

Alan Kay

Plankalkul

First programming language, designed by Konrad Zuse

On what branch of mathematics is axiomatic semantics based?

Formal Logic

One of the greatest single advances in computing came with the introduction of the IBM [a] in 1954, in large measure because its capabilities prompted the development of [b].

Fortran/ 704

To avoid ambiguous

add more nonterminal

A grammar that generates a sentential form for which there are two or more distinct parse tree is said to be -------

ambiguous

natural operational semantics

at the highest level, the interest is in the final result of the execution of a complete program

Operational Semantics

describe the meaning of a statement or program by specifying the effects of running it on a machine

A rule is ------if its LHS appears in its RHS

recursive

The string of a language are called----

sentences or statements

nonterminal

the abstraction in a BNF description or grammar

PHP

Rasmus Lerdorf

On what branch of mathematics is denotational semantics based?

Recursive Function Theory

Go

Robert Griesemer, Rob Pike, and Ken Thompson

Ada Lovelace

She is considered to be the first computer programmer. She wrote a computer language for the Analytical Engine developed by Charles Babbage

COBOL

The first successful high-level language for business was [c]

Fortran (FORmula TRANslation)

The first successful high-level language for scientific applications was [f]

What two programming language deficiencies were discovered as a result of the research in software development in the 1970s?

The primary programming language deficiencies that were discovered were (a) incompleteness of type checking and (b) inadequacy of control statements (requiring the extensive use of gotos). [p.20]

features of Fortran 77

- an If with an optional Else clause - character string handling - logical loop control statements

Goals of parsers

- Find all syntax errors (i.e. violations of grammar rules) and for each error, produce an appropriate diagnostic message and recover quickly. - Generate the parse tree (or at least a trace of the parse tree), for the source code being analyzed.

Language Design Trade-Offs

- Reliability vs. cost of execution - Example: Java demands all references to array elements be checked for proper indexing, which leads to increased execution costs - Readability vs. writability - Example: APL provides many powerful operators (and a large number of new symbols), allowing complex computations to be written in a compact program but at the cost of poor readability Writability (flexibility) vs. reliability - Example: C++ pointers are powerful and very flexible but are unreliable

Programming Domain

- Scientific applications, business applications, artificial intelligence, systems programming, web software, embedded systems, 3D Graphics and Animation, Gaming

Reasons for studying concepts of programming languages

- increased capacity to express ideas - improved background for choosing appropriate languages - increased ability to learn new languages. better use of languages that are already known - overall advancement of computing.

Dynamic Semantics

- the meaning of the expressions, statements, and program units of a programming language - Operational Semantics, Denotational Semantics, Axiomatic Semantics

Most of the popular languages of the past 50 years have been designed around the prevalent computer architecture, called the ------, after one of its originators, John von Neumann. These languages are called ------- languages.

- von Neumann architecture - imperative

Structural Operational Semantics

At the 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

------is a natural notation for describing syntax

BNF = Backus Naur Form

Eiffel

Bertrand Meyer

C++

Bjarne Stroustrup

Object-C

Brad Cox and Tom Love

a.Loglan b.Klingon d.lojban e.Esperanto g.Na'vi

Constructed Language - be artificially created

C

Dennis Ritchie

The type of ------ (Leftmost vs. Rightmost) determines the order that nodes of a parse tree are built, i.e. which non-terminal symbol is expanded at each derivation step. It does not affect the ultimate shape of the parse tree. Derivation is not part of the grammar itself, it is a method that determines the order of grammar rules when executing a parse

Derivation

John Backus

Developed FORTRAN. Led to other programming languages. High-level programming language. - developed the speed coding

What is the primary use of attribute grammars?

Enforcing Type compatibility

Between 1951 and 1953, a team led by [a] at UNIVAC developed a series of "compiling" systems named A-0, A-1, and A-2 that expanded a pseudo-code into machine code subprograms in the same way as macros are expanded into assembly languag

Grace Hopper

Python

Guido van Rossum

Scheme

Guy L. Steele and Gerald Jay Sussman

Charles Babbage

He is known as the "Father of Computers." He developed the Difference Engine and the Analytical Engine. His ideas were later used to design calculators and computers.

byte code

Initial implementations of Java were all hybrid. Its intermediate form, called [b], provides portability to any machine that has an interpreter and an associated runtime system.

Java

James Gosling

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

Java-scripts arrays and Perl hashes

Fortran

John Backus

The first widely-used functional programming language (called [a]) was invented to provide language features for list processing, the need for which grew out of the first applications in the area of [b].

LISP / artificial intelligence

Two approaches to describing syntax.

Language Recognizers Language Generators

Perl

Larry Wall

John von Neumann

Most of the popular languages of the past 60 years have been designed around the prevalent computer architecture, called the von Neumann ​architecture.

Although never implemented, and not even published until 1972, the first high-level language, [a], was developed in Germnay between 1936 and 1945 by [b].

Plankalkul / Konrad Zuse

pure interpretation

Programs are interpreted by another program known as an interpreter Use: Small programs or when efficiency is not an issue

Reasons to Separate Lexical and Syntax Analysis

Simplicity, Efficiency, Portability

What language was the first to fully support object-oriented programming?

Smalltalk

LISP

Steve Russell, Timothy P. Hart, and Mike Levin

------ is a formal method to describe how to determine a statement's set membership in a language.

Syntax

Which one of the following features was NOT a feature of Fortran 77?

dynamic arrays

The execution of a machine code program on a von Neumann architecture computer occurs in a process called the [f] cycle.

fetch-execute

A ----- is a formal description of a Language. It must a have a finite set of rules.

grammar

What is the name of the category of programming languages whose structure is dictated by the von Neumann computer architecture?

imperative programming languages

Langauge categories

imperative, functional, logic, quantum, markup/programming hybrid

automatic programming

implemented with a pure interpreter

A ------ is characterized by the set of all valid statements (i.e. strings) in that language. The cardinality of this set is potentially infinite

language

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

lexemes

A------ is a language that is used to describe another language

metalanguage ex: Backus Naur form

"Pseudocode"

not the pseudocode in the contemporary sense - Short code - Speed coding

With respect to compilation, the syntax analyzer takes the lexical units from the lexical analyzer and uses them to construct hierarchical structures called [p].

parse tree

The logical expressions used in axiomatic semantics are called----

predicates or assertions

compilation

programs can be translated into machine language, which can be executed directly on the computer.

Donald Knuth

prominent computer scientist, "father of the analysis of algorithms", author of "The Art of Programming" and important multi-volume encyclopedia of algorithms - Autocode compiler for the Manchester Mark I computer.

IBM704 & Fortran

providing indexing and floating point instructions for hardware

What characteristic does Ruby share with Smalltalk?

pure object oriented language

In general, grammars can be formally utilized in two distinct ways: for ------ and for ------

recognition / generation

The type of ------ (Right recursive vs. Left recursive) determines the shape of the parse tree, i.e. recursion occurs on the left child node vs. the right child node. The type of Recursion is part of the structure of a grammar rule. A given rule is Left recursive or Right recursive regardless when that rule is applied in the order rules of a Derivation.

recursion

- A grammar is a generative device for defining languages. The sentences of the language are generated through a sequence of applications of the rules, beginning with a special nonterminal of the grammar called the ------. This sequence of rule applications is called -------

start symbol / a derivation

terminal

the lexemes and tokens rules

Denotational Semantics

the most rigorous and most widely know formal method for describing the meaning of programs

bottum up

the parse tree is built from the leaves upward to the root

top-down

the tree is built from the root downward to the leaves

A ----- of a language is a category of its lexemes

token

Two categories of parsers

top down and bottom up

The new software development methodologies that emerged as a result of the research of the 1970s were called--------

top-down design and stepwise refinement

What data structure(s) does Python use in place of arrays?

tuples, lists, dictionaries

The primary limiting factor in the speed of von Neumann architecture computers is called the [v]

von Neumann bottleneck


Set pelajaran terkait

Questions and Notes - Chapter 20

View Set

Google Analytics IQ Test, Google Analytics

View Set

The 7 Pillars of Servant Leadership

View Set

Measures of the Location of the Data

View Set