PLC Test 1

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Reasons for Studying programming languages

(1) Increased capacity to express ideas. (2) Improved background for choosing appropriate languages. (3) Increased ability to learn new languages. (4) Better use of languages that are already known.

Augusta Ada Bryon

1815-1851, A mathematician and daughter of poet Lord Bryon. Regarded as the world's first programmer.

Konrad Zuse

1943, developed a language Plankalkul (Program calculus) to computer algorithms for his Z4 computer.

Objective-C

A hybrid language both imperative and object- orientated. Used to write the NeXTSTEP OS. Used by iOS developers. Inherited dynamic binding of messages from Smalltalk.

Python

A interpreted scripting language. Used for system administration, CGI programming, and other relatively small tasks. Has three kinds of data structures (lists, tuples 'immutable lists', and dictionaries). Is OOP and dynamically typed, has exception handling, and pattern-matching capabilities, provides garbage collection. Supports concurrency and network programming.Has support for functional programming more than other nonfunctional programming languages.

Expressivity

A language is expressive if it provides features that make it easier to perform common tasks.

Fortran 90 Standard

A list of Fortran features that were recommended for future removal.

Inheritance

A powerful concept that greatly enhances the potential to re-use existing software.

APL

A programming language. Has a number of powerful operators and a large collection of operators. Provides a large unit of operations on arrays. Difficult to read.

Operator Overloading

A single operator has more than one meaning. (Java + operator, and string concatenation)

Orthogonality

A small set of primitive constructs can be combined in a small number of ways, to build the language's control structures and data structures.

Dynamic Typing

A variable acquires a type when it is assigned a value, at which time is assumes the type of the value assigned.

Fortran IV

AKA Fortran 66, became one of the most widely used programming languages of its time. Added: explicit type declarations, a logical IF, and the ability to pass subprograms as parameters to other subprograms.

Ada 95

Added major features to the language.(1) Extended type derivation mechanism that supports inheritance and polymorphism. (2) Protected objects, which provide a more efficient way to share data among tasks.

ALGOL 60

Added: concepts of block structure, two different means of passing parameters to subprograms (pass by value, pass by name), procedures were allowed to be recursive, stack- dynamic arrays. However input and output statements were omitted.

Exception Handling

Allows a program to intercept run- time errors and take coercive action.

SIMULA 67

An extension of ALGOL 60. Add coroutines (subprograms that can be restarted from the place they were originally stopped), class constructs, and the concept of data abstraction.

PL/I

Attempted to combine the best parts of several existing programming languages: ALGOL 60 (recursion and block structure), Fortran IV (separate compilation with communication through global data), COBOL 60 (data structures, input/ output, and report generating facilities). Added: Concurrent executing tasks, 23 exception handling, procedures could be called recursively, pointers were included, cross section of arrays could be referenced.

Optimizer

Attempts to improve programs by making them smaller or faster.

Haskell

Based largely on Miranda, a purely functional language, having no variables or assignment statements. Uses lazy evaluation (no expression is evaluated until its value is required.)

C#

Based on C++ and Java. Designed to be used for component-based software development in the .NET framework. Includes some ideas from Delphi and Visual Basic. Compiled in an intermediate form (Intermediate language). JIT compiler translates IL into machine code before execution.

Java

Based on C++ but smaller, simpler, and more reliable. Has concurrent tasks (threads), removed: pointers, arithmetic expressions used as control expressions, stand-alone subprograms, multiple inheritance, structures, and unions. Has garbage collection.

F#

Based on OCaml, one of the .NET languages, supports both functional programming and imperative programming, fully OOP.

COBOL

Business language. Separated statements of the language into two categories- data description and executable statements. Added: DEFINE (macros), hierarchical data structures (records), use of long names (up to 30 chars) and word-connector chars. (dashes)

C with classes

C Language version added: (1) Derived classes. (2) Public/ private access control. (3) Constructor/ deconstructor. (4) Friend classes. (5) Parameter type checking. (6) Default parameters. (7) Overloading of assignment operator. (8) Friend classes.

C++

C language version added: (1) Virtual functions. (2) Function and operator overloading. (3) Reference types. (4) Multiple inheritance. (5) Abstract classes. (6) Templates. (7) Exception handling

Intermediate Code Generator

Checks programs for semantic errors. Translates program into an intermediate language (looks like Assembly)

