Examen 2 Flashcards

1
Q

Reasons for studying Concepts of Programming Languages

A
  1. Increased ability to express ideas.
  2. Improved background for choosing appropiate languages.
  3. Increased ability to learn new languages.
  4. Better use of languages that are already known.
  5. Overall advancement of computing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Programming Domains

A
  1. Scientific applications (Fortran)
  2. Business applications (COBOL)
  3. Artificial Intelligence (LISP)
  4. Systems Programming (C)
  5. Web Software (HTML, PHP, JavaScript, Java)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Language Evaluation Criteria

A
  1. Readability - the ease with which programs can be read and understood.
  2. Writeability - the ease with which a language can be used to create programs.
  3. Reliability - conformance to specifications.
  4. Cost - the ultimate total cost.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Languages Categories

A
  1. Imperative - algorithm is specified in great detail, and specific order of execution of instructions or statements must be included. (C, Java, Perl, JavaScript, Visual BASIC .NET, C++)
  2. Functional - main means of making computations is by applying functions to given parameters. (LISP, Scheme, ML, F#)
  3. Logic - rule-based; no particular order. (Prolog)
  4. Markup/programming hybrid - markup languages extended to support some programming. Used to specify layout of information on web documents. (HTML, XML, JSTL, XSLT)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Implementation Methods

A
  1. Compilation - programs are translated into machine language. Very fast program execution once translation is complete. Large commercial applications.
  2. Pure Interpretation - programs are interpreted by another program known as an interpreter. Easy implementation of many source-level debugging operations. Small programs or when efficiency is not an issue.
  3. Hybrid Implementation Systems - a compromise between compilers and pure interpreters. Faster than pure interpretation. Small and medium systems when efficiency is not the first concern.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Programming Environments

A

A collection of tools used in software development. May consist of only a file system, a text editor, a linker, and a compiler. Or may include a large collection of integrated tools. (Visual Studio Code, Eclipse, Sublime, Xcode, Android Studios, PyCharm)

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

1843: The beginning of all

A

Ada Lovelace (often cited as first programmer) wrote the instructions for the analytical engine. Considered the first published algorithm specifically tailored for implementations on a computer.

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

1945: Zuse’s Plankalkul

A

First high-level programming language designed for a computer.

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

1949: Assembly Language

A

A type of low-level language. It mainly consist of instructions that only machines could understand.

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

1957: FORTRAN

A

FORTRAN is often credited with being the first compiled high-level language.

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

1958: ALGOL 60

A

ALGOL 60 was the result of efforts to design a universal language. It strongly influenced subsequent programming languages.

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

1959: COBOL

A

It has had little effect on the design of subsequent languages. Few have attempted to design a new language for business applications.
COBOL historical background - based on FLOW-MATIC.
Design goals: must look like simple English, easy to use, broaden the base of computer users. First language required by DoD.

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

1960: LISP

A

Interest in AI appeared in the mid-50’s. Investigation concluded that some methods must be developed to allow computers to process symbolic data in linked lists. Most computation was on numeric data in arrays.
Functional Programming: LISP - AI research needed a language to process data in lists rather than arrays, and symbolic computation rather than numeric.
LISP Evaluation - pioneered functional programming. No need for variables or assignment. Control via recursion and conditional expressions.

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

1964: BASIC

A

Design goals: easy to learn and use for non-science students. Must be pleasant and friendly, fast turnaround for homework, and free and private access. First widely used language with time sharing.

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

1971: PASCAL

A

Designed for teaching structured programming. Small, simple, nothing really new, largest impact was on teaching programming.

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

1972: C

A

It’s general-purpose, procedural programming language and the most popular programming language until now. Mother of almost all higher-level programming languages.

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

1972: SQL

A

Programming language for storing and processing information in a relational database.

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

1983: C++

A

Object-Oriented Programming. C++ is the fastest high-level programming language and one of the world’s most popular.

19
Q

1991: Python

A

Famous language among data scientists and analysts. Simpler syntax that allows fewer lines.

20
Q

1995: Java

A

Supports only OOP. Widely used for Web programming.

21
Q

2000: C#

A

Developed by Microsoft and runs on the .NET Framework. Mainly used for making games.

22
Q

Scripting Languages

A

Type of programming language that is interpreted rather than requiring compilation.

23
Q

Scripting Languages for Web

A
  1. JavaScript - Client-side HTML-embedded scripting language, often used to create dynamic HTML documents. Most popular web-programming language (It is related to Java only through similar syntax).
  2. PHP - Server-side HTML-embedded scripting language, often used for form processing and database access through the Web (scripts executed on server). Widely used, open source.
24
Q

Markup Languages

A

It’s a set of rules that defines how the layout and presentation of text and images should appear in a digital document. It isn’t a programming nor scripting language because it isn’t used to perform actions.
1. HTML - standard markup language for web pages. Describes the structure of a web page and it tells the web browser how to display the content.

25
Q

Markup Languages for Web

A
  1. XML - defines and stores data in a shareable manner.
  2. JSP - server-side programming technology that enables the creation of dynamic, platform-independent method for building Web-based applications.
26
Q

Syntax

A

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

27
Q

Semantics

A

The meaning of the expressions, statements, and program units.

28
Q

Sentence

A
  1. Is a string of characters over some alphabet.
  2. Is a sentential form that has only terminal symbols.
29
Q

Language

A

Is a set of sentences.

30
Q

Lexeme

A

Is the lowest level syntactic unit of a language.

31
Q

Recognizers

A

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

32
Q

Generators

A

A device that generates sentences of a language. Can determine if syntax of particular sentence is syntactically correct by comparing it to the structure fo the generator. (Example: BNF)

33
Q

Backus-Naur Form (BNF)

A

Is a natural notation for describing syntax (by John Backus). It is a metalanguage.

34
Q

Metalanguage

A

Language used to describe another language.

35
Q

Abstraction

A

Simplifies complex language rules into more manageable and understandable parts.

36
Q

Pointed Brackets

A

Are often used to delimit names of abstractions. The brackets mean that it can be expanded into something else.

37
Q

Left-hand side (LHS)

A

Abstraction to be defined.

38
Q

Right-hand side (RHS)

A

String of terminals and/or nonterminals, is the definition of the LHS.

39
Q

Terminals

A

Are lexemes or tokens, they cannot be simplified any longer.

40
Q

Nonterminals

A

Are often enclosed in angle brackets. Can be expanded into something else.

41
Q

Grammar

A

A finite non-empty set of rules that is a generative device for defining languages.

42
Q

Derivation

A

Is a repeated application of rules, staring with the start symbol and ending with a sentence (all terminal symbols).

43
Q

Leftmost Derivation

A

Is one in which the leftmost nonterminal in each sentential form is the one that is expanded.

44
Q

Parse Tree

A

A hierarchical representation of a derivation.