Read e-book online A Practical Theory of Programming PDF

By Eric C.R. Hehner

ISBN-10: 0387941061

ISBN-13: 9780387941066

Knowing programming and programming languages calls for wisdom of the underlying theoretical version. This publication explores facets of programming which are amenable to mathematical facts. the writer describes a programming conception that's a lot less complicated and extra finished than the present theories to this point. within the theoretical version, a specification is simply a boolean expression and refinement is simply a typical implication. the writer develops a pragmatic and vast approach for writing exact requisites and designing courses whose executions most likely fulfill the standards. starting with preparatory fabric in good judgment, numbers, units, lists, features and family members, the e-book advances additional into software idea, the center of the booklet. next chapters should be chosen or passed over in line with direction emphasis. The textual content should be worthwhile to scholars in classes on programming method or verification on the complex undergraduate or starting graduate point, in addition to for software program engineers within the box. All technical phrases are defined after which proven within the publication anywhere attainable. No complicated mathematical wisdom or programming language is thought. The e-book includes various workouts and worked-out suggestions for particular routines. Transparency masters and strategies for the remainder workouts can be found from the writer.

Show description

Read or Download A Practical Theory of Programming PDF

Best children's ebooks books

New PDF release: Colonial America 1543-1763 (Discovering U.S. History)

"Discovering U. S. historical past" spans the advanced and sundry historical past of the U.S. from prehistoric occasions to the current day. This new chronological set should be learn as an entire, supplying readers with a finished background, or as standalone volumes, with each one name serving as a time tablet of a selected period.

Read e-book online How Did That Get to My House? Music PDF

Describes how tune reaches your house, from recording, to garage to transmissions.

Dr. Andrew J Harding, Dr. James Chin's 50 Years of Malaysia. Federalism Revisited PDF

On sixteen September 1963 Malaysia got here into being with the accession of Sabah, Sarawak and Singapore to the present Federation of Malaya. This ebook marks the fiftieth anniversary of this striking occasion in South East Asia's heritage. the point of interest of the publication can be commonly at the event of Sabah and Sarawak as topics of the federation.

Extra info for A Practical Theory of Programming

Sample text

For example, we can translate the summation program to C as follows. void B (void) {if (n == sizeof(L)/sizeof(L[0])) ; else { s = s + L[n]; n = n+1; B( ); }} s = 0; n = 0; B( ); A call that is executed last in the solution of a refinement, as B is here, can be translated as just a branch (jump) machine instruction. Many compilers do a poor job of translating calls, so we might prefer to write “go to”, which will then be translated as a branch instruction. s = 0; n = 0; B: if (n == sizeof(L)/sizeof(L[0])) ; else { s = s + L[n]; n = n+1; goto B; } Most calls can be translated either as nothing (in-line), or as a branch, so we needn't worry about calls, even recursive calls, being inefficient.

X x′ x x′ x x′′ x′ x x′ 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 = ∃x′′· 2 2 2 = 2 2 2 2 . 2 2 3 3 3 3 3 3 3 3 3 :: :: :: 4 4 4 4 4 4 :: :: :: 5 5 5 :: :: :: We need to be clear on what is meant by (substitute x′′, y′′, ... for x′, y′, ... in S ) and (substitute x′′, y′′, ... for x, y, ... R . To begin with, you should not conclude that substitution is impossible since the names S and R do not mention any state variables; presumably S and R stand for, or are equated to, expressions that do mention some state variables.

R∨S = (P. R) ∨ (P. S) ∨ (Q. R) ∨ (Q. S) Distributive Law (if b then P else Q)∧R = if b then P∧R else Q∧R Functional-Imperative Law x:= if b then e else f = if b then x:= e else x:= f In the second Distributive Law, we can replace ∧ with any other boolean operator. We can even replace it with dependent composition with a restriction: If b is a boolean expression of the prestate (in unprimed variables), Distributive Law (if b then P else Q). R = if b then (P. R) else (Q. R) And finally, if e is any expression of the prestate (in unprimed variables), Substitution Law x:= e.

Download PDF sample

A Practical Theory of Programming by Eric C.R. Hehner


by Joseph
4.1

Rated 4.69 of 5 – based on 18 votes