Syntax Analyzer (parser)

Checks programs for syntax errors.

JavaScript

Code is embedded in HTML documents and interpreted by the browser when the documents are displayed. Primary used include form validation and dynamic creating and modifying HTML documents.

PHP

Code is interpreted on the web server when an HTML document in which it is embedded has requested by a browser. Often produces HTML code as output, which replaces the PHP code in the HTML document. Has dynamic strings and arrays, and dynamic typing. Did not originally support OOP.

Linker

Combines code from different modules that belong to the same program, includes code for calls to library routines, includes code for communication with the operating system.

Well- Definedness

Completeness and precision of the language's definition.

Logic Programming Language

Consists of a series of facts and rules.Use of formal logic notation to describe computational processes.

Type Operators

Consists of arrays and pointers.

Short Code

Consists of coded versions of mathematical expressions. Codes were byte- pair values, and most equations fit into one word. Was not translated into machine code was interpreted (automatic programming)

Primitive Types

Consists of int, float, double, char, string, boolean

ALGOL W

Contributed value result method of passing parameters and the case statement.

Scheme

Descendant of Lisp, used static scoping, treated functions as first class entities. Functions can be assigned to variables, passed as parameter. Small size, and simple syntax and semantics.

Common Lisp

Descendant of lisp, relatively large and complex. Has a large number of data types and structures, including records, arrays, complex numbers, and character strings. Attempted to combine several dialects of lisps into a single language.

Caml/ OCaml

Descendants of ML and Haskell, OCaml supports OOP.

SNOBOL

Designed for text processing. Has a collection of powerful operations for string pattern matching.

SIMULA I

Designed primarily as a simulation language.

awk

Developed by Bell Laboratories, began as a report- generation language but later became a more general purpose language.

Miranda

Developed by David Turner, based partly on ML.

Fortran 90

Dramatically different from Fortran 77, added dynamic arrays, records, pointers, a multiple selection statement, and modules, and recursive sub programs.

Portability

Ease of moving programs from one implementation to another.

ALGOL 68

Emphasized orthogonality. Primitive data types (int, boolean, rea;, char, and complex) could be used to construct arrays, structures, and unions. Introduced flex arrays, length of an array did not have to be specified.

Speedcoding

Extended machine language to include floating point operations. Included pseudo instructions for four arithmetic operations, mathematical functions such as square root, sin, arc tangent, exponent, and logarithm. Also included conditional and unconditional branches, and a automatically incremented address register.

sh

First UNIX shell language. Began as a small collection of operating system commands.

B

First high level language implemented under UNIX. An untyped language, all data are considered machine words

Smalltalk

First language to fully support OOP. (data abstraction, inheritance, polymorphism/ dynamic binding). Populated by nothing but objects, from integer constants to large complex software systems.

Fortran II

Fixed many of the bugs of Fortran I (compilation). Added independent compilation of sub routines. Programs could be reliably programmed over 400 lines.

Semantic Error

Forgetting to define a variable.

Fortran 77

Fortran that added character string handling, logical loop control statements, and an if with an optional else clause.

Lexical Analyzer

Gathers characters into lexical units (lexemes) and discards comments.

ALGOL 58

Generalized many of Fortran's features. Added: compound statements, identifiers to have any length, any number of array dimensions, lower bound of arrays to be specified by the programmer, selection statements to be nested.

Pure Functional Language

Has no variables and no assignment statements.

Feature Multiplicity

Having multiple ways to accomplish the same effect. (Java: count++, ++count, count +=1)

Fortran List Processing Language FLPL

IBM added list processing capabilities to Fortran.

Fortran

IBM, John Backus. Included: input/ output formatting, variables up to six characters, user-defined subroutines, if statement, and do loop.

Compilation

In which a program written in a source language is translated to machine language by a compiler.

C

Influenced by ALGOL 68. Originally designed for systems programming but is suitable for a variety of applications.

von Neumann Architecture

Instructions and data are stored in memory. Instructions are fetched from memory and executed by the CPU.

Lexical Error

Invalid keyword. (Java int mistyped to inw)

Pure Interpretation

Involves the direction of execution of a program by another program, called an interpreter.

Web Software

Java, JavaScript, PHP.

Prolog

Language that consists of two kinds of statements, facts and rules.

Pascal

Largest impact was on the teaching of programming. 1980s, most widely used introductory language.

Phases of a Compiler

