By Eric C.R. Hehner

ISBN-10: 0387941061

ISBN-13: 9780387941066

ISBN-10: 3540941061

ISBN-13: 9783540941064

There are a number of theories of programming. the 1st usable conception, referred to as ''Hoare's Logic'', continues to be essentially the most well known. In it, a specification is a couple of predicates: a precondition and postcondition (these and all technical phrases could be outlined in due course). one other renowned and heavily similar idea by means of Dijkstra makes use of the weakest precondition predicate transformer, that is a functionality from courses and postconditions to preconditions. lones's Vienna improvement process has been used to virtue in a few industries; in it, a specification is a couple of predicates (as in Hoare's Logic), however the moment predicate is a relation. Temporal good judgment is one more formalism that introduces a few certain operators and quantifiers to explain a few facets of computation. the idea during this ebook is easier than any of these simply pointed out. In it, a specification is simply a boolean expression. Refinement is simply usual implication. This thought is usually extra common than these simply pointed out, utilizing to either terminating and nonterminating computation, to either sequential and parallel computation, to either stand-alone and interactive computation. And it comprises time bounds, either for set of rules category and for tightly restricted real-time functions

Show description

Read Online or Download A Practical Theory of Programming PDF

Similar programming languages books

Download e-book for iPad: Content Syndication with RSS by Ben Hammersley

Initially built by way of Netscape in 1999, RSS (which can stand for RDF web site precis, wealthy web site precis, or fairly uncomplicated Syndication) is an XML-based structure that permits net builders to explain and syndicate site content material. content material Syndication with RSS bargains webloggers, builders, and the programmers who aid them a radical rationalization of syndication generally and RSS specifically.

Get Deduction Systems PDF

The assumption of mechanizing deductive reasoning could be traced the entire as far back as Leibniz, who proposed the advance of a rational calculus for this objective. however it used to be now not till the looks of Frege's 1879 Begriffsschrift-"not in basic terms the direct ancestor of latest platforms of mathematical common sense, but in addition the ancestor of all formal languages, together with desktop programming languages" ([Dav83])-that the basic ideas of contemporary mathematical common sense have been constructed.

Tcl/Tk. A Developer's Guide by Clif Flynt (Auth.) PDF

''The most sensible machine programmers are astonishingly extra efficient than typical. One cause is they use solid instruments, they usually use them good. Clif Flynt's Tcl/Tk: A Developer's advisor, moment variation is helping you enhance your effectiveness as a developer in either one of those methods. Tcl is a software program language with a superb go back on investment—it achieves transportable, strong, inexpensive effects with nice financial system.

Download e-book for kindle: ActionScript Developer's Guide to Robotlegs: Building by Joel Hooks

Robotlegs is a standout one of the ActionScript three improvement frameworks on hand at the present time. With it, Flash, Flex, and AIR builders can create well-architected, testable, and versatile wealthy net functions - quick. This concise advisor indicates you the way the sunshine footprint and concentrated scope of this open resource framework not just solves your speedy coding difficulties, it is helping you achieve perception into AS3 structure on a miles deeper point.

Additional resources for A Practical Theory of Programming

Sample text

We also need a variable to serve as index in the list, saying how many items have been considered; let us take natural variable n for that. We must begin by assigning 0 to both s and n to indicate that we have summed zero items so far. 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 exact postcondition for P to be refined by S is ∀σ· P⇐S . For example, although x′>5 is not refined by x:= x+1 , we can calculate (in one integer variable) (the exact precondition for x′>5 to be refined by x:= x+1 ) = ∀x′· x′>5 ⇐ (x:= x+1) = ∀x′· x′>5 ⇐ x′=x+1 One-Point Law = x+1 > 5 = x>4 This means that a computation satisfying x:= x+1 will also satisfy x′>5 if and only if it starts with x>4 . If we are interested only in prestates such that x>4 , then we should weaken our problem with that antecedent, obtaining the refinement x>4 ⇒ x′>5 ⇐ x:= x+1 There is a similar story for postconditions.

Here are two examples. max = 〈x: xrat→〈y: xrat→if x≥y then x else y〉〉 min = 〈x: xrat→〈y: xrat→if x≤y then x else y〉〉 If we apply max to an argument we obtain a function of one variable, max 3 = 〈y: xrat→if 3≥y then 3 else y〉 which can be applied to an argument to obtain a number. max 3 5 = 5 A predicate is a function whose body is a boolean expression. Two examples are even = 〈i: int→i/2: int〉 odd = 〈i: int→¬ i/2: int〉 A relation is a function whose body is a predicate. Here is an example: divides = 〈n: nat+1→〈i: int→i/n: int〉〉 divides 2 = even divides 2 3 = ƒ One more operation on functions is selective union.

Download PDF sample

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

by Donald

Download e-book for iPad: A Practical Theory of Programming by Eric C.R. Hehner
Rated 4.26 of 5 – based on 6 votes
[an error occurred while processing the directive]