Test 1 Flashcards
Why do we study programming languages?
- Increased ability to express idea
- Improved background for choosing appropriate languages
- Increased ability to learn new languages
- Better understanding of implementation
- Better use of known languages
- Overall advancement of computing
4 Properties of Programming Languages are?
- Syntax
- Names
- Types
- Semantics
The precise description of all its grammatically correct programs is called what?
Syntax
Variables, functions, parameters, classes, and objects are all examples of what in a programming language?
Names
Named entities are bound to what in a running program
- Scope
- Visibility
- Type
- Lifetime
A collection of values and a collection of operations on those values is called what?
Types
A language’s type system can help do what?
- Determine legal operations
- Detect type errors
The meaning of a program is called what?
Semantics
What programming languages is used for scientific applications
Fortran
What programming languages is used for business applications
COBOL
What programming languages is used for systems programming
C
What programming languages is used for artificial intelligence?
LISP
What programming languages is used for web software?
HTML, PHP, Java, Etc
A small instruction set and simple syntax fall into what of a good programming language
Simplicity and readability
a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data
structures is called what?
Orthogonality
A language element is bound to a property at the time that property is defined for it is an example of what
Clarity about binding
When a program behavior is the same under all conditions, this is known as what?
Reliability
How easily a language can be used to create programs is known as:
Writability
The ease with which programs can be moved from one implementation to another is:
Portability
The applicability to a wide range of applications is:
Generality
The completeness and precision of the language’s official definition is:
well-definedness
What architecture are languages primarily developed around?
Von Neumann Architecture
What type of languages are most dominant thanks to Von Neumann’s architecture?
Imperative
What are the four programming paradigms?
- Imperative
- Object-oriented
- Functional
- Logic
What is the old programming paradigm
Imperative programming
Give an example of an imperative programming language
Fortran, Cobol, C, Ada, Perl
What programming paradigm is a collection of objects that interact by passing messages that transform the state?
Object-Oriented
Give an example of an object-oriented language
Java, C++, C#, Python
What programming paradigm is defined by a collection of mathematical functions
Functional
Give an example of a functional language
Lisp, Scheme, ML, Haskell
What programming paradigm declares what the outcome of the program should be rather than how it should be accomplished
Logic Programming
What is an example of a logic programming language
Prolog
What is the compilation process
- Lexical analysis (lexical units)
- Syntax analys (parse trees)
- Semantic analysis (intermediate code)
- Code generation (machine code)
Give an example of a compiled language
Fortran, Cobol, C, C++
Give an example of an interpreted language
Scheme, Haskell, Python
Give an example of a hybrid language
The Java Virtual Machine
What was the first significantly widespread high level language
Fortran (very fast code)
What language is used in AI research
Lisp (data types of atoms and list)
what language pioneered functional programming
Lisp
What language came as a result of trying to design a universal language?
ALGOL
What language are all imperative languages now based on?
ALGOL
What language was first ever to be required by the DoD?
COBOL
What programming language was designed by Ken Iverson at IBM?
APL
What language was designed as a string manipulation language at Bell Labs by Farber
SNOBOL
What language was designed as a system simulation language in Norway by Nygaard and Dahl?
SIMULA 67
What language was named after Blaise Pascal and was designed for teaching structured programming?
Pascal
What language was designed for systems programming and had a powerful set of operators
C
What language was known as history’s largest design effort and contracted by the DoD?
Ada
What programming language was based on C and supported both procedural and OO programming?
C ++
What programming language eliminated many unsafe features of C++?
Java
A string of characters over some alphabet is known as a:
sentence
A set of sentences is known as a :
language
Languages can be formally defined in what two distinct ways?
Recognition and Generation
What type of grammar was meant to describe the syntax of natural languages?
Context-Free Grammars
Who invented Backus-Naur Form?
John Backus and Peter Naur
Grammar is considered ambiguous if what?
It generates a sentential form that comes from two or more distinct parse trees!
How do you denote optional parts of an EBNF?
with brackets( eg. if() [else]
How do you denote alternative parts of an EBNF?
with parentheses (showing an or relationship(