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

By Eric C.R. Hehner

Realizing programming and programming languages calls for wisdom of the underlying theoretical version. This booklet explores features of programming which are amenable to mathematical facts. the writer describes a programming idea that is a lot easier and extra complete than the present theories thus far. within the theoretical version, a specification is simply a boolean expression and refinement is simply a typical implication. the writer develops a realistic and vast strategy for writing unique standards and designing courses whose executions most likely fulfill the requirements. starting with preparatory fabric in good judgment, numbers, units, lists, capabilities and family, the e-book advances extra into software conception, the guts of the e-book. next chapters could be chosen or passed over in accordance with path emphasis. The textual content may be helpful to scholars in classes on programming technique or verification on the complicated undergraduate or starting graduate point, in addition to for software program engineers within the box. All technical phrases are defined after which confirmed within the e-book anywhere attainable. No complicated mathematical wisdom or programming language is believed. The publication comprises various routines and worked-out options for particular routines. Transparency masters and strategies for the rest routines can be found from the writer.

Show description

Read or Download A Practical Theory of Programming PDF

Best children's ebooks books

Sea Otters (Jane Goodall's Animal World)

An advent to sea otters, aquatic mammals that dwell within the north Pacific and barely come to land.

Jesse James (Legends of the Wild West)

Jesse James could be the most famed outlaw from the wild days of the outdated West. He begun his profession throughout the Civil struggle, as a part of a bunch of Southern-supporting guerrilla warring parties in his local Missouri. After the battle, James became his hand to crime, changing into one of many leaders of the recognized James-Younger Gang, with his brother Frank and one other set of brothers, the Youngers.

Just a Little Later with Eevo & Sim

A bit Later With Eevo and Sim is the continuation of as soon as Upon a Time lengthy, in the past, the adventures of Eevo and Sim. the tale is decided approximately 50,000 years in the past for the period of prehistoric guy. Their mom and dad, Shim and Dedu, have simply lower back from their lengthy journey to the Wetlands extended family, the previous domestic of Shim.

The Wind in the Willows (Oxford World’s Classics)

One of many best-known classics of kid's literature, a undying masterpiece and an essential portrait of an age, The Wind within the Willows begun initially in Kenneth Grahame's letters to his younger son, the place he first stated the adventures of Rat and Badger, of Mole and Toad--all narrated in virtuoso language starting from full of life parody to problematic fin-de-si�cle mysticism.

Additional info for A Practical Theory of Programming

Sample text

We complete the task by adding the remaining items (which means all of them) to the sum. s′ = ΣL ⇐ s:= 0. n:= 0. ) This theorem is easily proven by two applications of the Substitution Law. #L] . When we refine this new problem, we must ignore the context in which it arose; in particular, we ignore that s=0 ∧ n=0 . The new specification represents the problem when n items have been summed and the rest remain to be summed, for arbitrary n . One of the possible values for n is #L , which means that all items have been summed.

S. →S〉 x′′ y′′ ... →R〉 x′′ y′′ ... · (substitute x′′, y′′, ... for x′, y′, ... in S ) ∧ (substitute x′′, y′′, ... for x, y, ... in R ) 37 4 Program Theory Here's an example. In one integer variable x , the specification x′=x ∨ x′=x+1 says that the final value of x is either the same as the initial value or one greater. Let's compose it with itself. x′=x ∨ x′=x+1 . x′=x ∨ x′=x+1 = ∃x′′· (x′′=x ∨ x′′=x+1) ∧ (x′=x′′ ∨ x′=x′′+1) distribute ∧ over ∨ = ∃x′′· x′′=x ∧ x′=x′′ ∨ x′′=x+1 ∧ x′=x′′ ∨ x′′=x ∧ x′=x′′+1 ∨ x′′=x+1 ∧ x′=x′′+1 distribute ∃ over ∨ = (∃x′′· x′′=x ∧ x′=x′′) ∨ (∃x′′· x′′=x+1 ∧ x′=x′′) ∨ (∃x′′· x′′=x ∧ x′=x′′+1) ∨ (∃x′′· x′′=x+1 ∧ x′=x′′+1) One-Point, 4 times = x′=x ∨ x′=x+1 ∨ x′=x+2 If we either leave x alone or add 1 to it, and then again we either leave x alone or add 1 to it, the net result is that we either leave it alone, add 1 to it, or add 2 to it.

G} and the set brackets { } just make the parameter and argument into The power operator elements, as required, and the content operator ~ then removes the set structure. Here is a predicate whose parameter is a function. 10· even (f n)〉 Let us call this predicate check . 10 . When an argument for check is applied to the first 10 natural numbers, the results must be included in int because they will be tested for evenness. An argument for check may have a larger domain (extra domain elements will be ignored), and it may have a smaller range.

Download PDF sample

Rated 4.33 of 5 – based on 42 votes