1 / 17

Ch .4 Software

Ch .4 Software. BIT 1003 - Presentation 6. Contents. GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES FUNCTIONAL LANGUAGES LANGUAGE DESIGN LANGUAGE SYNTAX AND SEMANTICS. GENERATIONS OF LANGUAGES.

liuz
Download Presentation

Ch .4 Software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch.4 Software BIT 1003- Presentation6

  2. Contents • GENERATIONS OF LANGUAGES • COMPILERS AND INTERPRETERS • VIRTUAL MACHINES • OBJECT-ORIENTED PROGRAMMING • SCRIPTING LANGUAGES • FUNCTIONAL LANGUAGES • LANGUAGE DESIGN • LANGUAGE SYNTAX AND SEMANTICS

  3. GENERATIONS OF LANGUAGES • Each computer is wired to perform certain operations in response to instructions. • An instruction is a patternof ones and zeros stored in a word of computer memory. • By the way, a “word” of memory is the basic unit ofstorage for a computer. A 16-bit computer has a word size of 16 bits, or two bytes. A 32-bit computer hasa word size of 32 bits, or four bytes. A 64-bit computer has a word size of 64 bits, or eight bytes. • When a computeraccesses memory, it usually stores or retrieves a word of information at a time.

  4. instruction set -architecture • Each computer is wired to interpret a finite set of instructions. • Most machines today have 75 to150 instructions in the machine “instruction set.” • Much of the “architecture” of a computer design isreflected in the instruction set, and the instruction sets for different architectures are different. • Forexample, the instruction set for the Intel Pentium computer is different from the instruction set for the Sun SPARC.

  5. Theearliestcomputers • Theywere programmed directly in the machineinstruction set. • The programmer worked with ones and zeros to code each instruction. • As an example,here is code (and an explanation of each instruction), for a particular 16-bit computer.

  6. Assemblylanguages • An early improvement in programming productivity was the assembler. • Assembly languages are called second-generation languages. • An assembler can read mnemonics(letters and numbers) for the machine instructions, and for each mnemonic generate the machine language in onesandzeros.

  7. These are typical of such mnemonics:

  8. FORTRAN • In 1954 the world saw the first third-generation language. • The language was FORTRAN, devised by JohnBackus of IBM. • FORTRAN stands for FORmulaTRANslation. • example: X = Y + Z

  9. procedurallanguage • FORTRAN is a “procedural language”. • The computer is a flexible tool, and the programmer’s job is to lay out thesequence of steps necessary to accomplish the task. • The program is like a recipe that the computer will followmechanically.

  10. LISP (forLIStProcessing) • In 1958, John McCarthy at MIT developed a very different type of language. • It is a particularly good language for workingwith lists of numbers, words, and objects, and it has been widely used in artificial intelligence (AI) work. • In mathematics, a function takes arguments and returns a value. • LISP works the same way, and LISP iscalleda “functionallanguage” • example: (+ 2 5)

  11. Cobol(COmmercialandBusiness-OrientedLanguage) • In 1959 a consortium of six computer manufacturers and three US government agencies released Cobol asthe computing language for business applications. • Cobol, likeFORTRAN, is an imperative, procedural language. • To make the code more self-documenting, Cobol was designedto be a remarkably “wordy” language. • The following line adds two numbers and stores the result in a third variable: ADD Y, Z GIVING X.

  12. PL/1 and BASIC • Both PL/1 and BASIC were introduced in 1964. • These, too, are procedural, imperative languages. • IBMdesigned PL/1 with the plan of “unifying” scientific and commercial programming. • PL/1 was part of the IBM360 project, and PL/1 was intended to supplant both FORTRAN and Cobol

  13. BASIC (Beginner’s All-purpose Symbolic Instruction Code) • BASIC was designed at Dartmouth by professors Kemeny and Kurtz as a simple language for beginners. • Over time, however, an almost countless number of variations of BASIC have been created, andsome are very rich in programming power. • Microsoft’s Visual Basic, for example, is a powerful language rich in modern features.

  14. C • Dennis Ritchie created the very influential third-generation language C in 1971. • C was developed as a languagewith which to write the operating system Unix, and the popularity of C and Unix rose together. • C is also animperative programming language. • An important part of C’s appeal is its ability to perform low-level manipulations,such as manipulations of individual bits, from a high-level language.

  15. Smalltalk • During the 1970s, the language Smalltalk popularized the ideas of object-oriented programming. • Object-orientedlanguages are another subcategory of imperative languages. • Both procedural and object-orientedlanguages are imperative languages. • The difference is that object-oriented languages support object-orientedprogramming practices such as inheritance, encapsulation, and polymorphism.

  16. C++ • In the mid-1980s, BjarneStroustrup, at Cambridge University in Britain, invented an object-orientedlanguage called C++. • C++ is a superset of C; any C program is also a C++ program. • C++ provides a full set ofobject-oriented features, and at one time was called “C with classes.”

  17. Java • The most popular object-oriented language today is Java, which was created by James Gosling and hiscolleagues at Sun Microsystems. • Java was released by Sun in 1994, and became an immediate hit due to itsappropriateness for web applications, its rich language library, and its hardware independence. • Java’s growth inuse among programmers has been unprecedented for a new language. • Today Java and C are the languages mostfrequently chosen for new work.

More Related