programming domains 1.scientific applications typically, scientific applications have simple data...

16
Programming Domains 1. Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point arithmetic computations. For some scientific applications where efficiency is the primary concern, like those that were common in the 1950’s and 1960’s, no subsequent language is significantly better than FORTRAN .

Upload: jack-glenn

Post on 14-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Programming Domains

1. Scientific Applications

Typically, scientific applications have simple data structures but require large numbers of floating-point arithmetic computations.

For some scientific applications where efficiency is the primary concern, like those that were common in the 1950’s and 1960’s, no subsequent language is significantly better than FORTRAN.

.

Page 2: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Programming Domains (con’d)Business Applications

The use of computers for business applications began in the 1950’s.

The first successful high-level language for business was COBOL which appeared in 1960.

Business languages are characterized, according to the needs of the application, by elaborate input and output facilities and decimal data types.

With the advent of microcomputers came new ways of businesses, especially small businesses, to use computers. Two specific tools, spreadsheet systems and database systems, were developed for business and now are widely used.

Page 3: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Programming Domains (con’d)

Artificial Intelligence

AI is a broad area of computer applications characterized by the absence of exact algorithms and the use of symbolic computations rather than numeric computation.

Symbolic computation means that symbols, consisting of names rather than numbers, are manipulated.

The first widely used programming language developed for AI applications was the functional language LISP (Scheme) which appeared in 1959.

An alternative approach to these applications appeared in the early 1970’s: logic programming using Prolog language

Page 4: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Programming Domains (con’d)Systems Programming Languages

The operating system and all of the programming support tools of a computer system are collectively known as its systems software.

Systems software is used almost continuously and therefore must have execution efficiency.

A language for this domain must have low-level features that allow the software to external devices to be written.

In the 1960’s and 1970’s, some computer manufacturers, such as IBM, Digital, and Burroughs (now UNISYS) developed special machine-oriented high level languages for systems software on their machines. For IBM mainframe computers, the language was PL/S, a dialect of PL/I; for Digital, it Is BLISS, a language at a level just above assembly language; for Burroughs, it was Extended Algol.

The UNIX operating system is written almost entirely in C, which was made it relatively easy to port, or move, to different machines.

Page 5: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Programming Domains (con’d)Very High-level Languages (VHLLs)

The languages in the category called very high-level have evolved slowly over the past 25 years.

The various scripting languages for UNIX are examples of VHLLs. A scripting language is one that is used by putting a list of commands, called script, in a file to be executed.

The first of these languages, named shell, began as a small collection of commands that were interpreted to be calls to system subprograms that performed utility functions, such as file management and simple file filtering.

Other VHLLs are awk, for report generation, tcl combined with tk, which provide a method of building X Windows applications. The perl is a combination of shell and awk.

Page 6: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Programming Domains (con’d)

• Special-Purpose Languages– A host of special-purpose languages have appeared

over the past 40 years.– They range from RPG, which is used to produce

business reports, to APT, which is used for instructing programmable machine tools, to GPSS, which is used for systems simulation.

Page 7: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Language Evaluation Criteria

• Readability

• Writability

• Reliability

• Cost

Page 8: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Readability• The ease with which programs can be read and understood.

• Overall Simplicity – A language that has a large number of basic components is more difficult to learn than one with a small number of basic componenets.

examples: Ccount = count + 1count += 1count++++count

• Orthogonality – in a programming language means that a relatively small set of primitive constructs can be combines in a relatively small number of ways to build the control and data structures of the language

– Orthogonality is closely related to simplicity. The more orthogonal the design of a language, the fewer exceptions the language rules require. Fewer exceptions means a higher degree of regularity in the design, which makes the language easier to learn.

Page 9: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Readability

• Control Structures. The structured programming revolution of the 1970s was a reaction to the poor readability caused by the limited control statements of some of the languages of the 1950s and 1960s. – Examples

• Goto statements vs Loops

Page 10: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Readability

• Data Types and Structures.– The presence of adequate facilities for

defining data types and data structures in a language is another significant aid to readability.

Page 11: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Readability

• Syntax Considerations– The syntax, or form, of the elements of a

language has a significant effect on the readability of programs.

– Examples:• Identifier Forms (length, case sensitivity)• Special Words (* & + %)• Form and Meaning (Appearance does not always

suggest their function?)

Page 12: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Writability

Writability is a measure of how easily a language can be used to create programs for a chosen problem domain.

Page 13: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Writability

• Simplicity and Orthogonality

• Support for Abstraction– Abstraction means the ability to define and

then use complicated structures or operations in ways that allow many of the details to be ignored.

– Process abstraction– Data abstraction

Page 14: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Writability

• Expressivity– Expressivity in a language means that there

are very powerful operators that allow a great dean of computation to be accomplished with a very small program.

Page 15: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Reliability

• Type checking– Type checking is simply testing for type errors

in a given program, either by the compiler or during program execution

• Exception Handling

• Aliasing

• Readability and Writability

Page 16: Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point

Cost

• The ultimate total cost of a programming language is a function of many of its characteristics.– Cost of training programmers– Cost of writing programs in the language– Cost of compiling programs– Cost of executing programs– Cost of compilers– Cost of poor reliability