Lexical analyzer, Syntax analyzer, intermediate code generator, optimizer, code generator.

Type Checking

Means to check for type errors, either during compilation or during program execution. (Compile time vs Run time)

Syntax Error

Missing curly brace.

Aliasing

Occurs when there are two or more names for the same memory location.

Information Processing Language IPL

One of the first AI programs, included list processing instructions.

Perl

Originally a combination of awk and sh. Has dynamic arrays that can have gaps in between elements. Has associative arrays (Hashes). Variables are implicitly declared. Powerful but somewhat dangerous.

BASIC

Originally only had 14 different statement types and a single data type, floating-point. Much design came from Fortran, with minor influences from ALGOL 60. First widely used language via terminal.

Lua

Portuguese for moon. Supports imperative and functional programming. Does not support OOP. Has one data structure, table (an associative array). Uses garbage collection for objects, is dynamically typed. Only has 21 reserve words. Compiled into intermediate code and later interpreted.

Alan Kay

Predicted the future availability of powerful computers that would be used by nonprogrammers. Such a computer would be highly interactive and use sophisticated graphics in its user interface.

MetaLanguage ML

Primarily a functional language, also supports imperative programming. Type of variables and expressions can be determined at compile time. Syntax resembles that of an imperative language.

FLOW-MATIC

Primary business language in the 1950s for UNIVAC computers.

Nonprocedural

Programs in a language that do not state exactly how a result is to be computed but rather describe the form and/ or its characteristics.

Functional Language

Provides only the ability to define functions and call them.

Ruby

Purely OOP. Classes and objects are dynamic. Methods can be dynamically added together. Dynamic typing is used. Scope of variable can be specified by its name (letter = local, $ = global, @ = instance variable. First programming language designed in Japan to enjoy widespread use in US.

Pure Lisp

Purely functional language. Only had two kinds of data structures (atoms, Lists). No assignment statements, no loops, only recursion. All computations are accomplished by applying functions to arguments.

Language Evaluation Criteria

Readability, Writabilitiy, Reliability, Cost. (Development of the software life cycle concept)

Business Applications

Requirements: Report generation; character data; decimal arithmetic. (COBOL)

Scientific Applications

Requirements: Simple data structures (arrays); large number of floating point calculations; efficiency. (Fortran, ALGOL 60)

Artificial Intelligence AI

Requirements: Symbol manipulation; linked lists; ability to create and execute code at run time. (Lisp, Scheme, Prolog)

Ada

Result of the most extensive and expensive language design effort undertaken. Contributions: (1) Packages provide a means for encapsulating data objects. (2) Specifications for data types and procedures. (3) Extensive facilities for exception handling. (4) Generic packages and subprograms. (5) Tasks can execute concurrently.

Plankalkul

Solved a wide variety of problems. Data Structures: a single bit, int, floating point, arrays, and records. Used two's complement and hidden bit scheme. Included for, fin command, and selection statement (no else clause).

von Neumann bottleneck

Speed of the connection between a computer's memory and its processor determines the speed of the computer.

Dynamic Storage Allocation

Storage is allocated to a variable only when it is assigned a value.

Generality

Suitability for a wide range of applications.

Abstraction

The ability to define and then use complicated structures or operations in ways that allows many of the details to be ignored.

Hybrid Implementation System

Translates a source program into an intermediate language, which is the interpreted.

Code Generator

Translates intermediate code to machine language.

ksh

UNIX shell language added variables, control flow statements, functions, and other capabilities.

JOVIAL

Used ALGOL 58 as a basis, official scientific language for the US Air Force for a quarter of a century.

Fortran 2003

Version of Fortran that added OOP, parameterized derived types, and procedure pointers.

Fortran 95

Version of Fortran that added the forall statement.

Fortran III

Version of Fortran that was never widely distributed.


Ensembles d'études connexes

Evolve: Maternity - Women's Health/Disorders

View Set

Insurance Pre-licensing : Chapter 4 quiz

View Set

Biology Week 1: Tragedy of the Commons

View Set

BA302 Chapter 4 Individual Attitudes and Behaviors

View Set

Chapter 9 Retirement Accounts Quiz Xcel Solutions

View Set

Music - Papa's got a Brand New Bag

View Set

8.2.7 Practice Questions Notebook Components

View Set

Module 1 - Le Guide alimentaire canadien

View Set