ch12 - Imperative Programming Chapter 12 12.1: What Makes a...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Imperative Programming Chapter 12
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12.1: What Makes a Language Imperative? Programs written in imperative programming languages consist of A program state Instructions that change the program state Program instructions are “imperative” in the grammatical sense of imperative verbs that express a command
Background image of page 2
Von Neumann Machines and Imperative Programming Commands in an imperative language are similar to the native machine instructions of traditional computer hardware – the von Neumann-Eckley model. John von Neumann: first person to document the basic concepts of stored program computers . Von Neumann was a famous Hungarian mathematician; came to US in 1930s & became interested in computers while participating in the development of the hydrogen bomb.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The “von Neumann” Computer A memory unit: able to store both data and instructions Random access Internally, data and instructions are stored in the same A calculating unit (the ALU) A control unit, (the CPU) Stored program → an instruction set Duality of instructions and data → programs can be self modifying Von Neumann outlined this structure in a document known as the “First Draft of a Report on the EDVAC” June, 1945
Background image of page 4
The von Neumann Computer – Historical Background Earlier computers had fixed programs: they were hardwired to do one thing. Sometimes external programs were implemented with paper tape or by setting switches. Eckert and Mauchly considered stored program computers as early as 1944 During WW II they designed & built the ENIAC (although for simplicity the stored program concept was not included at first)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The von Neumann Computer – Historical Background During WW II they designed & built the ENIAC (although for simplicity the stored program concept was not included at first) Later (with von Neumann), they worked on the EDVAC First stored program electronic computer: the Manchester ESSM (Baby) Victoria University of Manchester Executed its first program June 21, 1948 A number of other stored program machines were under development around this time
Background image of page 6
History of Imperative Languages First imperative languages: assembly languages 1954-1955: Fortran ( FOR mula TRAN slator) John Backus developed for IBM 704 Late 1950’s: Algol ( ALGO rithmic L anguage) 1958: Cobol ( CO mmon B usiness O riented L anguage) Developed by a government committee; Grace Hopper very influential.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Flowchart Used to model imperative programs Based on the three control statements that are essential to have Turing machine capability Precursor of UML and other modern techniques Originated to describe process flow in general
Background image of page 8
Formal Definition of Imperative Programming Languages are classified as imperative if they are Turing complete. Modern imperative languages generally include
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 56

ch12 - Imperative Programming Chapter 12 12.1: What Makes a...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online